mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Medical - Allow placing unconscious in a body bag (#7941)
* medical: allow placing unconscious in a bodybag * Always show body bag action on non-awake units Co-authored-by: PabstMirror <pabstmirror@gmail.com>
This commit is contained in:
parent
ef56a2dc32
commit
9e3409fc6e
@ -245,9 +245,7 @@ class GVAR(actions) {
|
||||
medicRequired = 0;
|
||||
treatmentTime = QGVAR(treatmentTimeBodyBag);
|
||||
items[] = {"ACE_bodyBag"};
|
||||
// 'vehicle _patient' always returns the body
|
||||
// '_patient in _patient' always false for body
|
||||
condition = QUOTE(!alive _patient && {isNull objectParent _patient});
|
||||
condition = QFUNC(canPlaceInBodyBag);
|
||||
callbackSuccess = QFUNC(placeInBodyBag);
|
||||
consumeItem = 1;
|
||||
litter[] = {};
|
||||
|
@ -6,6 +6,7 @@ PREP(bandageLocal);
|
||||
PREP(bodyCleanupLoop);
|
||||
PREP(canBandage);
|
||||
PREP(canCPR);
|
||||
PREP(canPlaceInBodyBag);
|
||||
PREP(canSplint);
|
||||
PREP(canStitch);
|
||||
PREP(canTreat);
|
||||
|
24
addons/medical_treatment/functions/fnc_canPlaceInBodyBag.sqf
Normal file
24
addons/medical_treatment/functions/fnc_canPlaceInBodyBag.sqf
Normal file
@ -0,0 +1,24 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: SynixeBrett
|
||||
* Checks if the patient can be placed in a bodybag.
|
||||
*
|
||||
* 'vehicle _patient' always returns the body
|
||||
* '_patient in _patient' always false for body
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Medic (not used) <OBJECT>
|
||||
* 1: Patient <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Can Place in Bodybag <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [player, cursorObject] call ace_medical_treatment_fnc_canPlaceInBodybag
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
params ["", "_patient"];
|
||||
|
||||
(isNull objectParent _patient) && {!(_patient call EFUNC(common,isAwake))}
|
@ -4,7 +4,7 @@
|
||||
* Places a dead body inside a body bag.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Medic (not used) <OBJECT>
|
||||
* 0: Medic <OBJECT>
|
||||
* 1: Patient <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
@ -16,9 +16,14 @@
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
params ["", "_patient"];
|
||||
params ["_medic", "_patient"];
|
||||
TRACE_1("placeInBodyBag",_patient);
|
||||
|
||||
if ((alive _patient) && {!GVAR(allowBodyBagUnconscious)}) exitWith {
|
||||
[_medic, "ACE_bodyBag"] call EFUNC(common,addToInventory); // re-add slighly used bodybag?
|
||||
[LSTRING(bodybagWhileStillAlive)] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
|
||||
if (!local _patient) exitWith {
|
||||
TRACE_1("Calling where local",local _patient);
|
||||
[QGVAR(placeInBodyBag), [nil, _patient], _patient] call CBA_fnc_targetEvent;
|
||||
|
@ -234,6 +234,15 @@
|
||||
true
|
||||
] call CBA_settings_fnc_init;
|
||||
|
||||
[
|
||||
QGVAR(allowBodyBagUnconscious),
|
||||
"CHECKBOX",
|
||||
[LSTRING(AllowBodyBagUnconscious_DisplayName), LSTRING(AllowBodyBagUnconscious_Description)],
|
||||
[ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)],
|
||||
false,
|
||||
true
|
||||
] call CBA_settings_fnc_init;
|
||||
|
||||
[
|
||||
QGVAR(cprSuccessChance),
|
||||
"SLIDER",
|
||||
|
@ -606,6 +606,12 @@
|
||||
<Polish>Pozwala przetoczyć płyny IV samemu sobie</Polish>
|
||||
<Italian>Abilita la trasfusione in endovena su se stessi.</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Medical_Treatment_AllowBodyBagUnconscious_DisplayName">
|
||||
<English>Allow Unconscious Body Bag</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Medical_Treatment_AllowBodyBagUnconscious_Description">
|
||||
<English>Enables placing an unconscious patient in a body bag.</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Medical_Treatment_MedicIV_DisplayName">
|
||||
<English>Allow IV Transfusion</English>
|
||||
<German>Erlaube Bluttransfusionen</German>
|
||||
@ -4282,5 +4288,8 @@
|
||||
<Chinese>這部位沒有止血帶!</Chinese>
|
||||
<Turkish>Bu vücut kısmında turnike yok!</Turkish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Medical_Treatment_bodybagWhileStillAlive">
|
||||
<English>The body twitched and may not be dead!</English>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
|
Loading…
Reference in New Issue
Block a user