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
addons/medical_treatment
@ -245,9 +245,7 @@ class GVAR(actions) {
|
|||||||
medicRequired = 0;
|
medicRequired = 0;
|
||||||
treatmentTime = QGVAR(treatmentTimeBodyBag);
|
treatmentTime = QGVAR(treatmentTimeBodyBag);
|
||||||
items[] = {"ACE_bodyBag"};
|
items[] = {"ACE_bodyBag"};
|
||||||
// 'vehicle _patient' always returns the body
|
condition = QFUNC(canPlaceInBodyBag);
|
||||||
// '_patient in _patient' always false for body
|
|
||||||
condition = QUOTE(!alive _patient && {isNull objectParent _patient});
|
|
||||||
callbackSuccess = QFUNC(placeInBodyBag);
|
callbackSuccess = QFUNC(placeInBodyBag);
|
||||||
consumeItem = 1;
|
consumeItem = 1;
|
||||||
litter[] = {};
|
litter[] = {};
|
||||||
|
@ -6,6 +6,7 @@ PREP(bandageLocal);
|
|||||||
PREP(bodyCleanupLoop);
|
PREP(bodyCleanupLoop);
|
||||||
PREP(canBandage);
|
PREP(canBandage);
|
||||||
PREP(canCPR);
|
PREP(canCPR);
|
||||||
|
PREP(canPlaceInBodyBag);
|
||||||
PREP(canSplint);
|
PREP(canSplint);
|
||||||
PREP(canStitch);
|
PREP(canStitch);
|
||||||
PREP(canTreat);
|
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.
|
* Places a dead body inside a body bag.
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: Medic (not used) <OBJECT>
|
* 0: Medic <OBJECT>
|
||||||
* 1: Patient <OBJECT>
|
* 1: Patient <OBJECT>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
@ -16,9 +16,14 @@
|
|||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
|
|
||||||
params ["", "_patient"];
|
params ["_medic", "_patient"];
|
||||||
TRACE_1("placeInBodyBag",_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 {
|
if (!local _patient) exitWith {
|
||||||
TRACE_1("Calling where local",local _patient);
|
TRACE_1("Calling where local",local _patient);
|
||||||
[QGVAR(placeInBodyBag), [nil, _patient], _patient] call CBA_fnc_targetEvent;
|
[QGVAR(placeInBodyBag), [nil, _patient], _patient] call CBA_fnc_targetEvent;
|
||||||
|
@ -234,6 +234,15 @@
|
|||||||
true
|
true
|
||||||
] call CBA_settings_fnc_init;
|
] 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),
|
QGVAR(cprSuccessChance),
|
||||||
"SLIDER",
|
"SLIDER",
|
||||||
|
@ -606,6 +606,12 @@
|
|||||||
<Polish>Pozwala przetoczyć płyny IV samemu sobie</Polish>
|
<Polish>Pozwala przetoczyć płyny IV samemu sobie</Polish>
|
||||||
<Italian>Abilita la trasfusione in endovena su se stessi.</Italian>
|
<Italian>Abilita la trasfusione in endovena su se stessi.</Italian>
|
||||||
</Key>
|
</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">
|
<Key ID="STR_ACE_Medical_Treatment_MedicIV_DisplayName">
|
||||||
<English>Allow IV Transfusion</English>
|
<English>Allow IV Transfusion</English>
|
||||||
<German>Erlaube Bluttransfusionen</German>
|
<German>Erlaube Bluttransfusionen</German>
|
||||||
@ -4282,5 +4288,8 @@
|
|||||||
<Chinese>這部位沒有止血帶!</Chinese>
|
<Chinese>這部位沒有止血帶!</Chinese>
|
||||||
<Turkish>Bu vücut kısmında turnike yok!</Turkish>
|
<Turkish>Bu vücut kısmında turnike yok!</Turkish>
|
||||||
</Key>
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Medical_Treatment_bodybagWhileStillAlive">
|
||||||
|
<English>The body twitched and may not be dead!</English>
|
||||||
|
</Key>
|
||||||
</Package>
|
</Package>
|
||||||
</Project>
|
</Project>
|
||||||
|
Loading…
Reference in New Issue
Block a user