Skip to content

Commit

Permalink
Merge pull request #131 from johnb432/master
Browse files Browse the repository at this point in the history
Added more entrenching tool support (ACE)
  • Loading branch information
AdlerSalbei authored Sep 20, 2022
2 parents 1566d69 + 8c4cc8f commit fb8cbc1
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

params ["_trench", "_unit"];

if !("ACE_EntrenchingTool" in items _unit) exitWith {false};
if !([_unit] call ace_trenches_fnc_hasEntrenchingTool) exitWith {false};
if ((_trench getVariable ["ace_trenches_progress", 0]) >= 1) exitWith {false};

// Prevent removing/digging trench by more than one person
Expand Down
2 changes: 1 addition & 1 deletion addons/functions/functions/fnc_canDigTrench.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

params ["_unit", ["_trench", objNull]];

if !("ACE_EntrenchingTool" in items _unit) exitWith {false};
if !([_unit] call ace_trenches_fnc_hasEntrenchingTool) exitWith {false};

if (((getPosATL _unit) select 2) > 0.05) exitWith {false};

Expand Down
2 changes: 1 addition & 1 deletion addons/functions/functions/fnc_canHelpDiggingTrench.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

params ["_trench", "_unit"];

if !("ACE_EntrenchingTool" in items _unit) exitWith {false};
if !([_unit] call ace_trenches_fnc_hasEntrenchingTool) exitWith {false};
if ((_trench getVariable ["ace_trenches_progress", 0]) >= 1) exitWith {false};
if !(_trench getVariable ["ace_trenches_digging", false]) exitWith {false};
if (count (_trench getVariable [QGVAR(diggers), []]) < 1) exitWith {false};
Expand Down
7 changes: 3 additions & 4 deletions addons/functions/functions/fnc_canPlaceCamouflage.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@

params ["_trench", "_unit"];

private _statusNumber = _trench getVariable [QGVAR(trenchCamouflageStatus), 0];
private _statusString = "CamouflagePositions" + str (_statusNumber + 1);

if !(GVAR(allowCamouflage)) exitWith {false};
if (GVAR(camouflageRequireEntrenchmentTool) && {!("ACE_EntrenchingTool" in items _unit)}) exitWith {false};
if (GVAR(camouflageRequireEntrenchmentTool) && {!([_unit] call ace_trenches_fnc_hasEntrenchingTool)}) exitWith {false};

private _statusNumber = _trench getVariable [QGVAR(trenchCamouflageStatus), 0];
private _statusString = "CamouflagePositions" + str (_statusNumber + 1);
private _config = configOf _trench >> _statusString;

(isClass _config) &&
Expand Down
2 changes: 1 addition & 1 deletion addons/main/script_mod.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@

#define REQUIRED_VERSION 2.02
#define REQUIRED_CBA_VERSION { 3, 5, 0 }
#define REQUIRED_ACE_VERSION { 3, 11, 0 }
#define REQUIRED_ACE_VERSION { 3, 15, 1 }

0 comments on commit fb8cbc1

Please sign in to comment.