Skip to content

Commit

Permalink
Zeus Actions - Fix config code breaking during build (#6864)
Browse files Browse the repository at this point in the history
* Zeus Actions - Fix config code breaking during build

* Update addons/rearm/XEH_preInit.sqf

Co-Authored-By: PabstMirror <pabstmirror@gmail.com>

* formating, add note
  • Loading branch information
PabstMirror authored Mar 14, 2019
1 parent 36aa0d1 commit 70a4b36
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion addons/interaction/ACE_ZeusActions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class ACE_ZeusActions {
displayName = "$STR_repair";
icon = "\A3\ui_f\data\igui\cfg\actions\repair_ca.paa";
condition = QUOTE(ZEUS_ACTION_CONDITION && {-1 < (curatorSelected select 0) findIf {_x isKindOf 'AllVehicles' && {!(_x isKindOf 'Man')}}});
statement = QUOTE({if (_x isKindOf 'AllVehicles' && {!(_x isKindOf 'Man')}) then {_x setDamage 0}} forEach (curatorSelected select 0));
statement = QUOTE(call FUNC(repair_Statement));
};
};

Expand Down
7 changes: 7 additions & 0 deletions addons/interaction/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,11 @@ PREP_RECOMPILE_START;
#include "XEH_PREP.hpp"
PREP_RECOMPILE_END;

DFUNC(repair_Statement) = { // moved from config because of build problems
TRACE_1("repair_Statement",_this);
{
if (_x isKindOf 'AllVehicles' && {!(_x isKindOf 'Man')}) then { _x setDamage 0; };
} forEach (curatorSelected select 0)
};

ADDON = true;
8 changes: 1 addition & 7 deletions addons/rearm/ACE_ZeusActions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,7 @@ class ACE_ZeusActions {
displayName = CSTRING(Rearm);
icon = QPATHTOF(ui\icon_rearm_interact.paa);
condition = QUOTE(ZEUS_ACTION_CONDITION && {-1 < (curatorSelected select 0) findIf {_x isKindOf 'AllVehicles' && {!(_x isKindOf 'Man')}}});
statement = QUOTE( \
{ \
if (_x isKindOf 'AllVehicles' && {!(_x isKindOf 'Man')}) then { \
[ARR_2(objNull,_x)] call ace_rearm_fnc_rearmEntireVehicleSuccess; \
}; \
} forEach (curatorSelected select 0); \
);
statement = QUOTE(call FUNC(rearm_statement));
};
};
};
9 changes: 9 additions & 0 deletions addons/rearm/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,13 @@ PREP_RECOMPILE_END;

#include "initSettings.sqf"

DFUNC(rearm_statement) = { // moved from config because of build problems
TRACE_1("rearm_statement",_this);
{
if (_x isKindOf 'AllVehicles' && {!(_x isKindOf 'Man')}) then {
[objNull, _x] call FUNC(rearmEntireVehicleSuccess);
};
} forEach (curatorSelected select 0);
};

ADDON = true;

0 comments on commit 70a4b36

Please sign in to comment.