diff --git a/addons/zeus/CfgFactionClasses.hpp b/addons/zeus/CfgFactionClasses.hpp new file mode 100644 index 0000000000..7d758adfc0 --- /dev/null +++ b/addons/zeus/CfgFactionClasses.hpp @@ -0,0 +1,27 @@ +class CfgFactionClasses { + class GVAR(AI) { + displayName = "ACE AI"; + priority = 2; + side = 7; + }; + class GVAR(Captive) { + displayName = "ACE Captive"; + priority = 2; + side = 7; + }; + class GVAR(Medical) { + displayName = "ACE Medical"; + priority = 2; + side = 7; + }; + class GVAR(Repair) { + displayName = "ACE Repair"; + priority = 2; + side = 7; + }; + class GVAR(Utility) { + displayName = "ACE Utility"; + priority = 2; + side = 7; + }; +}; diff --git a/addons/zeus/CfgVehicles.hpp b/addons/zeus/CfgVehicles.hpp index 4ab9ad871c..22d827e16f 100644 --- a/addons/zeus/CfgVehicles.hpp +++ b/addons/zeus/CfgVehicles.hpp @@ -94,82 +94,109 @@ class CfgVehicles { }; class GVAR(moduleAddSpareTrack): GVAR(moduleBase) { curatorCanAttach = 1; + category = QGVAR(Repair); displayName = CSTRING(ModuleAddSpareTrack_DisplayName); function = QFUNC(moduleAddSpareTrack); icon = QPATHTOF(UI\Icon_Module_Zeus_Medic_ca.paa);//@todo }; class GVAR(moduleAddSpareWheel): GVAR(moduleBase) { curatorCanAttach = 1; + category = QGVAR(Repair); displayName = CSTRING(ModuleAddSpareWheel_DisplayName); function = QFUNC(moduleAddSpareWheel); icon = QPATHTOF(UI\Icon_Module_Zeus_Medic_ca.paa);//@todo }; class GVAR(moduleCaptive): GVAR(moduleBase) { curatorCanAttach = 1; + category = QGVAR(Captive); displayName = CSTRING(ModuleCaptive_DisplayName); function = QFUNC(moduleCaptive); icon = QPATHTOF(UI\Icon_Module_Zeus_Captive_ca.paa); }; class GVAR(moduleDefendArea): GVAR(moduleBase) { curatorCanAttach = 1; + category = QGVAR(AI); displayName = CSTRING(ModuleDefendArea_DisplayName); curatorInfoType = QGVAR(RscDefendArea); }; + class GVAR(moduleEditableObjects): GVAR(moduleBase) { + curatorCanAttach = 1; + category = QGVAR(Utility); + displayName = CSTRING(ModuleEditableObjects_DisplayName); + curatorInfoType = QGVAR(RscEditableObjects); + }; class GVAR(moduleGlobalSetSkill): GVAR(moduleBase) { + category = QGVAR(AI); displayName = CSTRING(ModuleGlobalSetSkill_DisplayName); curatorInfoType = QGVAR(RscGlobalSetSkill); }; class GVAR(moduleGroupSide): GVAR(moduleBase) { curatorCanAttach = 1; + category = QGVAR(Utility); displayName = CSTRING(ModuleGroupSide_DisplayName); curatorInfoType = QGVAR(RscGroupSide); }; class GVAR(modulePatrolArea): GVAR(moduleBase) { curatorCanAttach = 1; + category = QGVAR(AI); displayName = CSTRING(ModulePatrolArea_DisplayName); curatorInfoType = QGVAR(RscPatrolArea); }; class GVAR(moduleSearchArea): GVAR(moduleBase) { curatorCanAttach = 1; + category = QGVAR(AI); displayName = CSTRING(ModuleSearchArea_DisplayName); curatorInfoType = QGVAR(RscSearchArea); }; class GVAR(moduleSearchNearby): GVAR(moduleBase) { curatorCanAttach = 1; + category = QGVAR(AI); displayName = CSTRING(ModuleSearchNearby_DisplayName); function = QFUNC(moduleSearchNearby); }; class GVAR(moduleSetMedic): GVAR(moduleBase) { curatorCanAttach = 1; + category = QGVAR(Medical); displayName = CSTRING(ModuleSetMedic_DisplayName); function = QFUNC(moduleSetMedic); icon = QPATHTOF(UI\Icon_Module_Zeus_Medic_ca.paa); }; class GVAR(moduleSetMedicalFacility): GVAR(moduleBase) { curatorCanAttach = 1; + category = QGVAR(Medical); displayName = CSTRING(ModuleSetMedicalFacility_DisplayName); function = QFUNC(moduleSetMedicalFacility); icon = QPATHTOF(UI\Icon_Module_Zeus_Medic_ca.paa); }; class GVAR(moduleSetMedicalVehicle): GVAR(moduleBase) { curatorCanAttach = 1; + category = QGVAR(Medical); displayName = CSTRING(ModuleSetMedicalVehicle_DisplayName); function = QFUNC(moduleSetMedicalVehicle); icon = QPATHTOF(UI\Icon_Module_Zeus_Medic_ca.paa); }; + class GVAR(moduleSimulation): GVAR(moduleBase) { + curatorCanAttach = 1; + category = QGVAR(Utility); + displayName = CSTRING(ModuleSimulation_DisplayName); + function = QFUNC(moduleSimulation); + }; class GVAR(moduleSurrender): GVAR(moduleBase) { curatorCanAttach = 1; + category = QGVAR(Captive); displayName = CSTRING(ModuleSurrender_DisplayName); function = QFUNC(moduleSurrender); icon = QPATHTOF(UI\Icon_Module_Zeus_Surrender_ca.paa); }; class GVAR(moduleTeleportPlayers): GVAR(moduleBase) { curatorCanAttach = 1; + category = QGVAR(Utility); displayName = CSTRING(ModuleTeleportPlayers_DisplayName); curatorInfoType = QGVAR(RscTeleportPlayers); }; class GVAR(moduleUnconscious): GVAR(moduleBase) { curatorCanAttach = 1; + category = QGVAR(Medical); displayName = CSTRING(ModuleUnconscious_DisplayName); function = QFUNC(moduleUnconscious); icon = QPATHTOF(UI\Icon_Module_Zeus_Unconscious_ca.paa); diff --git a/addons/zeus/XEH_PREP.hpp b/addons/zeus/XEH_PREP.hpp index eb70a8529d..4a54c03920 100644 --- a/addons/zeus/XEH_PREP.hpp +++ b/addons/zeus/XEH_PREP.hpp @@ -14,6 +14,7 @@ PREP(moduleSearchNearby); PREP(moduleSetMedic); PREP(moduleSetMedicalVehicle); PREP(moduleSetMedicalFacility); +PREP(moduleSimulation); PREP(moduleSurrender); PREP(moduleTeleportPlayers); PREP(moduleUnconscious); @@ -22,6 +23,7 @@ PREP(ui_attributeCargo); //PREP(ui_attributePosition); PREP(ui_attributeRadius); PREP(ui_defendArea); +PREP(ui_editableObjects); PREP(ui_globalSetSkill); PREP(ui_groupSide); PREP(ui_patrolArea); diff --git a/addons/zeus/XEH_postInit.sqf b/addons/zeus/XEH_postInit.sqf index 9062ae5e9a..1ddcaf30d8 100644 --- a/addons/zeus/XEH_postInit.sqf +++ b/addons/zeus/XEH_postInit.sqf @@ -14,3 +14,26 @@ QGVAR(GlobalSkillAI) addPublicVariableEventHandler FUNC(moduleGlobalSetSkill); [QGVAR(modulePatrolArea), CBA_fnc_taskPatrol] call CBA_fnc_addEventHandler; [QGVAR(moduleSearchNearby), CBA_fnc_searchNearby] call CBA_fnc_addEventHandler; [QGVAR(moduleSearchArea), CBA_fnc_taskSearchArea] call CBA_fnc_addEventHandler; + +// Editable object commands must be ran on server, this events are used in the respective module +if (isServer) then { + [QGVAR(addObjects), { + params ["_objects", ["_curator",objNull]]; + + if !(isNull _curator) exitWith { _curator addCuratorEditableObjects [_objects, true]; }; + + { + _x addCuratorEditableObjects [_objects, true]; + } forEach allCurators; + }] call CBA_fnc_addEventHandler; + + [QGVAR(removeObjects), { + params ["_objects", ["_curator",objNull]]; + + if !(isNull _curator) exitWith { _curator removeCuratorEditableObjects [_objects, true]; }; + + { + _x removeCuratorEditableObjects [_objects, true]; + } forEach allCurators; + }] call CBA_fnc_addEventHandler; +}; diff --git a/addons/zeus/config.cpp b/addons/zeus/config.cpp index ac7ac9832a..84659b0641 100644 --- a/addons/zeus/config.cpp +++ b/addons/zeus/config.cpp @@ -5,11 +5,13 @@ class CfgPatches { name = COMPONENT_NAME; units[] = { QGVAR(moduleDefendArea), + QGVAR(moduleEditableObjects), QGVAR(moduleGlobalSetSkill), QGVAR(moduleGroupSide), QGVAR(modulePatrolArea), QGVAR(moduleSearchArea), QGVAR(moduleSearchNearby), + QGVAR(moduleSimulation), QGVAR(moduleTeleportPlayers) }; weapons[] = {}; @@ -49,6 +51,7 @@ class ACE_Curator { GVAR(cargoAndRepair)[] = {"ace_cargo", "ace_repair"}; }; +#include "CfgFactionClasses.hpp" #include "CfgEventHandlers.hpp" #include "CfgVehicles.hpp" #include "ACE_Settings.hpp" diff --git a/addons/zeus/functions/fnc_bi_moduleCurator.sqf b/addons/zeus/functions/fnc_bi_moduleCurator.sqf index 231f2cb08d..66395fbb0c 100644 --- a/addons/zeus/functions/fnc_bi_moduleCurator.sqf +++ b/addons/zeus/functions/fnc_bi_moduleCurator.sqf @@ -10,7 +10,7 @@ * 2: activated * * Return Value: - * nil + * None * * Public: No */ @@ -98,7 +98,7 @@ if (_activated) then { //--- Handle ownership [_logic,_ownerVar,_ownerUID,_adminVar] spawn { scriptname "BIS_fnc_moduleCurator: Owner"; - + params ["_logic", "_ownerVar", "_ownerUID", "_adminVar"]; if (_adminVar != "") then {_ownerVar = _adminVar;}; diff --git a/addons/zeus/functions/fnc_bi_moduleMine.sqf b/addons/zeus/functions/fnc_bi_moduleMine.sqf index 5a14fbe218..940dd94f38 100644 --- a/addons/zeus/functions/fnc_bi_moduleMine.sqf +++ b/addons/zeus/functions/fnc_bi_moduleMine.sqf @@ -9,7 +9,7 @@ * 2: activated * * Return Value: - * nil + * None * * Public: No */ diff --git a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf index 1a9da0ab02..70002cc215 100644 --- a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf +++ b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf @@ -10,7 +10,7 @@ * 2: activated * * Return Value: - * nil + * None * * Public: No */ diff --git a/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf b/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf index f32afef130..79cd35477f 100644 --- a/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf +++ b/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf @@ -9,7 +9,7 @@ * 2: activated * * Return Value: - * nil + * None * * Public: No */ diff --git a/addons/zeus/functions/fnc_handleZeusUnitAssigned.sqf b/addons/zeus/functions/fnc_handleZeusUnitAssigned.sqf index 65663e65fd..fada3f1e32 100644 --- a/addons/zeus/functions/fnc_handleZeusUnitAssigned.sqf +++ b/addons/zeus/functions/fnc_handleZeusUnitAssigned.sqf @@ -12,7 +12,7 @@ * 1: The zeus player * * Return Value: - * nil + * None * * Public: No */ diff --git a/addons/zeus/functions/fnc_moduleCaptive.sqf b/addons/zeus/functions/fnc_moduleCaptive.sqf index 7d1c46f873..732c165fa4 100644 --- a/addons/zeus/functions/fnc_moduleCaptive.sqf +++ b/addons/zeus/functions/fnc_moduleCaptive.sqf @@ -8,7 +8,7 @@ * 2: Activated * * Return Value: - * None + * None * * Public: No */ diff --git a/addons/zeus/functions/fnc_moduleGlobalSetSkill.sqf b/addons/zeus/functions/fnc_moduleGlobalSetSkill.sqf index 35c6476cc0..58e7ad19c5 100644 --- a/addons/zeus/functions/fnc_moduleGlobalSetSkill.sqf +++ b/addons/zeus/functions/fnc_moduleGlobalSetSkill.sqf @@ -7,10 +7,7 @@ * 1: Variable new value * * Return Value: - * None - * - * Example: - * "ace_zeus_GlobalSkillAI" addPublicVariableEventHandler ace_zeus_fnc_moduleGlobalSetSkill + * None * * Public: No */ diff --git a/addons/zeus/functions/fnc_moduleGroupSide.sqf b/addons/zeus/functions/fnc_moduleGroupSide.sqf index fa37ca3463..050b92a9fc 100644 --- a/addons/zeus/functions/fnc_moduleGroupSide.sqf +++ b/addons/zeus/functions/fnc_moduleGroupSide.sqf @@ -7,7 +7,7 @@ * 1: Chosen side * * Return Value: - * None + * None * * Example: * [this, west] call ace_zeus_fnc_moduleGroupSide diff --git a/addons/zeus/functions/fnc_moduleSearchNearby.sqf b/addons/zeus/functions/fnc_moduleSearchNearby.sqf index 48f35bbfee..76f77c489e 100644 --- a/addons/zeus/functions/fnc_moduleSearchNearby.sqf +++ b/addons/zeus/functions/fnc_moduleSearchNearby.sqf @@ -8,7 +8,7 @@ * 2: Activated * * Return Value: - * None + * None * * Public: No */ diff --git a/addons/zeus/functions/fnc_moduleSetMedic.sqf b/addons/zeus/functions/fnc_moduleSetMedic.sqf index d4acda3f54..14dfca4f6f 100644 --- a/addons/zeus/functions/fnc_moduleSetMedic.sqf +++ b/addons/zeus/functions/fnc_moduleSetMedic.sqf @@ -8,7 +8,7 @@ * 2: Activated * * Return Value: - * None + * None * * Public: No */ diff --git a/addons/zeus/functions/fnc_moduleSetMedicalFacility.sqf b/addons/zeus/functions/fnc_moduleSetMedicalFacility.sqf index 1e710bf41b..4c26ccdd71 100644 --- a/addons/zeus/functions/fnc_moduleSetMedicalFacility.sqf +++ b/addons/zeus/functions/fnc_moduleSetMedicalFacility.sqf @@ -8,7 +8,7 @@ * 2: Activated * * Return Value: - * None + * None * * Public: No */ diff --git a/addons/zeus/functions/fnc_moduleSetMedicalVehicle.sqf b/addons/zeus/functions/fnc_moduleSetMedicalVehicle.sqf index 4ffec3460e..abbc26b1ed 100644 --- a/addons/zeus/functions/fnc_moduleSetMedicalVehicle.sqf +++ b/addons/zeus/functions/fnc_moduleSetMedicalVehicle.sqf @@ -8,7 +8,7 @@ * 2: Activated * * Return Value: - * None + * None * * Public: No */ diff --git a/addons/zeus/functions/fnc_moduleSimulation.sqf b/addons/zeus/functions/fnc_moduleSimulation.sqf new file mode 100644 index 0000000000..fab59e48eb --- /dev/null +++ b/addons/zeus/functions/fnc_moduleSimulation.sqf @@ -0,0 +1,27 @@ +/* + * Author: Fisher, SilentSpike + * Toggle Simulation on object. + * + * Arguments: + * 0: The module logic + * + * Return Value: + * None + * + * Public: No + */ + +#include "script_component.hpp" + +params ["_logic"]; + +if !(local _logic) exitWith {}; + +private _object = attachedTo _logic; +if (isNull _object) then { + [LSTRING(NothingSelected)] call EFUNC(common,displayTextStructured); +} else { + [QEGVAR(common,enableSimulationGlobal), [_object, !(simulationEnabled _object)]] call CBA_fnc_serverEvent; +}; + +deleteVehicle _logic; diff --git a/addons/zeus/functions/fnc_moduleSurrender.sqf b/addons/zeus/functions/fnc_moduleSurrender.sqf index e14501feb0..d6d030a4c5 100644 --- a/addons/zeus/functions/fnc_moduleSurrender.sqf +++ b/addons/zeus/functions/fnc_moduleSurrender.sqf @@ -8,7 +8,7 @@ * 2: Activated * * Return Value: - * None + * None * * Public: No */ diff --git a/addons/zeus/functions/fnc_moduleTeleportPlayers.sqf b/addons/zeus/functions/fnc_moduleTeleportPlayers.sqf index 2a43f26ed1..4a1855ba65 100644 --- a/addons/zeus/functions/fnc_moduleTeleportPlayers.sqf +++ b/addons/zeus/functions/fnc_moduleTeleportPlayers.sqf @@ -8,7 +8,7 @@ * 2: Teleport group * * Return Value: - * None + * None * * Example: * [player, "5854854754", false] call ace_zeus_fnc_moduleTeleportPlayers diff --git a/addons/zeus/functions/fnc_moduleUnconscious.sqf b/addons/zeus/functions/fnc_moduleUnconscious.sqf index d9f9031cee..502847feda 100644 --- a/addons/zeus/functions/fnc_moduleUnconscious.sqf +++ b/addons/zeus/functions/fnc_moduleUnconscious.sqf @@ -8,7 +8,7 @@ * 2: Activated * * Return Value: - * None + * None * * Public: No */ diff --git a/addons/zeus/functions/fnc_moduleZeusSettings.sqf b/addons/zeus/functions/fnc_moduleZeusSettings.sqf index 0f3d720599..0b4e3b4027 100644 --- a/addons/zeus/functions/fnc_moduleZeusSettings.sqf +++ b/addons/zeus/functions/fnc_moduleZeusSettings.sqf @@ -8,7 +8,7 @@ * 2: activated * * Return Value: - * None + * None * * Public: No */ diff --git a/addons/zeus/functions/fnc_ui_attributeCargo.sqf b/addons/zeus/functions/fnc_ui_attributeCargo.sqf index 444fa5e7e2..49e5c6b2ea 100644 --- a/addons/zeus/functions/fnc_ui_attributeCargo.sqf +++ b/addons/zeus/functions/fnc_ui_attributeCargo.sqf @@ -7,10 +7,7 @@ * 0: ace_cargo controls group * * Return Value: - * None - * - * Example: - * onSetFocus = "_this call ace_zeus_fnc_ui_vehCargo" + * None * * Public: No */ @@ -20,7 +17,7 @@ params ["_control"]; TRACE_1("params",_control); -private _veh = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull); +private _veh = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); TRACE_1("",_veh); private _loaded = _veh getVariable [QEGVAR(cargo,loaded), []]; diff --git a/addons/zeus/functions/fnc_ui_attributePosition.sqf b/addons/zeus/functions/fnc_ui_attributePosition.sqf index 95557a891b..d6ae581ae4 100644 --- a/addons/zeus/functions/fnc_ui_attributePosition.sqf +++ b/addons/zeus/functions/fnc_ui_attributePosition.sqf @@ -6,19 +6,17 @@ * 0: position controls group * * Return Value: - * None + * None * * Public: No */ #include "script_component.hpp" -disableSerialization; - //Generic Init: params ["_control"]; private _display = ctrlParent _control; -private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull); +private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); _control ctrlRemoveAllEventHandlers "setFocus"; diff --git a/addons/zeus/functions/fnc_ui_attributeRadius.sqf b/addons/zeus/functions/fnc_ui_attributeRadius.sqf index c26f8ac97d..7330d1b170 100644 --- a/addons/zeus/functions/fnc_ui_attributeRadius.sqf +++ b/addons/zeus/functions/fnc_ui_attributeRadius.sqf @@ -6,15 +6,13 @@ * 0: radius controls group * * Return Value: - * None + * None * * Public: No */ #include "script_component.hpp" -disableSerialization; - //Generic Init: params ["_control"]; private _display = ctrlParent _control; diff --git a/addons/zeus/functions/fnc_ui_defendArea.sqf b/addons/zeus/functions/fnc_ui_defendArea.sqf index 6fcb4a17d5..492f74cf48 100644 --- a/addons/zeus/functions/fnc_ui_defendArea.sqf +++ b/addons/zeus/functions/fnc_ui_defendArea.sqf @@ -6,19 +6,17 @@ * 0: dummy controls group * * Return Value: - * None + * None * * Public: No */ #include "script_component.hpp" -disableSerialization; - //Generic Init: params ["_control"]; private _display = ctrlParent _control; -private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull); +private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); _control ctrlRemoveAllEventHandlers "setFocus"; diff --git a/addons/zeus/functions/fnc_ui_editableObjects.sqf b/addons/zeus/functions/fnc_ui_editableObjects.sqf new file mode 100644 index 0000000000..040bd2630f --- /dev/null +++ b/addons/zeus/functions/fnc_ui_editableObjects.sqf @@ -0,0 +1,65 @@ +/* + * Author: Fisher, SilentSpike + * Updated all/local curator with objects in the module radius. + * + * Arguments: + * 0: editableObjects controls group + * + * Return Value: + * None + * + * Public: No + */ + +#include "script_component.hpp" + +params ["_control"]; + +//Generic Init: +private _display = ctrlParent _control; +private _ctrlButtonOK = _display displayCtrl 1; //IDC_OK +private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); +TRACE_1("logicObject",_logic); + +_control ctrlRemoveAllEventHandlers "setFocus"; + +//Specific on-load stuff: +(_display displayCtrl 16188) cbSetChecked true; + +private _fnc_onUnload = { + private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); + if (isNull _logic) exitWith {}; + + if (_this select 1 == 2) then { + deleteVehicle _logic; + }; +}; + +private _fnc_onConfirm = { + params [["_ctrlButtonOK", controlNull, [controlNull]]]; + + private _display = ctrlParent _ctrlButtonOK; + if (isNull _display) exitWith {}; + + private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); + if (isNull _logic) exitWith {}; + + private _radius = GETVAR(_display,GVAR(radius),50); + private _position = GETVAR(_display,GVAR(position),getPos _logic); + private _allCurators = cbChecked (_display displayCtrl 16188); + private _removeObjects = cbChecked (_display displayCtrl 16189); + + private _objects = nearestObjects [_position, ["All"], _radius]; + private _localCurator = [getAssignedCuratorLogic player, objNull] select _allCurators; + + if (_removeObjects) then { + [QGVAR(removeObjects), [_objects, _localCurator]] call CBA_fnc_serverEvent; + } else { + [QGVAR(addObjects), [_objects, _localCurator]] call CBA_fnc_serverEvent; + }; + + deleteVehicle _logic; +}; + +_display displayAddEventHandler ["unload", _fnc_onUnload]; +_ctrlButtonOK ctrlAddEventHandler ["buttonClick", _fnc_onConfirm]; diff --git a/addons/zeus/functions/fnc_ui_globalSetSkill.sqf b/addons/zeus/functions/fnc_ui_globalSetSkill.sqf index 8dcac19bce..68ffc95033 100644 --- a/addons/zeus/functions/fnc_ui_globalSetSkill.sqf +++ b/addons/zeus/functions/fnc_ui_globalSetSkill.sqf @@ -6,25 +6,20 @@ * 0: globalSetSkill controls group * * Return Value: - * None - * - * Example: - * onSetFocus = "_this call ace_zeus_fnc_ui_globalSetSkill" + * None * * Public: No */ #include "script_component.hpp" -disableSerialization; - params ["_control"]; TRACE_1("params",_control); //Generic Init: -private _display = ctrlparent _control; -private _ctrlButtonOK = _display displayctrl 1; //IDC_OK -private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull); +private _display = ctrlParent _control; +private _ctrlButtonOK = _display displayCtrl 1; //IDC_OK +private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); TRACE_1("logicObject",_logic); _control ctrlRemoveAllEventHandlers "setFocus"; diff --git a/addons/zeus/functions/fnc_ui_groupSide.sqf b/addons/zeus/functions/fnc_ui_groupSide.sqf index be3298c8da..46418a71fc 100644 --- a/addons/zeus/functions/fnc_ui_groupSide.sqf +++ b/addons/zeus/functions/fnc_ui_groupSide.sqf @@ -6,10 +6,7 @@ * 0: groupSide controls group * * Return Value: - * NONE - * - * Example: - * onSetFocus = "_this call ace_zeus_fnc_ui_groupSide" + * None * * Public: No */ @@ -17,14 +14,12 @@ #include "script_component.hpp" #define IDCs [31201,31200,31202,31203] -disableSerialization; - params ["_control"]; //Generic Init: -private _display = ctrlparent _control; -private _ctrlButtonOK = _display displayctrl 1; //IDC_OK -private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull); +private _display = ctrlParent _control; +private _ctrlButtonOK = _display displayCtrl 1; //IDC_OK +private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); TRACE_1("logicObject",_logic); _control ctrlRemoveAllEventHandlers "setFocus"; diff --git a/addons/zeus/functions/fnc_ui_patrolArea.sqf b/addons/zeus/functions/fnc_ui_patrolArea.sqf index d4fbc092a0..9db2df9773 100644 --- a/addons/zeus/functions/fnc_ui_patrolArea.sqf +++ b/addons/zeus/functions/fnc_ui_patrolArea.sqf @@ -6,19 +6,17 @@ * 0: dummy controls group * * Return Value: - * None + * None * * Public: No */ #include "script_component.hpp" -disableSerialization; - //Generic Init: params ["_control"]; private _display = ctrlParent _control; -private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull); +private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); _control ctrlRemoveAllEventHandlers "setFocus"; diff --git a/addons/zeus/functions/fnc_ui_searchArea.sqf b/addons/zeus/functions/fnc_ui_searchArea.sqf index 3da147b963..d30af4e234 100644 --- a/addons/zeus/functions/fnc_ui_searchArea.sqf +++ b/addons/zeus/functions/fnc_ui_searchArea.sqf @@ -6,19 +6,17 @@ * 0: dummy controls group * * Return Value: - * None + * None * * Public: No */ #include "script_component.hpp" -disableSerialization; - //Generic Init: params ["_control"]; private _display = ctrlParent _control; -private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull); +private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); _control ctrlRemoveAllEventHandlers "setFocus"; diff --git a/addons/zeus/functions/fnc_ui_teleportPlayers.sqf b/addons/zeus/functions/fnc_ui_teleportPlayers.sqf index bdcd8ae93f..cd5fd82d8d 100644 --- a/addons/zeus/functions/fnc_ui_teleportPlayers.sqf +++ b/addons/zeus/functions/fnc_ui_teleportPlayers.sqf @@ -6,24 +6,19 @@ * 0: teleportPlayers controls group * * Return Value: - * NONE - * - * Example: - * onSetFocus = "_this call ace_zeus_fnc_ui_teleportPlayers" + * None * * Public: No */ #include "script_component.hpp" -disableSerialization; - params ["_control"]; //Generic Init: -private _display = ctrlparent _control; -private _ctrlButtonOK = _display displayctrl 1; //IDC_OK -private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull); +private _display = ctrlParent _control; +private _ctrlButtonOK = _display displayCtrl 1; //IDC_OK +private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); TRACE_1("logicObject",_logic); _control ctrlRemoveAllEventHandlers "setFocus"; diff --git a/addons/zeus/functions/fnc_zeusAttributes.sqf b/addons/zeus/functions/fnc_zeusAttributes.sqf index dcbef69510..5481120cd3 100644 --- a/addons/zeus/functions/fnc_zeusAttributes.sqf +++ b/addons/zeus/functions/fnc_zeusAttributes.sqf @@ -9,7 +9,7 @@ * 2: Display class name * * Return Value: - * None + * None * * Example: * onLoad = "['onLoad',_this,'RscDisplayExample'] call ace_zeus_fnc_zeusAttributes" diff --git a/addons/zeus/stringtable.xml b/addons/zeus/stringtable.xml index 317f423b4e..a120c27c08 100644 --- a/addons/zeus/stringtable.xml +++ b/addons/zeus/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -205,6 +205,21 @@ Osłaniaj obszar Verteidige Gebiet + + Update Editable Objects + + + All Curators + + + Apply changes to all curators + + + Remove Objects + + + Remove existing instead of adding new + Global AI Skill Compétence global de l'IA @@ -465,6 +480,9 @@ Assigner installation médicale 医療施設として割り当て + + Toggle Simulation + Add Spare Wheel Adicionar roda sobressalente @@ -696,4 +714,4 @@ Ungültiger Radius eingegeben - \ No newline at end of file + diff --git a/addons/zeus/ui/RscAttributes.hpp b/addons/zeus/ui/RscAttributes.hpp index 1efcde2c66..27f89d89c0 100644 --- a/addons/zeus/ui/RscAttributes.hpp +++ b/addons/zeus/ui/RscAttributes.hpp @@ -97,6 +97,59 @@ class GVAR(RscDefendArea): RscDisplayAttributes { }; }; +class GVAR(RscEditableObjects): RscDisplayAttributes { + onLoad = QUOTE([ARR_3('onLoad', _this, QQGVAR(RscEditableObjects))] call FUNC(zeusAttributes)); + onUnload = QUOTE([ARR_3('onUnload', _this, QQGVAR(RscEditableObjects))] call FUNC(zeusAttributes)); + class Controls: Controls { + class Background: Background {}; + class Title: Title {}; + class Content: Content { + class Controls { + class radius: GVAR(AttributeRadius) {}; + //class position: GVAR(AttributePosition) {}; + class editableObjects: RscControlsGroupNoScrollbars { + onSetFocus = QUOTE(_this call FUNC(ui_editableObjects)); + idc = 26422; + x = 0; + y = 0; + w = W_PART(11.1); + h = H_PART(2.5); + class controls { + class Label: RscText { + idc = -1; + text = CSTRING(ModuleEditableObjects_curators); + toolTip = CSTRING(ModuleEditableObjects_curators_desc); + x = 0; + y = 0; + w = W_PART(10); + h = H_PART(1); + colorBackground[] = {0,0,0,0.5}; + }; + class AllCurators: RscCheckBox { + idc = 16188; + x = W_PART(10.1); + y = 0; + w = W_PART(1); + h = H_PART(1); + }; + class Label2: Label { + text = CSTRING(ModuleEditableObjects_removal); + toolTip = CSTRING(ModuleEditableObjects_removal_desc); + y = H_PART(1.1); + }; + class EditingMode: AllCurators { + idc = 16189; + y = H_PART(1.1); + }; + }; + }; + }; + }; + class ButtonOK: ButtonOK {}; + class ButtonCancel: ButtonCancel {}; + }; +}; + class GVAR(RscGlobalSetSkill): RscDisplayAttributes { onLoad = QUOTE([ARR_3('onLoad', _this, QUOTE(QGVAR(RscGlobalSetSkill)))] call FUNC(zeusAttributes)); onUnload = QUOTE([ARR_3('onUnload', _this, QUOTE(QGVAR(RscGlobalSetSkill)))] call FUNC(zeusAttributes));