mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge pull request #2162 from acemod/assign-medic-curator-modules
Add medical curator modules
This commit is contained in:
commit
1d51bd7c40
@ -115,4 +115,34 @@ class CfgVehicles {
|
||||
sync[] = {};
|
||||
};
|
||||
};
|
||||
class GVAR(moduleSetMedic): GVAR(moduleBase) {
|
||||
curatorCanAttach = 1;
|
||||
displayName = CSTRING(ModuleSetMedic_displayName);
|
||||
function = QFUNC(moduleSetMedic);
|
||||
icon = QUOTE(PATHTOF(UI\Icon_Module_Zeus_Medic_ca.paa));
|
||||
class ModuleDescription {
|
||||
description = "";
|
||||
sync[] = {};
|
||||
};
|
||||
};
|
||||
class GVAR(moduleSetMedicalVehicle): GVAR(moduleBase) {
|
||||
curatorCanAttach = 1;
|
||||
displayName = CSTRING(ModuleSetMedicalVehicle_displayName);
|
||||
function = QFUNC(moduleSetMedicalVehicle);
|
||||
icon = QUOTE(PATHTOF(UI\Icon_Module_Zeus_Medic_ca.paa));
|
||||
class ModuleDescription {
|
||||
description = "";
|
||||
sync[] = {};
|
||||
};
|
||||
};
|
||||
class GVAR(moduleSetMedicalFacility): GVAR(moduleBase) {
|
||||
curatorCanAttach = 1;
|
||||
displayName = CSTRING(ModuleSetMedicalFacility_displayName);
|
||||
function = QFUNC(moduleSetMedicalFacility);
|
||||
icon = QUOTE(PATHTOF(UI\Icon_Module_Zeus_Medic_ca.paa));
|
||||
class ModuleDescription {
|
||||
description = "";
|
||||
sync[] = {};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -8,6 +8,9 @@ PREP(bi_moduleProjectile);
|
||||
PREP(bi_moduleRemoteControl);
|
||||
PREP(handleZeusUnitAssigned);
|
||||
PREP(moduleCaptive);
|
||||
PREP(moduleSetMedic);
|
||||
PREP(moduleSetMedicalVehicle);
|
||||
PREP(moduleSetMedicalFacility);
|
||||
PREP(moduleSurrender);
|
||||
PREP(moduleUnconscious);
|
||||
PREP(moduleZeusSettings);
|
||||
|
@ -19,7 +19,10 @@ class CfgPatches {
|
||||
};
|
||||
class GVAR(medical): ADDON {
|
||||
units[] = {
|
||||
QGVAR(moduleUnconscious)
|
||||
QGVAR(moduleUnconscious),
|
||||
QGVAR(moduleSetMedic),
|
||||
QGVAR(moduleSetMedicalVehicle),
|
||||
QGVAR(moduleSetMedicalFacility)
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -3,21 +3,20 @@
|
||||
* Flips the capture state of the unit the module is placed on.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The module logic <LOGIC>
|
||||
* 1: units <ARRAY>
|
||||
* 2: activated <BOOL>
|
||||
* 0: The module logic <OBJECT>
|
||||
* 1: Synchronized units <ARRAY>
|
||||
* 2: Activated <BOOL>
|
||||
*
|
||||
* ReturnValue:
|
||||
* nil
|
||||
* Return Value:
|
||||
* None <NIL>
|
||||
*
|
||||
* Public: no
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_mouseOver", "_unit", "_captive"];
|
||||
|
||||
params ["_logic", "_units", "_activated"];
|
||||
private ["_mouseOver", "_unit", "_captive"];
|
||||
|
||||
if !(_activated && local _logic) exitWith {};
|
||||
|
||||
|
52
addons/zeus/functions/fnc_moduleSetMedic.sqf
Normal file
52
addons/zeus/functions/fnc_moduleSetMedic.sqf
Normal file
@ -0,0 +1,52 @@
|
||||
/*
|
||||
* Author: SilentSpike, Glowbal
|
||||
* Assigns a medic role from the medical module to a unit
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The module logic <OBJECT>
|
||||
* 1: Synchronized units <ARRAY>
|
||||
* 2: Activated <BOOL>
|
||||
*
|
||||
* Return Value:
|
||||
* None <NIL>
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_logic", "_units", "_activated"];
|
||||
private ["_mouseOver", "_unit", "_medicN"];
|
||||
|
||||
if !(_activated && local _logic) exitWith {};
|
||||
|
||||
if !(["ACE_Medical"] call EFUNC(common,isModLoaded)) then {
|
||||
[LSTRING(RequiresAddon)] call EFUNC(common,displayTextStructured);
|
||||
} else {
|
||||
_mouseOver = GETMVAR(bis_fnc_curatorObjectPlaced_mouseOver,[""]);
|
||||
|
||||
if ((_mouseOver select 0) != "OBJECT") then {
|
||||
[LSTRING(NothingSelected)] call EFUNC(common,displayTextStructured);
|
||||
} else {
|
||||
_unit = effectivecommander (_mouseOver select 1);
|
||||
|
||||
if !(_unit isKindOf "CAManBase") then {
|
||||
[LSTRING(OnlyInfantry)] call EFUNC(common,displayTextStructured);
|
||||
} else {
|
||||
if !(alive _unit) then {
|
||||
[LSTRING(OnlyAlive)] call EFUNC(common,displayTextStructured);
|
||||
} else {
|
||||
if (GETVAR(_unit,EGVAR(captives,isHandcuffed),false)) then {
|
||||
[LSTRING(OnlyNonCaptive)] call EFUNC(common,displayTextStructured);
|
||||
} else {
|
||||
_medicN = GETVAR(_unit,EGVAR(medical,medicClass),0);
|
||||
if (_medicN < 1) then {
|
||||
_unit setvariable [QEGVAR(medical,medicClass), 1, true];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
deleteVehicle _logic;
|
51
addons/zeus/functions/fnc_moduleSetMedicalFacility.sqf
Normal file
51
addons/zeus/functions/fnc_moduleSetMedicalFacility.sqf
Normal file
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Author: SilentSpike, Glowbal
|
||||
* Assigns a medic role from the medical module to a unit
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The module logic <OBJECT>
|
||||
* 1: Synchronized units <ARRAY>
|
||||
* 2: Activated <BOOL>
|
||||
*
|
||||
* Return Value:
|
||||
* None <NIL>
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_logic", "_units", "_activated"];
|
||||
private ["_mouseOver", "_unit"];
|
||||
|
||||
if !(_activated && local _logic) exitWith {};
|
||||
|
||||
if !(["ACE_Medical"] call EFUNC(common,isModLoaded)) then {
|
||||
[LSTRING(RequiresAddon)] call EFUNC(common,displayTextStructured);
|
||||
} else {
|
||||
_mouseOver = GETMVAR(bis_fnc_curatorObjectPlaced_mouseOver,[""]);
|
||||
|
||||
if ((_mouseOver select 0) != "OBJECT") then {
|
||||
[LSTRING(NothingSelected)] call EFUNC(common,displayTextStructured);
|
||||
} else {
|
||||
_unit = (_mouseOver select 1);
|
||||
|
||||
if (_unit isKindOf "Man" || {!(_unit isKindOf "Building")}) then {
|
||||
[LSTRING(OnlyStructures)] call EFUNC(common,displayTextStructured);
|
||||
} else {
|
||||
if !(alive _unit) then {
|
||||
[LSTRING(OnlyAlive)] call EFUNC(common,displayTextStructured);
|
||||
} else {
|
||||
if (GETVAR(_unit,EGVAR(captives,isHandcuffed),false)) then {
|
||||
[LSTRING(OnlyNonCaptive)] call EFUNC(common,displayTextStructured);
|
||||
} else {
|
||||
if (!(GETVAR(_unit,EGVAR(medical,isMedicalFacility),false))) then {
|
||||
_unit setvariable [QEGVAR(medical,isMedicalFacility), true, true];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
deleteVehicle _logic;
|
52
addons/zeus/functions/fnc_moduleSetMedicalVehicle.sqf
Normal file
52
addons/zeus/functions/fnc_moduleSetMedicalVehicle.sqf
Normal file
@ -0,0 +1,52 @@
|
||||
/*
|
||||
* Author: SilentSpike, Glowbal
|
||||
* Assigns a medic role from the medical module to a unit
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The module logic <OBJECT>
|
||||
* 1: Synchronized units <ARRAY>
|
||||
* 2: Activated <BOOL>
|
||||
*
|
||||
* Return Value:
|
||||
* None <NIL>
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_logic", "_units", "_activated"];
|
||||
private ["_mouseOver", "_unit", "_medicN"];
|
||||
|
||||
if !(_activated && local _logic) exitWith {};
|
||||
|
||||
if !(["ACE_Medical"] call EFUNC(common,isModLoaded)) then {
|
||||
[LSTRING(RequiresAddon)] call EFUNC(common,displayTextStructured);
|
||||
} else {
|
||||
_mouseOver = GETMVAR(bis_fnc_curatorObjectPlaced_mouseOver,[""]);
|
||||
|
||||
if ((_mouseOver select 0) != "OBJECT") then {
|
||||
[LSTRING(NothingSelected)] call EFUNC(common,displayTextStructured);
|
||||
} else {
|
||||
_unit = (_mouseOver select 1);
|
||||
|
||||
if (_unit isKindOf "Man" || {_unit isKindOf "Building"}) then {
|
||||
[LSTRING(OnlyVehicles)] call EFUNC(common,displayTextStructured);
|
||||
} else {
|
||||
if !(alive _unit) then {
|
||||
[LSTRING(OnlyAlive)] call EFUNC(common,displayTextStructured);
|
||||
} else {
|
||||
if (GETVAR(_unit,EGVAR(captives,isHandcuffed),false)) then {
|
||||
[LSTRING(OnlyNonCaptive)] call EFUNC(common,displayTextStructured);
|
||||
} else {
|
||||
_medicN = GETVAR(_unit,EGVAR(medical,medicClass),0);
|
||||
if (_medicN < 1) then {
|
||||
_unit setvariable [QEGVAR(medical,medicClass), 1, true];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
deleteVehicle _logic;
|
@ -3,21 +3,20 @@
|
||||
* Flips the surrender state of the unit the module is placed on.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The module logic <LOGIC>
|
||||
* 1: units <ARRAY>
|
||||
* 2: activated <BOOL>
|
||||
* 0: The module logic <OBJECT>
|
||||
* 1: Synchronized units <ARRAY>
|
||||
* 2: Activated <BOOL>
|
||||
*
|
||||
* ReturnValue:
|
||||
* nil
|
||||
* Return Value:
|
||||
* None <NIL>
|
||||
*
|
||||
* Public: no
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_mouseOver", "_unit", "_surrendering"];
|
||||
|
||||
params ["_logic", "_units", "_activated"];
|
||||
private ["_mouseOver", "_unit", "_surrendering"];
|
||||
|
||||
if !(_activated && local _logic) exitWith {};
|
||||
|
||||
|
@ -3,21 +3,20 @@
|
||||
* Flips the unconscious state of the unit the module is placed on.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The module logic <LOGIC>
|
||||
* 1: units <ARRAY>
|
||||
* 2: activated <BOOL>
|
||||
* 0: The module logic <OBJECT>
|
||||
* 1: Synchronized units <ARRAY>
|
||||
* 2: Activated <BOOL>
|
||||
*
|
||||
* ReturnValue:
|
||||
* nil
|
||||
* Return Value:
|
||||
* None <NIL>
|
||||
*
|
||||
* Public: no
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_mouseOver", "_unit", "_conscious"];
|
||||
|
||||
params ["_logic", "_units", "_activated"];
|
||||
private ["_mouseOver", "_unit", "_conscious"];
|
||||
|
||||
if !(_activated && local _logic) exitWith {};
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project name="ACE">
|
||||
<Package name="Zeus">
|
||||
<Key ID="STR_ACE_Zeus_Settings_DisplayName">
|
||||
@ -137,6 +137,15 @@
|
||||
<German>Bewusstlosigkeit umschalten</German>
|
||||
<Portuguese>Alternar inconsciência</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Zeus_ModuleSetMedic_DisplayName">
|
||||
<English>Assign Medic</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Zeus_ModuleSetMedicalVehicle_DisplayName">
|
||||
<English>Assign Medical Vehicle</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Zeus_ModuleSetMedicalFacility_DisplayName">
|
||||
<English>Assign Medical Facility</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Zeus_OnlyAlive">
|
||||
<English>Unit must be alive</English>
|
||||
<French>Utiliser uniquement sur une unité vivante</French>
|
||||
@ -161,6 +170,12 @@
|
||||
<Italian>Si può usare solo su fanteria a piedi</Italian>
|
||||
<Portuguese>Usar somente em infantaria desmontada</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Zeus_OnlyStructures">
|
||||
<English>Unit must be a structure</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Zeus_OnlyVehicles">
|
||||
<English>Unit must be a vehicle</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Zeus_OnlyNonCaptive">
|
||||
<English>Unit must not be captive</English>
|
||||
<Polish>Jednostka nie może być więźniem</Polish>
|
||||
|
BIN
addons/zeus/ui/Icon_Module_Zeus_Medic_ca.paa
Normal file
BIN
addons/zeus/ui/Icon_Module_Zeus_Medic_ca.paa
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user