Wire cutter - Allow use when unit has RHS Engineer UMBTS backpack (#6462)

* Allow wirecutter use when unit has RHS Engineer UMBTS backpack

* Move flag from code to config
This commit is contained in:
Dystopian 2018-07-27 20:26:26 +03:00 committed by PabstMirror
parent 4e0df9b90e
commit a44411c666
4 changed files with 14 additions and 3 deletions

View File

@ -60,7 +60,7 @@ if !(_unit call EFUNC(common,isSwimming)) then {
!isNull _fence !isNull _fence
&& {damage _fence < 1} && {damage _fence < 1}
&& {"ACE_wirecutter" in ([_player, false, true, true, true, false] call CBA_fnc_uniqueUnitItems)} && {HAS_WIRECUTTER(_player)}
}, },
["isNotSwimming"] ["isNotSwimming"]
] call EFUNC(common,progressBar); ] call EFUNC(common,progressBar);

View File

@ -24,7 +24,7 @@ params ["_interactionType"];
if ( if (
_interactionType != 0 _interactionType != 0
|| {vehicle ACE_player != ACE_player} || {vehicle ACE_player != ACE_player}
|| {!("ACE_wirecutter" in ([ACE_player, false, true, true, true, false] call CBA_fnc_uniqueUnitItems))} || {!HAS_WIRECUTTER(ACE_player)}
) exitWith {}; ) exitWith {};
TRACE_1("Starting wirecuter interact PFH",_interactionType); TRACE_1("Starting wirecuter interact PFH",_interactionType);
@ -53,7 +53,7 @@ TRACE_1("Starting wirecuter interact PFH",_interactionType);
!isNull _attachedFence !isNull _attachedFence
&& {damage _attachedFence < 1} && {damage _attachedFence < 1}
&& {"ACE_wirecutter" in ([_player, false, true, true, true, false] call CBA_fnc_uniqueUnitItems)} && {HAS_WIRECUTTER(_player)}
&& {[_player, _attachedFence, ["isNotSwimming"]] call EFUNC(common,canInteractWith)} && {[_player, _attachedFence, ["isNotSwimming"]] call EFUNC(common,canInteractWith)}
&& { && {
// Custom LOS check for fence // Custom LOS check for fence

View File

@ -56,3 +56,9 @@
#define SOUND_CLIP_TIME_SPACING 1.5 #define SOUND_CLIP_TIME_SPACING 1.5
#define CUT_TIME_DEFAULT 11 #define CUT_TIME_DEFAULT 11
#define CUT_TIME_ENGINEER 7.5 #define CUT_TIME_ENGINEER 7.5
#define HAS_WIRECUTTER(unit) (\
"ACE_wirecutter" in ([ARR_6(unit, false, true, true, true, false)] call CBA_fnc_uniqueUnitItems) \
|| {1 == getNumber (configFile >> "CfgVehicles" >> (backpack unit) >> QGVAR(hasWirecutter))} \
|| {1 == getNumber (configFile >> "CfgWeapons" >> (vest unit) >> QGVAR(hasWirecutter))} \
)

View File

@ -218,4 +218,9 @@ class CfgVehicles {
class OTR21_Base: Truck_F { class OTR21_Base: Truck_F {
EGVAR(refuel,fuelCapacity) = 500; EGVAR(refuel,fuelCapacity) = 500;
}; };
class rhs_assault_umbts;
class rhs_assault_umbts_engineer: rhs_assault_umbts {
EGVAR(logistics_wirecutter,hasWirecutter) = 1;
};
}; };