Added assign medic, medicalfacility and medical vehicle curator modules

This commit is contained in:
Glowbal 2015-08-15 18:25:48 +02:00
parent 29b21b8f41
commit 0e57d3d97c
8 changed files with 211 additions and 2 deletions

View File

@ -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[] = {};
};
};
};

View File

@ -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);

View File

@ -19,7 +19,10 @@ class CfgPatches {
};
class GVAR(medical): ADDON {
units[] = {
QGVAR(moduleUnconscious)
QGVAR(moduleUnconscious),
QGVAR(moduleSetMedic),
QGVAR(moduleSetMedicalVehicle),
QGVAR(moduleSetMedicalFacility)
};
};
};

View 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;

View 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;

View 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;

View File

@ -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>

Binary file not shown.