From 57db905f7c40b9d123148766285deaff2c68f5a7 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Thu, 14 Mar 2019 09:17:34 -0500 Subject: [PATCH] Zeus Actions - Fix config code breaking during build (#6864) * Zeus Actions - Fix config code breaking during build * Update addons/rearm/XEH_preInit.sqf Co-Authored-By: PabstMirror * formating, add note --- addons/interaction/ACE_ZeusActions.hpp | 2 +- addons/interaction/XEH_preInit.sqf | 7 +++++++ addons/rearm/ACE_ZeusActions.hpp | 8 +------- addons/rearm/XEH_preInit.sqf | 9 +++++++++ 4 files changed, 18 insertions(+), 8 deletions(-) diff --git a/addons/interaction/ACE_ZeusActions.hpp b/addons/interaction/ACE_ZeusActions.hpp index bdadfa5e63..9fad6c819a 100644 --- a/addons/interaction/ACE_ZeusActions.hpp +++ b/addons/interaction/ACE_ZeusActions.hpp @@ -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)); }; }; diff --git a/addons/interaction/XEH_preInit.sqf b/addons/interaction/XEH_preInit.sqf index b47cf6628d..dbc37e2bb6 100644 --- a/addons/interaction/XEH_preInit.sqf +++ b/addons/interaction/XEH_preInit.sqf @@ -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; diff --git a/addons/rearm/ACE_ZeusActions.hpp b/addons/rearm/ACE_ZeusActions.hpp index 89fd4a6537..2d05e34a4c 100644 --- a/addons/rearm/ACE_ZeusActions.hpp +++ b/addons/rearm/ACE_ZeusActions.hpp @@ -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)); }; }; }; diff --git a/addons/rearm/XEH_preInit.sqf b/addons/rearm/XEH_preInit.sqf index 9361d05015..10156a7d1c 100644 --- a/addons/rearm/XEH_preInit.sqf +++ b/addons/rearm/XEH_preInit.sqf @@ -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;