Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_WeaponAttachmentBayonetAttributes.c
Go to the documentation of this file.
2{
3 [Attribute("1", UIWidgets.CheckBox, "Treat this attachment as a bayonet with regards to animation and sound.")]
4 protected bool m_bIsBayonet;
5
6 [Attribute("1.0", UIWidgets.EditBox, "Damage Modifier. If this value is greater than 1.0, weapon damage is increased with this attachment.")]
8
9 [Attribute("1.0", UIWidgets.EditBox, "Range Modifier. Greater than 1 increases the range of the weapon.")]
11
12 [Attribute("1.0", UIWidgets.EditBox, "Precision modifier. Values between 0 and 1 make the attack more precise.")]
14
15 [Attribute("0.0", UIWidgets.EditBox, "Extra Obstruction length. Extra length for weapon obstruction test, in meters.")]
17
18 override bool ApplyModifiers(BaseWeaponStatsManagerComponent statsManager, int muzzleIndex, IEntity attachedEntity)
19 {
20 if (!statsManager.SetIsBayonet(attachedEntity, m_bIsBayonet))
21 return false;
22
23 if (!statsManager.SetExtraObstructionLength(attachedEntity, m_fExtraObstructionLength))
24 return false;
25
26 if (!statsManager.SetMeleeDamageFactor(attachedEntity, m_fDamageModificationFactor))
27 return false;
28
29 if (!statsManager.SetMeleeRangeFactor(attachedEntity, m_fRangeModificationFactor))
30 return false;
31
32 if (!statsManager.SetMeleeAccuracyFactor(attachedEntity, m_fPrecisionModificationFactor))
33 return false;
34
35 return true;
36 }
37
38 override void ClearModifiers(BaseWeaponStatsManagerComponent statsManager, int muzzleIndex, IEntity attachedEntity)
39 {
40 statsManager.ClearIsBayonet(attachedEntity);
41 statsManager.ClearExtraObstructionLength(attachedEntity);
42 statsManager.ClearMeleeDamageFactor(attachedEntity);
43 statsManager.ClearMeleeRangeFactor(attachedEntity);
44 statsManager.ClearMeleeAccuracyFactor(attachedEntity);
45 }
46}
override bool ApplyModifiers(BaseWeaponStatsManagerComponent statsManager, int muzzleIndex, IEntity attachedEntity)
override void ClearModifiers(BaseWeaponStatsManagerComponent statsManager, int muzzleIndex, IEntity attachedEntity)
SCR_FieldOfViewSettings Attribute