diff --git a/addons/captives/CfgVehicles.hpp b/addons/captives/CfgVehicles.hpp
index 91c47824fd..ec142a533b 100644
--- a/addons/captives/CfgVehicles.hpp
+++ b/addons/captives/CfgVehicles.hpp
@@ -164,8 +164,6 @@ class CfgVehicles {
displayName = "$STR_ACE_Captives_ModuleSurrender_DisplayName"; //Make Unit Surrender
function = QUOTE(DFUNC(moduleSurrender));
scope = 2; //show in editor
- scopeCurator = 2; //show in zeus
- curatorCost = 0; //???
isGlobal = 1; //run global
isTriggerActivated = 1; //Wait for triggers
icon = QUOTE(PATHTOF(UI\Icon_Module_Make_Unit_Surrender_ca.paa));
@@ -176,4 +174,4 @@ class CfgVehicles {
sync[] = {"AnyAI"};
};
};
-};
\ No newline at end of file
+};
diff --git a/addons/captives/functions/fnc_moduleSurrender.sqf b/addons/captives/functions/fnc_moduleSurrender.sqf
index bf0e04cd6a..5b40b7663e 100644
--- a/addons/captives/functions/fnc_moduleSurrender.sqf
+++ b/addons/captives/functions/fnc_moduleSurrender.sqf
@@ -23,37 +23,13 @@ private ["_bisMouseOver", "_mouseOverObject"];
if (!_activated) exitWith {};
if (local _logic) then {
- if ((!isnull curatorcamera) && {((count curatorMouseOver) == 2) && {(curatorMouseOver select 1) == _logic}}) then {//in zeus interface and we placed the module
- _bisMouseOver = missionNamespace getVariable ["bis_fnc_curatorObjectPlaced_mouseOver", []];//bis caches the previous curatorMouseOver
- if ((count _bisMouseOver) == 2) then {//check what mouse was over before the module was placed
- _mouseOverObject = _bisMouseOver select 1;
- if ((_mouseOverObject isKindOf "CAManBase") && {(vehicle _mouseOverObject) == _mouseOverObject}) then {
- TRACE_2("Debug - module surrendering %1",_mouseOverObject,(name _mouseOverObject));
- if (alive _mouseOverObject) then {
- if (!(_mouseOverObject getVariable [QGVAR(isSurrendering), false])) then {
- ["SetSurrendered", [_mouseOverObject], [_mouseOverObject, true]] call EFUNC(common,targetEvent);
- } else {
- ["SetSurrendered", [_mouseOverObject], [_mouseOverObject, false]] call EFUNC(common,targetEvent);
- };
- } else {
- ["STR_ACE_Captives_Zeus_OnlyAlive"] call EFUNC(common,displayTextStructured);
- };
- } else {
- ["STR_ACE_Captives_Zeus_OnlyInfantry"] call EFUNC(common,displayTextStructured);
- };
- } else {
- ["STR_ACE_Captives_Zeus_NothingSelected"] call EFUNC(common,displayTextStructured);
- };
- } else {
- //an editor module
- //Modules run before postInit can instal the event handler, so we need to wait a little bit
- [{
- PARAMS_1(_units);
- {
- ["SetSurrendered", [_x], [_x, true]] call EFUNC(common,targetEvent);
- } forEach _units;
- }, [_units], 0.05, 0.05]call EFUNC(common,waitAndExecute);
- };
+ //Modules run before postInit can instal the event handler, so we need to wait a little bit
+ [{
+ PARAMS_1(_units);
+ {
+ ["SetSurrendered", [_x], [_x, true]] call EFUNC(common,targetEvent);
+ } forEach _units;
+ }, [_units], 0.05, 0.05]call EFUNC(common,waitAndExecute);
deleteVehicle _logic;
};
diff --git a/addons/captives/stringtable.xml b/addons/captives/stringtable.xml
index c987e75641..4e329675d1 100644
--- a/addons/captives/stringtable.xml
+++ b/addons/captives/stringtable.xml
@@ -157,42 +157,6 @@
Megadás abbahagyása
Smetti di arrenderti
-
- Only use on alive units
- Utiliser uniquement sur une unité vivante
- Nur bei lebenden Einheiten verwendbar
- Utilizar solo en unidades vivas
- Použitelné jen na živé jednotky
- Używaj tylko na żywych jednostkach
- Применимо только к живым юнитам
- Csak élő egységeken használni
- Si può fare solo su persone vive
- Usar somente em unidades vivas
-
-
- Only use on dismounted inf
- Utiliser uniquement sur du personnel à pied
- Nur bei abgesessener Infanterie verwendbar
- Utilizar solo en infanteria desmontada
- Použitelné jen na pěsích jednotkách
- Używaj tylko na piechocie poza wszelkimi pojazdami
- Применимо только к пехоте вне техники
- Csak járműben kívül lévő egységeken használni
- Si può usare solo su fanteria a piedi
- Usar somente em infantaria desmontada
-
-
- Nothing under mouse
- Rien sous le curseur
- Es wurde nichts ausgewählt
- Nada bajo el ratón
- Nada debaixo do mouse
- Nic není vybráno
- Nie ma nic pod kursorem
- Ничего не выделено
- Semmi sincs az egér alatt
- Nessuna selezione
-
Make Unit Surrender
Poddaj się!
diff --git a/addons/zeus/CfgFactionClasses.hpp b/addons/zeus/CfgFactionClasses.hpp
deleted file mode 100644
index da8e845a43..0000000000
--- a/addons/zeus/CfgFactionClasses.hpp
+++ /dev/null
@@ -1,6 +0,0 @@
-class CfgFactionClasses {
- class NO_CATEGORY;
- class ADDON: NO_CATEGORY {
- displayName = "$STR_ACE_Zeus_category";
- };
-};
diff --git a/addons/zeus/CfgVehicles.hpp b/addons/zeus/CfgVehicles.hpp
index cb7346e18d..439dede5b1 100644
--- a/addons/zeus/CfgVehicles.hpp
+++ b/addons/zeus/CfgVehicles.hpp
@@ -3,12 +3,24 @@ class CfgVehicles {
class ModuleEmpty_F;
class ACE_Module;
- class GVAR(moduleZeusSettings): ACE_Module {
+ class ModuleCurator_F: Module_F {
+ function = QFUNC(bi_moduleCurator);
+ };
+ class ModuleMine_F: ModuleEmpty_F {
+ function = QFUNC(bi_moduleMine);
+ };
+ class ModuleOrdnance_F: Module_F {
+ function = QFUNC(bi_moduleProjectile);
+ };
+ class ModuleRemoteControl_F: Module_F {
+ function = QFUNC(bi_moduleRemoteControl);
+ };
+ class GVAR(moduleSettings): ACE_Module {
scope = 2;
displayName = "$STR_ACE_Zeus_Module_DisplayName";
- //icon = QUOTE(PATHTOF(iconGoesHere));
- category = "ACE_zeus";
- function = QUOTE(DFUNC(moduleZeusSettings));
+ icon = QUOTE(PATHTOF(UI\Icon_Module_Zeus_Settings_ca.paa));
+ category = "ACE";
+ function = QFUNC(moduleZeusSettings);
functionPriority = 1;
isGlobal = 1;
isTriggerActivated = 0;
@@ -64,17 +76,39 @@ class CfgVehicles {
sync[] = {};
};
};
-
- class ModuleCurator_F: Module_F {
- function = QUOTE(DFUNC(bi_moduleCurator));
+ class GVAR(moduleBase): Module_F {
+ author = "SilentSpike";
+ category = "ACE";
+ scopeCurator = 2;
};
- class ModuleMine_F: ModuleEmpty_F {
- function = QUOTE(DFUNC(bi_moduleMine));
+ class GVAR(moduleCaptive): GVAR(moduleBase) {
+ curatorCanAttach = 1;
+ displayName = "$STR_ACE_Zeus_ModuleCaptive_DisplayName";
+ function = QFUNC(moduleCaptive);
+ icon = QUOTE(PATHTOF(UI\Icon_Module_Zeus_Captive_ca.paa));
+ class ModuleDescription {
+ description = "Flips the capture state of the specified unit.";
+ sync[] = {};
+ };
};
- class ModuleOrdnance_F: Module_F {
- function = QUOTE(DFUNC(bi_moduleProjectile));
+ class GVAR(moduleSurrender): GVAR(moduleBase) {
+ curatorCanAttach = 1;
+ displayName = "$STR_ACE_Zeus_ModuleSurrender_DisplayName";
+ function = QFUNC(moduleSurrender);
+ icon = QUOTE(PATHTOF(UI\Icon_Module_Zeus_Surrender_ca.paa));
+ class ModuleDescription {
+ description = "Flips the surrender state of the specified unit.";
+ sync[] = {};
+ };
};
- class ModuleRemoteControl_F: Module_F {
- function = QUOTE(DFUNC(bi_moduleRemoteControl));
+ class GVAR(moduleUnconscious): GVAR(moduleBase) {
+ curatorCanAttach = 1;
+ displayName = "$STR_ACE_Zeus_ModuleUnconscious_DisplayName";
+ function = QFUNC(moduleUnconscious);
+ icon = QUOTE(PATHTOF(UI\Icon_Module_Zeus_Unconscious_ca.paa));
+ class ModuleDescription {
+ description = "Flips the unconscious state of the specified unit.";
+ sync[] = {};
+ };
};
};
diff --git a/addons/zeus/XEH_preInit.sqf b/addons/zeus/XEH_preInit.sqf
index e7bb1b96a5..1b2ac19263 100644
--- a/addons/zeus/XEH_preInit.sqf
+++ b/addons/zeus/XEH_preInit.sqf
@@ -6,6 +6,14 @@ PREP(bi_moduleCurator);
PREP(bi_moduleMine);
PREP(bi_moduleProjectile);
PREP(bi_moduleRemoteControl);
+PREP(handleZeusUnitAssigned);
+PREP(moduleCaptive);
+PREP(moduleSurrender);
+PREP(moduleUnconscious);
PREP(moduleZeusSettings);
+if (isServer) then {
+ ["zeusUnitAssigned", FUNC(handleZeusUnitAssigned)] call EFUNC(common,addEventHandler);
+};
+
ADDON = true;
diff --git a/addons/zeus/config.cpp b/addons/zeus/config.cpp
index 5ea4212dbb..7505f2770e 100644
--- a/addons/zeus/config.cpp
+++ b/addons/zeus/config.cpp
@@ -10,9 +10,25 @@ class CfgPatches {
authorUrl = "https://github.com/SilentSpike";
VERSION_CONFIG;
};
+ // Use additional cfgPatches to contextually remove modules from zeus
+ class GVAR(captives): ADDON {
+ units[] = {
+ QGVAR(moduleCaptive),
+ QGVAR(moduleSurrender)
+ };
+ };
+ class GVAR(medical): ADDON {
+ units[] = {
+ QGVAR(moduleUnconscious)
+ };
+ };
+};
+
+class ACE_Curator {
+ GVAR(captives) = "ace_captives";
+ GVAR(medical) = "ace_medical";
};
#include "CfgEventHandlers.hpp"
-#include "CfgFactionClasses.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 016d1ae078..b33d7461cd 100644
--- a/addons/zeus/functions/fnc_bi_moduleCurator.sqf
+++ b/addons/zeus/functions/fnc_bi_moduleCurator.sqf
@@ -2,9 +2,12 @@
* Author: Bohemia Interactive
* Module function for initalizing zeus
* Edited to remove eagle and global ascension message
+ * Added "zeusUnitAssigned" event call
*
* Arguments:
- * 0: The logic object