From 741c51c04cb24c0d957adac25e8bef71f66494d5 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Tue, 12 Mar 2019 16:27:28 -0500 Subject: [PATCH 1/3] Zeus Actions - Fix config code breaking during build --- addons/interaction/ACE_ZeusActions.hpp | 2 +- addons/interaction/XEH_preInit.sqf | 5 +++++ addons/rearm/ACE_ZeusActions.hpp | 8 +------- addons/rearm/XEH_preInit.sqf | 8 ++++++++ 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/addons/interaction/ACE_ZeusActions.hpp b/addons/interaction/ACE_ZeusActions.hpp index bdadfa5e63f..9fad6c819af 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 b47cf6628db..6b0c79e3ce3 100644 --- a/addons/interaction/XEH_preInit.sqf +++ b/addons/interaction/XEH_preInit.sqf @@ -6,4 +6,9 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; +DFUNC(repair_Statement) = { + TRACE_1("repairStatement",_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 89fd4a6537e..2d05e34a4c0 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 9361d05015e..367b97d24ed 100644 --- a/addons/rearm/XEH_preInit.sqf +++ b/addons/rearm/XEH_preInit.sqf @@ -8,4 +8,12 @@ PREP_RECOMPILE_END; #include "initSettings.sqf" +DFUNC(rearm_statement) = { + { + if (_x isKindOf 'AllVehicles' && {!(_x isKindOf 'Man')}) then { + [objNull, _x] call ace_rearm_fnc_rearmEntireVehicleSuccess; + }; + } forEach (curatorSelected select 0); +}; + ADDON = true; From 87907317c0dd9f8490205b3fd33b234af6e18feb Mon Sep 17 00:00:00 2001 From: commy2 Date: Wed, 13 Mar 2019 09:11:19 -0500 Subject: [PATCH 2/3] Update addons/rearm/XEH_preInit.sqf Co-Authored-By: PabstMirror --- addons/rearm/XEH_preInit.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/rearm/XEH_preInit.sqf b/addons/rearm/XEH_preInit.sqf index 367b97d24ed..321d2de1850 100644 --- a/addons/rearm/XEH_preInit.sqf +++ b/addons/rearm/XEH_preInit.sqf @@ -11,7 +11,7 @@ PREP_RECOMPILE_END; DFUNC(rearm_statement) = { { if (_x isKindOf 'AllVehicles' && {!(_x isKindOf 'Man')}) then { - [objNull, _x] call ace_rearm_fnc_rearmEntireVehicleSuccess; + [objNull, _x] call FUNC(rearmEntireVehicleSuccess); }; } forEach (curatorSelected select 0); }; From 96c28464ddb766abcf880610969bb88f145e8526 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Thu, 14 Mar 2019 09:10:08 -0500 Subject: [PATCH 3/3] formating, add note --- addons/interaction/XEH_preInit.sqf | 8 +++++--- addons/rearm/XEH_preInit.sqf | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/addons/interaction/XEH_preInit.sqf b/addons/interaction/XEH_preInit.sqf index 6b0c79e3ce3..dbc37e2bb68 100644 --- a/addons/interaction/XEH_preInit.sqf +++ b/addons/interaction/XEH_preInit.sqf @@ -6,9 +6,11 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; -DFUNC(repair_Statement) = { - TRACE_1("repairStatement",_this) - {if (_x isKindOf 'AllVehicles' && {!(_x isKindOf 'Man')}) then {_x setDamage 0}} forEach (curatorSelected select 0) +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/XEH_preInit.sqf b/addons/rearm/XEH_preInit.sqf index 321d2de1850..10156a7d1c0 100644 --- a/addons/rearm/XEH_preInit.sqf +++ b/addons/rearm/XEH_preInit.sqf @@ -8,7 +8,8 @@ PREP_RECOMPILE_END; #include "initSettings.sqf" -DFUNC(rearm_statement) = { +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);