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
|
||||
* Mount unit actions inside passenger submenu
|
||||
* Note: This function is NOT global.
|
||||
*
|
||||
* Argument:
|
||||
* 0: Vehicle <OBJECT>
|
||||
|
@ -1,7 +1,6 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
* Create one action per passenger
|
||||
* Note: This function is NOT global.
|
||||
*
|
||||
* Argument:
|
||||
* 0: Vehicle <OBJECT>
|
||||
@ -29,7 +28,7 @@ _actions = [];
|
||||
str(_unit),
|
||||
[_unit, true] call EFUNC(common,getName),
|
||||
"",
|
||||
{systemChat "selected passenger"},
|
||||
{},
|
||||
{true},
|
||||
{_this call FUNC(addPassengerActions);},
|
||||
[_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(addToTriageCard);
|
||||
PREP(addUnconsciousCondition);
|
||||
PREP(addUnloadPatientActions);
|
||||
PREP(canAccessMedicalEquipment);
|
||||
PREP(canTreat);
|
||||
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>
|
||||
<Spanish>%1 te está intubando</Spanish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Medical_UnloadPatient">
|
||||
<English>Unload patient >></English>
|
||||
</Key>
|
||||
</Container>
|
||||
|
||||
</Package>
|
||||
|
Loading…
Reference in New Issue
Block a user