mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Added assign medic, medicalfacility and medical vehicle curator modules
This commit is contained in:
parent
29b21b8f41
commit
0e57d3d97c
@ -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)
|
||||
};
|
||||
};
|
||||
};
|
||||
|
53
addons/zeus/functions/fnc_moduleSetMedic.sqf
Normal file
53
addons/zeus/functions/fnc_moduleSetMedic.sqf
Normal file
@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Author: SilentSpike, Glowbal
|
||||
* Assigns a medic role from the medical module to a unit
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The module logic <LOGIC>
|
||||
* 1: units <ARRAY>
|
||||
* 2: activated <BOOL>
|
||||
*
|
||||
* ReturnValue:
|
||||
* nil
|
||||
*
|
||||
* Public: no
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_mouseOver", "_unit", "_medicN"];
|
||||
|
||||
params ["_logic", "_units", "_activated"];
|
||||
|
||||
if !(_activated && local _logic) exitWith {};
|
||||
|
||||
if (isNil QEFUNC(captives,setSurrendered)) 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;
|
52
addons/zeus/functions/fnc_moduleSetMedicalFacility.sqf
Normal file
52
addons/zeus/functions/fnc_moduleSetMedicalFacility.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 <LOGIC>
|
||||
* 1: units <ARRAY>
|
||||
* 2: activated <BOOL>
|
||||
*
|
||||
* ReturnValue:
|
||||
* nil
|
||||
*
|
||||
* Public: no
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_mouseOver", "_unit"];
|
||||
|
||||
params ["_logic", "_units", "_activated"];
|
||||
|
||||
if !(_activated && local _logic) exitWith {};
|
||||
|
||||
if (isNil QEFUNC(captives,setSurrendered)) 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 "CAManBase") then {
|
||||
[LSTRING(NoMan)] 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;
|
53
addons/zeus/functions/fnc_moduleSetMedicalVehicle.sqf
Normal file
53
addons/zeus/functions/fnc_moduleSetMedicalVehicle.sqf
Normal file
@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Author: SilentSpike, Glowbal
|
||||
* Assigns a medic role from the medical module to a unit
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The module logic <LOGIC>
|
||||
* 1: units <ARRAY>
|
||||
* 2: activated <BOOL>
|
||||
*
|
||||
* ReturnValue:
|
||||
* nil
|
||||
*
|
||||
* Public: no
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_mouseOver", "_unit", "_medicN"];
|
||||
|
||||
params ["_logic", "_units", "_activated"];
|
||||
|
||||
if !(_activated && local _logic) exitWith {};
|
||||
|
||||
if (isNil QEFUNC(captives,setSurrendered)) 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 "CAManBase") then {
|
||||
[LSTRING(NoMan)] 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;
|
@ -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_OnlyVehicles">
|
||||
<English>Object must be a vehicle</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Zeus_NoMan">
|
||||
<English>Object must not be a man</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