From bca8b01860475ab8817d7c38f27eb84b4cfc6f79 Mon Sep 17 00:00:00 2001 From: mharis001 <34453221+mharis001@users.noreply.github.com> Date: Sat, 24 Feb 2018 12:44:57 -0500 Subject: [PATCH] Various additions to ace_zeus (#6036) * Add search to teleport players UI * Change group side icons to look better * Improve teleport UI and add stringtable entries * Add Assign Repair Vehicle module * Add Assign Repair Facility module * Add Assign Engineer module * Add Full Heal module * Add Suicide Bomber module * Make heal module work without ace_medical * Add suicide bomber module translations * Improve attribute cargo to use displayName * Improve set engineer ui * ACE_Curator for repair modules + author array * Add angle param to getModuleDestination * Prevent multiple suicide bomber modules on same target * Heal module: support BI scripted revive system * Requested changes --- addons/ai/XEH_postInit.sqf | 29 +- addons/zeus/CfgVehicles.hpp | 34 +++ addons/zeus/XEH_PREP.hpp | 7 + addons/zeus/config.cpp | 16 +- .../zeus/functions/fnc_addObjectToCurator.sqf | 1 - .../zeus/functions/fnc_bi_moduleArsenal.sqf | 1 - .../zeus/functions/fnc_bi_moduleCurator.sqf | 1 - addons/zeus/functions/fnc_bi_moduleMine.sqf | 1 - .../functions/fnc_bi_moduleProjectile.sqf | 1 - .../functions/fnc_bi_moduleRemoteControl.sqf | 1 - .../functions/fnc_getModuleDestination.sqf | 15 +- .../functions/fnc_handleZeusUnitAssigned.sqf | 1 - addons/zeus/functions/fnc_moduleCaptive.sqf | 1 - addons/zeus/functions/fnc_moduleGarrison.sqf | 1 - .../functions/fnc_moduleGlobalSetSkill.sqf | 1 - addons/zeus/functions/fnc_moduleGroupSide.sqf | 1 - addons/zeus/functions/fnc_moduleHeal.sqf | 58 ++++ .../functions/fnc_moduleRemoveAceArsenal.sqf | 1 - .../functions/fnc_moduleRemoveArsenal.sqf | 1 - .../zeus/functions/fnc_moduleSearchNearby.sqf | 1 - .../zeus/functions/fnc_moduleSetEngineer.sqf | 27 ++ addons/zeus/functions/fnc_moduleSetMedic.sqf | 1 - .../fnc_moduleSetMedicalFacility.sqf | 1 - .../functions/fnc_moduleSetMedicalVehicle.sqf | 1 - .../functions/fnc_moduleSetRepairFacility.sqf | 50 ++++ .../functions/fnc_moduleSetRepairVehicle.sqf | 46 ++++ .../zeus/functions/fnc_moduleSimulation.sqf | 1 - .../functions/fnc_moduleSuicideBomber.sqf | 102 +++++++ .../functions/fnc_moduleSuppressiveFire.sqf | 2 +- addons/zeus/functions/fnc_moduleSurrender.sqf | 1 - .../functions/fnc_moduleTeleportPlayers.sqf | 1 - .../functions/fnc_moduleToggleFlashlight.sqf | 1 - addons/zeus/functions/fnc_moduleToggleNvg.sqf | 1 - .../zeus/functions/fnc_moduleUnGarrison.sqf | 1 - .../zeus/functions/fnc_moduleUnconscious.sqf | 1 - .../zeus/functions/fnc_moduleZeusSettings.sqf | 1 - .../zeus/functions/fnc_ui_attributeCargo.sqf | 9 +- .../functions/fnc_ui_attributePosition.sqf | 1 - .../zeus/functions/fnc_ui_attributeRadius.sqf | 1 - addons/zeus/functions/fnc_ui_defendArea.sqf | 1 - .../zeus/functions/fnc_ui_editableObjects.sqf | 1 - addons/zeus/functions/fnc_ui_garrison.sqf | 1 - .../zeus/functions/fnc_ui_globalSetSkill.sqf | 1 - addons/zeus/functions/fnc_ui_groupSide.sqf | 1 - addons/zeus/functions/fnc_ui_patrolArea.sqf | 1 - addons/zeus/functions/fnc_ui_searchArea.sqf | 1 - addons/zeus/functions/fnc_ui_setEngineer.sqf | 75 +++++ .../zeus/functions/fnc_ui_suicideBomber.sqf | 151 +++++++++++ .../zeus/functions/fnc_ui_teleportPlayers.sqf | 33 ++- .../functions/fnc_ui_toggleFlashlight.sqf | 1 - addons/zeus/functions/fnc_ui_toggleNvg.sqf | 1 - addons/zeus/functions/fnc_zeusAttributes.sqf | 1 - addons/zeus/stringtable.xml | 256 ++++++++++++++++++ addons/zeus/ui/Icon_Module_Zeus_Heal_ca.paa | Bin 0 -> 5625 bytes addons/zeus/ui/RscAttributes.hpp | 217 ++++++++++++++- 55 files changed, 1100 insertions(+), 64 deletions(-) create mode 100644 addons/zeus/functions/fnc_moduleHeal.sqf create mode 100644 addons/zeus/functions/fnc_moduleSetEngineer.sqf create mode 100644 addons/zeus/functions/fnc_moduleSetRepairFacility.sqf create mode 100644 addons/zeus/functions/fnc_moduleSetRepairVehicle.sqf create mode 100644 addons/zeus/functions/fnc_moduleSuicideBomber.sqf create mode 100644 addons/zeus/functions/fnc_ui_setEngineer.sqf create mode 100644 addons/zeus/functions/fnc_ui_suicideBomber.sqf create mode 100644 addons/zeus/ui/Icon_Module_Zeus_Heal_ca.paa diff --git a/addons/ai/XEH_postInit.sqf b/addons/ai/XEH_postInit.sqf index cf0ab8e49d..25bd328ff7 100644 --- a/addons/ai/XEH_postInit.sqf +++ b/addons/ai/XEH_postInit.sqf @@ -16,9 +16,10 @@ }] call CBA_fnc_addEventHandler; [QGVAR(unGarrison), FUNC(unGarrison)] call CBA_fnc_addEventHandler; + [QGVAR(doMove), { params ["_unitsArray"]; - { + { _x params ["_unit", "_pos"]; //_unit doFollow leader _unit; _unit setDestination [_pos, "LEADER PLANNED", true]; @@ -26,14 +27,16 @@ LOG(format [ARR_4("XEH_postInit: %1 doMove %2 | ID %3", _unit, _pos, clientOwner)]); } foreach _unitsArray }] call CBA_fnc_addEventHandler; + [QGVAR(setBehaviour), { params ["_groupsArray", "_behaviour"]; - { + { _x params ["_group"]; _group setBehaviour _behaviour; LOG(format [ARR_4("XEH_postInit: %1 setBehaviour %2 | ID %3", _group, _behaviour, clientOwner)]); } foreach _groupsArray }] call CBA_fnc_addEventHandler; + [QGVAR(enableAttack), { params ["_unitsArray", "_mode"]; { @@ -43,6 +46,26 @@ } foreach _unitsArray }] call CBA_fnc_addEventHandler; +[QGVAR(setUnitPos), { + params ["_unit", "_mode"]; + _unit setUnitPos _mode; +}] call CBA_fnc_addEventHandler; + +[QGVAR(setSpeedMode), { + params ["_unit", "_mode"]; + _unit setSpeedMode _mode; +}] call CBA_fnc_addEventHandler; + +[QGVAR(setCombatMode), { + params ["_unit", "_mode"]; + _unit setCombatMode _mode; +}] call CBA_fnc_addEventHandler; + +[QGVAR(allowFleeing), { + params ["_unit", "_cowardice"]; + _unit allowFleeing _cowardice; +}] call CBA_fnc_addEventHandler; + #ifdef DEBUG_MODE_FULL addMissionEventHandler ["Draw3D", { private _unitMoveList = missionNameSpace getVariable [QGVAR(garrison_unitMoveList), []]; @@ -81,4 +104,4 @@ }; } foreach _unitMoveList; }]; -#endif \ No newline at end of file +#endif diff --git a/addons/zeus/CfgVehicles.hpp b/addons/zeus/CfgVehicles.hpp index efa777e5ec..f37c5e8310 100644 --- a/addons/zeus/CfgVehicles.hpp +++ b/addons/zeus/CfgVehicles.hpp @@ -107,6 +107,27 @@ class CfgVehicles { function = QFUNC(moduleAddSpareWheel); icon = "a3\ui_f\data\IGUI\Cfg\Actions\repair_ca.paa"; }; + class GVAR(moduleSetEngineer): GVAR(moduleBase) { + curatorCanAttach = 1; + category = QGVAR(Repair); + displayName = CSTRING(ModuleSetEngineer_DisplayName); + curatorInfoType = QGVAR(RscSetEngineer); + icon = "a3\ui_f\data\IGUI\Cfg\Actions\repair_ca.paa"; + }; + class GVAR(moduleSetRepairFacility): GVAR(moduleBase) { + curatorCanAttach = 1; + category = QGVAR(Repair); + displayName = CSTRING(ModuleSetRepairFacility_DisplayName); + function = QFUNC(moduleSetRepairFacility); + icon = "a3\ui_f\data\IGUI\Cfg\Actions\repair_ca.paa"; + }; + class GVAR(moduleSetRepairVehicle): GVAR(moduleBase) { + curatorCanAttach = 1; + category = QGVAR(Repair); + displayName = CSTRING(ModuleSetRepairVehicle_DisplayName); + function = QFUNC(moduleSetRepairVehicle); + icon = "a3\ui_f\data\IGUI\Cfg\Actions\repair_ca.paa"; + }; class GVAR(moduleAddOrRemoveFRIES): GVAR(moduleBase) { curatorCanAttach = 1; category = QGVAR(Utility); @@ -150,6 +171,13 @@ class CfgVehicles { displayName = CSTRING(ModuleGroupSide_DisplayName); curatorInfoType = QGVAR(RscGroupSide); }; + class GVAR(moduleHeal): GVAR(moduleBase) { + curatorCanAttach = 1; + category = QGVAR(Medical); + displayName = CSTRING(ModuleHeal_DisplayName); + function = QFUNC(moduleHeal); + icon = QPATHTOF(ui\Icon_Module_Zeus_Heal_ca.paa); + }; class GVAR(moduleLoadIntoCargo): GVAR(moduleBase) { curatorCanAttach = 1; category = QGVAR(Utility); @@ -208,6 +236,12 @@ class CfgVehicles { displayName = CSTRING(ModuleSimulation_DisplayName); function = QFUNC(moduleSimulation); }; + class GVAR(moduleSuicideBomber): GVAR(moduleBase) { + curatorCanAttach = 1; + category = QGVAR(AI); + displayName = CSTRING(ModuleSuicideBomber_DisplayName); + curatorInfoType = QGVAR(RscSuicideBomber); + }; class GVAR(moduleSurrender): GVAR(moduleBase) { curatorCanAttach = 1; category = QGVAR(Captive); diff --git a/addons/zeus/XEH_PREP.hpp b/addons/zeus/XEH_PREP.hpp index 648282216a..4fa21ff340 100644 --- a/addons/zeus/XEH_PREP.hpp +++ b/addons/zeus/XEH_PREP.hpp @@ -17,14 +17,19 @@ PREP(moduleConfigurePylons); PREP(moduleGarrison); PREP(moduleGlobalSetSkill); PREP(moduleGroupSide); +PREP(moduleHeal); PREP(moduleLoadIntoCargo); PREP(moduleRemoveArsenal); PREP(moduleRemoveAceArsenal); PREP(moduleSearchNearby); +PREP(moduleSetEngineer); PREP(moduleSetMedic); PREP(moduleSetMedicalVehicle); PREP(moduleSetMedicalFacility); +PREP(moduleSetRepairFacility); +PREP(moduleSetRepairVehicle); PREP(moduleSimulation); +PREP(moduleSuicideBomber); PREP(moduleSuppressiveFire); PREP(moduleSuppressiveFireLocal); PREP(moduleSurrender); @@ -45,6 +50,8 @@ PREP(ui_globalSetSkill); PREP(ui_groupSide); PREP(ui_patrolArea); PREP(ui_searchArea); +PREP(ui_setEngineer); +PREP(ui_suicideBomber); PREP(ui_teleportPlayers); PREP(ui_toggleFlashlight); PREP(ui_toggleNvg); diff --git a/addons/zeus/config.cpp b/addons/zeus/config.cpp index 8e6d9767d6..37cfa24dd4 100644 --- a/addons/zeus/config.cpp +++ b/addons/zeus/config.cpp @@ -22,15 +22,17 @@ class CfgPatches { QGVAR(moduleSuppressiveFire), QGVAR(AddFullArsenal), QGVAR(RemoveFullArsenal), + QGVAR(moduleTeleportPlayers), + QGVAR(moduleHeal), + QGVAR(moduleSuicideBomber), QGVAR(AddFullAceArsenal), - QGVAR(RemoveFullAceArsenal), - QGVAR(moduleTeleportPlayers) + QGVAR(RemoveFullAceArsenal) }; weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common", "ace_ai"}; author = ECSTRING(common,ACETeam); - authors[] = {"SilentSpike"}; + authors[] = {"SilentSpike", "mharis001"}; url = ECSTRING(main,URL); VERSION_CONFIG; }; @@ -55,6 +57,13 @@ class CfgPatches { QGVAR(moduleLoadIntoCargo) }; }; + class GVAR(repair): ADDON { + units[] = { + QGVAR(moduleSetEngineer), + QGVAR(moduleSetRepairVehicle), + QGVAR(moduleSetRepairFacility) + }; + }; class GVAR(cargoAndRepair): ADDON { units[] = { QGVAR(moduleAddSpareTrack), @@ -83,6 +92,7 @@ class ACE_Curator { GVAR(captives) = "ace_captives"; GVAR(medical) = "ace_medical"; GVAR(cargo) = "ace_cargo"; + GVAR(repair) = "ace_repair"; GVAR(cargoAndRepair)[] = {"ace_cargo", "ace_repair"}; GVAR(fastroping) = "ace_fastroping"; GVAR(pylons) = "ace_pylons"; diff --git a/addons/zeus/functions/fnc_addObjectToCurator.sqf b/addons/zeus/functions/fnc_addObjectToCurator.sqf index 230f035eb3..7efa8beb64 100644 --- a/addons/zeus/functions/fnc_addObjectToCurator.sqf +++ b/addons/zeus/functions/fnc_addObjectToCurator.sqf @@ -13,7 +13,6 @@ * * Public: No */ - #include "script_component.hpp" params ["_object"]; diff --git a/addons/zeus/functions/fnc_bi_moduleArsenal.sqf b/addons/zeus/functions/fnc_bi_moduleArsenal.sqf index 2990d42633..bc976c7bee 100644 --- a/addons/zeus/functions/fnc_bi_moduleArsenal.sqf +++ b/addons/zeus/functions/fnc_bi_moduleArsenal.sqf @@ -16,7 +16,6 @@ * * Public: No */ - #include "script_component.hpp" params ["_logic", "", "_activated"]; diff --git a/addons/zeus/functions/fnc_bi_moduleCurator.sqf b/addons/zeus/functions/fnc_bi_moduleCurator.sqf index b556b08197..3b863a70a5 100644 --- a/addons/zeus/functions/fnc_bi_moduleCurator.sqf +++ b/addons/zeus/functions/fnc_bi_moduleCurator.sqf @@ -17,7 +17,6 @@ * * Public: No */ - #include "script_component.hpp" params ["_logic", "_units", "_activated"]; diff --git a/addons/zeus/functions/fnc_bi_moduleMine.sqf b/addons/zeus/functions/fnc_bi_moduleMine.sqf index 1c85706d09..cb3be133d1 100644 --- a/addons/zeus/functions/fnc_bi_moduleMine.sqf +++ b/addons/zeus/functions/fnc_bi_moduleMine.sqf @@ -16,7 +16,6 @@ * * Public: No */ - #include "script_component.hpp" params ["_logic", "_units", "_activated"]; diff --git a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf index 3d974c126c..bbb4da0988 100644 --- a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf +++ b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf @@ -17,7 +17,6 @@ * * Public: No */ - #include "script_component.hpp" _logic = _this select 0; diff --git a/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf b/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf index 994b445d8d..687956492d 100644 --- a/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf +++ b/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf @@ -16,7 +16,6 @@ * * Public: No */ - #include "script_component.hpp" _logic = _this select 0; diff --git a/addons/zeus/functions/fnc_getModuleDestination.sqf b/addons/zeus/functions/fnc_getModuleDestination.sqf index f29b42550c..d6aa822b5a 100644 --- a/addons/zeus/functions/fnc_getModuleDestination.sqf +++ b/addons/zeus/functions/fnc_getModuleDestination.sqf @@ -15,6 +15,7 @@ * 2: Text (default: "") * 3: Icon image file (default: "\a3\ui_f\data\IGUI\Cfg\Cursors\select_target_ca.paa") * 4: Icon color (default: [1,0,0,1]) + * 5: Icon Angle (default: 0) * * Return Value: * None @@ -26,7 +27,7 @@ */ #include "script_component.hpp" -params ["_object", "_code", ["_text", ""], ["_icon", "\a3\ui_f\data\IGUI\Cfg\Cursors\select_target_ca.paa"], ["_color", [1,0,0,1]]]; +params ["_object", "_code", ["_text", ""], ["_icon", "\a3\ui_f\data\IGUI\Cfg\Cursors\select_target_ca.paa"], ["_color", [1,0,0,1]], ["_angle", 0]]; if (missionNamespace getVariable [QGVAR(moduleDestination_running), false]) exitWith { [false, _object, [0,0,0], false, false, false] call _code; @@ -86,16 +87,16 @@ GVAR(moduleDestination_displayEHKeyboard) = [findDisplay 312, "KeyDown", { GVAR(moduleDestination_mapDrawEH) = [((findDisplay 312) displayCtrl 50), "draw", { params ["_mapCtrl"]; //IGNORE_PRIVATE_WARNING ["_thisArgs"] - _thisArgs params ["_object", "_text", "_icon", "_color"]; + _thisArgs params ["_object", "_text", "_icon", "_color", "_angle"]; private _pos2d = (((findDisplay 312) displayCtrl 50) ctrlMapScreenToWorld getMousePosition); - _mapCtrl drawIcon [_icon, _color, _pos2d, 24, 24, 45, _text, 1, 0.03, "TahomaB", "right"]; + _mapCtrl drawIcon [_icon, _color, _pos2d, 24, 24, _angle, _text, 1, 0.03, "TahomaB", "right"]; _mapCtrl drawLine [getPos _object, _pos2d, _color]; -}, [_object, _text, _icon, _color]] call CBA_fnc_addBISEventHandler; +}, [_object, _text, _icon, _color, _angle]] call CBA_fnc_addBISEventHandler; // Add draw EH for 3D camera view - draws the 3D icon and line [{ - (_this select 0) params ["_object", "_code", "_text", "_icon", "_color"]; + (_this select 0) params ["_object", "_code", "_text", "_icon", "_color", "_angle"]; if ((isNull _object) || {isNull findDisplay 312} || {!isNull findDisplay 49}) then { TRACE_3("null-exit",isNull _object,isNull findDisplay 312,isNull findDisplay 49); GVAR(moduleDestination_running) = false; @@ -104,7 +105,7 @@ GVAR(moduleDestination_mapDrawEH) = [((findDisplay 312) displayCtrl 50), "draw", if (GVAR(moduleDestination_running)) then { // Draw the 3d icon and line private _mousePosAGL = screenToWorld getMousePosition; - drawIcon3D [_icon, _color, _mousePosAGL, 1.5, 1.5, 45, _text]; + drawIcon3D [_icon, _color, _mousePosAGL, 1.5, 1.5, _angle, _text]; drawLine3D [_mousePosAGL, ASLtoAGL (getPosASL _object), _color];; } else { TRACE_4("cleaning up",_this select 1,GVAR(moduleDestination_displayEHMouse),GVAR(moduleDestination_displayEHKeyboard),GVAR(moduleDestination_mapDrawEH)); @@ -116,4 +117,4 @@ GVAR(moduleDestination_mapDrawEH) = [((findDisplay 312) displayCtrl 50), "draw", GVAR(moduleDestination_displayEHKeyboard) = nil; GVAR(moduleDestination_mapDrawEH) = nil; }; -}, 0, [_object, _code, _text, _icon, _color]] call CBA_fnc_addPerFrameHandler; +}, 0, [_object, _code, _text, _icon, _color, _angle]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/zeus/functions/fnc_handleZeusUnitAssigned.sqf b/addons/zeus/functions/fnc_handleZeusUnitAssigned.sqf index 05c5de668e..58db9b093e 100644 --- a/addons/zeus/functions/fnc_handleZeusUnitAssigned.sqf +++ b/addons/zeus/functions/fnc_handleZeusUnitAssigned.sqf @@ -19,7 +19,6 @@ * * Public: No */ - #include "script_component.hpp" if !(isClass (configFile >> "ACE_Curator")) exitWith { ERROR("The ACE_Curator class does not exist") }; diff --git a/addons/zeus/functions/fnc_moduleCaptive.sqf b/addons/zeus/functions/fnc_moduleCaptive.sqf index 317c785f20..fbb1255b8d 100644 --- a/addons/zeus/functions/fnc_moduleCaptive.sqf +++ b/addons/zeus/functions/fnc_moduleCaptive.sqf @@ -15,7 +15,6 @@ * * Public: No */ - #include "script_component.hpp" params ["_logic"]; diff --git a/addons/zeus/functions/fnc_moduleGarrison.sqf b/addons/zeus/functions/fnc_moduleGarrison.sqf index 2762102d0c..5bc545716d 100644 --- a/addons/zeus/functions/fnc_moduleGarrison.sqf +++ b/addons/zeus/functions/fnc_moduleGarrison.sqf @@ -17,7 +17,6 @@ * * Public: No */ - #include "script_component.hpp" params ["_logic", "_pos", "_radius" ,"_mode" , "_topDownMode", "_teleport"]; diff --git a/addons/zeus/functions/fnc_moduleGlobalSetSkill.sqf b/addons/zeus/functions/fnc_moduleGlobalSetSkill.sqf index 1d4e2769b8..6e275acaf8 100644 --- a/addons/zeus/functions/fnc_moduleGlobalSetSkill.sqf +++ b/addons/zeus/functions/fnc_moduleGlobalSetSkill.sqf @@ -14,7 +14,6 @@ * * Public: No */ - #include "script_component.hpp" params ["_varName", "_varValue"]; diff --git a/addons/zeus/functions/fnc_moduleGroupSide.sqf b/addons/zeus/functions/fnc_moduleGroupSide.sqf index 2a52df09da..2ef385a091 100644 --- a/addons/zeus/functions/fnc_moduleGroupSide.sqf +++ b/addons/zeus/functions/fnc_moduleGroupSide.sqf @@ -14,7 +14,6 @@ * * Public: No */ - #include "script_component.hpp" params ["_unit", "_newSide"]; diff --git a/addons/zeus/functions/fnc_moduleHeal.sqf b/addons/zeus/functions/fnc_moduleHeal.sqf new file mode 100644 index 0000000000..34f7519699 --- /dev/null +++ b/addons/zeus/functions/fnc_moduleHeal.sqf @@ -0,0 +1,58 @@ +/* + * Author: mharis001 + * Full heal unit. + * + * Arguments: + * 0: The module logic + * + * Return Value: + * None + * + * Example: + * [LOGIC] call ace_zeus_fnc_moduleHeal + * + * Public: No + */ +#include "script_component.hpp" + +params ["_logic"]; + +if !(local _logic) exitWith {}; + +private _unit = attachedTo _logic; + +// Validate module target +scopeName "Main"; +private _fnc_errorAndClose = { + params ["_msg"]; + deleteVehicle _logic; + [_msg] call FUNC(showMessage); + breakOut "Main"; +}; + +switch (false) do { + case !(isNull _unit): { + [LSTRING(NothingSelected)] call _fnc_errorAndClose; + }; + case (_unit isKindOf "CAManBase"): { + [LSTRING(OnlyInfantry)] call _fnc_errorAndClose; + }; + case (alive _unit): { + [LSTRING(OnlyAlive)] call _fnc_errorAndClose; + }; +}; + +// Heal validated target +if (["ace_medical"] call EFUNC(common,isModLoaded) && {EGVAR(medical,level) > 0}) then { + [QEGVAR(medical,treatmentAdvanced_fullHealLocal), [_unit, _unit], _unit] call CBA_fnc_targetEvent; +} else { + // BI's scripted revive system + if ((missionNamespace getVariable ["bis_revive_mode", 0]) != 0) then { + ["#rev", 1, _unit] call BIS_fnc_reviveOnState; + _unit setVariable ["#rev", 1, true]; + } else { + _unit setDamage 0; + }; +}; + +deleteVehicle _logic; diff --git a/addons/zeus/functions/fnc_moduleRemoveAceArsenal.sqf b/addons/zeus/functions/fnc_moduleRemoveAceArsenal.sqf index c39b51a3de..83aa319480 100644 --- a/addons/zeus/functions/fnc_moduleRemoveAceArsenal.sqf +++ b/addons/zeus/functions/fnc_moduleRemoveAceArsenal.sqf @@ -10,7 +10,6 @@ * * Public: No */ - #include "script_component.hpp" params ["_logic"]; diff --git a/addons/zeus/functions/fnc_moduleRemoveArsenal.sqf b/addons/zeus/functions/fnc_moduleRemoveArsenal.sqf index 9693881810..97256ca67d 100644 --- a/addons/zeus/functions/fnc_moduleRemoveArsenal.sqf +++ b/addons/zeus/functions/fnc_moduleRemoveArsenal.sqf @@ -10,7 +10,6 @@ * * Public: No */ - #include "script_component.hpp" params ["_logic"]; diff --git a/addons/zeus/functions/fnc_moduleSearchNearby.sqf b/addons/zeus/functions/fnc_moduleSearchNearby.sqf index a73dbd7fe8..2145d62e17 100644 --- a/addons/zeus/functions/fnc_moduleSearchNearby.sqf +++ b/addons/zeus/functions/fnc_moduleSearchNearby.sqf @@ -15,7 +15,6 @@ * * Public: No */ - #include "script_component.hpp" params ["_logic"]; diff --git a/addons/zeus/functions/fnc_moduleSetEngineer.sqf b/addons/zeus/functions/fnc_moduleSetEngineer.sqf new file mode 100644 index 0000000000..e548c6c363 --- /dev/null +++ b/addons/zeus/functions/fnc_moduleSetEngineer.sqf @@ -0,0 +1,27 @@ +/* + * Author: mharis001 + * Zeus module function to set unit engineer skill. + * + * Arguments: + * 0: Unit + * 1: Skill level (1 - Engineer, 2 - Adv. Engineer) (default: 1) + * + * Return Value: + * None + * + * Example: + * [unit, 2] call ace_zeus_fnc_moduleSetEngineer + * + * Public: No + */ +#include "script_component.hpp" + +params ["_unit", ["_engineerN", 1]]; + +if (isNull _unit) exitWith { + ERROR("Passed unit is null"); +}; + +if !([_unit, _engineerN] call EFUNC(repair,isEngineer)) then { + _unit setVariable ["ACE_IsEngineer", _engineerN, true]; +}; diff --git a/addons/zeus/functions/fnc_moduleSetMedic.sqf b/addons/zeus/functions/fnc_moduleSetMedic.sqf index b2cd233bc7..c213bcc25e 100644 --- a/addons/zeus/functions/fnc_moduleSetMedic.sqf +++ b/addons/zeus/functions/fnc_moduleSetMedic.sqf @@ -15,7 +15,6 @@ * * Public: No */ - #include "script_component.hpp" params ["_logic"]; diff --git a/addons/zeus/functions/fnc_moduleSetMedicalFacility.sqf b/addons/zeus/functions/fnc_moduleSetMedicalFacility.sqf index 4977b21986..e9f39019a2 100644 --- a/addons/zeus/functions/fnc_moduleSetMedicalFacility.sqf +++ b/addons/zeus/functions/fnc_moduleSetMedicalFacility.sqf @@ -15,7 +15,6 @@ * * Public: No */ - #include "script_component.hpp" params ["_logic"]; diff --git a/addons/zeus/functions/fnc_moduleSetMedicalVehicle.sqf b/addons/zeus/functions/fnc_moduleSetMedicalVehicle.sqf index a819a15d9e..a4555c5ff9 100644 --- a/addons/zeus/functions/fnc_moduleSetMedicalVehicle.sqf +++ b/addons/zeus/functions/fnc_moduleSetMedicalVehicle.sqf @@ -15,7 +15,6 @@ * * Public: No */ - #include "script_component.hpp" params ["_logic"]; diff --git a/addons/zeus/functions/fnc_moduleSetRepairFacility.sqf b/addons/zeus/functions/fnc_moduleSetRepairFacility.sqf new file mode 100644 index 0000000000..a35533f4f4 --- /dev/null +++ b/addons/zeus/functions/fnc_moduleSetRepairFacility.sqf @@ -0,0 +1,50 @@ +/* + * Author: mharis001 + * Assigns object as repair facility. + * + * Arguments: + * 0: The module logic + * + * Return Value: + * None + * + * Example: + * [LOGIC] call ace_zeus_fnc_moduleSetRepairFacility + * + * Public: No + */ + #include "script_component.hpp" + + params ["_logic"]; + + if !(local _logic) exitWith {}; + +if !(["ace_repair"] call EFUNC(common,isModLoaded)) then { + [LSTRING(RequiresAddon)] call FUNC(showMessage); +} else { + private _mouseOver = GETMVAR(bis_fnc_curatorObjectPlaced_mouseOver,[""]); + + if ((_mouseOver select 0) != "OBJECT") then { + [LSTRING(NothingSelected)] call FUNC(showMessage); + } else { + private _unit = (_mouseOver select 1); + + if (_unit isKindOf "Man" || {!(_unit isKindOf "Building")}) then { + [LSTRING(OnlyStructures)] call FUNC(showMessage); + } else { + if !(alive _unit) then { + [LSTRING(OnlyAlive)] call FUNC(showMessage); + } else { + if (GETVAR(_unit,EGVAR(captives,isHandcuffed),false)) then { + [LSTRING(OnlyNonCaptive)] call FUNC(showMessage); + } else { + if ((_unit getVariable ["ACE_isRepairFacility", 0]) < 1) then { + _unit setVariable ["ACE_isRepairFacility", 1, true]; + }; + }; + }; + }; + }; +}; + +deleteVehicle _logic; diff --git a/addons/zeus/functions/fnc_moduleSetRepairVehicle.sqf b/addons/zeus/functions/fnc_moduleSetRepairVehicle.sqf new file mode 100644 index 0000000000..485c8f8db5 --- /dev/null +++ b/addons/zeus/functions/fnc_moduleSetRepairVehicle.sqf @@ -0,0 +1,46 @@ +/* + * Author: mharis001 + * Assigns object as repair vehicle. + * + * Arguments: + * 0: The module logic + * + * Return Value: + * None + * + * Example: + * [LOGIC] call ace_zeus_fnc_moduleSetRepairVehicle + * + * Public: No + */ +#include "script_component.hpp" + +params ["_logic"]; + +if !(local _logic) exitWith {}; + +if !(["ace_repair"] call EFUNC(common,isModLoaded)) then { + [LSTRING(RequiresAddon)] call FUNC(showMessage); +} else { + private _mouseOver = GETMVAR(bis_fnc_curatorObjectPlaced_mouseOver,[""]); + + if ((_mouseOver select 0) != "OBJECT") then { + [LSTRING(NothingSelected)] call FUNC(showMessage); + } else { + private _unit = _mouseOver select 1; + + if (_unit isKindOf "Man" || (_unit isKindOf "Building")) then { + [LSTRING(OnlyVehicles)] call FUNC(showMessage); + } else { + if !(alive _unit) then { + [LSTRING(OnlyAlive)] call FUNC(showMessage); + } else { + if !([_unit] call EFUNC(repair,isRepairVehicle)) then { + _unit setVariable ["ACE_isRepairVehicle", 1, true]; + }; + }; + }; + }; +}; + +deleteVehicle _logic; diff --git a/addons/zeus/functions/fnc_moduleSimulation.sqf b/addons/zeus/functions/fnc_moduleSimulation.sqf index fc6d6e4a06..76a275a02e 100644 --- a/addons/zeus/functions/fnc_moduleSimulation.sqf +++ b/addons/zeus/functions/fnc_moduleSimulation.sqf @@ -13,7 +13,6 @@ * * Public: No */ - #include "script_component.hpp" params ["_logic"]; diff --git a/addons/zeus/functions/fnc_moduleSuicideBomber.sqf b/addons/zeus/functions/fnc_moduleSuicideBomber.sqf new file mode 100644 index 0000000000..778ca5c47c --- /dev/null +++ b/addons/zeus/functions/fnc_moduleSuicideBomber.sqf @@ -0,0 +1,102 @@ +/* + * Author: mharis001 + * Zeus module function to make unit a suicide bomber. + * + * Arguments: + * 0: Unit that is suicide bomber + * 1: Activation side (default: west) + * 2: Activation radius (default: 10) + * 3: Explosion size (0 - Small, 1 - Medium, 2 - Large) (default: 0) + * 4: Auto seek (default: false) + * + * Return Value: + * None + * + * Example: + * [unit, west, 10, 0, true] call ace_zeus_fnc_moduleSuicideBomber + * + * Public: No + */ +#include "script_component.hpp" + +#define EXPLOSIVES ["R_TBG32V_F", "M_Mo_120mm_AT", "Bo_GBU12_LGB"] +#define DISTANCE_FAR 15 +#define DISTANCE_CLOSE 2 +#define MOVE_TIME 10 + +TRACE_1("params",_this); + +if (isNull (_this select 0)) exitWith {}; + +// Prevent another suicide bomber module being attached +_unit setVariable [QGVAR(suicideBomber), true, true]; + +// One time behaviour changes +if (_autoSeek) then { + [QEGVAR(ai,setUnitPos), [_unit, "UP"], _unit] call CBA_fnc_targetEvent; + [QEGVAR(ai,setSpeedMode), [_unit, "FULL"], _unit] call CBA_fnc_targetEvent; + [QEGVAR(ai,setBehaviour), [[_unit], "CARELESS"], _unit] call CBA_fnc_targetEvent; + [QEGVAR(ai,setCombatMode), [_unit, "BLUE"], _unit] call CBA_fnc_targetEvent; + [QEGVAR(ai,AISection), [[_unit], ["TARGET", "AUTOTARGET"], false], _unit] call CBA_fnc_targetEvent; + [QEGVAR(ai,allowFleeing), [_unit, 0], _unit] call CBA_fnc_targetEvent; +}; + +// Run PFH to make unit a suicide bomber +[{ + params ["_args", "_pfhID"]; + _args params [["_unit", objNull], ["_activationSide", west], ["_activationRadius", 10], ["_explosionSize", 0], ["_autoSeek", false]]; + + // Unit deleted or killed + if (isNull _unit || {!alive _unit}) exitWith { + [_pfhID] call CBA_fnc_removePerFrameHandler; + LOG("Unit deleted or killed, PFH removed"); + }; + + // Detonation + private _nearObjects = (_unit nearObjects _activationRadius) select {side _x == _activationSide && {_x != _unit} && {alive _x}}; + if !(_nearObjects isEqualTo []) then { + createVehicle [EXPLOSIVES select _explosionSize, getPos _unit, [], 0, "CAN_COLLIDE"]; + [_pfhID] call CBA_fnc_removePerFrameHandler; + LOG("Explosion created, PFH removed"); + }; + + // Auto Seek + if (!_autoSeek) exitWith {}; + + private _memory = _unit getVariable [QGVAR(suicideBomber_memory), [nil, CBA_missionTime]]; + _memory params ["_lastMove", "_lastTime"]; + + private _range = 100 max (200 * (_unit skill "spotDistance")); // 100-200 + private _nearestObjects = (nearestObjects [_unit, [], _range]) select {side _x == _activationSide && {_x != _unit} && {alive _x}}; + + #ifdef DEBUG_MODE_FULL + if !(isNil "_lastMove") then { + drawLine3D [_unit modelToWorldVisual [0, 0, 1], _lastMove, [1, 0, 0, 1]]; + }; + for "_i" from 0 to 35 do { + drawLine3D [(_unit getRelPos [_range, _i * 10]) vectorAdd [0, 0, 1], (_unit getRelPos [_range, (_i + 1) * 10]) vectorAdd [0, 0, 1], [0, 1, 0, 1]]; + }; + for "_i" from 0 to 35 do { + drawLine3D [(_unit getRelPos [_activationRadius, _i * 10]) vectorAdd [0, 0, 1], (_unit getRelPos [_activationRadius, (_i + 1) * 10]) vectorAdd [0, 0, 1], [0, 0, 1, 1]]; + }; + for "_i" from 0 to 359 do { + if (_i >= linearConversion [_lastTime - MOVE_TIME, _lastTime, CBA_missionTime, 0, 359, true]) then { + drawLine3D [(_unit getRelPos [2, _i]) vectorAdd [0, 0, 1], (_unit getRelPos [2, _i + 1]) vectorAdd [0, 0, 1], [1, 1, 0, 1]]; + }; + }; + #endif + + if (_nearestObjects isEqualTo []) exitWith {}; + + // Get relative position close to target to avoid bug where AI wont path to a certain position + private _moveToPos = (_nearestObjects select 0) getPos [1, random 360]; + + if (isNil "_lastMove" || // No move given yet + {(_lastMove distance _moveToPos) > DISTANCE_FAR} || // New target is too far from last move + {(_lastMove distance _unit) < DISTANCE_CLOSE} || // Unit has reached last move + {CBA_missionTime >= _lastTime}) then { // Too much time passed between last move (also acts as a fail-safe if unit gets stuck) + [QEGVAR(ai,doMove), [[[_unit, _moveToPos]]], _unit] call CBA_fnc_targetEvent; + _unit setVariable [QGVAR(suicideBomber_memory), [_moveToPos, CBA_missionTime + MOVE_TIME]]; + TRACE_2("Moving unit",_moveToPos,CBA_missionTime); + }; +}, 0, _this] call CBA_fnc_addPerFrameHandler; diff --git a/addons/zeus/functions/fnc_moduleSuppressiveFire.sqf b/addons/zeus/functions/fnc_moduleSuppressiveFire.sqf index b2c9ba88a7..0dde339da6 100644 --- a/addons/zeus/functions/fnc_moduleSuppressiveFire.sqf +++ b/addons/zeus/functions/fnc_moduleSuppressiveFire.sqf @@ -116,4 +116,4 @@ if ([_unit] call EFUNC(common,isPlayer)) exitWith { }; #endif -}, localize LSTRING(ModuleSuppressiveFire_DisplayName)] call FUNC(getModuleDestination); +}, localize LSTRING(ModuleSuppressiveFire_DisplayName), "\a3\ui_f\data\IGUI\Cfg\Cursors\select_target_ca.paa", [1, 0, 0, 1], 45] call FUNC(getModuleDestination); diff --git a/addons/zeus/functions/fnc_moduleSurrender.sqf b/addons/zeus/functions/fnc_moduleSurrender.sqf index fceb72b57f..3c293bcfa0 100644 --- a/addons/zeus/functions/fnc_moduleSurrender.sqf +++ b/addons/zeus/functions/fnc_moduleSurrender.sqf @@ -15,7 +15,6 @@ * * Public: No */ - #include "script_component.hpp" params ["_logic"]; diff --git a/addons/zeus/functions/fnc_moduleTeleportPlayers.sqf b/addons/zeus/functions/fnc_moduleTeleportPlayers.sqf index c52517a7d0..eb42306931 100644 --- a/addons/zeus/functions/fnc_moduleTeleportPlayers.sqf +++ b/addons/zeus/functions/fnc_moduleTeleportPlayers.sqf @@ -15,7 +15,6 @@ * * Public: No */ - #include "script_component.hpp" params ["_logic","_uid","_group"]; diff --git a/addons/zeus/functions/fnc_moduleToggleFlashlight.sqf b/addons/zeus/functions/fnc_moduleToggleFlashlight.sqf index 4ebfd5a1c0..b66d011704 100644 --- a/addons/zeus/functions/fnc_moduleToggleFlashlight.sqf +++ b/addons/zeus/functions/fnc_moduleToggleFlashlight.sqf @@ -16,7 +16,6 @@ * * Public: No */ - #include "script_component.hpp" params ["_logic", "_toggle", "_addGear", "_target"]; diff --git a/addons/zeus/functions/fnc_moduleToggleNvg.sqf b/addons/zeus/functions/fnc_moduleToggleNvg.sqf index 16511063fe..23a2cf5a05 100644 --- a/addons/zeus/functions/fnc_moduleToggleNvg.sqf +++ b/addons/zeus/functions/fnc_moduleToggleNvg.sqf @@ -15,7 +15,6 @@ * * Public: No */ - #include "script_component.hpp" params ["_logic", "_toggle", "_target"]; diff --git a/addons/zeus/functions/fnc_moduleUnGarrison.sqf b/addons/zeus/functions/fnc_moduleUnGarrison.sqf index 08fb7ada10..082a19b2b1 100644 --- a/addons/zeus/functions/fnc_moduleUnGarrison.sqf +++ b/addons/zeus/functions/fnc_moduleUnGarrison.sqf @@ -13,7 +13,6 @@ * * Public: No */ - #include "script_component.hpp" params ["_logic"]; diff --git a/addons/zeus/functions/fnc_moduleUnconscious.sqf b/addons/zeus/functions/fnc_moduleUnconscious.sqf index 1e0955997f..72aa0599dd 100644 --- a/addons/zeus/functions/fnc_moduleUnconscious.sqf +++ b/addons/zeus/functions/fnc_moduleUnconscious.sqf @@ -15,7 +15,6 @@ * * Public: No */ - #include "script_component.hpp" params ["_logic"]; diff --git a/addons/zeus/functions/fnc_moduleZeusSettings.sqf b/addons/zeus/functions/fnc_moduleZeusSettings.sqf index 8abd714824..1aa4b399ef 100644 --- a/addons/zeus/functions/fnc_moduleZeusSettings.sqf +++ b/addons/zeus/functions/fnc_moduleZeusSettings.sqf @@ -15,7 +15,6 @@ * * Public: No */ - #include "script_component.hpp" params ["_logic"]; diff --git a/addons/zeus/functions/fnc_ui_attributeCargo.sqf b/addons/zeus/functions/fnc_ui_attributeCargo.sqf index fb57362fa1..aa4ed00090 100644 --- a/addons/zeus/functions/fnc_ui_attributeCargo.sqf +++ b/addons/zeus/functions/fnc_ui_attributeCargo.sqf @@ -1,5 +1,5 @@ /* - * Author: PabstMirror + * Author: PabstMirror, mharis001 * Initalises the ace_cargo attribute of the zeus vehicle attributes display * (the display shown on double click) * @@ -14,7 +14,6 @@ * * Public: No */ - #include "script_component.hpp" params ["_control"]; @@ -28,6 +27,10 @@ TRACE_1("",_loaded); _control ctrlRemoveAllEventHandlers "setFocus"; +private _listbox = _control controlsGroupCtrl 80086; + { - (_control controlsGroupCtrl 80086) lbAdd (str _x); + private _class = if (_x isEqualType "") then {_x} else {typeOf _x}; + private _displayName = getText (configFile >> "CfgVehicles" >> _class >> "displayName"); + _listbox lbAdd _displayName; } forEach _loaded; diff --git a/addons/zeus/functions/fnc_ui_attributePosition.sqf b/addons/zeus/functions/fnc_ui_attributePosition.sqf index ecd3458ac2..6143a7bf21 100644 --- a/addons/zeus/functions/fnc_ui_attributePosition.sqf +++ b/addons/zeus/functions/fnc_ui_attributePosition.sqf @@ -13,7 +13,6 @@ * * Public: No */ - #include "script_component.hpp" //Generic Init: diff --git a/addons/zeus/functions/fnc_ui_attributeRadius.sqf b/addons/zeus/functions/fnc_ui_attributeRadius.sqf index 3c4d296f91..4a24a21349 100644 --- a/addons/zeus/functions/fnc_ui_attributeRadius.sqf +++ b/addons/zeus/functions/fnc_ui_attributeRadius.sqf @@ -13,7 +13,6 @@ * * Public: No */ - #include "script_component.hpp" //Generic Init: diff --git a/addons/zeus/functions/fnc_ui_defendArea.sqf b/addons/zeus/functions/fnc_ui_defendArea.sqf index 13de25c2fa..e5fc26ef4e 100644 --- a/addons/zeus/functions/fnc_ui_defendArea.sqf +++ b/addons/zeus/functions/fnc_ui_defendArea.sqf @@ -13,7 +13,6 @@ * * Public: No */ - #include "script_component.hpp" //Generic Init: diff --git a/addons/zeus/functions/fnc_ui_editableObjects.sqf b/addons/zeus/functions/fnc_ui_editableObjects.sqf index 8cb243849e..6b1c30ad8c 100644 --- a/addons/zeus/functions/fnc_ui_editableObjects.sqf +++ b/addons/zeus/functions/fnc_ui_editableObjects.sqf @@ -13,7 +13,6 @@ * * Public: No */ - #include "script_component.hpp" params ["_control"]; diff --git a/addons/zeus/functions/fnc_ui_garrison.sqf b/addons/zeus/functions/fnc_ui_garrison.sqf index cc5087de65..266d564457 100644 --- a/addons/zeus/functions/fnc_ui_garrison.sqf +++ b/addons/zeus/functions/fnc_ui_garrison.sqf @@ -13,7 +13,6 @@ * * Public: No */ - #include "script_component.hpp" disableSerialization; diff --git a/addons/zeus/functions/fnc_ui_globalSetSkill.sqf b/addons/zeus/functions/fnc_ui_globalSetSkill.sqf index edca781152..91da3b04dc 100644 --- a/addons/zeus/functions/fnc_ui_globalSetSkill.sqf +++ b/addons/zeus/functions/fnc_ui_globalSetSkill.sqf @@ -13,7 +13,6 @@ * * Public: No */ - #include "script_component.hpp" params ["_control"]; diff --git a/addons/zeus/functions/fnc_ui_groupSide.sqf b/addons/zeus/functions/fnc_ui_groupSide.sqf index e5720e0720..17e6aadc15 100644 --- a/addons/zeus/functions/fnc_ui_groupSide.sqf +++ b/addons/zeus/functions/fnc_ui_groupSide.sqf @@ -13,7 +13,6 @@ * * Public: No */ - #include "script_component.hpp" #define IDCs [31201,31200,31202,31203] diff --git a/addons/zeus/functions/fnc_ui_patrolArea.sqf b/addons/zeus/functions/fnc_ui_patrolArea.sqf index c026bbce6a..1ce329047d 100644 --- a/addons/zeus/functions/fnc_ui_patrolArea.sqf +++ b/addons/zeus/functions/fnc_ui_patrolArea.sqf @@ -13,7 +13,6 @@ * * Public: No */ - #include "script_component.hpp" //Generic Init: diff --git a/addons/zeus/functions/fnc_ui_searchArea.sqf b/addons/zeus/functions/fnc_ui_searchArea.sqf index 06393ca578..9745be7166 100644 --- a/addons/zeus/functions/fnc_ui_searchArea.sqf +++ b/addons/zeus/functions/fnc_ui_searchArea.sqf @@ -13,7 +13,6 @@ * * Public: No */ - #include "script_component.hpp" //Generic Init: diff --git a/addons/zeus/functions/fnc_ui_setEngineer.sqf b/addons/zeus/functions/fnc_ui_setEngineer.sqf new file mode 100644 index 0000000000..18cd5febfa --- /dev/null +++ b/addons/zeus/functions/fnc_ui_setEngineer.sqf @@ -0,0 +1,75 @@ +/* + * Author: mharis001 + * Initalizes the "Set Engineer" Zeus module display. + * + * Arguments: + * 0: setEngineer controls group + * + * Return Value: + * None + * + * Example: + * [CONTROL] call ace_zeus_fnc_ui_setEngineer + * + * 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"; + +// Validate module target +private _unit = attachedTo _logic; +TRACE_1("unit",_unit); + +scopeName "Main"; +private _fnc_errorAndClose = { + params ["_msg"]; + _display closeDisplay 0; + deleteVehicle _logic; + [_msg] call FUNC(showMessage); + breakOut "Main"; +}; + +switch (false) do { + case !(isNull _unit): { + [LSTRING(NothingSelected)] call _fnc_errorAndClose; + }; + case (_unit isKindOf "CAManBase"): { + [LSTRING(OnlyInfantry)] call _fnc_errorAndClose; + }; + case (alive _unit): { + [LSTRING(OnlyAlive)] call _fnc_errorAndClose; + }; +}; + +// Specific onLoad stuff +private _fnc_onUnload = { + private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); + if (isNull _logic) exitWith {}; + + 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 _value = lbCurSel (_display displayCtrl 86947); + [attachedTo _logic, _value + 1] call FUNC(moduleSetEngineer); // +1 since lbCurSel zero-indexed +}; + +_display displayAddEventHandler ["Unload", _fnc_onUnload]; +_ctrlButtonOK ctrlAddEventHandler ["ButtonClick", _fnc_onConfirm]; diff --git a/addons/zeus/functions/fnc_ui_suicideBomber.sqf b/addons/zeus/functions/fnc_ui_suicideBomber.sqf new file mode 100644 index 0000000000..13d61ddc63 --- /dev/null +++ b/addons/zeus/functions/fnc_ui_suicideBomber.sqf @@ -0,0 +1,151 @@ +/* + * Author: mharis001 + * Initalizes the "Suicide Bomber" Zeus module display. + * + * Arguments: + * 0: suicideBomber controls group + * + * Return Value: + * None + * + * Example: + * [CONTROL] call ace_zeus_fnc_ui_suicideBomber + * + * Public: No + */ +#include "script_component.hpp" + +#define SIDE_IDCs [83580, 83581, 83582, 83583] + +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("Logic Object",_logic); + +_control ctrlRemoveAllEventHandlers "SetFocus"; + +// Validate module target +private _unit = attachedTo _logic; +TRACE_1("Unit",_unit); + +scopeName "Main"; +private _fnc_errorAndClose = { + params ["_msg"]; + _display closeDisplay 0; + deleteVehicle _logic; + [_msg] call FUNC(showMessage); + breakOut "Main"; +}; + +switch (false) do { + case !(isNull _unit): { + [LSTRING(NothingSelected)] call _fnc_errorAndClose; + }; + case (_unit isKindOf "CAManBase"): { + [LSTRING(OnlyInfantry)] call _fnc_errorAndClose; + }; + case (alive _unit): { + [LSTRING(OnlyAlive)] call _fnc_errorAndClose; + }; + case !([_unit] call EFUNC(common,isPlayer)): { + ["str_a3_cfgvehicles_moduleremotecontrol_f_errorPlayer"] call _fnc_errorAndClose; + }; + case !(_unit getVariable [QGVAR(suicideBomber), false]): { + [LSTRING(ModuleSuicideBomber_AlreadyBomber)] call _fnc_errorAndClose; + }; +}; + +// Specific onLoad stuff + +// Activation side +private _fnc_onSelection = { + params [["_activeCtrl", controlNull, [controlNull]]]; + + private _display = ctrlParent _activeCtrl; + if (isNUll _display) exitWith {}; + + // Update button colours and scales + { + private _ctrl = _display displayCtrl _x; + private _color = _ctrl getVariable "color"; + private _scale = 1; + + if (ctrlIDC _activeCtrl == _x) then { + _color set [3, 1]; + _scale = 1.2; + } else { + _color set [3, 0.5]; + }; + + _ctrl ctrlSetTextColor _color; + [_ctrl, _scale, 0.1] call BIS_fnc_ctrlSetScale; + } forEach SIDE_IDCs; + + // Save selected side + SETVAR(_display,activationSide,(ctrlIDC _activeCtrl) - 83580); +}; + +// Init side buttons +{ + private _ctrl = _display displayCtrl _x; + private _color = [_x - 83580] call BIS_fnc_sideColor; + _ctrl setVariable ["color", _color]; + _ctrl ctrlSetActiveColor _color; + + _color set [3, 0.5]; + _ctrl ctrlSetTextColor _color; + + _ctrl ctrlAddEventHandler ["ButtonClick", _fnc_onSelection]; +} forEach SIDE_IDCs; + +// Activation radius +private _fnc_onSliderMove = { + params ["_slider"]; + + private _display = ctrlParent _slider; + (_display displayCtrl 83573) ctrlSetText (str round sliderPosition _slider); +}; + +private _slider = _display displayCtrl 83572; +private _edit = _display displayCtrl 83573; + +_slider sliderSetRange [5, 50]; +_slider sliderSetSpeed [1, 1]; +_slider sliderSetPosition 10; +_edit ctrlSetText "10"; + +_slider ctrlAddEventHandler ["SliderPosChanged", _fnc_onSliderMove]; + +// Confirm and Cancel +private _fnc_onUnload = { + private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); + if (isNull _logic) exitWith {}; + + 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 _unit = attachedTo _logic; + private _side = [GETVAR(_display,activationSide,1)] call BIS_fnc_sideType; + private _radius = round sliderPosition (_display displayCtrl 83572); + private _expSize = lbCurSel (_display displayCtrl 83574); + private _autoSeek = lbCurSel (_display displayCtrl 83575) > 0; + + [_unit, _side, _radius, _expSize, _autoSeek] call FUNC(moduleSuicideBomber); + + deleteVehicle _logic; +}; + +_display displayAddEventHandler ["Unload", _fnc_onUnload]; +_ctrlButtonOK ctrlAddEventHandler ["ButtonClick", _fnc_onConfirm]; diff --git a/addons/zeus/functions/fnc_ui_teleportPlayers.sqf b/addons/zeus/functions/fnc_ui_teleportPlayers.sqf index d323a9a467..99233482a4 100644 --- a/addons/zeus/functions/fnc_ui_teleportPlayers.sqf +++ b/addons/zeus/functions/fnc_ui_teleportPlayers.sqf @@ -1,6 +1,6 @@ /* - * Author: SilentSpike - * Initalises the `teleport players` zeus module display + * Author: SilentSpike, mharis001 + * Initalizes the "Teleport Players" Zeus module display. * * Arguments: * 0: teleportPlayers controls group @@ -13,7 +13,6 @@ * * Public: No */ - #include "script_component.hpp" params ["_control"]; @@ -37,6 +36,33 @@ private _listbox = _display displayCtrl 16189; _listbox lbSetCurSel 0; (_display displayCtrl 16188) cbSetChecked (_logic getVariable ["tpGroup",false]); +private _fnc_onKeyUp = { + params ["_display"]; + + private _listbox = _display displayCtrl 16189; + private _edit = _display displayCtrl 16190; + private _text = toLower ctrlText _edit; + + lbClear _listbox; + + { + if (alive _x) then { + if ([toLower name _x, _text] call CBA_fnc_find > -1) then { + _listbox lbSetData [_listbox lbAdd (name _x), getPlayerUID _x]; + }; + }; + } forEach ([] call CBA_fnc_players); + + // Alert user to zero search matches + if (lbSize _listbox == 0) then { + _edit ctrlSetTooltip (localize LSTRING(ModuleTeleportPlayers_noneFound)); + _edit ctrlSetTextColor [1, 0, 0, 1]; + } else { + _edit ctrlSetTooltip ""; + _edit ctrlSetTextColor [1, 1, 1, 1]; + }; +}; + private _fnc_onUnload = { params ["_display"]; @@ -64,5 +90,6 @@ private _fnc_onConfirm = { [_logic, _uid, _group] call FUNC(moduleTeleportPlayers); }; +_display displayAddEventHandler ["KeyUp", _fnc_onKeyUp]; _display displayAddEventHandler ["unload", _fnc_onUnload]; _ctrlButtonOK ctrlAddEventHandler ["buttonclick", _fnc_onConfirm]; diff --git a/addons/zeus/functions/fnc_ui_toggleFlashlight.sqf b/addons/zeus/functions/fnc_ui_toggleFlashlight.sqf index 9dff6808e4..a40a55ac40 100644 --- a/addons/zeus/functions/fnc_ui_toggleFlashlight.sqf +++ b/addons/zeus/functions/fnc_ui_toggleFlashlight.sqf @@ -13,7 +13,6 @@ * * Public: No */ - #include "script_component.hpp" disableSerialization; diff --git a/addons/zeus/functions/fnc_ui_toggleNvg.sqf b/addons/zeus/functions/fnc_ui_toggleNvg.sqf index 822e552dac..fcfbc52c83 100644 --- a/addons/zeus/functions/fnc_ui_toggleNvg.sqf +++ b/addons/zeus/functions/fnc_ui_toggleNvg.sqf @@ -13,7 +13,6 @@ * * Public: No */ - #include "script_component.hpp" disableSerialization; diff --git a/addons/zeus/functions/fnc_zeusAttributes.sqf b/addons/zeus/functions/fnc_zeusAttributes.sqf index 5481120cd3..8e80744e66 100644 --- a/addons/zeus/functions/fnc_zeusAttributes.sqf +++ b/addons/zeus/functions/fnc_zeusAttributes.sqf @@ -16,7 +16,6 @@ * * Public: No */ - #include "script_component.hpp" TRACE_1("params",_this); diff --git a/addons/zeus/stringtable.xml b/addons/zeus/stringtable.xml index 3981cb63ef..38696f4038 100644 --- a/addons/zeus/stringtable.xml +++ b/addons/zeus/stringtable.xml @@ -1238,6 +1238,262 @@ 解除驻军驻守状态 주둔해제 + + No players found + 沒有玩家找到 + 没有玩家找到 + Nije pronađen nijedan igrač + Aucun joueur trouvé + Keine Spieler gefunden + Nincsenek játékosok + Nessun giocatore trovato + プレーヤーが見つかりません + 플레이어가 없습니다. + Nie znaleziono graczy + Nenhum jogador encontrado + Игроки не найдены + No se encontraron jugadores + + + Assign Repair Vehicle + 分配維修車輛 + 分配维修车辆 + Přiřaďte opravárenské vozidlo + Affecter un véhicule de réparation + Fahrzeug reparieren zuweisen + Hozzárendelés javítóműhöz + Assegna veicolo di riparazione + 修理車両を割り当てる + 수리 차량 지정 + Przydziel pojazd do naprawy + Atribuir veículo de reparação + Назначить ремонтный автомобиль + Asignar vehículo de reparación + + + Assign Repair Facility + 分配修理設施 + 分配修理设施 + Přiřaďte opravu + Affecter une installation de réparation + Zuweisen von Reparatureinrichtung + Hozzárendelés javításhoz + Assegna struttura di riparazione + 修理施設を割り当てる + 수리 시설 지정 + Przydziel naprawę + Atribuir facilidade de reparação + Назначить ремонтный комплекс + Asignar instalación de reparación + + + Assign Engineer + 指派工程師 + 指派工程师 + Přiřadit inženýra + Affecter ingénieur + Engineer zuweisen + Engedélyezze a mérnököt + Assign Engineer + 担当エンジニア + 엔지니어 지정 + Przydziel inżyniera + Encarregar o engenheiro + Назначить инженера + Asignar Ingeniero + + + Engineer Skill + 工程師技能 + 工程师技能 + Inženýrská dovednost + Compétence d'ingénieur + Ingenieur Fähigkeit + Mérnöki készség + Abilità ingegnere + エンジニアのスキル + 기술자의 기술 + Umiejętność inżyniera + Habilidade do engenheiro + Инженерное мастерство + Habilidad de Ingeniero + + + Full Heal + 完全治愈 + 完全治愈 + Plné uzdravení + Guérison complète + Vollständige Heilung + Teljes gyógyítás + Guarigione completa + フルヒール + 완전 치유 + Pełne uleczenie + Cura completa + Полное исцеление + Totalmente curado + + + Suicide Bomber + 自殺式炸彈襲擊者 + 自杀式炸弹袭击者 + Samovražedný bombardér + Kamikaze + Selbstmordattentäter + Öngyilkos merénylő + Kamikaze + 自爆テロ犯 + 자살 폭탄 + Samobójca + Bombardeiro suicida + Террорист-смертник + Bombardeo suicida + + + Activation Side + 激活方 + 激活方 + Aktivační strana + Activation latérale + Aktivierungsseite + Aktiválási oldal + Lato di attivazione + アクティベーションサイド + 활성화면 + Strona aktywacji + Lado de ativação + Сторона активации + Lado de activación + + + Activation Radius + 激活半徑 + 激活半径 + Aktivační poloměr + Rayon d'activation + Aktivierungsradius + Aktiválási sugár + Raggio di attivazione + 活性化半径 + 활성화 반경 + Promień aktywacji + Rádio de ativação + Радиус активации + Radio de activación + + + Explosion Size + 爆炸尺寸 + 爆炸尺寸 + Velikost výbuchu + Taille d'explosion + Explosionsgröße + Robbanásméret + Dimensione di esplosione + 爆発サイズ + 폭발 크기 + Rozmiar wybuchu + Tamanho da Explosão + Размер взрыва + Tamaño de Explosión + + + Auto Seek + 自動尋求 + 自动寻求 + Auto Seek + Recherche automatique + Automatische Suche + Automatikus keresés + Ricerca automatica + オートシーク + 자동 탐색 + Auto Seek + Busca automática + Автоматический поиск + Búsqueda automática + + + Unit will actively try to find and move towards nearby units of the activation side. The range of Auto Seek is based on the unit's spot distance skill with a minimum of 100 meters. + 單位將主動嘗試尋找並移動到附近的激活方單位。自動搜索的範圍是基於單位的距離技能,最少100米。 + 单位将主动尝试寻找并移动到附近的激活方单位。自动搜索的范围是基于单位的距离技能,最少100米。 + Jednotka se bude aktivně snažit najít a přejít na blízké jednotky na straně aktivace. Rozsah Auto Seek je založen na dovednosti spotové vzdálenosti jednotky s minimem 100 metrů. + L'unité essayera activement de trouver et de se déplacer vers les unités à proximité du côté d'activation. La portée d'Auto Seek est basée sur la compétence de distance de l'unité avec un minimum de 100 mètres. + Die Einheit versucht aktiv, in der Nähe befindliche Einheiten der Aktivierungsseite zu finden und sich dorthin zu bewegen. Der Bereich der automatischen Suche basiert auf der Fähigkeit der Zielentfernung der Einheit mit einer Mindestentfernung von 100 Metern. + Az egység aktívan megpróbálja megtalálni és elmozdulni az aktivációs oldal közeli egységei felé.Az automatikus keresési tartomány az egység helyszíni szakértelmén alapul, legalább 100 méterrel. + L'unità cercherà attivamente di trovare e spostarsi verso le unità vicine del lato di attivazione. La gamma di Auto Seek si basa sull'abilità a distanza spot dell'unità con un minimo di 100 metri. + ユニットはアクティベーション側の近くのユニットを見つけて移動しようと積極的に試みます。オートシークの範囲は、ユニットのスポット距離のスキルに基づいており、最低100メートルです。 + 유닛은 액티브 측의 근접 유닛을 향해 적극적으로 찾아서 이동하려고 시도합니다. 자동 시크의 범위는 유닛의 스팟 거리 스킬을 기준으로 최소 100 미터입니다. + Jednostka będzie aktywnie próbowała znaleźć i ruszyć w kierunku pobliskich jednostek strony aktywacji. Zasięg Auto Seek opiera się na umiejętności punktowej odległości jednostki z minimum 100 metrów. + A unidade tentará ativamente encontrar e se mover para as unidades próximas do lado da ativação. O alcance da Auto Seek é baseado na habilidade de distância do ponto da unidade com um mínimo de 100 metros. + Устройство будет активно пытаться найти и перейти к соседним единицам активации. Диапазон автоматического поиска основан на умении снимать расстояние на расстоянии не менее 100 метров. + La unidad intentará buscar activamente y moverse hacia las unidades cercanas del lado de activación. El rango de Auto Seek se basa en la habilidad de distancia al punto de la unidad con un mínimo de 100 metros. + + + Small + + + Malý + Petit + Klein + Kicsi + Piccolo + 小さい + 작은 + Mały + Pequeno + Маленький + Pequeña + + + Medium + + + Střední + Moyen + Mittel + Közepes + medio + + 매질 + Średni + Médio + средний + Medio + + + Large + + + Velký + Grand + Groß + Nagy + Grande + + + Duży + ampla + большой + Grande + + + Unit is already a suicide bomber + 這個單位已經是自殺炸彈手了 + 这个单位已经是自杀炸弹手了 + Jednotka je již samovražedným bombardérem + L'unité est déjà un kamikaze + Die Einheit ist bereits ein Selbstmordattentäter + Az egység már öngyilkos bombázó + L'unità è già un kamikaze + ユニットはすでに自爆テロである + 유닛은 이미 자살 폭탄 테러범이다. + Jednostka jest już zamachowcem-samobójcą + A unidade já é um suicida + Единица уже является террористом-смертником + La unidad ya es un terrorista suicida + Add full ACE Arsenal diff --git a/addons/zeus/ui/Icon_Module_Zeus_Heal_ca.paa b/addons/zeus/ui/Icon_Module_Zeus_Heal_ca.paa new file mode 100644 index 0000000000000000000000000000000000000000..03f808203cb8927e2e7857e5ca42e01571cebb66 GIT binary patch literal 5625 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 literal 0 HcmV?d00001 diff --git a/addons/zeus/ui/RscAttributes.hpp b/addons/zeus/ui/RscAttributes.hpp index 2bb2c97d85..87ce44e54a 100644 --- a/addons/zeus/ui/RscAttributes.hpp +++ b/addons/zeus/ui/RscAttributes.hpp @@ -8,6 +8,8 @@ class RscXSliderH; class RscCheckBox; class RscActivePicture; class RscMapControl; +class RscPicture; +class ctrlToolbox; class RscDisplayAttributes { class Controls { @@ -280,7 +282,7 @@ class GVAR(RscGroupSide): RscDisplayAttributes { }; class BLUFOR: RscActivePicture { idc = 31200; - text = "\a3\Ui_f\data\Map\Markers\NATO\b_unknown.paa"; + text = "\a3\Ui_F_Curator\Data\Displays\RscDisplayCurator\side_west_ca.paa"; x = W_PART(12.5); y = H_PART(0.25); w = W_PART(2); @@ -289,7 +291,7 @@ class GVAR(RscGroupSide): RscDisplayAttributes { }; class OPFOR: BLUFOR { idc = 31201; - text = "\a3\Ui_f\data\Map\Markers\NATO\o_unknown.paa"; + text = "\a3\Ui_F_Curator\Data\Displays\RscDisplayCurator\side_east_ca.paa"; x = W_PART(15.5); y = H_PART(0.25); w = W_PART(2); @@ -298,7 +300,7 @@ class GVAR(RscGroupSide): RscDisplayAttributes { }; class Independent: BLUFOR { idc = 31202; - text = "\a3\Ui_f\data\Map\Markers\NATO\n_unknown.paa"; + text = "\a3\Ui_F_Curator\Data\Displays\RscDisplayCurator\side_guer_ca.paa"; x = W_PART(18.5); y = H_PART(0.25); w = W_PART(2); @@ -307,7 +309,7 @@ class GVAR(RscGroupSide): RscDisplayAttributes { }; class Civilian: BLUFOR { idc = 31203; - text = "\a3\Ui_f\data\Map\Markers\NATO\n_unknown.paa"; + text = "\a3\Ui_F_Curator\Data\Displays\RscDisplayCurator\side_civ_ca.paa"; x = W_PART(21.5); y = H_PART(0.25); w = W_PART(2); @@ -394,16 +396,41 @@ class GVAR(RscTeleportPlayers): RscDisplayAttributes { w = W_PART(26); h = H_PART(5.9); }; - class Label: Title { + class SearchBackground: RscText { + idc = -1; + x = 0; + y = H_PART(7.1); + w = W_PART(1); + h = H_PART(1); + colorBackground[] = {0, 0, 0, 0.5}; + }; + class SearchPicture: RscPicture { + idc = -1; + text = "\a3\Ui_f\data\GUI\RscCommon\RscButtonSearch\search_start_ca.paa"; + x = 0; + y = H_PART(7.1); + w = W_PART(1); + h = H_PART(1); + }; + class Search: RscEdit { + idc = 16190; + x = W_PART(1.2); + y = H_PART(7.1); + w = W_PART(14.5); + h = H_PART(1); + autocomplete = ""; + }; + class LabelGroup: Title { idc = -1; text = CSTRING(ModuleTeleportPlayers_group); toolTip = CSTRING(ModuleTeleportPlayers_group_desc); + x = W_PART(15.9); y = H_PART(7.1); - w = W_PART(10); + w = W_PART(9); }; class UseGroup: RscCheckBox { idc = 16188; - x = W_PART(10.1); + x = W_PART(25); y = H_PART(7.1); w = W_PART(1); h = H_PART(1); @@ -668,3 +695,179 @@ class GVAR(RscToggleFlashlight): RscDisplayAttributes { class ButtonCancel: ButtonCancel {}; }; }; + +class GVAR(RscSetEngineer): RscDisplayAttributes { + onLoad = QUOTE([ARR_3('onLoad', _this, QUOTE(QGVAR(RscSetEngineer)))] call FUNC(zeusAttributes)); + onUnload = QUOTE([ARR_3('onUnload', _this, QUOTE(QGVAR(RscSetEngineer)))] call FUNC(zeusAttributes)); + class Controls: Controls { + class Background: Background {}; + class Title: Title {}; + class Content: Content { + class Controls { + class setEngineer: RscControlsGroupNoScrollbars { + onSetFocus = QUOTE(_this call FUNC(ui_setEngineer)); + idc = 86946; + x = 0; + y = 0; + w = W_PART(26); + h = H_PART(1.2); + class controls { + class Label: RscText { + idc = -1; + text = CSTRING(ModuleSetEngineer_skill); + toolTip = ECSTRING(repair,AssignEngineerRole_role_Description); + x = 0; + y = H_PART(0.1); + w = W_PART(10); + h = H_PART(1); + colorBackground[] = {0, 0, 0, 0.5}; + }; + class Roles: ctrlToolbox { + idc = 86947; + x = W_PART(10.1); + y = H_PART(0.1); + w = W_PART(15.9); + h = H_PART(1); + rows = 1; + columns = 2; + strings[] = {ECSTRING(repair,AssignEngineerRole_role_engineer), ECSTRING(repair,AssignEngineerRole_role_advanced)}; + }; + }; + }; + }; + }; + class ButtonOK: ButtonOK {}; + class ButtonCancel: ButtonCancel {}; + }; +}; + +class GVAR(RscSuicideBomber): RscDisplayAttributes { + onLoad = QUOTE([ARR_3('onLoad', _this, QUOTE(QGVAR(RscSuicideBomber)))] call FUNC(zeusAttributes)); + onUnload = QUOTE([ARR_3('onUnload', _this, QUOTE(QGVAR(RscSuicideBomber)))] call FUNC(zeusAttributes)); + class Controls: Controls { + class Background: Background {}; + class Title: Title {}; + class Content: Content { + class Controls { + class suicideBomber: RscControlsGroupNoScrollbars { + onSetFocus = QUOTE(_this call FUNC(ui_suicideBomber)); + idc = 83470; + x = 0; + y = 0; + w = W_PART(26); + h = H_PART(5.8); + class controls { + class ActivationSide: RscControlsGroupNoScrollbars { + idc = 83571; + x = 0; + y = 0; + w = W_PART(26); + h = H_PART(2.5); + class controls { + class Label: RscText { + idc = -1; + text = CSTRING(ModuleSuicideBomber_ActivationSide); + x = 0; + y = 0; + w = W_PART(10); + h = H_PART(2.5); + colorBackground[] = {0, 0, 0, 0.5}; + }; + class Background: RscText { + idc = -1; + x = W_PART(10); + y = 0; + w = W_PART(16); + h = H_PART(2.5); + colorBackground[] = {1, 1, 1, 0.1}; + }; + class BLUFOR: RscActivePicture { + idc = 83581; + text = "\a3\Ui_F_Curator\Data\Displays\RscDisplayCurator\side_west_ca.paa"; + x = W_PART(12.5); + y = H_PART(0.25); + w = W_PART(2); + h = H_PART(2); + tooltip = "$STR_WEST"; + }; + class OPFOR: BLUFOR { + idc = 83580; + text = "\a3\Ui_F_Curator\Data\Displays\RscDisplayCurator\side_east_ca.paa"; + x = W_PART(15.5); + tooltip = "$STR_EAST"; + }; + class Independent: BLUFOR { + idc = 83582; + text = "\a3\Ui_F_Curator\Data\Displays\RscDisplayCurator\side_guer_ca.paa"; + x = W_PART(18.5); + tooltip = "$STR_guerrila"; + }; + class Civilian: BLUFOR { + idc = 83583; + text = "\a3\Ui_F_Curator\Data\Displays\RscDisplayCurator\side_civ_ca.paa"; + x = W_PART(21.5); + tooltip = "$STR_Civilian"; + }; + }; + }; + class DistanceLabel: RscText { + idc = -1; + text = CSTRING(ModuleSuicideBomber_ActivationRadius); + x = 0; + y = H_PART(2.6); + w = W_PART(10); + h = H_PART(1); + colorBackground[] = {0, 0, 0, 0.5}; + }; + class DistanceSlider: RscXSliderH { + idc = 83572; + x = W_PART(10.1); + y = H_PART(2.6); + w = W_PART(13.9); + h = H_PART(1); + }; + class DistanceEdit: RscEdit { + idc = 83573; + x = W_PART(24.1); + y = H_PART(2.6); + w = W_PART(1.9); + h = H_PART(1); + autocomplete = ""; + maxChars = 3; + canModify = 0; + }; + class ExplosionLabel: DistanceLabel { + idc = -1; + text = CSTRING(ModuleSuicideBomber_ExplosionSize); + y = H_PART(3.7); + }; + class Explosion: ctrlToolbox { + idc = 83574; + x = W_PART(10.1); + y = H_PART(3.7); + w = W_PART(15.9); + h = H_PART(1); + rows = 1; + columns = 3; + strings[] = {CSTRING(ModuleSuicideBomber_Small), CSTRING(ModuleSuicideBomber_Medium), CSTRING(ModuleSuicideBomber_Large)}; + }; + class AutoSeekLabel: DistanceLabel { + idc = -1; + text = CSTRING(ModuleSuicideBomber_AutoSeek); + y = H_PART(4.8); + toolTip = CSTRING(ModuleSuicideBomber_AutoSeek_tooltip); + }; + class AutoSeek: Explosion { + idc = 83575; + y = H_PART(4.8); + columns = 2; + strings[] = {ECSTRING(common,Disabled), ECSTRING(common,Enabled)}; + }; + }; + }; + }; + }; + class ButtonOK: ButtonOK {}; + class ButtonCancel: ButtonCancel {}; + }; +};