From e92fc856ee6485215b08ac055ea9d589df7ebd6a Mon Sep 17 00:00:00 2001 From: Dystopian Date: Thu, 14 Jan 2021 01:08:39 +0300 Subject: [PATCH 01/10] Add enable setting --- addons/repair/CfgActions.hpp | 9 --- addons/repair/CfgEden.hpp | 7 +- addons/repair/CfgVehicles.hpp | 68 ------------------- addons/repair/XEH_postInit.sqf | 63 ++++++++++++++++- addons/repair/XEH_preInit.sqf | 33 --------- addons/repair/config.cpp | 1 - .../repair/functions/fnc_addRepairActions.sqf | 2 +- .../functions/fnc_getPostRepairDamage.sqf | 2 +- .../functions/fnc_isInRepairFacility.sqf | 9 ++- .../repair/functions/fnc_isRepairVehicle.sqf | 9 ++- addons/repair/initSettings.sqf | 62 ++++++++++------- 11 files changed, 117 insertions(+), 148 deletions(-) delete mode 100644 addons/repair/CfgActions.hpp diff --git a/addons/repair/CfgActions.hpp b/addons/repair/CfgActions.hpp deleted file mode 100644 index 5dbd0ca7a60..00000000000 --- a/addons/repair/CfgActions.hpp +++ /dev/null @@ -1,9 +0,0 @@ -class CfgActions { - class None; - class Repair: None { - show = 0; - }; - class RepairVehicle: None { - show = 0; - }; -}; diff --git a/addons/repair/CfgEden.hpp b/addons/repair/CfgEden.hpp index 03614b3a2f1..a06457490ce 100644 --- a/addons/repair/CfgEden.hpp +++ b/addons/repair/CfgEden.hpp @@ -1,7 +1,8 @@ +#define VANILLA_ISREPAIRVEHICLE (if (getRepairCargo _this > 0) then {1} else {0}) #define GET_NUMBER(config,default) (if (isNumber (config)) then {getNumber (config)} else {default}) #define DEFAULT_ISENGINEER ([ARR_2(0,1)] select (_this getUnitTrait 'engineer')) -#define DEFAULT_ISREPAIRVEHICLE GET_NUMBER(configFile >> 'CfgVehicles' >> typeOf _this >> QQGVAR(canRepair),0) +#define DEFAULT_ISREPAIRVEHICLE GET_NUMBER(configFile >> 'CfgVehicles' >> typeOf _this >> QQGVAR(canRepair),VANILLA_ISREPAIRVEHICLE) class ctrlToolbox; @@ -69,7 +70,7 @@ class Cfg3DEN { property = QGVAR(editorLoadedTracks); control = "Edit"; expression = "_this setVariable ['%s',_value];"; - defaultValue = "[0,1] select (_this isKindOf 'Tank')"; // must match pre init script + defaultValue = "[0,1] select (_this isKindOf 'Tank')"; // must match post init script validate = "number"; condition = "objectHasInventoryCargo"; typeName = "NUMBER"; @@ -78,7 +79,7 @@ class Cfg3DEN { displayName = CSTRING(editorLoadedWheels); tooltip = CSTRING(editorLoadedWheels_tooltip); property = QGVAR(editorLoadedWheels); - defaultValue = "[0,1] select (_this isKindOf 'Car')"; // must match pre init script + defaultValue = "[0,1] select (_this isKindOf 'Car')"; // must match post init script }; }; }; diff --git a/addons/repair/CfgVehicles.hpp b/addons/repair/CfgVehicles.hpp index 9ed723e66a9..6e8b4dcd699 100644 --- a/addons/repair/CfgVehicles.hpp +++ b/addons/repair/CfgVehicles.hpp @@ -3,10 +3,6 @@ class ACE_MainActions { \ class GVAR(Repair) { \ displayName = CSTRING(Repair); \ - condition = "true"; \ - statement = ""; \ - runOnHover = 1; \ - showDisabled = 0; \ icon = "\A3\ui_f\data\igui\cfg\actions\repair_ca.paa"; \ distance = 4; \ exceptions[] = {"isNotSwimming", "isNotOnLadder"}; \ @@ -403,39 +399,10 @@ class CfgVehicles { editorPreview = QPATHTOF(data\preview_wheel.jpg); }; - // disable vanilla repair - // "getNumber (_x >> ""transportRepair"") > 0" configClasses (configFile >> "CfgVehicles") - class ReammoBox_F; - class Land_RepairDepot_01_base_F: ReammoBox_F { // TanksDLC - Repair Depo Thing - GVAR(canRepair) = 1; - transportRepair = 0; - }; - class Van_02_base_F; - class Van_02_service_base_F: Van_02_base_F { // OrangeDLC - GVAR(canRepair) = 1; - transportRepair = 0; - }; - - class Slingload_01_Base_F; - class B_Slingload_01_Repair_F: Slingload_01_Base_F { - GVAR(canRepair) = 1; - transportRepair = 0; - }; - class Helicopter_Base_H; class Heli_Transport_04_base_F: Helicopter_Base_H { GVAR(hitpointGroups)[] = { {"HitEngine", {"HitEngine1", "HitEngine2"}} }; }; - class O_Heli_Transport_04_repair_F: Heli_Transport_04_base_F { - GVAR(canRepair) = 1; - transportRepair = 0; - }; - - class Pod_Heli_Transport_04_base_F; - class Land_Pod_Heli_Transport_04_repair_F: Pod_Heli_Transport_04_base_F { - GVAR(canRepair) = 1; - transportRepair = 0; - }; class Heli_Transport_02_base_F; class I_Heli_Transport_02_F: Heli_Transport_02_base_F { @@ -448,41 +415,10 @@ class CfgVehicles { }; class B_APC_Tracked_01_base_F; - class B_APC_Tracked_01_CRV_F: B_APC_Tracked_01_base_F { - GVAR(canRepair) = 1; - transportRepair = 0; - }; - class B_APC_Tracked_01_AA_F: B_APC_Tracked_01_base_F { GVAR(hitpointPositions)[] = {{"HitTurret", {0,-2,0}}}; }; - class Offroad_01_base_F; - class Offroad_01_repair_base_F: Offroad_01_base_F { - GVAR(canRepair) = 1; - transportRepair = 0; - }; - - class B_Truck_01_mover_F; - class B_Truck_01_Repair_F: B_Truck_01_mover_F { - GVAR(canRepair) = 1; - transportRepair = 0; - }; - - class B_Truck_01_fuel_F: B_Truck_01_mover_F { // the fuel hemet apparently can repair. GJ BI - transportRepair = 0; - }; - - class Truck_02_base_F; - class Truck_02_box_base_F: Truck_02_base_F { - GVAR(canRepair) = 1; - transportRepair = 0; - }; - - class Truck_02_medical_base_F: Truck_02_box_base_F { - GVAR(canRepair) = 0; - }; - class Car_F: Car { class HitPoints; }; @@ -502,10 +438,6 @@ class CfgVehicles { }; }; }; - class O_Truck_03_repair_F: Truck_03_base_F { - GVAR(canRepair) = 1; - transportRepair = 0; - }; class Quadbike_01_base_F: Car_F { GVAR(hitpointPositions)[] = { {"HitEngine", {0, 0.5, -0.7}}, {"HitFuel", {0, 0, -0.5}} }; diff --git a/addons/repair/XEH_postInit.sqf b/addons/repair/XEH_postInit.sqf index 2cbbd8c3e1d..1a6302aae88 100644 --- a/addons/repair/XEH_postInit.sqf +++ b/addons/repair/XEH_postInit.sqf @@ -1,9 +1,9 @@ #include "script_component.hpp" +if !GVAR(enabled) exitWith {}; + [QGVAR(setVehicleDamage), {_this call FUNC(setDamage)}] call CBA_fnc_addEventHandler; [QGVAR(setVehicleHitPointDamage), {_this call FUNC(setHitPointDamage)}] call CBA_fnc_addEventHandler; - -// wheels [QGVAR(setWheelHitPointDamage), { params ["_object", "_hitPoint", "_damage"]; private _damageDisabled = !isDamageAllowed _object; @@ -18,3 +18,62 @@ _object allowDamage false; }; }] call CBA_fnc_addEventHandler; + + +// placed in editor static objects don't trigger init +{ + if (local _x && {getRepairCargo _x > 0}) then { + _x setRepairCargo 0; + }; +} forEach allMissionObjects "Static"; + +["All", "InitPost", { + params ["_vehicle"]; + if (local _vehicle && {getRepairCargo _vehicle > 0}) then { + _vehicle setRepairCargo 0; + }; +}, true, ["Man"], true] call CBA_fnc_addClassEventHandler; + +["CAManBase", "InitPost", { + params ["_unit"]; + if (local _unit && {_unit getUnitTrait "engineer"}) then { + _unit setUnitTrait ["engineer", false]; + if (-1 isEqualTo (_unit getVariable ["ACE_IsEngineer", -1])) then { + _unit setVariable ["ACE_IsEngineer", true, true]; + }; + }; +}, true, [], true] call CBA_fnc_addClassEventHandler; + + +["ACE_RepairItem_Base", "killed", { + params ["_object"]; + + [{deleteVehicle _this}, _object, 5] call CBA_fnc_waitAndExecute; +}, true, [], true] call CBA_fnc_addClassEventHandler; + +// load tracks and wheels +if (isServer) then { + private _fnc_addSpareItems = { + if (!GVAR(addSpareParts)) exitWith {}; + params ["_vehicle"]; + + private _spareTracks = _vehicle getVariable QGVAR(editorLoadedTracks); + if (isNil "_spareTracks") then { + _spareTracks = [0, 1] select (_vehicle isKindOf "Tank"); // must match eden attribute default + }; + if (_spareTracks > 0) then { + [_vehicle, _spareTracks, "ACE_Track"] call FUNC(addSpareParts); + }; + + private _spareWheels = _vehicle getVariable QGVAR(editorLoadedWheels); + if (isNil "_spareWheels") then { + _spareWheels = [0, 1] select (_vehicle isKindOf "Car"); // must match eden attribute default + }; + if (_spareWheels > 0) then { + [_vehicle, _spareWheels, "ACE_Wheel"] call FUNC(addSpareParts); + }; + }; + + ["Tank", "initPost", _fnc_addSpareItems, true, [], true] call CBA_fnc_addClassEventHandler; + ["Car", "initPost", _fnc_addSpareItems, true, [], true] call CBA_fnc_addClassEventHandler; +}; diff --git a/addons/repair/XEH_preInit.sqf b/addons/repair/XEH_preInit.sqf index 216a16fcf72..9361d05015e 100644 --- a/addons/repair/XEH_preInit.sqf +++ b/addons/repair/XEH_preInit.sqf @@ -8,37 +8,4 @@ PREP_RECOMPILE_END; #include "initSettings.sqf" -["ACE_RepairItem_Base", "killed", { - params ["_object"]; - - [{deleteVehicle _this}, _object, 5] call CBA_fnc_waitAndExecute; -}] call CBA_fnc_addClassEventHandler; - -// load tracks and wheels -if (isServer) then { - private _fnc_addSpareItems = { - if (!GVAR(addSpareParts)) exitWith {}; - params ["_vehicle"]; - - private _spareTracks = _vehicle getVariable QGVAR(editorLoadedTracks); - if (isNil "_spareTracks") then { - _spareTracks = [0, 1] select (_vehicle isKindOf "Tank"); // must match eden attribute default - }; - if (_spareTracks > 0) then { - [_vehicle, _spareTracks, "ACE_Track"] call FUNC(addSpareParts); - }; - - private _spareWheels = _vehicle getVariable QGVAR(editorLoadedWheels); - if (isNil "_spareWheels") then { - _spareWheels = [0, 1] select (_vehicle isKindOf "Car"); // must match eden attribute default - }; - if (_spareWheels > 0) then { - [_vehicle, _spareWheels, "ACE_Wheel"] call FUNC(addSpareParts); - }; - }; - - ["Tank", "initPost", _fnc_addSpareItems] call CBA_fnc_addClassEventHandler; - ["Car", "initPost", _fnc_addSpareItems] call CBA_fnc_addClassEventHandler; -}; - ADDON = true; diff --git a/addons/repair/config.cpp b/addons/repair/config.cpp index 1dbe9b46b1c..05ee4bac015 100644 --- a/addons/repair/config.cpp +++ b/addons/repair/config.cpp @@ -16,7 +16,6 @@ class CfgPatches { #include "ACE_Repair.hpp" #include "ACE_Settings.hpp" -#include "CfgActions.hpp" #include "CfgEden.hpp" #include "CfgEventHandlers.hpp" #include "CfgMoves.hpp" diff --git a/addons/repair/functions/fnc_addRepairActions.sqf b/addons/repair/functions/fnc_addRepairActions.sqf index 96eff28d4af..fbf95416bc9 100644 --- a/addons/repair/functions/fnc_addRepairActions.sqf +++ b/addons/repair/functions/fnc_addRepairActions.sqf @@ -15,7 +15,7 @@ * Public: No */ -if (!hasInterface) exitWith {}; +if (!hasInterface || !GVAR(enabled)) exitWith {}; params ["_vehicle"]; private _type = typeOf _vehicle; diff --git a/addons/repair/functions/fnc_getPostRepairDamage.sqf b/addons/repair/functions/fnc_getPostRepairDamage.sqf index d8ed7d38046..5beb12dcb4a 100644 --- a/addons/repair/functions/fnc_getPostRepairDamage.sqf +++ b/addons/repair/functions/fnc_getPostRepairDamage.sqf @@ -7,7 +7,7 @@ * 0: Unit that does the repairing * * Return Value: - * 0: Rpair Damage Threshold + * 0: Repair Damage Threshold * * Example: * [unit] call ace_repair_fnc_getPostRepairDamage diff --git a/addons/repair/functions/fnc_isInRepairFacility.sqf b/addons/repair/functions/fnc_isInRepairFacility.sqf index dcbd141fb77..bcc217dda17 100644 --- a/addons/repair/functions/fnc_isInRepairFacility.sqf +++ b/addons/repair/functions/fnc_isInRepairFacility.sqf @@ -10,7 +10,7 @@ * Is inside a repair facility * * Example: - * [unit] call ace_repair_fnc_isInRepairFacility + * player call ace_repair_fnc_isInRepairFacility * * Public: Yes */ @@ -22,8 +22,13 @@ private _position = getPosASL _object; private _isInBuilding = false; private _checkObject = { + private _config = configFile >> "CfgVehicles" >> typeOf _x; + private _canRepair = getNumber (_config >> QGVAR(canRepair)); + if (_canRepair == 0) then { + _canRepair = getNumber (_config >> "transportRepair"); + }; if ( - _x getVariable ["ACE_isRepairFacility", getNumber (configFile >> "CfgVehicles" >> typeOf _x >> QGVAR(canRepair))] > 0 + _x getVariable ["ACE_isRepairFacility", _canRepair > 0] in [1, true] // can be integer or boolean && {!(_x isKindOf "AllVehicles")} // check if it's not repair vehicle && {alive _x} ) exitWith { diff --git a/addons/repair/functions/fnc_isRepairVehicle.sqf b/addons/repair/functions/fnc_isRepairVehicle.sqf index 6e7ddcab27f..cbae645bca8 100644 --- a/addons/repair/functions/fnc_isRepairVehicle.sqf +++ b/addons/repair/functions/fnc_isRepairVehicle.sqf @@ -10,7 +10,7 @@ * Is engineering vehicle * * Example: - * [vehicle] call ace_repair_fnc_isRepairVehicle + * cursorObject call ace_repair_fnc_isRepairVehicle * * Public: Yes */ @@ -20,6 +20,11 @@ TRACE_1("params",_vehicle); if (_vehicle isKindOf "CAManBase") exitWith {false}; +private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _canRepair = getNumber (_config >> QGVAR(canRepair)); +if (_canRepair == 0) then { + _canRepair = getNumber (_config >> "transportRepair"); +}; // Value can be integer or boolean -private _value = _vehicle getVariable ["ACE_isRepairVehicle", getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> QGVAR(canRepair))]; +private _value = _vehicle getVariable ["ACE_isRepairVehicle", _canRepair > 0]; _value in [1, true] // return diff --git a/addons/repair/initSettings.sqf b/addons/repair/initSettings.sqf index 38e9e19e970..58804b6ae75 100644 --- a/addons/repair/initSettings.sqf +++ b/addons/repair/initSettings.sqf @@ -1,117 +1,127 @@ +[ + QGVAR(enabled), "CHECKBOX", + ELSTRING(common,Enabled), + [LELSTRING(OptionsMenu,CategoryLogistics), "str_state_repair"], + true, + true, + {[QGVAR(enabled), _this] call EFUNC(common,cbaSettings_settingChanged)}, + true +] call CBA_fnc_addSetting; + [ QGVAR(displayTextOnRepair), "CHECKBOX", [LSTRING(SettingDisplayTextName), LSTRING(SettingDisplayTextDesc)], - [localize ELSTRING(OptionsMenu,CategoryLogistics), localize "str_state_repair"], + [LELSTRING(OptionsMenu,CategoryLogistics), "str_state_repair"], true, // default value false, // isGlobal {[QGVAR(displayTextOnRepair), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(engineerSetting_repair), "LIST", [LSTRING(engineerSetting_Repair_name), LSTRING(engineerSetting_Repair_description)], - [localize ELSTRING(OptionsMenu,CategoryLogistics), localize "str_state_repair"], + [LELSTRING(OptionsMenu,CategoryLogistics), "str_state_repair"], [[0,1,2],[LSTRING(engineerSetting_anyone), LSTRING(engineerSetting_EngineerOnly), LSTRING(engineerSetting_AdvancedOnly)],1], // [values, titles, defaultIndex] true, // isGlobal {[QGVAR(engineerSetting_repair), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(engineerSetting_wheel), "LIST", [LSTRING(engineerSetting_Wheel_name), LSTRING(engineerSetting_Wheel_description)], - [localize ELSTRING(OptionsMenu,CategoryLogistics), localize "str_state_repair"], + [LELSTRING(OptionsMenu,CategoryLogistics), "str_state_repair"], [[0,1,2],[LSTRING(engineerSetting_anyone), LSTRING(engineerSetting_EngineerOnly), LSTRING(engineerSetting_AdvancedOnly)],0], // [values, titles, defaultIndex] true, // isGlobal {[QGVAR(engineerSetting_wheel), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(repairDamageThreshold), "SLIDER", [LSTRING(repairDamageThreshold_name), LSTRING(repairDamageThreshold_description)], - [localize ELSTRING(OptionsMenu,CategoryLogistics), localize "str_state_repair"], + [LELSTRING(OptionsMenu,CategoryLogistics), "str_state_repair"], [0,1,0.6,2], // [min, max, default value, trailing decimals (-1 for whole numbers only)] true, // isGlobal {[QGVAR(repairDamageThreshold), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(repairDamageThreshold_engineer), "SLIDER", [LSTRING(repairDamageThreshold_Engineer_name), LSTRING(repairDamageThreshold_Engineer_description)], - [localize ELSTRING(OptionsMenu,CategoryLogistics), localize "str_state_repair"], + [LELSTRING(OptionsMenu,CategoryLogistics), "str_state_repair"], [0,1,0.4,2], // [min, max, default value, trailing decimals (-1 for whole numbers only)] true, // isGlobal {[QGVAR(repairDamageThreshold_engineer), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(consumeItem_toolKit), "LIST", // fnc_repair expects number [LSTRING(consumeItem_ToolKit_name), LSTRING(consumeItem_ToolKit_description)], - [localize ELSTRING(OptionsMenu,CategoryLogistics), localize "str_state_repair"], + [LELSTRING(OptionsMenu,CategoryLogistics), "str_state_repair"], [[0,1],[ELSTRING(common,No), ELSTRING(common,Yes)],0], // [values, titles, defaultIndex] true, // isGlobal {[QGVAR(consumeItem_toolKit), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(fullRepairLocation), "LIST", [LSTRING(fullRepairLocation), LSTRING(fullRepairLocation_description)], - [localize ELSTRING(OptionsMenu,CategoryLogistics), localize "str_state_repair"], + [LELSTRING(OptionsMenu,CategoryLogistics), "str_state_repair"], [[0,1,2,3,4],[LSTRING(useAnywhere), LSTRING(repairVehicleOnly), LSTRING(repairFacilityOnly), LSTRING(vehicleAndFacility), ELSTRING(common,Disabled)],2], // [values, titles, defaultIndex] true, // isGlobal {[QGVAR(fullRepairLocation), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(engineerSetting_fullRepair), "LIST", [LSTRING(engineerSetting_fullRepair_name), LSTRING(engineerSetting_fullRepair_description)], - [localize ELSTRING(OptionsMenu,CategoryLogistics), localize "str_state_repair"], + [LELSTRING(OptionsMenu,CategoryLogistics), "str_state_repair"], [[0,1,2],[LSTRING(engineerSetting_anyone), LSTRING(engineerSetting_EngineerOnly), LSTRING(engineerSetting_AdvancedOnly)],2], // [values, titles, defaultIndex] true, // isGlobal {[QGVAR(engineerSetting_fullRepair), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(addSpareParts), "CHECKBOX", [LSTRING(addSpareParts_name), LSTRING(addSpareParts_description)], - [localize ELSTRING(OptionsMenu,CategoryLogistics), localize "str_state_repair"], + [LELSTRING(OptionsMenu,CategoryLogistics), "str_state_repair"], true, // default value true, // isGlobal {[QGVAR(addSpareParts), _this] call EFUNC(common,cbaSettings_settingChanged)}, true // Needs mission restart -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(wheelRepairRequiredItems), "LIST", [LSTRING(WheelRepairRequiredItems_DisplayName), LSTRING(WheelRepairRequiredItems_Description)], - [localize ELSTRING(OptionsMenu,CategoryLogistics), localize "str_state_repair"], + [LELSTRING(OptionsMenu,CategoryLogistics), "str_state_repair"], [[[], ["ToolKit"]], ["STR_A3_None", "STR_A3_CfgWeapons_Toolkit0"], 0], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(miscRepairRequiredItems), "LIST", [LSTRING(MiscRepairRequiredItems_DisplayName), LSTRING(MiscRepairRequiredItems_Description)], - [localize ELSTRING(OptionsMenu,CategoryLogistics), localize "str_state_repair"], + [LELSTRING(OptionsMenu,CategoryLogistics), "str_state_repair"], [[[], ["ToolKit"]], ["STR_A3_None", "STR_A3_CfgWeapons_Toolkit0"], 1], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(fullRepairRequiredItems), "LIST", [LSTRING(FullRepairRequiredItems_DisplayName), LSTRING(FullRepairRequiredItems_Description)], - [localize ELSTRING(OptionsMenu,CategoryLogistics), localize "str_state_repair"], + [LELSTRING(OptionsMenu,CategoryLogistics), "str_state_repair"], [[[], ["ToolKit"]], ["STR_A3_None", "STR_A3_CfgWeapons_Toolkit0"], 1], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(autoShutOffEngineWhenStartingRepair), "CHECKBOX", [LSTRING(autoShutOffEngineWhenStartingRepair_name), LSTRING(autoShutOffEngineWhenStartingRepair_description)], - [localize ELSTRING(OptionsMenu,CategoryLogistics), localize "str_state_repair"], + [LELSTRING(OptionsMenu,CategoryLogistics), "str_state_repair"], false, // default value true, // isGlobal {[QGVAR(autoShutOffEngineWhenStartingRepair), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; From 668614b1ec1cd9bf3a99b365e064de05d2d8f858 Mon Sep 17 00:00:00 2001 From: Dystopian Date: Sun, 17 Jan 2021 21:03:12 +0400 Subject: [PATCH 02/10] Optimize eden expressions Co-authored-by: Filip Maciejewski --- addons/repair/CfgEden.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/repair/CfgEden.hpp b/addons/repair/CfgEden.hpp index a06457490ce..57fff12ba6d 100644 --- a/addons/repair/CfgEden.hpp +++ b/addons/repair/CfgEden.hpp @@ -1,4 +1,4 @@ -#define VANILLA_ISREPAIRVEHICLE (if (getRepairCargo _this > 0) then {1} else {0}) +#define VANILLA_ISREPAIRVEHICLE (parseNumber (getRepairCargo _this > 0)) #define GET_NUMBER(config,default) (if (isNumber (config)) then {getNumber (config)} else {default}) #define DEFAULT_ISENGINEER ([ARR_2(0,1)] select (_this getUnitTrait 'engineer')) @@ -70,7 +70,7 @@ class Cfg3DEN { property = QGVAR(editorLoadedTracks); control = "Edit"; expression = "_this setVariable ['%s',_value];"; - defaultValue = "[0,1] select (_this isKindOf 'Tank')"; // must match post init script + defaultValue = "parseNumber (_this isKindOf 'Tank')"; // must match post init script validate = "number"; condition = "objectHasInventoryCargo"; typeName = "NUMBER"; @@ -79,7 +79,7 @@ class Cfg3DEN { displayName = CSTRING(editorLoadedWheels); tooltip = CSTRING(editorLoadedWheels_tooltip); property = QGVAR(editorLoadedWheels); - defaultValue = "[0,1] select (_this isKindOf 'Car')"; // must match post init script + defaultValue = "parseNumber (_this isKindOf 'Car')"; // must match post init script }; }; }; From d2d346f10192878b5775807779abffd571a49c7d Mon Sep 17 00:00:00 2001 From: Dystopian Date: Mon, 17 Jul 2023 01:07:48 +0300 Subject: [PATCH 03/10] Add debug --- addons/repair/XEH_postInit.sqf | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/addons/repair/XEH_postInit.sqf b/addons/repair/XEH_postInit.sqf index 8083cd2e24d..8d3922e8cca 100644 --- a/addons/repair/XEH_postInit.sqf +++ b/addons/repair/XEH_postInit.sqf @@ -24,24 +24,25 @@ if !GVAR(enabled) exitWith {}; { if (local _x && {getRepairCargo _x > 0}) then { _x setRepairCargo 0; + TRACE_3("setRepairCargo static",_x,typeOf _x,getRepairCargo _x); }; } forEach allMissionObjects "Static"; ["All", "InitPost", { params ["_vehicle"]; - if (local _vehicle && {getRepairCargo _vehicle > 0}) then { + if !(local _vehicle && {getRepairCargo _vehicle > 0}) exitWith {}; _vehicle setRepairCargo 0; - }; + TRACE_3("setRepairCargo vehicle",_vehicle,typeOf _vehicle,getRepairCargo _vehicle); }, true, ["Man"], true] call CBA_fnc_addClassEventHandler; ["CAManBase", "InitPost", { params ["_unit"]; - if (local _unit && {_unit getUnitTrait "engineer"}) then { + if !(local _unit && {_unit getUnitTrait "engineer"}) exitWith {}; _unit setUnitTrait ["engineer", false]; - if (-1 isEqualTo (_unit getVariable ["ACE_IsEngineer", -1])) then { + if (_unit getVariable ["ACE_IsEngineer", -1] isEqualTo -1) then { _unit setVariable ["ACE_IsEngineer", true, true]; }; - }; + TRACE_3("setUnitTrait",_unit,typeOf _unit,_unit getUnitTrait "engineer"); }, true, [], true] call CBA_fnc_addClassEventHandler; From 00fc8542b2646e159c2f31429d60575142375432 Mon Sep 17 00:00:00 2001 From: Dystopian Date: Mon, 17 Jul 2023 01:12:33 +0300 Subject: [PATCH 04/10] Update addons/repair/functions/fnc_addRepairActions.sqf Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> --- addons/repair/functions/fnc_addRepairActions.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/repair/functions/fnc_addRepairActions.sqf b/addons/repair/functions/fnc_addRepairActions.sqf index 43290b736a8..8ed06af0868 100644 --- a/addons/repair/functions/fnc_addRepairActions.sqf +++ b/addons/repair/functions/fnc_addRepairActions.sqf @@ -15,7 +15,7 @@ * Public: No */ -if (!hasInterface || !GVAR(enabled)) exitWith {}; +if !(hasInterface && {GVAR(enabled)}) exitWith {}; params ["_vehicle"]; private _type = typeOf _vehicle; From e15cbd2586829d9c0ddaf3601905c256a00958bb Mon Sep 17 00:00:00 2001 From: Dystopian Date: Mon, 17 Jul 2023 23:04:00 +0300 Subject: [PATCH 05/10] Fix strange indent --- addons/repair/XEH_postInit.sqf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/repair/XEH_postInit.sqf b/addons/repair/XEH_postInit.sqf index 8d3922e8cca..b4583e7709e 100644 --- a/addons/repair/XEH_postInit.sqf +++ b/addons/repair/XEH_postInit.sqf @@ -31,17 +31,17 @@ if !GVAR(enabled) exitWith {}; ["All", "InitPost", { params ["_vehicle"]; if !(local _vehicle && {getRepairCargo _vehicle > 0}) exitWith {}; - _vehicle setRepairCargo 0; + _vehicle setRepairCargo 0; TRACE_3("setRepairCargo vehicle",_vehicle,typeOf _vehicle,getRepairCargo _vehicle); }, true, ["Man"], true] call CBA_fnc_addClassEventHandler; ["CAManBase", "InitPost", { params ["_unit"]; if !(local _unit && {_unit getUnitTrait "engineer"}) exitWith {}; - _unit setUnitTrait ["engineer", false]; + _unit setUnitTrait ["engineer", false]; if (_unit getVariable ["ACE_IsEngineer", -1] isEqualTo -1) then { - _unit setVariable ["ACE_IsEngineer", true, true]; - }; + _unit setVariable ["ACE_IsEngineer", true, true]; + }; TRACE_3("setUnitTrait",_unit,typeOf _unit,_unit getUnitTrait "engineer"); }, true, [], true] call CBA_fnc_addClassEventHandler; From 942fffd0e1e8a3031f69c4f4c1bbdef859562b5b Mon Sep 17 00:00:00 2001 From: Dystopian Date: Mon, 17 Jul 2023 23:11:14 +0300 Subject: [PATCH 06/10] Optimize bool to number conversion Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> --- addons/repair/XEH_postInit.sqf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/repair/XEH_postInit.sqf b/addons/repair/XEH_postInit.sqf index b4583e7709e..875c299511e 100644 --- a/addons/repair/XEH_postInit.sqf +++ b/addons/repair/XEH_postInit.sqf @@ -62,7 +62,7 @@ if (isServer) then { private _spareTracks = _vehicle getVariable QGVAR(editorLoadedTracks); if (isNil "_spareTracks") then { - _spareTracks = [0, 1] select (_vehicle isKindOf "Tank"); // must match eden attribute default + _spareTracks = parseNumber (_vehicle isKindOf "Tank"); // must match eden attribute default }; if (_spareTracks > 0) then { [_vehicle, _spareTracks, "ACE_Track"] call FUNC(addSpareParts); @@ -70,7 +70,7 @@ if (isServer) then { private _spareWheels = _vehicle getVariable QGVAR(editorLoadedWheels); if (isNil "_spareWheels") then { - _spareWheels = [0, 1] select (_vehicle isKindOf "Car"); // must match eden attribute default + _spareWheels = parseNumber (_vehicle isKindOf "Car"); // must match eden attribute default }; if (_spareWheels > 0) then { [_vehicle, _spareWheels, "ACE_Wheel"] call FUNC(addSpareParts); From 7f7dacbf09843b7131c9711d5ba042e5bdea12cc Mon Sep 17 00:00:00 2001 From: Dystopian Date: Wed, 26 Jul 2023 23:41:59 +0300 Subject: [PATCH 07/10] Prevent run before setting is ready --- addons/repair/XEH_postInit.sqf | 4 ++++ addons/repair/functions/fnc_addRepairActions.sqf | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/addons/repair/XEH_postInit.sqf b/addons/repair/XEH_postInit.sqf index 875c299511e..7b810da3c4e 100644 --- a/addons/repair/XEH_postInit.sqf +++ b/addons/repair/XEH_postInit.sqf @@ -1,5 +1,9 @@ #include "script_component.hpp" +if !(EGVAR(common,settingsInitFinished)) exitWith { + EGVAR(common,runAtSettingsInitialized) pushBack [compileScript [__FILE__], _this]; +}; + if !GVAR(enabled) exitWith {}; [QGVAR(setVehicleDamage), {_this call FUNC(setDamage)}] call CBA_fnc_addEventHandler; diff --git a/addons/repair/functions/fnc_addRepairActions.sqf b/addons/repair/functions/fnc_addRepairActions.sqf index 8ed06af0868..0eeedcd9ff8 100644 --- a/addons/repair/functions/fnc_addRepairActions.sqf +++ b/addons/repair/functions/fnc_addRepairActions.sqf @@ -15,6 +15,10 @@ * Public: No */ +if !(EGVAR(common,settingsInitFinished)) exitWith { + EGVAR(common,runAtSettingsInitialized) pushBack [FUNC(addRepairActions), _this]; +}; + if !(hasInterface && {GVAR(enabled)}) exitWith {}; params ["_vehicle"]; From 595610201ea1c4b47e35e587fe2aefd8237a5fe9 Mon Sep 17 00:00:00 2001 From: Dystopian Date: Thu, 27 Jul 2023 23:17:22 +0300 Subject: [PATCH 08/10] Move postInit to EH --- addons/repair/XEH_postInit.sqf | 140 ++++++++++++++++----------------- 1 file changed, 70 insertions(+), 70 deletions(-) diff --git a/addons/repair/XEH_postInit.sqf b/addons/repair/XEH_postInit.sqf index 7b810da3c4e..f717e566513 100644 --- a/addons/repair/XEH_postInit.sqf +++ b/addons/repair/XEH_postInit.sqf @@ -1,86 +1,86 @@ #include "script_component.hpp" -if !(EGVAR(common,settingsInitFinished)) exitWith { - EGVAR(common,runAtSettingsInitialized) pushBack [compileScript [__FILE__], _this]; -}; +["CBA_settingsInitialized", { -if !GVAR(enabled) exitWith {}; + if !GVAR(enabled) exitWith {}; -[QGVAR(setVehicleDamage), {_this call FUNC(setDamage)}] call CBA_fnc_addEventHandler; -[QGVAR(setVehicleHitPointDamage), {_this call FUNC(setHitPointDamage)}] call CBA_fnc_addEventHandler; -[QGVAR(setWheelHitPointDamage), { - params ["_object", "_hitPoint", "_damage"]; - private _damageDisabled = !isDamageAllowed _object; + [QGVAR(setVehicleDamage), {_this call FUNC(setDamage)}] call CBA_fnc_addEventHandler; + [QGVAR(setVehicleHitPointDamage), {_this call FUNC(setHitPointDamage)}] call CBA_fnc_addEventHandler; + [QGVAR(setWheelHitPointDamage), { + params ["_object", "_hitPoint", "_damage"]; + private _damageDisabled = !isDamageAllowed _object; - if (_damageDisabled) then { - _object allowDamage true; - }; - - _object setHitPointDamage [_hitPoint, _damage]; - - if (_damageDisabled) then { - _object allowDamage false; - }; -}] call CBA_fnc_addEventHandler; - - -// placed in editor static objects don't trigger init -{ - if (local _x && {getRepairCargo _x > 0}) then { - _x setRepairCargo 0; - TRACE_3("setRepairCargo static",_x,typeOf _x,getRepairCargo _x); - }; -} forEach allMissionObjects "Static"; - -["All", "InitPost", { - params ["_vehicle"]; - if !(local _vehicle && {getRepairCargo _vehicle > 0}) exitWith {}; - _vehicle setRepairCargo 0; - TRACE_3("setRepairCargo vehicle",_vehicle,typeOf _vehicle,getRepairCargo _vehicle); -}, true, ["Man"], true] call CBA_fnc_addClassEventHandler; - -["CAManBase", "InitPost", { - params ["_unit"]; - if !(local _unit && {_unit getUnitTrait "engineer"}) exitWith {}; - _unit setUnitTrait ["engineer", false]; - if (_unit getVariable ["ACE_IsEngineer", -1] isEqualTo -1) then { - _unit setVariable ["ACE_IsEngineer", true, true]; - }; - TRACE_3("setUnitTrait",_unit,typeOf _unit,_unit getUnitTrait "engineer"); -}, true, [], true] call CBA_fnc_addClassEventHandler; + if (_damageDisabled) then { + _object allowDamage true; + }; + _object setHitPointDamage [_hitPoint, _damage]; -GVAR(allToolKits) = call (uiNamespace getVariable QGVAR(allToolKits)); + if (_damageDisabled) then { + _object allowDamage false; + }; + }] call CBA_fnc_addEventHandler; -["ACE_RepairItem_Base", "killed", { - params ["_object"]; - [{deleteVehicle _this}, _object, 5] call CBA_fnc_waitAndExecute; -}, true, [], true] call CBA_fnc_addClassEventHandler; + // placed in editor static objects don't trigger init + { + if (local _x && {getRepairCargo _x > 0}) then { + _x setRepairCargo 0; + TRACE_3("setRepairCargo static",_x,typeOf _x,getRepairCargo _x); + }; + } forEach allMissionObjects "Static"; -// load tracks and wheels -if (isServer) then { - private _fnc_addSpareItems = { - if (!GVAR(addSpareParts)) exitWith {}; + ["All", "InitPost", { params ["_vehicle"]; - - private _spareTracks = _vehicle getVariable QGVAR(editorLoadedTracks); - if (isNil "_spareTracks") then { - _spareTracks = parseNumber (_vehicle isKindOf "Tank"); // must match eden attribute default + if !(local _vehicle && {getRepairCargo _vehicle > 0}) exitWith {}; + _vehicle setRepairCargo 0; + TRACE_3("setRepairCargo vehicle",_vehicle,typeOf _vehicle,getRepairCargo _vehicle); + }, true, ["Man"], true] call CBA_fnc_addClassEventHandler; + + ["CAManBase", "InitPost", { + params ["_unit"]; + if !(local _unit && {_unit getUnitTrait "engineer"}) exitWith {}; + _unit setUnitTrait ["engineer", false]; + if (_unit getVariable ["ACE_IsEngineer", -1] isEqualTo -1) then { + _unit setVariable ["ACE_IsEngineer", true, true]; }; - if (_spareTracks > 0) then { - [_vehicle, _spareTracks, "ACE_Track"] call FUNC(addSpareParts); + TRACE_3("setUnitTrait",_unit,typeOf _unit,_unit getUnitTrait "engineer"); + }, true, [], true] call CBA_fnc_addClassEventHandler; + + + GVAR(allToolKits) = call (uiNamespace getVariable QGVAR(allToolKits)); + + ["ACE_RepairItem_Base", "killed", { + params ["_object"]; + + [{deleteVehicle _this}, _object, 5] call CBA_fnc_waitAndExecute; + }, true, [], true] call CBA_fnc_addClassEventHandler; + + // load tracks and wheels + if (isServer) then { + private _fnc_addSpareItems = { + if (!GVAR(addSpareParts)) exitWith {}; + params ["_vehicle"]; + + private _spareTracks = _vehicle getVariable QGVAR(editorLoadedTracks); + if (isNil "_spareTracks") then { + _spareTracks = parseNumber (_vehicle isKindOf "Tank"); // must match eden attribute default + }; + if (_spareTracks > 0) then { + [_vehicle, _spareTracks, "ACE_Track"] call FUNC(addSpareParts); + }; + + private _spareWheels = _vehicle getVariable QGVAR(editorLoadedWheels); + if (isNil "_spareWheels") then { + _spareWheels = parseNumber (_vehicle isKindOf "Car"); // must match eden attribute default + }; + if (_spareWheels > 0) then { + [_vehicle, _spareWheels, "ACE_Wheel"] call FUNC(addSpareParts); + }; }; - private _spareWheels = _vehicle getVariable QGVAR(editorLoadedWheels); - if (isNil "_spareWheels") then { - _spareWheels = parseNumber (_vehicle isKindOf "Car"); // must match eden attribute default - }; - if (_spareWheels > 0) then { - [_vehicle, _spareWheels, "ACE_Wheel"] call FUNC(addSpareParts); - }; + ["Tank", "initPost", _fnc_addSpareItems, true, [], true] call CBA_fnc_addClassEventHandler; + ["Car", "initPost", _fnc_addSpareItems, true, [], true] call CBA_fnc_addClassEventHandler; }; - ["Tank", "initPost", _fnc_addSpareItems, true, [], true] call CBA_fnc_addClassEventHandler; - ["Car", "initPost", _fnc_addSpareItems, true, [], true] call CBA_fnc_addClassEventHandler; -}; +}] call CBA_fnc_addEventHandler; From d849075d21fdf5363eb7f0e6c6609ff831f08a59 Mon Sep 17 00:00:00 2001 From: LinkIsGrim Date: Sat, 29 Jul 2023 07:34:24 +0300 Subject: [PATCH 09/10] remove all transportRepair = 0 --- optionals/compat_gm/CfgVehicles.hpp | 16 ---------------- optionals/compat_rhs_afrf3/CfgVehicles.hpp | 11 +---------- optionals/compat_rhs_usf3/CfgVehicles.hpp | 17 ----------------- optionals/compat_sog/CfgVehicles/wheeled.hpp | 9 --------- 4 files changed, 1 insertion(+), 52 deletions(-) diff --git a/optionals/compat_gm/CfgVehicles.hpp b/optionals/compat_gm/CfgVehicles.hpp index 3f8d8bf941b..61ec9081eb0 100644 --- a/optionals/compat_gm/CfgVehicles.hpp +++ b/optionals/compat_gm/CfgVehicles.hpp @@ -173,11 +173,6 @@ class CfgVehicles { EGVAR(medical,medicClass) = 1; }; - class gm_ural4320_repair_base: gm_ural4320_base { - transportRepair = 0; - EGVAR(repair,canRepair) = 1; - }; - // WEST @@ -222,12 +217,6 @@ class CfgVehicles { EGVAR(refuel,fuelCapacity) = 390; }; - class gm_fuchsa0_base; - class gm_fuchsa0_engineer_base: gm_fuchsa0_base { - transportRepair = 0; - EGVAR(repair,canRepair) = 1; - }; - class gm_luchs_base: gm_wheeled_APC_base { EGVAR(refuel,fuelCapacity) = 500; EGVAR(cookoff,cookoffSelections)[] = {"mainturret_hatch", "commanderturret_hatch"}; @@ -315,11 +304,6 @@ class CfgVehicles { }; class gm_m113a1dk_base; - class gm_m113a1dk_engineer_base: gm_m113a1dk_base { - transportRepair = 0; - EGVAR(repair,canRepair) = 1; - }; - class gm_m113a1dk_medic_base: gm_m113a1dk_base { EGVAR(medical,medicClass) = 1; }; diff --git a/optionals/compat_rhs_afrf3/CfgVehicles.hpp b/optionals/compat_rhs_afrf3/CfgVehicles.hpp index 124dc86696a..b59694de6e3 100644 --- a/optionals/compat_rhs_afrf3/CfgVehicles.hpp +++ b/optionals/compat_rhs_afrf3/CfgVehicles.hpp @@ -156,10 +156,6 @@ class CfgVehicles { EGVAR(refuel,hooks)[] = {{-0.05,-3.6,-0.45}}; EGVAR(refuel,fuelCargo) = 10000; }; - class RHS_Ural_Repair_MSV_01: RHS_Ural_Support_MSV_Base_01 { - transportRepair = 0; - EGVAR(repair,canRepair) = 1; - }; class RHS_Ural_Ammo_Base: RHS_Ural_Base { EGVAR(rearm,defaultSupply) = 1200; }; @@ -175,12 +171,7 @@ class CfgVehicles { EGVAR(refuel,fuelCapacity) = 210; }; - class rhs_gaz66_vmf: rhs_truck {}; - class rhs_gaz66_repair_base: rhs_gaz66_vmf { - transportRepair = 0; - EGVAR(repair,canRepair) = 1; - }; - + class rhs_gaz66_vmf; class rhs_gaz66_ammo_base: rhs_gaz66_vmf { EGVAR(rearm,defaultSupply) = 1200; }; diff --git a/optionals/compat_rhs_usf3/CfgVehicles.hpp b/optionals/compat_rhs_usf3/CfgVehicles.hpp index 36d96c8c652..bad6493465e 100644 --- a/optionals/compat_rhs_usf3/CfgVehicles.hpp +++ b/optionals/compat_rhs_usf3/CfgVehicles.hpp @@ -202,8 +202,6 @@ class CfgVehicles { transportFuel = 0; EGVAR(refuel,hooks)[] = {{1.1,0.9,-1.2}}; EGVAR(refuel,fuelCargo) = 900; // 45 jerrycans - transportRepair = 0; - EGVAR(repair,canRepair) = 1; }; class rhsusf_HEMTT_A4_base: Truck_01_base_F {}; @@ -234,21 +232,6 @@ class CfgVehicles { EGVAR(refuel,fuelCargo) = 10000; }; - class rhsusf_M977A4_REPAIR_usarmy_wd: rhsusf_M977A4_usarmy_wd { - transportRepair = 0; - EGVAR(repair,canRepair) = 1; - }; - - class rhsusf_M977A4_REPAIR_BKIT_usarmy_wd: rhsusf_M977A4_BKIT_usarmy_wd { - transportRepair = 0; - EGVAR(repair,canRepair) = 1; - }; - - class rhsusf_M977A4_REPAIR_BKIT_M2_usarmy_wd: rhsusf_M977A4_BKIT_M2_usarmy_wd { - transportRepair = 0; - EGVAR(repair,canRepair) = 1; - }; - class APC_Tracked_02_base_F: Tank_F {}; class rhsusf_m113tank_base: APC_Tracked_02_base_F { EGVAR(map,vehicleLightColor)[] = {0,1,0,0.1}; diff --git a/optionals/compat_sog/CfgVehicles/wheeled.hpp b/optionals/compat_sog/CfgVehicles/wheeled.hpp index 14ebcaf3398..3525328d3f4 100644 --- a/optionals/compat_sog/CfgVehicles/wheeled.hpp +++ b/optionals/compat_sog/CfgVehicles/wheeled.hpp @@ -9,11 +9,6 @@ class vn_wheeled_m54_fuel_base: vn_wheeled_m54_cab_base { EGVAR(refuel,hooks)[] = {{-1.15, -2.3, 0.28}}; EGVAR(refuel,fuelCargo) = 4542; }; -class vn_wheeled_m54_03_base; -class vn_wheeled_m54_repair_base: vn_wheeled_m54_03_base { - transportRepair = 0; - EGVAR(repair,canRepair) = 1; -}; class vn_wheeled_m54_01_base; class vn_wheeled_m54_ammo_base: vn_wheeled_m54_01_base { EGVAR(rearm,defaultSupply) = 1200; @@ -34,10 +29,6 @@ class vn_wheeled_z157_fuel_base: vn_wheeled_z157_base { EGVAR(refuel,hooks)[] = {{-1.36, -3.575, -0.4}}; EGVAR(refuel,fuelCargo) = 4000; }; -class vn_wheeled_z157_repair_base: vn_wheeled_z157_base { - transportRepair = 0; - EGVAR(repair,canRepair) = 1; -}; class vn_wheeled_z157_01_base; class vn_wheeled_z157_ammo_base: vn_wheeled_z157_01_base { EGVAR(rearm,defaultSupply) = 1200; From 0d595a2c37f9352f6225edf000f43f8e6780fea1 Mon Sep 17 00:00:00 2001 From: LinkIsGrim Date: Sat, 29 Jul 2023 07:41:03 +0300 Subject: [PATCH 10/10] remove requiredAddons --- optionals/compat_gm/config.cpp | 2 +- optionals/compat_rhs_afrf3/config.cpp | 2 +- optionals/compat_rhs_usf3/config.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/optionals/compat_gm/config.cpp b/optionals/compat_gm/config.cpp index 60838869491..4e1883a6410 100644 --- a/optionals/compat_gm/config.cpp +++ b/optionals/compat_gm/config.cpp @@ -6,7 +6,7 @@ class CfgPatches { units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ace_csw", "ace_explosives", "ace_refuel", "ace_repair", "gm_core"}; + requiredAddons[] = {"ace_csw", "ace_explosives", "ace_refuel", "gm_core"}; author = ECSTRING(common,ACETeam); authors[] = {"sancron", "nomisum"}; url = ECSTRING(main,URL); diff --git a/optionals/compat_rhs_afrf3/config.cpp b/optionals/compat_rhs_afrf3/config.cpp index 3f781a4423f..ae9491f2323 100644 --- a/optionals/compat_rhs_afrf3/config.cpp +++ b/optionals/compat_rhs_afrf3/config.cpp @@ -7,7 +7,7 @@ class CfgPatches { units[] = {}; weapons[] = {QGVAR(2b14_carry), QGVAR(nsv_carry), QGVAR(kord_carry), QGVAR(ags30_carry), QGVAR(spg9_carry), QGVAR(spg9m_carry), QGVAR(metis_carry), QGVAR(kornet_carry)}; requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ace_explosives", "ace_csw", "ace_refuel", "ace_repair", "rhs_main_loadorder"}; + requiredAddons[] = {"ace_explosives", "ace_csw", "ace_refuel", "rhs_main_loadorder"}; author = ECSTRING(common,ACETeam); authors[] = {"Ruthberg", "GitHawk", "BaerMitUmlaut", "commy2", "Skengman2"}; url = ECSTRING(main,URL); diff --git a/optionals/compat_rhs_usf3/config.cpp b/optionals/compat_rhs_usf3/config.cpp index 1daab4a14c7..8b6fbf9ecdd 100644 --- a/optionals/compat_rhs_usf3/config.cpp +++ b/optionals/compat_rhs_usf3/config.cpp @@ -7,7 +7,7 @@ class CfgPatches { units[] = {}; weapons[] = {QGVAR(m252_carry), QGVAR(m2_carry), QGVAR(mk19_carry), QGVAR(tow_carry)}; requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ace_explosives", "ace_javelin", "ace_refuel", "ace_repair", "ace_csw", "rhsusf_main_loadorder"}; + requiredAddons[] = {"ace_explosives", "ace_javelin", "ace_refuel", "ace_csw", "rhsusf_main_loadorder"}; author = ECSTRING(common,ACETeam); authors[] = {"Ruthberg", "GitHawk", "BaerMitUmlaut", "Fyuran"}; url = ECSTRING(main,URL);