mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Added allowSelfTreatment attribute to treatment actions
This commit is contained in:
parent
a4e406658f
commit
f15a1c033d
@ -7,6 +7,7 @@ class ACE_Medical_Actions {
|
||||
category = "bandage";
|
||||
treatmentLocations[] = {"All"};
|
||||
allowedSelections[] = {"All"};
|
||||
allowSelfTreatment = 1;
|
||||
requiredMedic = 0;
|
||||
treatmentTime = 5;
|
||||
treatmentTimeSelfCoef = 1;
|
||||
@ -32,6 +33,7 @@ class ACE_Medical_Actions {
|
||||
displayName = CSTRING(Inject_Morphine);
|
||||
displayNameProgress = CSTRING(Injecting_Morphine);
|
||||
allowedSelections[] = {"hand_l", "hand_r", "leg_l", "leg_r"};
|
||||
allowSelfTreatment = 1;
|
||||
category = "medication";
|
||||
treatmentTime = 2;
|
||||
items[] = {"ACE_morphine"};
|
||||
@ -43,6 +45,7 @@ class ACE_Medical_Actions {
|
||||
displayName = CSTRING(Inject_Epinephrine);
|
||||
displayNameProgress = CSTRING(Injecting_Epinephrine);
|
||||
allowedSelections[] = {"hand_l", "hand_r", "leg_l", "leg_r"};
|
||||
allowSelfTreatment = 1;
|
||||
category = "medication";
|
||||
requiredMedic = 1;
|
||||
treatmentTime = 3;
|
||||
@ -55,6 +58,7 @@ class ACE_Medical_Actions {
|
||||
displayName = CSTRING(Transfuse_Blood);
|
||||
displayNameProgress = CSTRING(Transfusing_Blood);
|
||||
allowedSelections[] = {"hand_l", "hand_r", "leg_l", "leg_r"};
|
||||
allowSelfTreatment = 0;
|
||||
category = "advanced";
|
||||
requiredMedic = 1;
|
||||
treatmentTime = 20;
|
||||
@ -111,6 +115,7 @@ class ACE_Medical_Actions {
|
||||
category = "advanced";
|
||||
treatmentLocations[] = {"All"};
|
||||
allowedSelections[] = {"body"};
|
||||
allowSelfTreatment = 0;
|
||||
requiredMedic = 0;
|
||||
treatmentTime = 15;
|
||||
items[] = {};
|
||||
@ -137,6 +142,7 @@ class ACE_Medical_Actions {
|
||||
// Which locations can this treatment action be used? Available: Field, MedicalFacility, MedicalVehicle, All.
|
||||
treatmentLocations[] = {"All"};
|
||||
allowedSelections[] = {"All"};
|
||||
allowSelfTreatment = 1;
|
||||
// What is the level of medical skill required for this treatment action? 0 = all soldiers, 1 = medic, 2 = doctor
|
||||
requiredMedic = 0;
|
||||
// The time it takes for a treatment action to complete. Time is in seconds.
|
||||
@ -210,6 +216,7 @@ class ACE_Medical_Actions {
|
||||
displayName = CSTRING(Actions_Blood4_1000);
|
||||
displayNameProgress = CSTRING(Transfusing_Blood);
|
||||
allowedSelections[] = {"hand_l", "hand_r", "leg_l", "leg_r"};
|
||||
allowSelfTreatment = 0;
|
||||
category = "advanced";
|
||||
items[] = {"ACE_bloodIV"};
|
||||
requiredMedic = 1;
|
||||
@ -260,6 +267,7 @@ class ACE_Medical_Actions {
|
||||
category = "advanced";
|
||||
items[] = {"ACE_surgicalKit"};
|
||||
treatmentLocations[] = {QGVAR(useLocation_SurgicalKit)};
|
||||
allowSelfTreatment = 0;
|
||||
requiredMedic = QGVAR(medicSetting_SurgicalKit);
|
||||
patientStateCondition = QGVAR(useCondition_SurgicalKit);
|
||||
treatmentTime = "(count ((_this select 1) getVariable ['ACE_Medical_bandagedWounds', []]) * 5)";
|
||||
@ -275,6 +283,7 @@ class ACE_Medical_Actions {
|
||||
category = "advanced";
|
||||
items[] = {"ACE_personalAidKit"};
|
||||
treatmentLocations[] = {QGVAR(useLocation_PAK)};
|
||||
allowSelfTreatment = 0;
|
||||
requiredMedic = QGVAR(medicSetting_PAK);
|
||||
patientStateCondition = QGVAR(useCondition_PAK);
|
||||
treatmentTime = QUOTE((_this select 1) call FUNC(treatmentAdvanced_fullHealTreatmentTime));
|
||||
@ -319,6 +328,7 @@ class ACE_Medical_Actions {
|
||||
displayName = CSTRING(Check_Response);
|
||||
callbackSuccess = QUOTE(DFUNC(actionCheckResponse));
|
||||
displayNameProgress = CSTRING(Check_Response_Content);
|
||||
allowSelfTreatment = 0;
|
||||
};
|
||||
class RemoveTourniquet: Tourniquet {
|
||||
displayName = CSTRING(Actions_RemoveTourniquet);
|
||||
@ -335,6 +345,7 @@ class ACE_Medical_Actions {
|
||||
category = "advanced";
|
||||
treatmentLocations[] = {"All"};
|
||||
allowedSelections[] = {"body"};
|
||||
allowSelfTreatment = 0;
|
||||
requiredMedic = 0;
|
||||
treatmentTime = 15;
|
||||
items[] = {};
|
||||
@ -356,6 +367,7 @@ class ACE_Medical_Actions {
|
||||
displayNameProgress = CSTRING(PlacingInBodyBag);
|
||||
category = "advanced";
|
||||
treatmentLocations[] = {"All"};
|
||||
allowSelfTreatment = 0;
|
||||
requiredMedic = 0;
|
||||
treatmentTime = 15;
|
||||
items[] = {"ACE_bodyBag"};
|
||||
|
@ -26,6 +26,9 @@ _config = (ConfigFile >> "ACE_Medical_Actions" >> (["Basic", "Advanced"] select
|
||||
|
||||
if !(isClass _config) exitwith {false};
|
||||
|
||||
// Allow self treatment check
|
||||
if (_caller == _target && {getNumber (_config >> "allowSelfTreatment") == 0}) exitwith {false};
|
||||
|
||||
_medicRequired = if (isNumber (_config >> "requiredMedic")) then {
|
||||
getNumber (_config >> "requiredMedic");
|
||||
} else {
|
||||
|
@ -34,6 +34,9 @@ if (GVAR(level) >= 2) then {
|
||||
};
|
||||
if !(isClass _config) exitwith {false};
|
||||
|
||||
// Allow self treatment check
|
||||
if (_caller == _target && {getNumber (_config >> "allowSelfTreatment") == 0}) exitwith {false};
|
||||
|
||||
_medicRequired = if (isNumber (_config >> "requiredMedic")) then {
|
||||
getNumber (_config >> "requiredMedic");
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user