mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Added dynamic actions to unload patients (unconscious) from vehicles
This commit is contained in:
parent
274dae9a02
commit
f8ea603977
@ -1,7 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Author: CAA-Picard
|
* Author: CAA-Picard
|
||||||
* Mount unit actions inside passenger submenu
|
* Mount unit actions inside passenger submenu
|
||||||
* Note: This function is NOT global.
|
|
||||||
*
|
*
|
||||||
* Argument:
|
* Argument:
|
||||||
* 0: Vehicle <OBJECT>
|
* 0: Vehicle <OBJECT>
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Author: CAA-Picard
|
* Author: CAA-Picard
|
||||||
* Create one action per passenger
|
* Create one action per passenger
|
||||||
* Note: This function is NOT global.
|
|
||||||
*
|
*
|
||||||
* Argument:
|
* Argument:
|
||||||
* 0: Vehicle <OBJECT>
|
* 0: Vehicle <OBJECT>
|
||||||
@ -29,7 +28,7 @@ _actions = [];
|
|||||||
str(_unit),
|
str(_unit),
|
||||||
[_unit, true] call EFUNC(common,getName),
|
[_unit, true] call EFUNC(common,getName),
|
||||||
"",
|
"",
|
||||||
{systemChat "selected passenger"},
|
{},
|
||||||
{true},
|
{true},
|
||||||
{_this call FUNC(addPassengerActions);},
|
{_this call FUNC(addPassengerActions);},
|
||||||
[_unit]
|
[_unit]
|
||||||
|
@ -1430,4 +1430,98 @@ class CfgVehicles {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Patient unload from vehicle actions
|
||||||
|
class LandVehicle;
|
||||||
|
class Car: LandVehicle {
|
||||||
|
class ACE_Actions {
|
||||||
|
class ACE_MainActions {
|
||||||
|
class ACE_UnloadPatients {
|
||||||
|
displayName = "$STR_ACE_Medical_UnloadPatient";
|
||||||
|
condition = "true";
|
||||||
|
statement = "";
|
||||||
|
insertChildren = QUOTE(_this call FUNC(addUnloadPatientActions));
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
class Tank: LandVehicle {
|
||||||
|
class ACE_Actions {
|
||||||
|
class ACE_MainActions {
|
||||||
|
class ACE_UnloadPatients {
|
||||||
|
displayName = "$STR_ACE_Medical_UnloadPatient";
|
||||||
|
condition = "true";
|
||||||
|
statement = "";
|
||||||
|
insertChildren = QUOTE(_this call FUNC(addUnloadPatientActions));
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
class Air;
|
||||||
|
class Helicopter: Air {
|
||||||
|
class ACE_Actions {
|
||||||
|
class ACE_MainActions {
|
||||||
|
class ACE_UnloadPatients {
|
||||||
|
displayName = "$STR_ACE_Medical_UnloadPatient";
|
||||||
|
condition = "true";
|
||||||
|
statement = "";
|
||||||
|
insertChildren = QUOTE(_this call FUNC(addUnloadPatientActions));
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
class Plane: Air {
|
||||||
|
class ACE_Actions {
|
||||||
|
class ACE_MainActions {
|
||||||
|
class ACE_UnloadPatients {
|
||||||
|
displayName = "$STR_ACE_Medical_UnloadPatient";
|
||||||
|
condition = "true";
|
||||||
|
statement = "";
|
||||||
|
insertChildren = QUOTE(_this call FUNC(addUnloadPatientActions));
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
class Ship;
|
||||||
|
class Ship_F: Ship {
|
||||||
|
class ACE_Actions {
|
||||||
|
class ACE_MainActions {
|
||||||
|
class ACE_UnloadPatients {
|
||||||
|
displayName = "$STR_ACE_Medical_UnloadPatient";
|
||||||
|
condition = "true";
|
||||||
|
statement = "";
|
||||||
|
insertChildren = QUOTE(_this call FUNC(addUnloadPatientActions));
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
class StaticWeapon: LandVehicle {
|
||||||
|
class ACE_Actions {
|
||||||
|
class ACE_MainActions {
|
||||||
|
class ACE_UnloadPatients {
|
||||||
|
displayName = "$STR_ACE_Medical_UnloadPatient";
|
||||||
|
condition = "true";
|
||||||
|
statement = "";
|
||||||
|
insertChildren = QUOTE(_this call FUNC(addUnloadPatientActions));
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
class StaticMortar;
|
||||||
|
class Mortar_01_base_F: StaticMortar {
|
||||||
|
class ACE_Actions {
|
||||||
|
class ACE_MainActions {
|
||||||
|
class ACE_UnloadPatients {
|
||||||
|
displayName = "$STR_ACE_Medical_UnloadPatient";
|
||||||
|
condition = "true";
|
||||||
|
statement = "";
|
||||||
|
insertChildren = QUOTE(_this call FUNC(addUnloadPatientActions));
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
@ -16,6 +16,7 @@ PREP(addToInjuredCollection);
|
|||||||
PREP(addToLog);
|
PREP(addToLog);
|
||||||
PREP(addToTriageCard);
|
PREP(addToTriageCard);
|
||||||
PREP(addUnconsciousCondition);
|
PREP(addUnconsciousCondition);
|
||||||
|
PREP(addUnloadPatientActions);
|
||||||
PREP(canAccessMedicalEquipment);
|
PREP(canAccessMedicalEquipment);
|
||||||
PREP(canTreat);
|
PREP(canTreat);
|
||||||
PREP(determineIfFatal);
|
PREP(determineIfFatal);
|
||||||
|
48
addons/medical/functions/fnc_addUnloadPatientActions.sqf
Normal file
48
addons/medical/functions/fnc_addUnloadPatientActions.sqf
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
/*
|
||||||
|
* Author: CAA-Picard
|
||||||
|
* Create one unload action per unconscious passenger
|
||||||
|
*
|
||||||
|
* Argument:
|
||||||
|
* 0: Vehicle <OBJECT>
|
||||||
|
* 1: Player <OBJECT>
|
||||||
|
* 3: Parameters <ARRAY>
|
||||||
|
*
|
||||||
|
* Return value:
|
||||||
|
* Children actions <ARRAY>
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
EXPLODE_3_PVT(_this,_vehicle,_player,_parameters);
|
||||||
|
|
||||||
|
systemChat format ["Generating for %1 %2", _vehicle, _player];
|
||||||
|
|
||||||
|
private ["_actions"];
|
||||||
|
_actions = [];
|
||||||
|
|
||||||
|
{
|
||||||
|
_unit = _x;
|
||||||
|
systemChat str(_unit);
|
||||||
|
if (_unit != _player && {(alive _unit) && {_unit getVariable ["ACE_isUnconscious", false]}}) then {
|
||||||
|
systemChat "Entered";
|
||||||
|
_actions pushBack
|
||||||
|
[
|
||||||
|
[
|
||||||
|
str(_unit),
|
||||||
|
[_unit, true] call EFUNC(common,getName),
|
||||||
|
"",
|
||||||
|
{[_player, (_this select 2) select 0] call FUNC(actionUnloadUnit);},
|
||||||
|
{true},
|
||||||
|
{},
|
||||||
|
[_unit]
|
||||||
|
] call EFUNC(interact_menu,createAction),
|
||||||
|
[],
|
||||||
|
_unit
|
||||||
|
];
|
||||||
|
};
|
||||||
|
} forEach crew _vehicle;
|
||||||
|
|
||||||
|
systemChat str(count _actions);
|
||||||
|
|
||||||
|
_actions
|
@ -725,6 +725,9 @@
|
|||||||
<Russian>%1 проводит вам интубацию</Russian>
|
<Russian>%1 проводит вам интубацию</Russian>
|
||||||
<Spanish>%1 te está intubando</Spanish>
|
<Spanish>%1 te está intubando</Spanish>
|
||||||
</Key>
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Medical_UnloadPatient">
|
||||||
|
<English>Unload patient >></English>
|
||||||
|
</Key>
|
||||||
</Container>
|
</Container>
|
||||||
|
|
||||||
</Package>
|
</Package>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user