diff --git a/addons/zeus/ACE_Settings.hpp b/addons/zeus/ACE_Settings.hpp index 6357992cf6..b520b7a31a 100644 --- a/addons/zeus/ACE_Settings.hpp +++ b/addons/zeus/ACE_Settings.hpp @@ -31,9 +31,9 @@ class ACE_Settings { values[] = {"$STR_A3_OPTIONS_DISABLED", CSTRING(revealMines_partial), CSTRING(revealMines_full)}; }; class GVAR(autoAddObjects) { + typeName = "BOOL"; + value = 0; displayName = CSTRING(AddObjectsToCurator); description = CSTRING(AddObjectsToCurator_desc); - value = 0; - typeName = "BOOL"; }; }; diff --git a/addons/zeus/CfgVehicles.hpp b/addons/zeus/CfgVehicles.hpp index c7ea7b6ec8..fbf63930c4 100644 --- a/addons/zeus/CfgVehicles.hpp +++ b/addons/zeus/CfgVehicles.hpp @@ -71,6 +71,12 @@ class CfgVehicles { }; }; }; + class autoAddObjects { + displayName = CSTRING(AddObjectsToCurator); + description = CSTRING(AddObjectsToCurator_desc); + typeName = "BOOL"; + defaultValue = 0; + }; }; class ModuleDescription { description = CSTRING(Settings_Description); diff --git a/addons/zeus/functions/fnc_addObjectToCurator.sqf b/addons/zeus/functions/fnc_addObjectToCurator.sqf index 085fff09d1..176b55dfdc 100644 --- a/addons/zeus/functions/fnc_addObjectToCurator.sqf +++ b/addons/zeus/functions/fnc_addObjectToCurator.sqf @@ -15,6 +15,11 @@ params ["_object"]; +if !(EGVAR(common,settingsInitFinished)) exitWith { + TRACE_1("pushing to runAtSettingsInitialized", _this); + EGVAR(common,runAtSettingsInitialized) pushBack [FUNC(addObjectToCurator), _this]; +}; + if (!(_object getVariable [QGVAR(addObject), GVAR(autoAddObjects)])) exitWith {}; [{ diff --git a/addons/zeus/functions/fnc_moduleZeusSettings.sqf b/addons/zeus/functions/fnc_moduleZeusSettings.sqf index 0b9c0f8dd8..0f3d720599 100644 --- a/addons/zeus/functions/fnc_moduleZeusSettings.sqf +++ b/addons/zeus/functions/fnc_moduleZeusSettings.sqf @@ -24,3 +24,4 @@ if !(_activated) exitWith {}; [_logic, QGVAR(radioOrdnance), "radioOrdnance"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(revealMines), "revealMines"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(remoteWind), "remoteWind"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(autoAddObjects), "autoAddObjects"] call EFUNC(common,readSettingFromModule);