Modernize and cleanup medical_treatment

This commit is contained in:
mharis001
2019-04-11 07:25:20 -04:00
parent 30b99fa20a
commit 0155c435bd
98 changed files with 1763 additions and 2383 deletions

View File

@ -1030,7 +1030,7 @@
<Korean>기본</Korean>
</Key>
<Key ID="STR_ACE_Common_Vehicle">
<English>Medical vehicles</English>
<English>Medical Vehicles</English>
<Russian>В медицинском транспорте</Russian>
<Polish>Pojazdy medyczne</Polish>
<Spanish>Vehiculos médicos</Spanish>

View File

@ -11,7 +11,6 @@ PREP_RECOMPILE_END;
// Add warning for old functions that were technically public, Remove at 3.14.0
{
missionNamespace setVariable [_x, compileFinal format ['diag_log text "ACE Medical WARNING: Formerly public function [%1] has no effect in medical rewrite."; nil', _x]];
} forEach ["ace_medical_fnc_actionPlaceInBodyBag","ace_medical_fnc_actionRemoveTourniquet","ace_medical_fnc_addHeartRateAdjustment","ace_medical_fnc_addToLog","ace_medical_fnc_addToTriageCard
","ace_medical_fnc_addUnconsciousCondition","ace_medical_fnc_addVitalLoop","ace_medical_fnc_canAccessMedicalEquipment","ace_medical_fnc_canTreat","ace_medical_fnc_displayTriageCard","ace_medical_fnc_dropDownTriageCard","ace_medical_fnc_getTriageStatus","ace_medical_fnc_getUnconsciousCondition","ace_medical_fnc_hasItem","ace_medical_fnc_hasItems","ace_medical_fnc_hasTourniquetAppliedTo","ace_medical_fnc_isInMedicalFacility","ace_medical_fnc_isInMedicalVehicle","ace_medical_fnc_isMedic","ace_medical_fnc_isMedicalVehicle","ace_medical_fnc_itemCheck","ace_medical_fnc_selectionNameToNumber","ace_medical_fnc_setCardiacArrest","ace_medical_fnc_setDead","ace_medical_fnc_setHitPointDamage","ace_medical_fnc_showBloodEffect","ace_medical_fnc_treatment","ace_medical_fnc_treatmentAdvanced_bandage","ace_medical_fnc_treatmentAdvanced_CPR","ace_medical_fnc_treatmentAdvanced_CPRLocal","ace_medical_fnc_treatmentAdvanced_medication","ace_medical_fnc_treatmentAdvanced_medicationLocal","ace_medical_fnc_treatmentIV","ace_medical_fnc_treatmentIVLocal","ace_medical_fnc_unconsciousPFH","ace_medical_fnc_useItem","ace_medical_fnc_useItems"];
} forEach ["ace_medical_fnc_actionPlaceInBodyBag","ace_medical_fnc_actionRemoveTourniquet","ace_medical_fnc_addHeartRateAdjustment","ace_medical_fnc_addToLog","ace_medical_fnc_addToTriageCard","ace_medical_fnc_addUnconsciousCondition","ace_medical_fnc_addVitalLoop","ace_medical_fnc_canAccessMedicalEquipment","ace_medical_fnc_canTreat","ace_medical_fnc_displayTriageCard","ace_medical_fnc_dropDownTriageCard","ace_medical_fnc_getTriageStatus","ace_medical_fnc_getUnconsciousCondition","ace_medical_fnc_hasItem","ace_medical_fnc_hasItems","ace_medical_fnc_hasTourniquetAppliedTo","ace_medical_fnc_isInMedicalFacility","ace_medical_fnc_isInMedicalVehicle","ace_medical_fnc_isMedic","ace_medical_fnc_isMedicalVehicle","ace_medical_fnc_itemCheck","ace_medical_fnc_selectionNameToNumber","ace_medical_fnc_setCardiacArrest","ace_medical_fnc_setDead","ace_medical_fnc_setHitPointDamage","ace_medical_fnc_showBloodEffect","ace_medical_fnc_treatment","ace_medical_fnc_treatmentAdvanced_bandage","ace_medical_fnc_treatmentAdvanced_CPR","ace_medical_fnc_treatmentAdvanced_CPRLocal","ace_medical_fnc_treatmentAdvanced_medication","ace_medical_fnc_treatmentAdvanced_medicationLocal","ace_medical_fnc_treatmentIV","ace_medical_fnc_treatmentIVLocal","ace_medical_fnc_unconsciousPFH","ace_medical_fnc_useItem","ace_medical_fnc_useItems"];
ADDON = true;

View File

@ -1,6 +1,6 @@
// CBA Settings [ADDON: ace_medical]:
private _categoryArray = [LELSTRING(medical,Category_DisplayName), "?"];
private _categoryArray = [LELSTRING(medical,Category), "?"];
// todo: Check the description is still accurate
[

View File

@ -2,7 +2,7 @@
#define COMPONENT_BEAUTIFIED Medical Core
#include "\z\ace\addons\main\script_mod.hpp"
// #define DEBUG_MODE_FULL
#define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
// #define ENABLE_PERFORMANCE_COUNTERS

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project name="ACE">
<Package name="Medical">
<Key ID="STR_ACE_Medical_Category_DisplayName">
<Key ID="STR_ACE_Medical_Category">
<English>ACE Medical</English>
<Russian>ACE: медицина</Russian>
<Polish>ACE Opcje medyczne</Polish>

View File

@ -26,7 +26,7 @@ private _animConfig = if (_isBandage) then {
configFile >> "ACE_Medical_Actions" >> "Basic" >> "Morphine";
};
private _configProperty = "animationCaller";
private _configProperty = "animationMedic";
if (_isSelfTreatment) then {
_configProperty = _configProperty + "Self";
};

View File

@ -1,6 +1,6 @@
// CBA Settings [ADDON: ace_medical_blood]:
private _categoryArray = [LELSTRING(medical,Category_DisplayName), LLSTRING(subCategory)];
private _categoryArray = [LELSTRING(medical,Category), LLSTRING(subCategory)];
[
QGVAR(enabledFor), "LIST",

View File

@ -1,6 +1,6 @@
// CBA Settings [ADDON: ace_medical_damage]:
private _categoryArray = [LELSTRING(medical,Category_DisplayName), LLSTRING(subCategory)];
private _categoryArray = [LELSTRING(medical,Category), LLSTRING(subCategory)];
[
QEGVAR(medical,playerDamageThreshold), "SLIDER",

View File

@ -1,6 +1,6 @@
// CBA Settings [ADDON: ace_medical_feedback]:
private _categoryArray = [LELSTRING(medical,Category_DisplayName), LLSTRING(subCategory)];
private _categoryArray = [LELSTRING(medical,Category), LLSTRING(subCategory)];
[
QGVAR(painEffectType),

View File

@ -44,7 +44,7 @@ class CfgVehicles {
#include "InteractionBodyParts.hpp"
#undef ACTION_CONDITION
};
class ACE_LoadPatient {
class ACE_LoadPatient {
displayName = CSTRING(LoadPatient);
condition = QUOTE(_target getVariable [ARR_2('ACE_isUnconscious',false)] && {alive _target} && {vehicle _target == _target});
exceptions[] = {"isNotDragging", "isNotCarrying"};

View File

@ -2,7 +2,7 @@
QGVAR(enableActions),
"LIST",
[LSTRING(EnableActions_DisplayName), LSTRING(EnableActions_Description)],
LSTRING(Category),
[ELSTRING(medical,Category), LSTRING(SubCategory)],
[[0, 1, 2], [LSTRING(Selections3D), LSTRING(Radial), ELSTRING(common,Disabled)], 0],
false
] call CBA_settings_fnc_init;
@ -11,7 +11,7 @@
QGVAR(enableSelfActions),
"CHECKBOX",
[LSTRING(EnableSelfActions_DisplayName), LSTRING(EnableSelfActions_Description)],
LSTRING(Category),
[ELSTRING(medical,Category), LSTRING(SubCategory)],
true,
false
] call CBA_settings_fnc_init;
@ -20,7 +20,7 @@
QGVAR(enableMedicalMenu),
"LIST",
[LSTRING(EnableMedicalMenu_DisplayName), LSTRING(EnableMedicalMenu_Description)],
LSTRING(Category),
[ELSTRING(medical,Category), LSTRING(SubCategory)],
[[0, 1, 2], [ELSTRING(common,Disabled), ELSTRING(common,Enabled), ELSTRING(common,VehiclesOnly)], 1],
false
] call CBA_settings_fnc_init;
@ -29,7 +29,7 @@
QGVAR(openAfterTreatment),
"CHECKBOX",
[LSTRING(OpenAfterTreatment_DisplayName), LSTRING(OpenAfterTreatment_Description)],
LSTRING(Category),
[ELSTRING(medical,Category), LSTRING(SubCategory)],
true,
false
] call CBA_settings_fnc_init;
@ -38,7 +38,7 @@
QGVAR(maxDistance),
"SLIDER",
[LSTRING(MaxDistance_DisplayName), LSTRING(MaxDistance_Description)],
LSTRING(Category),
[ELSTRING(medical,Category), LSTRING(SubCategory)],
[0, 10, 3, 1],
false
] call CBA_settings_fnc_init;

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project name="ACE">
<Package name="Medical GUI">
<Key ID="STR_ACE_Medical_GUI_Category">
<English>ACE Medical GUI</English>
<Key ID="STR_ACE_Medical_GUI_SubCategory">
<English>GUI</English>
</Key>
<Key ID="STR_ACE_Medical_GUI_EnableActions_DisplayName">
<English>Enable Medical Actions</English>

View File

@ -1,6 +1,6 @@
// CBA Settings [ADDON: ace_medical_statemachine]:
private _categoryArray = [LELSTRING(medical,Category_DisplayName), LLSTRING(subCategory)];
private _categoryArray = [LELSTRING(medical,Category), LLSTRING(subCategory)];
[
QGVAR(fatalInjuryCondition), "LIST",

View File

@ -1,6 +1,6 @@
// CBA Settings [ADDON: ace_medical_status]:
private _categoryArray = [LELSTRING(medical,Category_DisplayName), LLSTRING(subCategory)];
private _categoryArray = [LELSTRING(medical,Category), LLSTRING(subCategory)];
[
QEGVAR(medical,bleedingCoefficient), "SLIDER",

View File

@ -582,7 +582,7 @@ class ADDON {
timeInSystem = 1800;
timeTillMaxEffect = 30;
maxDose = 4;
inCompatableMedication[] = {};
incompatableMedication[] = {};
viscosityChange = -10;
};
class Epinephrine {
@ -593,7 +593,7 @@ class ADDON {
timeInSystem = 120;
timeTillMaxEffect = 10;
maxDose = 10;
inCompatableMedication[] = {};
incompatableMedication[] = {};
};
class Adenosine {
painReduce = 0;
@ -603,7 +603,7 @@ class ADDON {
timeInSystem = 120;
timeTillMaxEffect = 15;
maxDose = 6;
inCompatableMedication[] = {};
incompatableMedication[] = {};
};
class Atropine {
painReduce = 0;
@ -613,14 +613,14 @@ class ADDON {
timeInSystem = 120;
timeTillMaxEffect = 15;
maxDose = 6;
inCompatableMedication[] = {};
incompatableMedication[] = {};
};
class PainKillers {
painReduce = 0.1;
timeInSystem = 600;
timeTillMaxEffect = 60;
maxDose = 10;
inCompatableMedication[] = {};
incompatableMedication[] = {};
viscosityChange = 5;
};
};

View File

@ -1,39 +1,46 @@
class GVAR(Actions) {
// --- bandages
class GVAR(actions) {
// - Bandages -------------------------------------------------------------
class BasicBandage {
displayName = CSTRING(Bandage);
displayNameProgress = CSTRING(Bandaging);
icon = QPATHTOEF(medical_gui,ui\bandage.paa);
category = "bandage";
treatmentLocations[] = {"All"};
allowedSelections[] = {"All"};
allowSelfTreatment = 1;
requiredMedic = 0;
treatmentTime = QFUNC(getBandageTime);
treatmentTimeSelfCoef = 1;
items[] = {{"ACE_fieldDressing", "ACE_packingBandage", "ACE_elasticBandage", "ACE_quikclot"}};
condition = QFUNC(canBandage);
itemConsumed = 1;
callbackSuccess = QFUNC(treatmentBandage);
callbackFailure = "";
callbackProgress = "";
animationCaller = "AinvPknlMstpSlayW[wpn]Dnon_medicOther";
animationCallerProne = "AinvPpneMstpSlayW[wpn]Dnon_medicOther";
animationCallerSelf = "AinvPknlMstpSlayW[wpn]Dnon_medic";
animationCallerSelfProne = "AinvPpneMstpSlayW[wpn]Dnon_medic";
consumeItem = 1;
items[] = {"ACE_fieldDressing", "ACE_packingBandage", "ACE_elasticBandage", "ACE_quikclot"};
medicRequired = 0;
allowSelfTreatment = 1;
allowedSelections[] = {"All"};
condition = QFUNC(canBandage);
treatmentLocations = TREATMENT_LOCATIONS_ALL;
treatmentTime = QFUNC(getBandageTime);
treatmentTimeSelfCoef = 1; // todo: this isn't used anywhere, remove?
callbackStart = "";
callbackProgress = "";
callbackSuccess = QFUNC(bandage);
callbackFailure = "";
animationMedic = "AinvPknlMstpSlayW[wpn]Dnon_medicOther";
animationMedicProne = "AinvPpneMstpSlayW[wpn]Dnon_medicOther";
animationMedicSelf = "AinvPknlMstpSlayW[wpn]Dnon_medic";
animationMedicSelfProne = "AinvPpneMstpSlayW[wpn]Dnon_medic";
litter[] = {
{"All", "_bloodLossOnBodyPart > 0", {{"ACE_MedicalLitterBase", "ACE_MedicalLitter_bandage1", "ACE_MedicalLitter_bandage2", "ACE_MedicalLitter_bandage3"}}},
{"All", "_bloodLossOnBodyPart <= 0", {"ACE_MedicalLitter_clean"}}
{},
{"ACE_MedicalLitter_clean"},
{{"ACE_MedicalLitterBase", "ACE_MedicalLitter_bandage1", "ACE_MedicalLitter_bandage2", "ACE_MedicalLitter_bandage3"}}
};
};
class FieldDressing: BasicBandage {
displayName = CSTRING(Actions_FieldDressing);
items[] = {"ACE_fieldDressing"};
litter[] = {
{"All", "_bloodLossOnBodyPart > 0", {{"ACE_MedicalLitter_bandage2", "ACE_MedicalLitter_bandage3"}}},
{"All", "_bloodLossOnBodyPart <= 0", {"ACE_MedicalLitter_clean"}}
{},
{"ACE_MedicalLitter_clean"},
{{"ACE_MedicalLitter_bandage2", "ACE_MedicalLitter_bandage3"}}
};
};
class PackingBandage: BasicBandage {
@ -41,50 +48,51 @@ class GVAR(Actions) {
icon = QPATHTOEF(medical_gui,ui\packing_bandage.paa);
items[] = {"ACE_packingBandage"};
litter[] = {
{"All", "", {"ACE_MedicalLitter_packingBandage"}},
{"All", "_bloodLossOnBodyPart > 0", {{"ACE_MedicalLitter_bandage2", "ACE_MedicalLitter_bandage3"}}},
{"All", "_bloodLossOnBodyPart <= 0", {"ACE_MedicalLitter_clean"}}
{"ACE_MedicalLitter_packingBandage"},
{"ACE_MedicalLitter_clean"},
{{"ACE_MedicalLitter_bandage2", "ACE_MedicalLitter_bandage3"}}
};
};
class ElasticBandage: BasicBandage {
displayName = CSTRING(Actions_ElasticBandage);
items[] = {"ACE_elasticBandage"};
litter[] = {
{"All", "_bloodLossOnBodyPart > 0", {{"ACE_MedicalLitter_bandage2", "ACE_MedicalLitter_bandage3"}}},
{"All", "_bloodLossOnBodyPart <= 0", {"ACE_MedicalLitter_clean"}}
{},
{"ACE_MedicalLitter_clean"},
{{"ACE_MedicalLitter_bandage2", "ACE_MedicalLitter_bandage3"}}
};
};
class QuikClot: BasicBandage {
displayName = CSTRING(Actions_QuikClot);
items[] = {"ACE_quikclot"};
litter[] = {
{"All", "", {"ACE_MedicalLitter_QuickClot"}},
{"All", "_bloodLossOnBodyPart > 0", {{"ACE_MedicalLitter_bandage2", "ACE_MedicalLitter_bandage3"}}},
{"All", "_bloodLossOnBodyPart <= 0", {"ACE_MedicalLitter_clean"}}
{"ACE_MedicalLitter_QuickClot"},
{"ACE_MedicalLitter_clean"},
{{"ACE_MedicalLitter_bandage2", "ACE_MedicalLitter_bandage3"}}
};
};
// --- tourniquet
class Tourniquet: BasicBandage {
// - Tourniquets ----------------------------------------------------------
class ApplyTourniquet: BasicBandage {
displayName = CSTRING(Apply_Tourniquet);
displayNameProgress = CSTRING(Applying_Tourniquet);
icon = QPATHTOEF(medical_gui,ui\tourniquet.paa);
allowedSelections[] = {"LeftArm", "RightArm", "LeftLeg", "RightLeg"};
items[] = {"ACE_tourniquet"};
treatmentTime = 7;
callbackSuccess = QFUNC(treatmentTourniquet);
condition = QUOTE(!([ARR_2(_target,_bodyPart)] call FUNC(hasTourniquetAppliedTo)));
condition = QUOTE(!([ARR_2(_patient,_bodyPart)] call FUNC(hasTourniquetAppliedTo)));
callbackSuccess = QFUNC(tourniquet);
litter[] = {};
};
class RemoveTourniquet: Tourniquet {
class RemoveTourniquet: ApplyTourniquet {
displayName = CSTRING(Actions_RemoveTourniquet);
displayNameProgress = CSTRING(RemovingTourniquet);
items[] = {};
callbackSuccess = QFUNC(treatmentTourniquetRemove);
condition = QUOTE([ARR_2(_target,_bodyPart)] call FUNC(hasTourniquetAppliedTo));
condition = QUOTE([ARR_2(_patient,_bodyPart)] call FUNC(hasTourniquetAppliedTo));
callbackSuccess = QFUNC(tourniquetRemove);
};
// --- syringes
// - Syringes -------------------------------------------------------------
class Morphine: FieldDressing {
displayName = CSTRING(Inject_Morphine);
displayNameProgress = CSTRING(Injecting_Morphine);
@ -95,34 +103,34 @@ class GVAR(Actions) {
condition = "";
treatmentTime = 5;
callbackSuccess = QFUNC(treatmentMedication);
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
litter[] = { {"All", "", {"ACE_MedicalLitter_morphine"}} };
animationMedic = "AinvPknlMstpSnonWnonDnon_medic1";
sounds[] = {{QPATHTO_R(sounds\Inject.ogg),1,1,50}};
litter[] = {{"ACE_MedicalLitter_morphine"}};
};
class Adenosine: Morphine {
displayName = CSTRING(Inject_Adenosine);
displayNameProgress = CSTRING(Injecting_Adenosine);
condition = QGVAR(advancedMedication);
items[] = {"ACE_adenosine"};
litter[] = { {"All", "", {"ACE_MedicalLitter_adenosine"}} };
litter[] = {{"ACE_MedicalLitter_adenosine"}};
};
class Atropine: Morphine {
displayName = CSTRING(Inject_Atropine);
displayNameProgress = CSTRING(Injecting_Atropine);
condition = QGVAR(advancedMedication);
items[] = {"ACE_atropine"};
litter[] = { {"All", "", {"ACE_MedicalLitter_atropine"}} };
litter[] = {{"ACE_MedicalLitter_atropine"}};
};
class Epinephrine: Morphine {
displayName = CSTRING(Inject_Epinephrine);
displayNameProgress = CSTRING(Injecting_Epinephrine);
requiredMedic = QEGVAR(medical,medicSetting_Epi);
medicRequired = QGVAR(medicEpinephrine);
items[] = {"ACE_epinephrine"};
litter[] = { {"All", "", {"ACE_MedicalLitter_epinephrine"}} };
treatmentLocations[] = {QEGVAR(medical,useLocation_Epi)};
treatmentLocations = QGVAR(locationEpinephrine);
litter[] = {{"ACE_MedicalLitter_epinephrine"}};
};
// --- iv bags
// - IV Bags --------------------------------------------------------------
class BloodIV: BasicBandage {
displayName = CSTRING(Actions_Blood4_1000);
displayNameProgress = CSTRING(Transfusing_Blood);
@ -130,12 +138,12 @@ class GVAR(Actions) {
allowedSelections[] = {"LeftArm", "RightArm", "LeftLeg", "RightLeg"};
allowSelfTreatment = QGVAR(allowSelfIV);
category = "advanced";
requiredMedic = 1;
medicRequired = 1;
treatmentTime = 12;
items[] = {"ACE_bloodIV"};
condition = "";
callbackSuccess = QFUNC(treatmentIV);
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
callbackSuccess = QFUNC(ivBag);
animationMedic = "AinvPknlMstpSnonWnonDnon_medic1";
litter[] = {};
};
class BloodIV_500: BloodIV {
@ -150,7 +158,7 @@ class GVAR(Actions) {
displayName = CSTRING(Actions_Plasma4_1000);
displayNameProgress = CSTRING(Transfusing_Plasma);
items[] = {"ACE_plasmaIV"};
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
animationMedic = "AinvPknlMstpSnonWnonDnon_medic1";
};
class PlasmaIV_500: PlasmaIV {
displayName = CSTRING(Actions_Plasma4_500);
@ -164,7 +172,7 @@ class GVAR(Actions) {
displayName = CSTRING(Actions_Saline4_1000);
displayNameProgress = CSTRING(Transfusing_Saline);
items[] = {"ACE_salineIV"};
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
animationMedic = "AinvPknlMstpSnonWnonDnon_medic1";
};
class SalineIV_500: SalineIV {
displayName = CSTRING(Actions_Saline4_500);
@ -175,23 +183,23 @@ class GVAR(Actions) {
items[] = {"ACE_salineIV_250"};
};
// --- diagnose
// - Diagnose -------------------------------------------------------------
class Diagnose: BasicBandage {
displayName = CSTRING(Actions_Diagnose);
displayNameProgress = CSTRING(Actions_Diagnosing);
icon = "";
category = "examine";
treatmentLocations[] = {"All"};
treatmentLocations = TREATMENT_LOCATIONS_ALL;
allowedSelections[] = {"Head", "Body"};
requiredMedic = 0;
medicRequired = 0;
treatmentTime = 2.5;
items[] = {};
condition = QUOTE(!GVAR(advancedDiagnose));
callbackSuccess = QFUNC(actionDiagnose);
callbackSuccess = QFUNC(diagnose);
callbackFailure = "";
callbackProgress = "";
animationCaller = ""; // TODO
itemConsumed = 0;
animationMedic = ""; // TODO
consumeItem = 0;
litter[] = {};
};
class CheckPulse: Diagnose {
@ -199,40 +207,40 @@ class GVAR(Actions) {
displayNameProgress = CSTRING(Check_Pulse_Content);
allowedSelections[] = {"All"};
condition = QGVAR(advancedDiagnose);
callbackSuccess = QFUNC(actionCheckPulse);
animationCallerProne = "";
animationCallerSelfProne = "";
callbackSuccess = QFUNC(checkPulse);
animationMedicProne = "";
animationMedicSelfProne = "";
};
class CheckBloodPressure: CheckPulse {
displayName = CSTRING(Actions_CheckBloodPressure);
displayNameProgress = CSTRING(Check_Bloodpressure_Content);
allowedSelections[] = {"LeftArm", "RightArm", "LeftLeg", "RightLeg"};
callbackSuccess = QFUNC(actionCheckBloodPressure);
callbackSuccess = QFUNC(checkBloodPressure);
};
class CheckResponse: CheckPulse {
displayName = CSTRING(Check_Response);
displayNameProgress = CSTRING(Check_Response_Content);
allowedSelections[] = {"Head"};
allowSelfTreatment = 0;
callbackSuccess = QFUNC(actionCheckResponse);
callbackSuccess = QFUNC(checkResponse);
};
// --- misc
// - Misc -----------------------------------------------------------------
class BodyBag: BasicBandage {
displayName = CSTRING(PlaceInBodyBag);
displayNameProgress = CSTRING(PlacingInBodyBag);
icon = QPATHTOEF(medical_gui,ui\bodybag.paa);
category = "advanced";
treatmentLocations[] = {"All"};
treatmentLocations = TREATMENT_LOCATIONS_ALL;
allowSelfTreatment = 0;
requiredMedic = 0;
medicRequired = 0;
treatmentTime = 15;
items[] = {"ACE_bodyBag"};
condition = "!alive _target";
condition = "!alive _patient";
callbackSuccess = QFUNC(actionPlaceInBodyBag);
callbackFailure = "";
callbackProgress = "";
itemConsumed = 1;
consumeItem = 1;
litter[] = {};
};
class CPR: BasicBandage {
@ -240,22 +248,22 @@ class GVAR(Actions) {
displayNameProgress = CSTRING(Actions_PerformingCPR);
icon = "";
category = "advanced";
treatmentLocations[] = {"All"};
treatmentLocations = TREATMENT_LOCATIONS_ALL;
allowedSelections[] = {"Body"};
allowSelfTreatment = 0;
requiredMedic = 0;
medicRequired = 0;
treatmentTime = 15;
items[] = {};
condition = QUOTE(!(_target call EFUNC(common,isAwake)) && {!(_target getVariable [ARR_2('GVAR(receiveCPR)', false)])});
condition = QUOTE(!(_patient call EFUNC(common,isAwake)) && {!(_patient getVariable [ARR_2('GVAR(receiveCPR)', false)])});
callbackSuccess = QFUNC(treatmentCPR);
callbackFailure = QFUNC(treatmentCPR_failure);
callbackProgress = QFUNC(treatmentCPR_progress);
callbackStart = QFUNC(treatmentCPR_start);
animationCaller = "AinvPknlMstpSlayW[wpn]Dnon_medic";
animationCallerProne = "AinvPpneMstpSlayW[wpn]Dnon_medic";
animationCallerSelf = "";
animationCallerSelfProne = "";
itemConsumed = 0;
animationMedic = "AinvPknlMstpSlayW[wpn]Dnon_medic";
animationMedicProne = "AinvPpneMstpSlayW[wpn]Dnon_medic";
animationMedicSelf = "";
animationMedicSelfProne = "";
consumeItem = 0;
litter[] = {};
};
@ -265,36 +273,39 @@ class GVAR(Actions) {
icon = QPATHTOEF(medical_gui,ui\surgical_kit.paa);
category = "advanced";
items[] = {"ACE_surgicalKit"};
treatmentLocations[] = {QEGVAR(medical,useLocation_SurgicalKit)};
treatmentLocations = QGVAR(locationSurgicalKit);
allowSelfTreatment = 0;
requiredMedic = QEGVAR(medical,medicSetting_SurgicalKit);
treatmentTime = QUOTE(count (_target getVariable [ARR_2('EGVAR(medical,bandagedWounds)',[])]) * 5);
medicRequired = QGVAR(medicSurgicalKit);
treatmentTime = QUOTE(count (_patient getVariable [ARR_2('EGVAR(medical,bandagedWounds)',[])]) * 5);
callbackSuccess = "";
callbackProgress = QFUNC(treatmentSurgicalKit_onProgress);
itemConsumed = QEGVAR(medical,consumeItem_SurgicalKit);
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
litter[] = { {"All", "", {"ACE_MedicalLitter_gloves"} }};
callbackProgress = QFUNC(surgicalKitProgress);
consumeItem = QGVAR(consumeSurgicalKit);
animationMedic = "AinvPknlMstpSnonWnonDnon_medic1";
litter[] = {{"ACE_MedicalLitter_gloves"}};
};
class PersonalAidKit: BasicBandage {
displayName = CSTRING(Use_Aid_Kit);
displayNameProgress = CSTRING(TreatmentAction);
icon = "";
category = "advanced";
condition = QUOTE(_target call EFUNC(medical_status,isInStableCondition));
condition = QUOTE(_patient call EFUNC(medical_status,isInStableCondition));
items[] = {"ACE_personalAidKit"};
treatmentLocations[] = {QEGVAR(medical,useLocation_PAK)};
requiredMedic = QEGVAR(medical,medicSetting_PAK);
treatmentTime = QUOTE(_target call FUNC(healTime));
treatmentLocations = QGVAR(locationPAK);
medicRequired = QGVAR(medicPAK);
treatmentTime = QUOTE(_patient call FUNC(healTime));
callbackSuccess = QFUNC(treatmentFullHeal);
itemConsumed = QEGVAR(medical,consumeItem_PAK);
animationCaller = "AinvPknlMstpSlayW[wpn]Dnon_medicOther";
animationCallerProne = "AinvPpneMstpSlayW[wpn]Dnon_medicOther";
animationCallerSelf = "";
animationCallerSelfProne = "";
litter[] = { {"All", "", {"ACE_MedicalLitter_gloves"}},
{"All", "_bloodLossOnBodyPart > 0", {{"ACE_MedicalLitterBase", "ACE_MedicalLitter_bandage1", "ACE_MedicalLitter_bandage2", "ACE_MedicalLitter_bandage3"}}},
{"All", "_bloodLossOnBodyPart > 0", {{"ACE_MedicalLitterBase", "ACE_MedicalLitter_bandage1", "ACE_MedicalLitter_bandage2", "ACE_MedicalLitter_bandage3"}}},
{"All", "_bloodLossOnBodyPart <= 0", {"ACE_MedicalLitter_clean"}}
consumeItem = QGVAR(consumePAK);
animationMedic = "AinvPknlMstpSlayW[wpn]Dnon_medicOther";
animationMedicProne = "AinvPpneMstpSlayW[wpn]Dnon_medicOther";
animationMedicSelf = "";
animationMedicSelfProne = "";
litter[] = {
{"ACE_MedicalLitter_gloves"},
{"ACE_MedicalLitter_clean"},
{
{"ACE_MedicalLitterBase", "ACE_MedicalLitter_bandage1", "ACE_MedicalLitter_bandage2", "ACE_MedicalLitter_bandage3"},
{"ACE_MedicalLitterBase", "ACE_MedicalLitter_bandage1", "ACE_MedicalLitter_bandage2", "ACE_MedicalLitter_bandage3"}
}
};
};
};

View File

@ -1,3 +1,10 @@
#define GRID_3DEN_W (pixelW * pixelGrid * 0.5)
#define GRID_3DEN_H (pixelH * pixelGrid * 0.5)
#define DEFAULT_IS_MEDIC (parseNumber (_this getUnitTrait 'medic'))
#define DEFAULT_IS_MEDICAL_VEHICLE (getNumber (configFile >> 'CfgVehicles' >> typeOf _this >> 'attendant') > 0)
class ctrlToolbox;
class Cfg3DEN {
@ -9,19 +16,23 @@ class Cfg3DEN {
};
};
class GVAR(isMedicControl): Title {
attributeLoad = "(_this controlsGroupCtrl 100) lbSetCurSel (((_value + 1) min 3) max 0);";
attributeSave = "(lbCurSel (_this controlsGroupCtrl 100)) - 1";
attributeLoad = QUOTE((_this controlsGroupCtrl 100) lbSetCurSel (0 max (_value + 1) min 3));
attributeSave = QUOTE(lbCurSel (_this controlsGroupCtrl 100) - 1);
class Controls: Controls {
class Title: Title{};
class Title: Title {};
class Value: ctrlToolbox {
idc = 100;
style = "0x02";
x = "48 * (pixelW * pixelGrid * 0.50)";
w = "82 * (pixelW * pixelGrid * 0.50)";
h = "5 * (pixelH * pixelGrid * 0.50)";
x = 48 * GRID_3DEN_W;
w = 82 * GRID_3DEN_W;
h = 5 * GRID_3DEN_H;
rows = 1;
columns = 4;
strings[] = {"$STR_3DEN_Attributes_Lock_Default_text", CSTRING(AssignMedicRoles_role_none), CSTRING(AssignMedicRoles_role_medic), CSTRING(AssignMedicRoles_role_doctorShort)};
strings[] = {
"$STR_3DEN_Attributes_Lock_Default_text",
CSTRING(AssignMedicRoles_role_none),
CSTRING(AssignMedicRoles_role_medic),
CSTRING(AssignMedicRoles_role_doctorShort)
};
};
};
};
@ -31,36 +42,34 @@ class Cfg3DEN {
class ace_attributes {
class Attributes {
class ace_isMedic {
property = QUOTE(ace_isMedic);
control = QGVAR(isMedicControl);
displayName = CSTRING(AssignMedicRoles_role_DisplayName);
tooltip = CSTRING(Attributes_isMedic_Description);
expression = QUOTE(if (_value > -1) then {_this setVariable [ARR_3(QQEGVAR(medical,medicClass),_value,true)];};);
typeName = "NUMBER";
property = QUOTE(ace_isMedic);
control = QGVAR(isMedicControl);
expression = QUOTE(if (_value != -1 && {_value != DEFAULT_IS_MEDIC}) then {_this setVariable [ARR_3(QQEGVAR(medical,medicClass),_value,true)]});
defaultValue = QUOTE(DEFAULT_IS_MEDIC);
condition = "objectBrain";
defaultValue = "-1";
typeName = "NUMBER";
};
class ace_isMedicalVehicle {
property = QUOTE(ace_isMedicalVehicle);
value = 0;
control = "CheckboxNumber";
displayName = CSTRING(AssignMedicVehicle_enabled_DisplayName);
tooltip = CSTRING(Attributes_isMedicalVehicle_Description);
expression = QUOTE(_this setVariable [ARR_3(QQEGVAR(medical,medicClass),_value,true)];);
typeName = "NUMBER";
property = QUOTE(ace_isMedicalVehicle);
control = "Checkbox";
expression = QUOTE(_this setVariable [ARR_3(QQEGVAR(medical,isMedicalVehicle),_value,true)]);
defaultValue = QUOTE(DEFAULT_IS_MEDICAL_VEHICLE);
condition = "objectVehicle";
defaultValue = 0;
typeName = "BOOL";
};
class ace_isMedicalFacility {
property = QUOTE(ace_isMedicalFacility);
value = 0;
control = "Checkbox";
displayName = CSTRING(AssignMedicalFacility_enabled_DisplayName);
tooltip = CSTRING(AssignMedicalFacility_enabled_Description);
property = QUOTE(ace_isMedicalFacility);
control = "Checkbox";
expression = QUOTE(_this setVariable [ARR_3(QQEGVAR(medical,isMedicalFacility),_value,true)];);
typeName = "BOOL";
condition = "(1 - objectBrain) * (1 - objectVehicle)";
defaultValue = "false";
condition = "(1 - objectBrain) * (1 - objectVehicle)";
typeName = "BOOL";
};
};
};

View File

@ -1,32 +1,31 @@
class CfgWeapons {
class ItemCore;
class ACE_ItemCore;
class CBA_MiscItem_ItemInfo;
class InventoryFirstAidKitItem_Base_F;
class MedikitItem;
// ITEMS
class FirstAidKit: ItemCore {
type = 0;
ace_arsenal_hide = 1;
EGVAR(arsenal,hide) = 1;
class ItemInfo: InventoryFirstAidKitItem_Base_F {
mass = 4;
};
};
class Medikit: ItemCore {
type = 0;
ace_arsenal_hide = 1;
EGVAR(arsenal,hide) = 1;
class ItemInfo: MedikitItem {
mass = 60;
};
};
class ACE_ItemCore;
class ACE_fieldDressing: ACE_ItemCore {
scope = 2;
author = ECSTRING(common,ACETeam);
model = QPATHTOF(data\bandage.p3d);
picture = QPATHTOF(ui\items\fieldDressing_x_ca.paa);
picture = QPATHTOF(ui\fieldDressing_ca.paa);
displayName = CSTRING(Bandage_Basic_Display);
descriptionShort = CSTRING(Bandage_Basic_Desc_Short);
descriptionUse = CSTRING(Bandage_Basic_Desc_Use);
@ -38,7 +37,7 @@ class CfgWeapons {
scope = 2;
author = ECSTRING(common,ACETeam);
displayName = CSTRING(Packing_Bandage_Display);
picture = QPATHTOF(ui\items\packingBandage_x_ca.paa);
picture = QPATHTOF(ui\packingBandage_ca.paa);
model = QPATHTOF(data\packingbandage.p3d);
descriptionShort = CSTRING(Packing_Bandage_Desc_Short);
descriptionUse = CSTRING(Packing_Bandage_Desc_Use);
@ -50,7 +49,7 @@ class CfgWeapons {
scope = 2;
author = ECSTRING(common,ACETeam);
displayName = CSTRING(Bandage_Elastic_Display);
picture = QPATHTOF(ui\items\elasticBandage_x_ca.paa);
picture = QPATHTOF(ui\elasticBandage_ca.paa);
model = "\A3\Structures_F_EPA\Items\Medical\Bandage_F.p3d";
descriptionShort = CSTRING(Bandage_Elastic_Desc_Short);
descriptionUse = CSTRING(Bandage_Elastic_Desc_Use);
@ -62,7 +61,7 @@ class CfgWeapons {
scope = 2;
author = ECSTRING(common,ACETeam);
displayName = CSTRING(Tourniquet_Display);
picture = QPATHTOF(ui\items\tourniquet_x_ca.paa);
picture = QPATHTOF(ui\tourniquet_ca.paa);
model = QPATHTOF(data\tourniquet.p3d);
descriptionShort = CSTRING(Tourniquet_Desc_Short);
descriptionUse = CSTRING(Tourniquet_Desc_Use);
@ -74,7 +73,7 @@ class CfgWeapons {
scope = 2;
author = ECSTRING(common,ACETeam);
displayName = CSTRING(Morphine_Display);
picture = QPATHTOF(ui\items\morphine_x_ca.paa);
picture = QPATHTOF(ui\morphine_ca.paa);
model = QPATHTOF(data\morphine.p3d);
descriptionShort = CSTRING(Morphine_Desc_Short);
descriptionUse = CSTRING(Morphine_Desc_Use);
@ -86,7 +85,7 @@ class CfgWeapons {
scope = 2;
author = ECSTRING(common,ACETeam);
displayName = CSTRING(Adenosine_Display);
picture = QPATHTOF(ui\items\adenosine_x_ca.paa);
picture = QPATHTOF(ui\adenosine_ca.paa);
model = QPATHTOF(data\adenosine.p3d);
descriptionShort = CSTRING(adenosine_Desc_Short);
descriptionUse = CSTRING(adenosine_Desc_Use);
@ -98,7 +97,7 @@ class CfgWeapons {
scope = 2;
author = ECSTRING(common,ACETeam);
displayName = CSTRING(Atropine_Display);
picture = QPATHTOF(ui\items\atropine_x_ca.paa);
picture = QPATHTOF(ui\atropine_ca.paa);
model = QPATHTOF(data\atropine.p3d);
descriptionShort = CSTRING(Atropine_Desc_Short);
descriptionUse = CSTRING(Atropine_Desc_Use);
@ -110,7 +109,7 @@ class CfgWeapons {
scope = 2;
author = ECSTRING(common,ACETeam);
displayName = CSTRING(Epinephrine_Display);
picture = QPATHTOF(ui\items\epinephrine_x_ca.paa);
picture = QPATHTOF(ui\epinephrine_ca.paa);
model = QPATHTOF(data\epinephrine.p3d);
descriptionShort = CSTRING(Epinephrine_Desc_Short);
descriptionUse = CSTRING(Epinephrine_Desc_Use);
@ -125,8 +124,8 @@ class CfgWeapons {
displayName = CSTRING(Plasma_IV);
model = QPATHTOF(data\IVBag_1000ml.p3d);
hiddenSelections[] = {"camo"};
hiddenSelectionsTextures[] = { QPATHTOF(data\IVBag_plasma_1000ml_ca.paa) };
picture = QPATHTOF(ui\items\plasmaIV_x_ca.paa);
hiddenSelectionsTextures[] = {QPATHTOF(data\IVBag_plasma_1000ml_ca.paa)};
picture = QPATHTOF(ui\plasmaIV_ca.paa);
descriptionShort = CSTRING(Plasma_IV_Desc_Short);
descriptionUse = CSTRING(Plasma_IV_Desc_Use);
class ItemInfo: CBA_MiscItem_ItemInfo {
@ -136,7 +135,7 @@ class CfgWeapons {
class ACE_plasmaIV_500: ACE_plasmaIV {
displayName = CSTRING(Plasma_IV_500);
model = QPATHTOF(data\IVBag_500ml.p3d);
hiddenSelectionsTextures[] = { QPATHTOF(data\IVBag_plasma_500ml_ca.paa) };
hiddenSelectionsTextures[] = {QPATHTOF(data\IVBag_plasma_500ml_ca.paa)};
class ItemInfo: CBA_MiscItem_ItemInfo {
mass = 5;
};
@ -144,7 +143,7 @@ class CfgWeapons {
class ACE_plasmaIV_250: ACE_plasmaIV {
displayName = CSTRING(Plasma_IV_250);
model = QPATHTOF(data\IVBag_250ml.p3d);
hiddenSelectionsTextures[] = { QPATHTOF(data\IVBag_plasma_250ml_ca.paa) };
hiddenSelectionsTextures[] = {QPATHTOF(data\IVBag_plasma_250ml_ca.paa)};
class ItemInfo: CBA_MiscItem_ItemInfo {
mass = 2.5;
};
@ -154,9 +153,9 @@ class CfgWeapons {
author = ECSTRING(common,ACETeam);
model = QPATHTOF(data\IVBag_1000ml.p3d);
displayName = CSTRING(Blood_IV);
picture = QPATHTOF(ui\items\bloodIV_x_ca.paa);
picture = QPATHTOF(ui\bloodIV_ca.paa);
hiddenSelections[] = {"camo"};
hiddenSelectionsTextures[] = { QPATHTOF(data\IVBag_blood_1000ml_ca.paa) };
hiddenSelectionsTextures[] = {QPATHTOF(data\IVBag_blood_1000ml_ca.paa)};
descriptionShort = CSTRING(Blood_IV_Desc_Short);
descriptionUse = CSTRING(Blood_IV_Desc_Use);
class ItemInfo: CBA_MiscItem_ItemInfo {
@ -166,7 +165,7 @@ class CfgWeapons {
class ACE_bloodIV_500: ACE_bloodIV {
displayName = CSTRING(Blood_IV_500);
model = QPATHTOF(data\IVBag_500ml.p3d);
hiddenSelectionsTextures[] = { QPATHTOF(data\IVBag_blood_500ml_ca.paa) };
hiddenSelectionsTextures[] = {QPATHTOF(data\IVBag_blood_500ml_ca.paa)};
class ItemInfo: CBA_MiscItem_ItemInfo {
mass = 5;
};
@ -174,7 +173,7 @@ class CfgWeapons {
class ACE_bloodIV_250: ACE_bloodIV {
displayName = CSTRING(Blood_IV_250);
model = QPATHTOF(data\IVBag_250ml.p3d);
hiddenSelectionsTextures[] = { QPATHTOF(data\IVBag_blood_250ml_ca.paa) };
hiddenSelectionsTextures[] = {QPATHTOF(data\IVBag_blood_250ml_ca.paa)};
class ItemInfo: CBA_MiscItem_ItemInfo {
mass = 2.5;
};
@ -185,8 +184,8 @@ class CfgWeapons {
displayName = CSTRING(Saline_IV);
model = QPATHTOF(data\IVBag_1000ml.p3d);
hiddenSelections[] = {"camo"};
hiddenSelectionsTextures[] = { QPATHTOF(data\IVBag_saline_1000ml_ca.paa) };
picture = QPATHTOF(ui\items\salineIV_x_ca.paa);
hiddenSelectionsTextures[] = {QPATHTOF(data\IVBag_saline_1000ml_ca.paa)};
picture = QPATHTOF(ui\salineIV_ca.paa);
descriptionShort = CSTRING(Saline_IV_Desc_Short);
descriptionUse = CSTRING(Saline_IV_Desc_Use);
class ItemInfo: CBA_MiscItem_ItemInfo {
@ -196,7 +195,7 @@ class CfgWeapons {
class ACE_salineIV_500: ACE_salineIV {
displayName = CSTRING(Saline_IV_500);
model = QPATHTOF(data\IVBag_500ml.p3d);
hiddenSelectionsTextures[] = { QPATHTOF(data\IVBag_saline_500ml_ca.paa) };
hiddenSelectionsTextures[] = {QPATHTOF(data\IVBag_saline_500ml_ca.paa)};
class ItemInfo: CBA_MiscItem_ItemInfo {
mass = 5;
};
@ -204,7 +203,7 @@ class CfgWeapons {
class ACE_salineIV_250: ACE_salineIV {
displayName = CSTRING(Saline_IV_250);
model = QPATHTOF(data\IVBag_250ml.p3d);
hiddenSelectionsTextures[] = { QPATHTOF(data\IVBag_saline_250ml_ca.paa) };
hiddenSelectionsTextures[] = {QPATHTOF(data\IVBag_saline_250ml_ca.paa)};
class ItemInfo: CBA_MiscItem_ItemInfo {
mass = 2.5;
};
@ -214,7 +213,7 @@ class CfgWeapons {
author = ECSTRING(common,ACETeam);
displayName = CSTRING(QuikClot_Display);
model = QPATHTOF(data\QuikClot.p3d);
picture = QPATHTOF(ui\items\quickclot_x_ca.paa);
picture = QPATHTOF(ui\quickclot_ca.paa);
descriptionShort = CSTRING(QuikClot_Desc_Short);
descriptionUse = CSTRING(QuikClot_Desc_Use);
class ItemInfo: CBA_MiscItem_ItemInfo {
@ -225,7 +224,7 @@ class CfgWeapons {
scope = 2;
author = ECSTRING(common,ACETeam);
displayName = CSTRING(Aid_Kit_Display);
picture = QPATHTOF(ui\items\personal_aid_kit_x_ca.paa);
picture = QPATHTOF(ui\personal_aid_kit_ca.paa);
descriptionShort = CSTRING(Aid_Kit_Desc_Short);
descriptionUse = CSTRING(Aid_Kit_Desc_Use);
class ItemInfo: CBA_MiscItem_ItemInfo {
@ -233,11 +232,11 @@ class CfgWeapons {
};
};
class ACE_surgicalKit: ACE_ItemCore {
scope=2;
scope = 2;
author = ECSTRING(common,ACETeam);
displayName= CSTRING(SurgicalKit_Display);
model = QPATHTOF(data\surgical_kit.p3d);
picture = QPATHTOF(ui\items\surgicalKit_x_ca.paa);
picture = QPATHTOF(ui\surgicalKit_ca.paa);
descriptionShort = CSTRING(SurgicalKit_Desc_Short);
descriptionUse = CSTRING(SurgicalKit_Desc_Use);
class ItemInfo: CBA_MiscItem_ItemInfo {
@ -245,11 +244,11 @@ class CfgWeapons {
};
};
class ACE_bodyBag: ACE_ItemCore {
scope=2;
scope = 2;
author = ECSTRING(common,ACETeam);
displayName= CSTRING(Bodybag_Display);
model = QPATHTOF(data\bodybagItem.p3d);
picture = QPATHTOF(ui\items\bodybag_x_ca.paa);
picture = QPATHTOF(ui\bodybag_ca.paa);
descriptionShort = CSTRING(Bodybag_Desc_Short);
descriptionUse = CSTRING(Bodybag_Desc_Use);
class ItemInfo: CBA_MiscItem_ItemInfo {

View File

@ -1,11 +1,11 @@
// actions
PREP(actionCheckBloodPressure);
PREP(actionCheckBloodPressureLocal);
PREP(actionCheckPulse);
PREP(actionCheckPulseLocal);
PREP(actionCheckResponse);
PREP(actionDiagnose);
PREP(checkBloodPressure);
PREP(checkBloodPressureLocal);
PREP(checkPulse);
PREP(checkPulseLocal);
PREP(checkResponse);
PREP(diagnose);
PREP(actionLoadUnit);
PREP(actionPlaceInBodyBag);
PREP(actionUnloadUnit);
@ -15,11 +15,11 @@ PREP(addLoadPatientActions);
PREP(canTreat);
PREP(canTreatCached);
PREP(treatment);
PREP(treatment_failure);
PREP(treatment_success);
PREP(treatmentFailure);
PREP(treatmentSuccess);
PREP(treatmentBandage);
PREP(treatmentBandageLocal);
PREP(bandage);
PREP(bandageLocal);
PREP(treatmentCPR);
PREP(treatmentCPR_failure);
PREP(treatmentCPR_progress);
@ -27,21 +27,20 @@ PREP(treatmentCPR_start);
PREP(treatmentCPRLocal);
PREP(treatmentFullHeal);
PREP(treatmentFullHealLocal);
PREP(treatmentIV);
PREP(treatmentIVLocal);
PREP(treatmentMedication);
PREP(treatmentMedicationLocal);
PREP(treatmentSurgicalKit_onProgress);
PREP(treatmentTourniquet);
PREP(treatmentTourniquetLocal);
PREP(treatmentTourniquetRemove);
PREP(ivBag);
PREP(ivBagLocal);
PREP(medication);
PREP(medicationLocal);
PREP(surgicalKitProgress);
PREP(tourniquet);
PREP(tourniquetLocal);
PREP(tourniquetRemove);
// misc
PREP(addToLog);
PREP(addToTriageCard);
PREP(bodyCleanupLoop);
PREP(calculateBlood);
PREP(canAccessMedicalEquipment);
PREP(canBandage);
PREP(findMostEffectiveWound);
PREP(getBandageTime);
@ -60,11 +59,9 @@ PREP(setTriageStatus);
// items
PREP(checkItems);
PREP(hasItem);
PREP(hasItems);
PREP(useItem);
PREP(useItems);
// litter
PREP(createLitter);
PREP(createLitterServer);
PREP(litterCleanupLoop);
PREP(litterCreate);
PREP(litterHandleCreate);

View File

@ -5,7 +5,7 @@
// Handle bodybags and litter on server
if (isServer) then {
[QGVAR(createLitterServer), FUNC(litterHandleCreate)] call CBA_fnc_addEventHandler;
[QGVAR(createLitterServer), FUNC(createLitterServer)] call CBA_fnc_addEventHandler;
["ace_placedInBodyBag", FUNC(serverRemoveBody)] call CBA_fnc_addEventHandler;
};
@ -18,6 +18,6 @@ if (isServer) then {
[QGVAR(treatmentFullHealLocal), FUNC(treatmentFullHealLocal)] call CBA_fnc_addEventHandler;
// action events
[QGVAR(actionCheckPulseLocal), FUNC(actionCheckPulseLocal)] call CBA_fnc_addEventHandler;
[QGVAR(actionCheckBloodPressureLocal), FUNC(actionCheckBloodPressureLocal)] call CBA_fnc_addEventHandler;
[QGVAR(checkPulseLocal), FUNC(checkPulseLocal)] call CBA_fnc_addEventHandler;
[QGVAR(checkBloodPressureLocal), FUNC(checkBloodPressureLocal)] call CBA_fnc_addEventHandler;
[QGVAR(actionPlaceInBodyBag), FUNC(actionPlaceInBodyBag)] call CBA_fnc_addEventHandler;

View File

@ -34,4 +34,23 @@ GVAR(animDurations) = [] call CBA_fnc_createNamespace;
["AinvPknlMstpSnonWnonDnon_medic1", 10]
];
// class names of medical facilities
// global variable so it can be accessed by mission makers
GVAR(facilityClasses) = [
"TK_GUE_WarfareBFieldhHospital_Base_EP1",
"TK_GUE_WarfareBFieldhHospital_EP1",
"TK_WarfareBFieldhHospital_Base_EP1",
"TK_WarfareBFieldhHospital_EP1",
"US_WarfareBFieldhHospital_Base_EP1",
"US_WarfareBFieldhHospital_EP1",
"MASH_EP1",
"MASH",
"Land_A_Hospital",
"CDF_WarfareBFieldhHospital",
"GUE_WarfareBFieldhHospital",
"INS_WarfareBFieldhHospital",
"RU_WarfareBFieldhHospital",
"USMC_WarfareBFieldhHospital"
];
ADDON = true;

View File

@ -17,7 +17,7 @@ class CfgPatches {
#include "ACE_Medical_Treatment.hpp"
#include "ACE_Medical_Treatment_Actions.hpp"
#include "ACE_Settings.hpp"
#include "CfgEden.hpp"
#include "Cfg3DEN.hpp"
#include "CfgEventHandlers.hpp"
#include "CfgVehicles.hpp"
#include "CfgWeapons.hpp"

View File

@ -1,21 +0,0 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Action for checking the blood pressure of the patient
*
* Arguments:
* 0: The medic <OBJECT>
* 1: The patient <OBJECT>
* 2: Body part <STRING>
*
* Return Value:
* None
*
* Public: No
*/
params ["_caller", "_target", "_bodyPart"];
[QGVAR(actionCheckBloodPressureLocal), [_caller, _target, _bodyPart], _target] call CBA_fnc_targetEvent;
true

View File

@ -1,57 +0,0 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Local callback for checking the blood pressure of a patient
*
* Arguments:
* 0: The medic <OBJECT>
* 1: The patient <OBJECT>
* 2: Body part <STRING>
*
* Return Value:
* None
*
* Public: No
*/
params ["_caller", "_target", "_bodyPart"];
private _bloodPressure = [0, 0];
if (alive _target && {!([_target, _bodyPart] call FUNC(hasTourniquetAppliedTo))}) then {
_bloodPressure = GET_BLOOD_PRESSURE(_target);
};
private _bloodPressureOutput = ELSTRING(medical_treatment,Check_Bloodpressure_Output_6);
private _logOutPut = ELSTRING(medical_treatment,Check_Bloodpressure_NoBloodpressure);
_bloodPressure params ["_bloodPressureLow", "_bloodPressureHigh"];
if (_bloodPressureHigh > 20) then {
if (_caller call FUNC(isMedic)) then {
_bloodPressureOutput = ELSTRING(medical_treatment,Check_Bloodpressure_Output_1);
_logOutPut = format ["%1/%2", round _bloodPressureHigh, round _bloodPressureLow];
} else {
if (_bloodPressureHigh > 20) then {
_bloodPressureOutput = ELSTRING(medical_treatment,Check_Bloodpressure_Output_2);
_logOutPut = ELSTRING(medical_treatment,Check_Bloodpressure_Low);
if (_bloodPressureHigh > 100) then {
_bloodPressureOutput = ELSTRING(medical_treatment,Check_Bloodpressure_Output_3);
_logOutPut = ELSTRING(medical_treatment,Check_Bloodpressure_Normal);
if (_bloodPressureHigh > 160) then {
_bloodPressureOutput = ELSTRING(medical_treatment,Check_Bloodpressure_Output_4);
_logOutPut = ELSTRING(medical_treatment,Check_Bloodpressure_High);
};
};
};
};
};
[QEGVAR(common,displayTextStructured), [[_bloodPressureOutput, _target call EFUNC(common,getName), round _bloodPressureHigh, round _bloodPressureLow], 1.75, _caller], _caller] call CBA_fnc_targetEvent;
if (_logOutPut != "") then {
[_target, "activity", ELSTRING(medical_treatment,Check_Bloodpressure_Log), [_caller call EFUNC(common,getName), _logOutPut]] call FUNC(addToLog);
[_target, "quick_view", ELSTRING(medical_treatment,Check_Bloodpressure_Log), [_caller call EFUNC(common,getName), _logOutPut]] call FUNC(addToLog);
};

View File

@ -1,21 +0,0 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Action for checking the pulse or heart rate of the patient
*
* Arguments:
* 0: The medic <OBJECT>
* 1: The patient <OBJECT>
* 2: Body part <STRING>
*
* Return Value:
* None
*
* Public: No
*/
params ["_caller", "_target", "_bodyPart"];
[QGVAR(actionCheckPulseLocal), [_caller, _target, _bodyPart], _target] call CBA_fnc_targetEvent;
true

View File

@ -1,54 +0,0 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Local callback for checking the pulse of a patient
*
* Arguments:
* 0: The medic <OBJECT>
* 1: The patient <OBJECT>
* 2: Body part <STRING>
*
* Return Value:
* None
*
* Public: No
*/
params ["_caller", "_target", "_bodyPart"];
private _heartRate = 0;
if (alive _target && {!([_target, _bodyPart] call FUNC(hasTourniquetAppliedTo))}) then {
_heartRate = GET_HEART_RATE(_target);
};
private _heartRateOutput = ELSTRING(medical_treatment,Check_Pulse_Output_5);
private _logOutPut = ELSTRING(medical_treatment,Check_Pulse_None);
if (_heartRate > 1.0) then {
if (_caller call FUNC(isMedic)) then {
_heartRateOutput = ELSTRING(medical_treatment,Check_Pulse_Output_1);
_logOutPut = format ["%1", round(_heartRate)];
} else {
// non medical personel will only find a pulse/HR
_heartRateOutput = ELSTRING(medical_treatment,Check_Pulse_Output_2);
_logOutPut = ELSTRING(medical_treatment,Check_Pulse_Weak);
if (_heartRate > 60) then {
if (_heartRate > 100) then {
_heartRateOutput = ELSTRING(medical_treatment,Check_Pulse_Output_3);
_logOutPut = ELSTRING(medical_treatment,Check_Pulse_Strong);
} else {
_heartRateOutput = ELSTRING(medical_treatment,Check_Pulse_Output_4);
_logOutPut = ELSTRING(medical_treatment,Check_Pulse_Normal);
};
};
};
};
[QEGVAR(common,displayTextStructured), [[_heartRateOutput, _target call EFUNC(common,getName), round _heartRate], 1.5, _caller], _caller] call CBA_fnc_targetEvent;
if (_logOutPut != "") then {
[_target, "activity", ELSTRING(medical_treatment,Check_Pulse_Log), [_caller call EFUNC(common,getName), _logOutPut]] call FUNC(addToLog);
[_target, "quick_view", ELSTRING(medical_treatment,Check_Pulse_Log), [_caller call EFUNC(common,getName), _logOutPut]] call FUNC(addToLog);
};

View File

@ -1,26 +0,0 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Action for checking the response status of the patient
*
* Arguments:
* 0: The medic <OBJECT>
* 1: The patient <OBJECT>
*
* Return Value:
* None
*
* Example:
* [bob, kevin] call ace_medical_treatment_fnc_actionCheckResponse
*
* Public: No
*/
params ["_caller", "_target"];
private _output = [ELSTRING(medical_treatment,Check_Response_Unresponsive), ELSTRING(medical_treatment,Check_Response_Responsive)] select (_target call EFUNC(common,isAwake));
[QEGVAR(common,displayTextStructured), [[_output, _target call EFUNC(common,getName)], 2, _caller], _caller] call CBA_fnc_targetEvent;
[_target ,"activity", _output, [[_target, false, true] call EFUNC(common,getName)]] call FUNC(addToLog);
[_target, "quick_view", _output, [[_target, false, true] call EFUNC(common,getName)]] call FUNC(addToLog);

View File

@ -1,45 +0,0 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Action for diagnosing in basic medical
*
* Arguments:
* 0: The medic <OBJECT>
* 1: The patient <OBJECT>
*
* Return Value:
* None
*
* Public: No
*/
params ["_caller", "_target"];
private _genericMessages = [ELSTRING(medical_treatment,diagnoseMessage), _target call EFUNC(common,getName)];
if (alive _target) then {
_genericMessages pushBack ELSTRING(medical_treatment,diagnoseAlive);
} else {
_genericMessages pushBack ELSTRING(medical_treatment,diagnoseDead);
};
private _hemorrhage = GET_HEMORRHAGE(_target);
if (_hemorrhage > 0) then {
if (_hemorrhage > 1) then {
_genericMessages pushBack ELSTRING(medical_treatment,lostBloodALot);
} else {
_genericMessages pushBack ELSTRING(medical_treatment,lostBlood);
};
} else {
_genericMessages pushBack ELSTRING(medical_treatment,noBloodloss);
};
if (alive _target) then {
if IS_IN_PAIN(_target) then {
_genericMessages pushBack ELSTRING(medical_treatment,inPain);
} else {
_genericMessages pushBack ELSTRING(medical_treatment,noPain);
};
};
[QEGVAR(common,displayTextStructured), [_genericMessages, 3.0, _caller], _caller] call CBA_fnc_targetEvent;

View File

@ -1,56 +1,45 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Add an entry to the specified log
* Author: Glowbal, mharis001
* Adds an entry to the specified medical log of the unit.
*
* Arguments:
* 0: The patient <OBJECT>
* 1: The log type <STRING>
* 2: The message <STRING>
* 3: The arguments for localization <ARRAY>
* 0: Unit <OBJECT>
* 1: Log Type <STRING>
* 2: Message <STRING>
* 3: Formatting Arguments <ARRAY>
*
* Return Value:
* None
*
* Example:
* [bob, "type", "message", [_args]] call ace_medical_treatment_fnc_addToLog
* [player, "activity", "Message %1", ["Name"]] call ace_medical_treatment_fnc_addToLog
*
* Public: No
*/
params ["_unit", "_type", "_message", "_arguments"];
params ["_unit", "_logType", "_message", "_arguments"];
if (!local _unit) exitWith {
[QGVAR(addToMedicalLog), _this, _unit] call CBA_fnc_targetEvent;
[QGVAR(addToLog), _this, _unit] call CBA_fnc_targetEvent;
};
date params ["", "", "", "_hour", "_minute"];
private _timeStamp = format ["%1:%2", _hour, [_minute, 2] call CBA_fnc_formatNumber];
private _moment = format [["%1:%2", "%1:0%2"] select (_minute < 10), _hour, _minute];
private _logVarName = format [QEGVAR(medical,logFile_%1), _type];
private _logVarName = LOG_VARNAME(_logType);
private _log = _unit getVariable [_logVarName, []];
if (count _log >= 8) then {
private _newLog = [];
{
// ensure the first element will not be added
if (_forEachIndex > 0) then {
_newLog pushBack _x;
};
} forEach _log;
_log = _newLog;
if (count _log >= MAX_LOG_ENTRIES) then {
_log deleteAt 0;
};
_log pushBack [_message, _moment, _type, _arguments];
_log pushBack [_message, _timeStamp, _arguments, _logType];
_unit setVariable [_logVarName, _log, true];
["ace_medicalLogEntryAdded", [_unit, _type, _message, _arguments]] call CBA_fnc_localEvent;
private _logs = _unit getVariable [QEGVAR(medical,allLogs), []];
private _allLogs = _unit getVariable [QEGVAR(medical,allLogs), []];
if !(_logVarName in _logs) then {
_logs pushBack _logVarName;
_unit setVariable [QEGVAR(medical,allLogs), _logs, true];
if !(_logVarName in _allLogs) then {
_allLogs pushBack _logVarName;
_unit setVariable [QEGVAR(medical,allLogs), _allLogs, true];
};

View File

@ -1,46 +1,37 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Add an entry to the triage card
* Author: Glowbal, mharis001
* Adds an entry to the unit's triage card.
*
* Arguments:
* 0: The patient <OBJECT>
* 1: The new item class name <STRING>
* 0: Unit <OBJECT>
* 1: Item Classname <STRING>
*
* Return Value:
* None
*
* Example:
* [bob, "bandage"] call ace_medical_treatment_fnc_addToTriageCard
* [player, "ACE_morphine"] call ace_medical_treatment_fnc_addToTriageCard
*
* Public: No
*/
params ["_unit", "_newItem"];
params ["_unit", "_item"];
if (!local _unit) exitWith {
[QGVAR(addToTriageCard), _this, _unit] call CBA_fnc_targetEvent;
};
private _log = _unit getVariable [QEGVAR(medical,triageCard), []];
private _inList = false;
private _amount = 1;
private _triageCard = _unit getVariable [QEGVAR(medical,triageCard), []];
private _index = _triageCard findIf {_x select 0 == _item};
{
if (_x select 0 == _newItem) exitWith {
private _info = _log select _forEachIndex;
_info set [1, (_info select 1) + 1];
_info set [2, CBA_missionTime];
_log set [_forEachIndex, _info];
_amount = _info select 1;
_inList = true;
};
} forEach _log;
if (!_inList) then {
_log pushBack [_newItem, 1, CBA_missionTime];
if (_index == -1) then {
_triageCard pushBack [_item, 1, CBA_missionTime];
} else {
_triageCard set [_index, [_item, (_triageCard select _index select 1) + 1, CBA_missionTime]];
};
_unit setVariable [QEGVAR(medical,triageCard), _log, true];
["ace_triageCardItemAdded", [_unit, _newItem, _amount]] call CBA_fnc_localEvent;
_unit setVariable [QEGVAR(medical,triageCard), _triageCard, true];
// todo: add amount of item to event args?
["ace_triageCardItemAdded", [_unit, _item]] call CBA_fnc_localEvent;

View File

@ -0,0 +1,25 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Bandages open wounds on the given body part of the patient.
*
* Arguments:
* 0: Medic <OBJECT>
* 1: Patient <OBJECT>
* 2: Body Part <STRING>
* 3: Treatment <STRING>
*
* Return Value:
* None
*
* Example:
* [player, cursorObject, "Head", "FieldDressing"] call ace_medical_treatment_fnc_bandage
*
* Public: No
*/
params ["_medic", "_patient", "_bodyPart", "_classname"];
[_patient, "activity", LSTRING(Activity_bandagedPatient), [[_medic, false, true] call EFUNC(common,getName)]] call FUNC(addToLog);
[QGVAR(bandageLocal), [_patient, _bodyPart, _classname], _patient] call CBA_fnc_targetEvent;

View File

@ -1,30 +1,33 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Handles the bandage of a patient.
* Local callback for bandaging a patient's open wounds.
*
* Arguments:
* 0: The patient <OBJECT>
* 1: Treatment class name <STRING>
* 2: Body part <STRING>
* 0: Patient <OBJECT>
* 1: Body Part <STRING>
* 2: Treatment <STRING>
*
* Return Value:
* Succesful treatment started <BOOL>
* None
*
* Example:
* [player, "Head", "FieldDressing"] call ace_medical_treatment_fnc_bandageLocal
*
* Public: No
*/
params ["_target", "_bandage", "_bodyPart"];
params ["_patient", "_bodyPart", "_bandage"];
private _partIndex = ALL_BODY_PARTS find toLower _bodyPart;
if (_partIndex < 0) exitWith { false };
if (_partIndex < 0) exitWith {false};
private _openWounds = _target getVariable [QEGVAR(medical,openWounds), []];
if (_openWounds isEqualTo []) exitWith { false };
private _openWounds = _patient getVariable [QEGVAR(medical,openWounds), []];
if (_openWounds isEqualTo []) exitWith {false};
// Figure out which injury for this bodypart is the best choice to bandage
// TODO also use up the remainder on left over injuries
private _targetWound = [_target, _bandage, _partIndex] call FUNC(findMostEffectiveWound);
private _targetWound = [_patient, _bandage, _partIndex] call FUNC(findMostEffectiveWound);
_targetWound params ["_wound", "_woundIndex", "_effectiveness"];
// Everything is patched up on this body part already
@ -36,11 +39,9 @@ private _impact = _effectiveness min _amountOf;
_wound set [3, _amountOf - _impact];
_openWounds set [_woundIndex, _wound];
_target setVariable [QEGVAR(medical,openWounds), _openWounds, true];
_patient setVariable [QEGVAR(medical,openWounds), _openWounds, true];
// Handle the reopening of bandaged wounds
if (_impact > 0 && {GVAR(advancedBandages) && {GVAR(woundReopening)}}) then {
[_target, _impact, _partIndex, _woundIndex, _wound, _bandage] call FUNC(handleBandageOpening);
[_patient, _impact, _partIndex, _woundIndex, _wound, _bandage] call FUNC(handleBandageOpening);
};
true

View File

@ -1,28 +0,0 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Check if caller can access targets medical equipment, based upon accessLevel.
*
* Arguments:
* 0: The caller <OBJECT>
* 1: The target <OBJECT>
*
* Return Value:
* Can Treat <BOOL>
*
* Example:
* [bob, target] call ace_medical_treatment_fnc_canAccessMedicalEquipment
*
* Public: No
*/
params ["_caller", "_target"];
private _accessLevel = _target getVariable [QGVAR(allowSharedEquipmentAccess), -1];
switch (_accessLevel) do {
case 0: { true };
case 1: { side _target == side _caller };
case 2: { group _target == group _caller };
default { false };
};

View File

@ -5,23 +5,23 @@
* Toggles between showing all or only basic bandage action for advanced setting.
*
* Arguments:
* 0: The medic <OBJECT>
* 1: The patient <OBJECT>
* 2: Body part <STRING>
* 3: Treatment class name <STRING>
* 0: Medic <OBJECT>
* 1: Patient <OBJECT>
* 2: Body Part <STRING>
* 3: Treatment <STRING>
*
* ReturnValue:
* Return Value:
* Can Bandage <BOOL>
*
* Public: No
*/
params ["_medic", "_patient", "_bodypart", "_bandage"];
params ["_medic", "_patient", "_bodyPart", "_bandage"];
// Bandage type and bandage setting XNOR to show only active actions
if ((_bandage == "BasicBandage") isEqualTo GVAR(advancedBandages)) exitWith { false };
if ((_bandage == "BasicBandage") isEqualTo GVAR(advancedBandages)) exitWith {false};
private _index = ALL_BODY_PARTS find toLower _bodypart;
private _index = ALL_BODY_PARTS find toLower _bodyPart;
private _canBandage = false;
{

View File

@ -1,77 +1,39 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Check if the treatment action can be performed.
* Author: Glowbal, mharis001
* Checks if the given treatment can be performed.
*
* Arguments:
* 0: The caller <OBJECT>
* 1: The target <OBJECT>
* 2: Body part <STRING>
* 3: Treatment class name <STRING>
* 0: Medic <OBJECT>
* 1: Patient <OBJECT>
* 2: Body Part <STRING>
* 3: Treatment <STRING>
*
* ReturnValue:
* Return Value:
* Can Treat <BOOL>
*
* Example:
* [player, cursorTarget, "Head", "SurgicalKit"] call ace_medical_treatment_fnc_canTreat
* [player, cursorObject, "Head", "SurgicalKit"] call ace_medical_treatment_fnc_canTreat
*
* Public: No
*/
params ["_caller", "_target", "_bodyPart", "_className"];
params ["_medic", "_patient", "_bodyPart", "_classname"];
if !(_target isKindOf "CAManBase") exitWith {false};
private _config = configFile >> QGVAR(actions) >> _classname;
private _config = configFile >> QGVAR(Actions) >> _className;
if !(isClass _config) exitWith {false};
// allow self treatment check
private _isSelf = _caller isEqualTo _target;
private _allowSelf = 0;
if (_isSelf) then {
if (isNumber (_config >> "allowSelfTreatment")) then {
_allowSelf = getNumber (_config >> "allowSelfTreatment");
} else {
if (isText (_config >> "allowSelfTreatment")) then {
_allowSelf = missionNamespace getVariable [getText (_config >> "allowSelfTreatment"), 0];
};
};
};
if (_isSelf && {_allowSelf == 0}) exitWith {false};
private _medicRequired = 0;
if (isNumber (_config >> "requiredMedic")) then {
_medicRequired = getNumber (_config >> "requiredMedic");
} else {
if (isText (_config >> "requiredMedic")) then {
_medicRequired = missionNamespace getVariable [getText (_config >> "requiredMedic"), 0];
};
};
if !([_caller, _medicRequired] call FUNC(isMedic)) exitWith {false};
// check selection
private _allowedSelections = getArray (_config >> "allowedSelections") apply {toLower _x};
if !("all" in _allowedSelections || {(_bodyPart in _allowedSelections)}) exitWith {false};
// check item
private _items = getArray (_config >> "items");
if (count _items > 0 && {!([_caller, _target, _items] call FUNC(hasItems))}) exitWith {false};
private _condition = true;
if (isText (_config >> "condition")) then {
_condition = getText (_config >> "condition");
if (_condition isEqualTo "") exitWith {
_condition = true;
};
isClass _config
&& {_patient isKindOf "CAManBase"}
&& {_medic != _patient || {GET_NUMBER_ENTRY(_config >> "allowSelfTreatment") == 1}}
&& {[_medic, GET_NUMBER_ENTRY(_config >> "medicRequired")] call FUNC(isMedic)}
&& {
private _selections = getArray (_config >> "allowedSelections") apply {toLower _x};
"all" in _selections || {_bodyPart in _selections}
} && {
private _items = getArray (_config >> "items");
_items isEqualTo [] || {[_medic, _patient, _items] call FUNC(hasItem)}
} && {
private _condition = getText (_config >> "condition");
if (isNil _condition) then {
_condition = compile _condition;
@ -79,38 +41,23 @@ if (isText (_config >> "condition")) then {
_condition = missionNamespace getVariable _condition;
};
if !(_condition isEqualType false) then {
if (_condition isEqualType {}) then {
_condition = call _condition;
};
};
if !(_condition) exitWith {false};
// check allowed locations
private _locations = getArray (_config >> "treatmentLocations") apply {toLower _x};
if ("all" in _locations) then {
_locations = true;
} else {
private _medFacility = {([_caller] call FUNC(isInMedicalFacility)) || ([_target] call FUNC(isInMedicalFacility))};
private _medVeh = {([_caller] call FUNC(isInMedicalVehicle)) || ([_target] call FUNC(isInMedicalVehicle))};
{
if (_x == "field") exitWith { _locations = true; };
if (_x == "MedicalFacility" && _medFacility) exitWith { _locations = true; };
if (_x == "MedicalVehicle" && _medVeh) exitWith { _locations = true; };
if !(isNil _x) exitWith {
_locations = missionNamespace getVariable _x;
if !(_locations isEqualType false) then {
if (_locations isEqualTo 0) exitWith { _locations = true; }; //AdvancedMedicalSettings_anywhere
if (_locations isEqualTo 1) exitWith { _locations = call _medVeh; }; //AdvancedMedicalSettings_vehicle
if (_locations isEqualTo 2) exitWith { _locations = call _medFacility; }; //AdvancedMedicalSettings_facility
if (_locations isEqualTo 3) exitWith { _locations = call _medFacility || {call _medVeh}; }; //AdvancedMedicalSettings_vehicleAndFacility
_locations = false; //Disabled
};
_condition
} && {
switch (GET_NUMBER_ENTRY(_config >> "treatmentLocations")) do {
case TREATMENT_LOCATIONS_ALL: {true};
case TREATMENT_LOCATIONS_VEHICLES: {
IN_MED_VEHICLE(_medic) || {IN_MED_VEHICLE(_patient)}
};
} forEach _locations;
};
_locations
case TREATMENT_LOCATIONS_FACILITIES: {
IN_MED_FACILITY(_medic) || {IN_MED_FACILITY(_patient)}
};
case TREATMENT_LOCATIONS_VEHICLES_AND_FACILITIES: {
IN_MED_VEHICLE(_medic) || {IN_MED_VEHICLE(_patient)} || {IN_MED_FACILITY(_medic)} || {IN_MED_FACILITY(_patient)}
};
default {false};
};
}

View File

@ -1,24 +1,23 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Cached Check if the treatment action can be performed.
* Cached check to determine if given treatment can be performed.
*
* Arguments:
* 0: The caller <OBJECT>
* 1: The target <OBJECT>
* 2: Selection name <STRING>
* 3: ACE_Medical_Treatment Classname <STRING>
* 0: Medic <OBJECT>
* 1: Patient <OBJECT>
* 2: Body Part <STRING>
* 3: Treatment <STRING>
*
* Return Value:
* Can Treat <BOOL>
*
* Example:
* [bob, kevin, "selection", "classname"] call ace_medical_treatment_fnc_canTreatCached
* [player, cursorObject, "Head", "SurgicalKit"] call ace_medical_treatment_fnc_canTreatCached
*
* Public: No
*/
params ["", "_target", "_selection", "_classname"];
params ["", "_patient", "_bodyPart", "_classname"];
// parameters, function, namespace, uid
[_this, DFUNC(canTreat), _target, format [QGVAR(canTreat_%1_%2), _selection, _classname], CAN_TREAT_CONDITION_CACHE_EXPIRY, QEGVAR(interact_menu,clearConditionCaches)] call EFUNC(common,cachedCall);
[_this, FUNC(canTreat), _patient, format [QGVAR(canTreat_%1_%2), _bodyPart, _classname], CAN_TREAT_CONDITION_CACHE_EXPIRY, QEGVAR(interact_menu,clearConditionCaches)] call EFUNC(common,cachedCall);

View File

@ -0,0 +1,22 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Checks the blood pressure of the patient.
*
* Arguments:
* 0: Medic <OBJECT>
* 1: Patient <OBJECT>
* 2: Body Part <OBJECT>
*
* Return Value:
* None
*
* Example:
* [player, cursorObject, "LeftArm"] call ace_medical_treatment_fnc_checkBloodPressure
*
* Public: No
*/
params ["_medic", "_patient", "_bodyPart"];
[QGVAR(checkBloodPressureLocal), [_medic, _patient, _bodyPart], _patient] call CBA_fnc_targetEvent;

View File

@ -0,0 +1,57 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Local callback for checking the blood pressure of a patient.
*
* Arguments:
* 0: Medic <OBJECT>
* 1: Patient <OBJECT>
* 2: Body Part <OBJECT>
*
* Return Value:
* None
*
* Example:
* [player, cursorObject, "LeftArm"] call ace_medical_treatment_fnc_checkBloodPressureLocal
*
* Public: No
*/
params ["_medic", "_patient", "_bodyPart"];
private _bloodPressure = [0, 0];
if (alive _patient && {!([_patient, _bodyPart] call FUNC(hasTourniquetAppliedTo))}) then {
_bloodPressure = GET_BLOOD_PRESSURE(_patient);
};
private _bloodPressureOutput = LSTRING(Check_Bloodpressure_Output_6);
private _logOutPut = LSTRING(Check_Bloodpressure_NoBloodpressure);
_bloodPressure params ["_bloodPressureLow", "_bloodPressureHigh"];
if (_bloodPressureHigh > 20) then {
if (_medic call FUNC(isMedic)) then {
_bloodPressureOutput = LSTRING(Check_Bloodpressure_Output_1);
_logOutPut = format ["%1/%2", round _bloodPressureHigh, round _bloodPressureLow];
} else {
if (_bloodPressureHigh > 20) then {
_bloodPressureOutput = LSTRING(Check_Bloodpressure_Output_2);
_logOutPut = LSTRING(Check_Bloodpressure_Low);
if (_bloodPressureHigh > 100) then {
_bloodPressureOutput = LSTRING(Check_Bloodpressure_Output_3);
_logOutPut = LSTRING(Check_Bloodpressure_Normal);
if (_bloodPressureHigh > 160) then {
_bloodPressureOutput = LSTRING(Check_Bloodpressure_Output_4);
_logOutPut = LSTRING(Check_Bloodpressure_High);
};
};
};
};
};
[_patient, "quick_view", LSTRING(Check_Bloodpressure_Log), [_medic call EFUNC(common,getName), _logOutPut]] call FUNC(addToLog);
[QEGVAR(common,displayTextStructured), [[_bloodPressureOutput, _patient call EFUNC(common,getName), round _bloodPressureHigh, round _bloodPressureLow], 1.75, _medic], _medic] call CBA_fnc_targetEvent;

View File

@ -6,7 +6,7 @@
* Arguments:
* 0: The unit <OBJECT>
*
* ReturnValue:
* Return Value:
* None
*
* Public: No

View File

@ -0,0 +1,22 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Checks the pulse or heart rate of the patient.
*
* Arguments:
* 0: Medic <OBJECT>
* 1: Patient <OBJECT>
* 2: Body Part <OBJECT>
*
* Return Value:
* None
*
* Example:
* [player, cursorObject, "Head"] call ace_medical_treatment_fnc_checkPulse
*
* Public: No
*/
params ["_medic", "_patient", "_bodyPart"];
[QGVAR(checkPulseLocal), [_medic, _patient, _bodyPart], _patient] call CBA_fnc_targetEvent;

View File

@ -0,0 +1,53 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Local callback for checking the pulse or heart rate of a patient.
*
* Arguments:
* 0: Medic <OBJECT>
* 1: Patient <OBJECT>
* 2: Body Part <OBJECT>
*
* Return Value:
* None
*
* Example:
* [player, cursorObject, "Head"] call ace_medical_treatment_fnc_checkPulseLocal
*
* Public: No
*/
params ["_medic", "_patient", "_bodyPart"];
private _heartRate = 0;
if (alive _patient && {!([_patient, _bodyPart] call FUNC(hasTourniquetAppliedTo))}) then {
_heartRate = GET_HEART_RATE(_patient);
};
private _heartRateOutput = LSTRING(Check_Pulse_Output_5);
private _logOutPut = LSTRING(Check_Pulse_None);
if (_heartRate > 1) then {
if (_medic call FUNC(isMedic)) then {
_heartRateOutput = LSTRING(Check_Pulse_Output_1);
_logOutPut = format ["%1", round _heartRate];
} else {
_heartRateOutput = LSTRING(Check_Pulse_Output_2);
_logOutPut = LSTRING(Check_Pulse_Weak);
if (_heartRate > 60) then {
if (_heartRate > 100) then {
_heartRateOutput = LSTRING(Check_Pulse_Output_3);
_logOutPut = LSTRING(Check_Pulse_Strong);
} else {
_heartRateOutput = LSTRING(Check_Pulse_Output_4);
_logOutPut = LSTRING(Check_Pulse_Normal);
};
};
};
};
[_patient, "quick_view", LSTRING(Check_Pulse_Log), [_medic call EFUNC(common,getName), _logOutPut]] call FUNC(addToLog);
[QEGVAR(common,displayTextStructured), [[_heartRateOutput, _patient call EFUNC(common,getName), round _heartRate], 1.5, _medic], _medic] call CBA_fnc_targetEvent;

View File

@ -0,0 +1,24 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Checks the response status of the patient.
*
* Arguments:
* 0: Medic <OBJECT>
* 1: Patient <OBJECT>
*
* Return Value:
* None
*
* Example:
* [player, cursorObject] call ace_medical_treatment_fnc_checkResponse
*
* Public: No
*/
params ["_medic", "_patient"];
private _output = [LSTRING(Check_Response_Unresponsive), LSTRING(Check_Response_Responsive)] select (_patient call EFUNC(common,isAwake));
[[_output, _patient call EFUNC(common,getName)], 2] call EFUNC(common,displayTextStructured);
[_patient, "quick_view", _output, [[_target, false, true] call EFUNC(common,getName)]] call FUNC(addToLog);

View File

@ -0,0 +1,70 @@
#include "script_component.hpp"
/*
* Author: Glowbal, mharis001
* Creates litter around the patient based on the treatment.
*
* Arguments:
* 0: Medic <OBJECT>
* 1: Patient <OBJECT>
* 2: Body Part <STRING>
* 3: Treatment <STRING>
*
* Return Value:
* None
*
* Example:
* [player, cursorObject, "Head", "BasicBandage"] call ace_medical_fnc_createLitter
*
* Public: No
*/
// Exit if litter creation is disabled
if (!GVAR(allowLitterCreation)) exitWith {};
params ["_medic", "_patient", "_bodyPart", "_classname"];
// Don't create litter if medic or patient are inside a vehicle
if (vehicle _medic != _medic || {vehicle _patient != _patient}) exitWith {};
// Determine if treated body part is bleeding
private _index = ALL_BODY_PARTS find toLower _bodyPart;
private _isBleeding = (_patient getVariable [QEGVAR(medical,openWounds), []]) findIf {
_x params ["", "", "_bodyPartN", "_amountOf", "_bleeding"];
_bodyPartN == _index && {_amountOf * _bleeding > 0}
} != -1;
// Get litter config for the treatment
private _litter = getArray (configFile >> QGVAR(actions) >> _classname >> "litter");
_litter params [["_alwaysLitter", [], [[]]], ["_cleanLitter", [], [[]]], ["_bloodyLitter", [], [[]]]];
private _fnc_createLitter = {
params ["_litterOptions"];
private _position = getPosASL _patient;
// For now, don't spawn litter over water to avoid floating litter
// todo: handle carriers over water
if (surfaceIsWater _position) exitWith {};
{
if (_x isEqualType []) then {
_x = selectRandom _x;
};
// Randomize position XY +/- 1 m
private _position = _position vectorAdd [
random 2 - 1,
random 2 - 1,
0
];
// Create litter on server which will also handle cleanup
[QGVAR(createLitterServer), [_x, _position, random 360]] call CBA_fnc_serverEvent;
} forEach _litterOptions;
};
private _conditionalLitter = [_cleanLitter, _bloodyLitter] select _isBleeding;
[_alwaysLitter] call _fnc_createLitter;
[_conditionalLitter] call _fnc_createLitter;

View File

@ -0,0 +1,59 @@
#include "script_component.hpp"
/*
* Author: Glowbal, mharis001
* Creates a litter object and handles its cleanup. Only execute on server.
*
* Arguments:
* 0: Litter Class <STRING>
* 1: Position ASL <ARRAY>
* 2: Direction <NUMBER>
*
* Return Value:
* None
*
* Example:
* ["Litter_1", [100, 100, 0], 90] call ace_medical_fnc_createLitterServer
*
* Public: No
*/
params ["_litterClass", "_position", "_direction"];
if (isNil QGVAR(litterObjects)) then {
GVAR(litterObjects) = [];
GVAR(litterCleanup) = false;
};
private _model = getText (configFile >> "CfgVehicles" >> _litterClass >> "model");
if (_model == "") exitWith {};
// createSimpleObject expects a path without the leading slash
if (_model select [0, 1] == "\") then {
_model = _model select [1];
};
private _object = createSimpleObject [_model, [0, 0, 0]];
_object setPosASL _position;
_object setDir _direction;
systemChat str [_litterClass, _object];
// Set the litter object's position next frame to correct HORRIBLE spacing (fixes #1112)
[{
params ["_object", "_position"];
_object setPosASL _position;
}, [_object, _position]] call CBA_fnc_execNextFrame;
// Delete oldest litter object if max count reached
if (count GVAR(litterObjects) > GVAR(maxLitterObjects)) then {
private _litterToDelete = GVAR(litterObjects) deleteAt 0;
deleteVehicle (_litterToDelete select 0);
};
GVAR(litterObjects) pushBack [_object, CBA_missionTime];
// Start cleanup loop if not already running and litter lifetime is not forever
if (!GVAR(litterCleanup) && {GVAR(litterCleanUpDelay) > 0}) then {
[] call FUNC(litterCleanupLoop);
GVAR(litterCleanup) = true;
};

View File

@ -0,0 +1,49 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Action for diagnosing in basic medical
*
* Arguments:
* 0: Medic <OBJECT>
* 1: Patient <OBJECT>
*
* Return Value:
* None
*
* Example:
* [player, cursorObject] call ace_medical_treatment_fnc_diagnose
*
* Public: No
*/
params ["_medic", "_patient"];
private _messages = [LSTRING(diagnoseMessage), _patient call EFUNC(common,getName)];
if (alive _patient) then {
_messages pushBack LSTRING(diagnoseAlive);
} else {
_messages pushBack LSTRING(diagnoseDead);
};
private _hemorrhage = GET_HEMORRHAGE(_patient);
if (_hemorrhage > 0) then {
if (_hemorrhage > 1) then {
_messages pushBack LSTRING(lostBloodALot);
} else {
_messages pushBack LSTRING(lostBlood);
};
} else {
_messages pushBack LSTRING(noBloodloss);
};
// todo: mirror pain visualization logic of medical_gui?
if (alive _patient) then {
if IS_IN_PAIN(_patient) then {
_messages pushBack LSTRING(inPain);
} else {
_messages pushBack LSTRING(noPain);
};
};
[_messages, 3] call EFUNC(common,displayTextStructured);

View File

@ -7,11 +7,11 @@
* 0: Unit <OBJECT>
*
* Return Value:
* Triage info <ARRAY>
* 0: Status ID <NUMBER>
* 1: Name <STRING>
* 2: Color <ARRAY>
* 3: Text color <ARRAY>
* Triage Info <ARRAY>
* 0: Status ID <NUMBER>
* 1: Name <STRING>
* 2: Color <ARRAY>
* 3: Text Color <ARRAY>
*
* Example:
* [player] call ace_medical_treatment_fnc_getTriageStatus

View File

@ -1,44 +1,31 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Check if the item is present between the patient and the medic
* Author: Glowbal, mharis001
* Checks if one of the given items are present between the medic and patient.
* Does not respect the priority defined by the allowSharedEquipment setting.
* Will check medic first and then patient if shared equipment is allowed.
*
* Arguments:
* 0: Medic <OBJECT>
* 1: Patient <OBJECT>
* 2: Item <STRING>
* 2: Items <ARRAY>
*
* Return Value:
* Has the items <BOOL>
* Has Item <BOOL>
*
* Example:
* [bob, patient, "bandage"] call ace_medical_treatment_fnc_hasItem
* [player, cursorObject, ["ACE_fieldDressing"]] call ace_medical_treatment_fnc_hasItems
*
* Public: No
*/
params ["_medic", "_patient", "_item"];
params ["_medic", "_patient", "_items"];
if (isNil QEGVAR(medical,setting_allowSharedEquipment)) then {
EGVAR(medical,setting_allowSharedEquipment) = true;
private _fnc_checkItems = {
params ["_unit"];
private _unitItems = _unit call EFUNC(common,uniqueItems);
_items findIf {_x in _unitItems} != -1
};
if (EGVAR(medical,setting_allowSharedEquipment) && {[_patient, _item] call EFUNC(common,hasItem)}) exitWith {
true
};
if ([_medic, _item] call EFUNC(common,hasItem)) exitWith {
true
};
private _hasItem = false;
if (vehicle _medic != _medic && {vehicle _medic call FUNC(isMedicalVehicle)}) then {
{
if ([_medic, _x] call FUNC(canAccessMedicalEquipment) && {[_x, _item] call EFUNC(common,hasItem)}) exitWith {
_hasItem = true;
};
} forEach crew vehicle _medic;
};
_hasItem
_medic call _fnc_checkItems || {GVAR(allowSharedEquipment) != 2 && {_patient call _fnc_checkItems}}

View File

@ -1,36 +0,0 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Check if all items are present between the patient and the medic.
*
* Arguments:
* 0: Medic <OBJECT>
* 1: Patient <OBJECT>
* 2: Items <ARRAY<STRING>>
*
* Return Value:
* Has the items <BOOL>
*
* Example:
* [bob, patient, ["bandage", "morphine"]] call ace_medical_treatment_fnc_hasItems
*
* Public: No
*/
params ["_medic", "_patient", "_items"];
private _return = true;
{
// handle a one of type use item
if (_x isEqualType [] && {{[_medic, _patient, _x] call FUNC(hasItem)} count _x == 0}) exitWith {
_return = false;
};
// handle required item
if (_x isEqualType "" && {!([_medic, _patient, _x] call FUNC(hasItem))}) exitWith {
_return = false;
};
} forEach _items;
_return

View File

@ -1,14 +1,14 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Check if unit has a tourniquet applied to the specified bodypart
* Checks if the unit has a tourniquet applied on the specified body part.
*
* Arguments:
* 0: The Unit <OBJECT>
* 0: Unit <OBJECT>
* 1: Body Part <STRING>
*
* Return Value:
* Has tourniquet applied <BOOL>
* Has Tourniquet Applied <BOOL>
*
* Example:
* [player, "leftleg"] call ace_medical_treatment_fnc_hasTourniquetAppliedTo
@ -16,8 +16,8 @@
* Public: No
*/
params ["_target", "_bodyPart"];
params ["_unit", "_bodyPart"];
private _index = ALL_BODY_PARTS find toLower _bodyPart;
_index >= 0 && {HAS_TOURNIQUET_APPLIED_ON(_target,_index)}
_index >= 0 && {HAS_TOURNIQUET_APPLIED_ON(_unit,_index)}

View File

@ -1,13 +1,13 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Checks if a unit is in a designated medical facility
* Author: Glowbal, mharis001
* Checks if the unit is in a medical facility.
*
* Arguments:
* 0: The Unit <OBJECT>
* 0: Unit <OBJECT>
*
* Return Value:
* Is in medical facility <BOOL>
* In Medical Facility <BOOL>
*
* Example:
* [player] call ace_medical_treatment_fnc_isInMedicalFacility
@ -15,49 +15,13 @@
* Public: No
*/
#define CHECK_OBJECTS(var) ((var) findIf {typeOf _x in GVAR(facilityClasses) || {_x getVariable [QEGVAR(medical,isMedicalFacility), false]}} != -1)
params ["_unit"];
//Cache the results as this function could be called rapidly
(_unit getVariable [QGVAR(cacheInFacility), [-9, false]]) params ["_expireTime", "_lastResult"];
if (CBA_missionTime < _expireTime) exitWith {_lastResult};
private _eyePos = eyePos _unit;
private _isInBuilding = false;
private _medicalFacility =
[
"TK_GUE_WarfareBFieldhHospital_Base_EP1",
"TK_GUE_WarfareBFieldhHospital_EP1",
"TK_WarfareBFieldhHospital_Base_EP1",
"TK_WarfareBFieldhHospital_EP1",
"US_WarfareBFieldhHospital_Base_EP1",
"US_WarfareBFieldhHospital_EP1",
"MASH_EP1",
"MASH",
"Land_A_Hospital",
"CDF_WarfareBFieldhHospital",
"GUE_WarfareBFieldhHospital",
"INS_WarfareBFieldhHospital",
"RU_WarfareBFieldhHospital",
"USMC_WarfareBFieldhHospital"
];
private _objects = (lineIntersectsWith [_unit modelToWorldVisual [0, 0, (_eyePos select 2)], _unit modelToWorldVisual [0, 0, (_eyePos select 2) +10], _unit]);
{
if (((typeOf _x) in _medicalFacility) || {_x getVariable [QEGVAR(medical,isMedicalFacility),false]}) exitWith {
_isInBuilding = true;
};
} forEach _objects;
if (!_isInBuilding) then {
_objects = _unit nearObjects 7.5;
{
if (((typeOf _x) in _medicalFacility) || {_x getVariable [QEGVAR(medical,isMedicalFacility),false]}) exitWith {
_isInBuilding = true;
};
} forEach _objects;
private _fnc_check = {
private _position = _unit modelToWorldVisual [0, 0, eyePos _unit select 2];
CHECK_OBJECTS(ARR_5(lineIntersectsWith [_position, _position vectorAdd [0, 0, 10], _unit])) || {CHECK_OBJECTS(_unit nearObjects 7.5)}
};
_unit setVariable [QGVAR(cacheInFacility), [CBA_missionTime + IN_MEDICAL_FACILITY_CACHE_EXPIRY, _isInBuilding]];
_isInBuilding;
[[], _fnc_check, _unit, QGVAR(inMedicalFacilityCache), IN_MEDICAL_FACILITY_CACHE_EXPIRY] call EFUNC(common,cachedCall);

View File

@ -1,13 +1,13 @@
#include "script_component.hpp"
/*
* Author: KoffeinFlummi
* Checks if a unit is in a medical vehicle.
* Checks if the unit is in a medical vehicle.
*
* Arguments:
* 0: unit to be checked <OBJECT>
* 0: Unit <OBJECT>
*
* Return Value:
* Is unit in medical vehicle? <BOOL>
* In Medical Vehicle <BOOL>
*
* Example:
* [player] call ace_medical_treatment_fnc_isInMedicalVehicle
@ -19,7 +19,4 @@ params ["_unit"];
private _vehicle = vehicle _unit;
if (_unit == _vehicle) exitWith {false};
if (_unit in [driver _vehicle, gunner _vehicle, commander _vehicle]) exitWith {false};
[_vehicle] call FUNC(isMedicalVehicle);
_unit != _vehicle && {!(_unit in [driver _vehicle, gunner _vehicle, commander _vehicle])} && {[_vehicle] call FUNC(isMedicalVehicle)}

View File

@ -1,14 +1,15 @@
#include "script_component.hpp"
/*
* Author: Glowbal, KoffeinFlummi
* Check if a unit is any medical class
* Checks if the unit is a medic of the given level.
* Medic Levels: 0 - None, 1 - Medic, 2 - Doctor
*
* Arguments:
* 0: The Unit <OBJECT>
* 1: Class <NUMBER> (default: 1)
* 0: Unit <OBJECT>
* 1: Medic Level <NUMBER> (default: 1)
*
* Return Value:
* Is in of medic class <BOOL>
* Is Medic <BOOL>
*
* Example:
* [player] call ace_medical_treatment_fnc_isMedic
@ -18,13 +19,13 @@
params ["_unit", ["_medicN", 1]];
private _class = _unit getVariable [QEGVAR(medical,medicClass), [0, 1] select (_unit getUnitTrait "medic")];
private _class = _unit getVariable [QEGVAR(medical,medicClass), parseNumber (_unit getUnitTrait "medic")];
if (_class >= _medicN) exitWith {true};
if (!EGVAR(medical,increaseTrainingInLocations)) exitWith {false};
if (!GVAR(locationsBoostTraining)) exitWith {false};
if (([_unit] call FUNC(isInMedicalVehicle)) || {[_unit] call FUNC(isInMedicalFacility)}) then {
_class = _class + 1; //boost by one: untrained becomes medic, medic becomes doctor
if ([_unit] call FUNC(isInMedicalVehicle) || {[_unit] call FUNC(isInMedicalFacility)}) then {
_class = _class + 1; // Boost medical training by one: untrained becomes medic, medic becomes doctor
};
_class >= _medicN

View File

@ -1,13 +1,13 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Check if vehicle is a medical vehicle
* Checks if the vehicle is a medical vehicle.
*
* Arguments:
* 0: The Vehicle <OBJECT>
* 0: Vehicle <OBJECT>
*
* Return Value:
* Is in of medic class <BOOL>
* Is Medical Vehicle <BOOL>
*
* Example:
* [cursorObject] call ace_medical_treatment_fnc_isMedicalVehicle
@ -17,4 +17,4 @@
params ["_vehicle"];
(_vehicle getVariable [QEGVAR(medical,medicClass), getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> "attendant")]) > 0
_vehicle getVariable [QEGVAR(medical,isMedicalVehicle), getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> "attendant") > 0]

View File

@ -0,0 +1,28 @@
#include "script_component.hpp"
/*
* Author: Glowbal, mharis001
* Administers an IV bag treatment to the patient.
*
* Arguments:
* 0: Medic <OBJECT>
* 1: Patient <OBJECT>
* 2: Body Part <STRING>
* 3: Treatment <STRING>
* 4: Item User (not used) <OBJECT>
* 5: Used Item <STRING>
*
* Return Value:
* None
*
* Example:
* [player, cursorObject, "RightArm", "BloodIV", objNull, "ACE_bloodIV"] call ace_medical_treatment_fnc_ivBag
*
* Public: No
*/
params ["_medic", "_patient", "_bodyPart", "_classname", "", "_usedItem"];
[_patient, _usedItem] call FUNC(addToTriageCard);
[_patient, "activity", LSTRING(Activity_gaveIV), [[_medic, false, true] call EFUNC(common,getName)]] call FUNC(addToLog);
[QGVAR(ivBagLocal), [_patient, _bodyPart, _classname], _patient] call CBA_fnc_targetEvent;

View File

@ -0,0 +1,38 @@
#include "script_component.hpp"
/*
* Author: Glowbal, mharis001
* Local callback for administering an IV bag to a patient.
*
* Arguments:
* 0: Patient <OBJECT>
* 1: Body Part <STRING>
* 2: Treatment <STRING>
*
* Return Value:
* None
*
* Example:
* [player, "RightArm", "BloodIV"] call ace_medical_treatment_fnc_ivBagLocal
*
* Public: No
*/
params ["_patient", "_bodyPart", "_classname"];
// Exit if patient has max blood volume
private _bloodVolume = GET_BLOOD_VOLUME(_patient);
if (_bloodVolume >= DEFAULT_BLOOD_VOLUME) exitWith {};
private _partIndex = ALL_BODY_PARTS find toLower _bodyPart;
// Get attributes for the used IV
private _defaultConfig = configFile >> QUOTE(ADDON) >> "IV";
private _ivConfig = _defaultConfig >> _classname;
private _volume = GET_NUMBER(_ivConfig >> "volume",getNumber (_defaultConfig >> "volume"));
private _type = GET_STRING(_ivConfig >> "type",getText (_defaultConfig >> "type"));
// Add IV bag to patient's ivBags array
private _ivBags = _patient getVariable [QEGVAR(medical,ivBags), []];
_ivBags pushBack [_volume, _type, _partIndex];
_ivBags setVariable [QEGVAR(medical,ivBags), _ivBags, true];

View File

@ -1,7 +1,7 @@
#include "script_component.hpp"
/*
* Author: Glowbal, esteldunedain
* Loop that cleans up litter
* Author: Glowbal, esteldunedain, mharis001
* Handles cleaning up litter objects that have reached their lifetime.
*
* Arguments:
* None
@ -10,31 +10,28 @@
* None
*
* Example:
* call ace_medical_treatment_fnc_litterCleanupLoop
* [] call ace_medical_treatment_fnc_litterCleanupLoop
*
* Public: No
*/
{
_x params ["_time", "_objects"];
_x params ["_object", "_timeCreated"];
// Older elements are always at the begining of the array
if (CBA_missionTime - _time < GVAR(litterCleanUpDelay)) exitWith {};
// Litter array has older objects at the beginning
// Can exit on first element that still has lifetime remaining
if (CBA_missionTime - _timeCreated < GVAR(litterCleanUpDelay)) exitWith {};
TRACE_2("deleting",_time,_objects);
{
deleteVehicle _x;
} forEach _objects;
deleteVehicle _object;
GVAR(litterObjects) set [_forEachIndex, objNull];
} forEach GVAR(litterObjects);
GVAR(allCreatedLitter) set [_forEachIndex, objNull];
} forEach GVAR(allCreatedLitter);
GVAR(litterObjects) = GVAR(litterObjects) - [objNull];
GVAR(allCreatedLitter) = GVAR(allCreatedLitter) - [objNull];
// If no more litter remain, exit the loop
if (GVAR(allCreatedLitter) isEqualTo []) exitWith {
GVAR(litterPFHRunning) = false;
// Exit the loop if no litter objects left
if (GVAR(litterObjects) isEqualTo []) exitWith {
GVAR(litterCleanup) = false;
};
// Schedule the loop to be executed again 30 sec later
[FUNC(litterCleanupLoop), [], 30] call CBA_fnc_waitAndExecute;
// Schedule cleanup loop to executed again
[FUNC(litterCleanupLoop), [], LITTER_CLEANUP_CHECK_DELAY] call CBA_fnc_waitAndExecute;

View File

@ -1,98 +0,0 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Spawns litter for the treatment action on the ground around the target
*
* Arguments:
* 0: The Caller <OBJECT>
* 1: The target <OBJECT>
* 2: The treatment Selection Name <STRING>
* 3: The treatment classname <STRING>
* 4: ?
* 5: Users of Items <?>
* 6: Blood Loss on selection (previously called _previousDamage) <NUMBER>
*
* Return Value:
* None
*
* Public: No
*/
#define MIN_ENTRIES_LITTER_CONFIG 3
params ["_caller", "_target", "_selectionName", "_className", "", "_usersOfItems", "_bloodLossOnSelection"];
TRACE_6("params",_caller,_target,_selectionName,_className,_usersOfItems,_bloodLossOnSelection);
// Ensures comptibilty with other possible medical treatment configs
private _previousDamage = _bloodLossOnSelection;
// Exit if litter is disabled by setting
if !(EGVAR(medical,allowLitterCreation)) exitWith {};
// Don't create litter if medic or patient are inside a vehicle
if (vehicle _caller != _caller || {vehicle _target != _target}) exitWith {};
private _config = configFile >> QGVAR(Actions) >> _className;
if !(isClass _config) exitWith {TRACE_1("No action config",_className);};
if !(isArray (_config >> "litter")) exitWith {TRACE_1("No litter config",_className);};
private _litter = getArray (_config >> "litter");
private _createLitter = {
params ["_unit", "_litterClass"];
private _position = getPosASL _unit;
// @TODO: handle carriers over water
// For now, don't spawn litter if we are over water to avoid floating litter
if (surfaceIsWater _position) exitWith {false};
_position = _position vectorAdd [
random 2 - 1,
random 2 - 1,
0
];
private _direction = random 360;
// Create the litter, and timeout the event based on the cleanup delay
// The cleanup delay for events in MP is handled by the server side
TRACE_3("Creating Litter on server",_litterClass,_position,_direction);
[QGVAR(createLitterServer), [_litterClass, _position, _direction]] call CBA_fnc_serverEvent;
true
};
{
if (count _x < MIN_ENTRIES_LITTER_CONFIG) then {
WARNING_2("Wrong litter array: %1",_x);
} else {
_x params [
["_selection", "", [""]],
["_litterCondition", "", [""]],
["_litterOptions", [], [[]]]
];
if (toLower _selection in [toLower _selectionName, "all"]) then {
if (_litterCondition isEqualTo "") then {
_litterCondition = {true};
} else {
_litterCondition = compile _litterCondition;
};
// existing configs seem to use carried over magic variables. we pass them as arguments (_this) anyway
if !([_caller, _target, _selectionName, _className, _usersOfItems, _bloodLossOnSelection] call _litterCondition) exitWith {};
// Loop through through the litter options and place the litter
{
if (_x isEqualType "") then {
[_target, _x] call _createLitter;
};
if (_x isEqualType [] && {count _x > 0}) then {
[_target, selectRandom _x] call _createLitter;
};
} foreach _litterOptions;
};
};
} foreach _litter;

View File

@ -1,68 +0,0 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* handle Litter Create
*
* Arguments:
* 0: Litter Class <STRING>
* 1: Position <ARRAY>
* 2: Unit <OBJECT>
*
* Return Value:
* None
*
* Example:
* ["litter", [2, 5, 6], bob] call ace_medical_treatment_fnc_handleCreateLitter
*
* Public: No
*/
params ["_litterClass", "_position", "_direction"];
TRACE_3("params",_litterClass,_position,_direction);
//IGNORE_PRIVATE_WARNING ["_values"];
if (isNil QGVAR(allCreatedLitter)) then {
GVAR(allCreatedLitter) = [];
GVAR(litterPFHRunning) = false;
};
private _model = getText (configFile >> "CfgVehicles" >> _litterClass >> "model");
if (_model == "") exitWith {TRACE_2("no model",_litterClass,_model)};
// createSimpleObject expects a path without the leading slash
if (_model select [0,1] == "\") then {
_model = _model select [1];
};
private _litterObject = createSimpleObject [_model, [0,0,0]];
TRACE_2("created",_litterClass,_litterObject);
_litterObject setDir _direction;
_litterObject setPosASL _position;
// Move the litter next frame to get rid of HORRIBLE spacing, fixes #1112
[{
params ["_object", "_position"];
_object setPosASL _position;
}, [_litterObject, _position]] call CBA_fnc_execNextFrame;
private _maxLitterCount = getArray (configFile >> "ACE_Settings" >> QEGVAR(medical,litterSimulationDetail) >> "_values") select EGVAR(medical,litterSimulationDetail);
if (count GVAR(allCreatedLitter) > _maxLitterCount) then {
// gank the first litter object, and spawn ours.
private _oldLitter = GVAR(allCreatedLitter) deleteAt 0;
{
deleteVehicle _x;
} forEach (_oldLitter select 1);
};
GVAR(allCreatedLitter) pushBack [CBA_missionTime, [_litterObject]];
if (!GVAR(litterPFHRunning) && {GVAR(litterCleanUpDelay) > 0}) then {
// Start the litter cleanup loop
GVAR(litterPFHRunning) = true;
call FUNC(litterCleanupLoop);
};

View File

@ -0,0 +1,28 @@
#include "script_component.hpp"
/*
* Author: Glowbal, mharis001
* Administers medication to the patient on the given body bodypart.
*
* Arguments:
* 0: Medic <OBJECT>
* 1: Patient <OBJECT>
* 2: Body Part <STRING>
* 3: Treatment <STRING>
* 4: Item User (not used) <OBJECT>
* 5: Used Item <STRING>
*
* Return Value:
* None
*
* Example:
* [player, cursorObject, "RightArm", "Morphine", objNull, "ACE_morphine"] call ace_medical_treatment_fnc_medication
*
* Public: No
*/
params ["_medic", "_patient", "_bodyPart", "_classname", "", "_usedItem"];
[_patient, _usedItem] call FUNC(addToTriageCard);
[_patient, "activity", LSTRING(Activity_usedItem), [[_medic, false, true] call EFUNC(common,getName), getText (configFile >> "CfgWeapons" >> _usedItem >> "displayName")]] call FUNC(addToLog);
[QGVAR(medicationLocal), [_patient, _bodyPart, _classname]] call CBA_fnc_targetEvent;

View File

@ -0,0 +1,69 @@
#include "script_component.hpp"
/*
* Author: Glowbal, mharis001
* Local callback for administering medication to a patient.
*
* Arguments:
* 0: Patient <OBJECT>
* 1: Body Part <STRING>
* 2: Treatment <STRING>
*
* Return Value:
* None
*
* Example:
* [player, "RightArm", "Morphine"] call ace_medical_treatment_fnc_medicationLocal
*
* Public: No
*/
// todo: move this macro to script_macros_medical.hpp?
#define MORPHINE_PAIN_SUPPRESSION 0.6
params ["_patient", "_bodyPart", "_classname"];
// Medication has no effects on dead units
if (!alive _patient) exitWith {};
// Exit with basic medication handling if advanced medication not enabled
if (!GVAR(advancedMedication)) exitWith {
switch (_classname) do {
case "Morphine": {
private _painSuppress = GET_PAIN_SUPPRESS(_patient);
_patient setVariable [VAR_PAIN_SUPP, (_painSuppress + MORPHINE_PAIN_SUPPRESSION) min 1, true];
};
case "Epinephrine": {
[QEGVAR(medical,WakeUp), _patient] call CBA_fnc_localEvent;
};
};
};
// Handle tourniquet on body part blocking blood flow at injection site
private _partIndex = ALL_BODY_PARTS find toLower _bodyPart;
if (HAS_TOURNIQUET_APPLIED_ON(_patient,_partIndex)) exitWith {
private _occludedMedications = _patient getVariable [QEGVAR(medical,occludedMedications), []];
_occludedMedications pushBack [_partIndex, _classname];
_patient setVariable [QEGVAR(medical,occludedMedications), _occludedMedications, true];
};
// Get adjustment attributes for used medication
private _defaultConfig = configFile >> QUOTE(ADDON) >> "Medication";
private _medicationConfig = _defaultConfig >> _classname;
private _painReduce = GET_NUMBER(_medicationConfig >> "painReduce",getNumber (_defaultConfig >> "painReduce"));
private _timeInSystem = GET_NUMBER(_medicationConfig >> "timeInSystem",getNumber (_defaultConfig >> "timeInSystem"));
private _timeTillMaxEffect = GET_NUMBER(_medicationConfig >> "timeTillMaxEffect",getNumber (_defaultConfig >> "timeTillMaxEffect"));
private _maxDose = GET_NUMBER(_medicationConfig >> "maxDose",getNumber (_defaultConfig >> "maxDose"));
private _viscosityChange = GET_NUMBER(_medicationConfig >> "viscosityChange",getNumber (_defaultConfig >> "viscosityChange"));
private _hrIncreaseLow = GET_ARRAY(_medicationConfig >> "hrIncreaseLow",getArray (_defaultConfig >> "hrIncreaseLow"));
private _hrIncreaseNormal = GET_ARRAY(_medicationConfig >> "hrIncreaseNormal",getArray (_defaultConfig >> "hrIncreaseNormal"));
private _hrIncreaseHigh = GET_ARRAY(_medicationConfig >> "hrIncreaseHigh",getArray (_defaultConfig >> "hrIncreaseHigh"));
private _incompatableMedication = GET_ARRAY(_medicationConfig >> "incompatableMedication",getArray (_defaultConfig >> "incompatableMedication"));
private _heartRate = GET_HEART_RATE(_patient);
private _hrIncrease = [_hrIncreaseLow, _hrIncreaseNorm, _hrIncreaseHigh] select (floor ((0 max _heartRate min 110) / 55));
_hrIncrease params ["_minIncrease", "_maxIncrease"];
private _heartRateChange = _minIncrease + random (_maxIncrease - _minIncrease);
// todo: finish when medication rework PR is complete

View File

@ -0,0 +1,38 @@
#include "script_component.hpp"
/*
* Author: BaerMitUmlaut
* Handles the surgical kit treatment by periodically closing bandaged wounds.
*
* Arguments:
* 0: Arguments <ARRAY>
* 0: Medic (not used) <OBJECT>
* 1: Patient <OBJECT>
* 1: Elapsed Time <NUMBER>
* 2: Total Time <NUMBER>
*
* Return Value:
* Continue Treatment <BOOL>
*
* Example:
* [[objNull, player], 5, 10] call ace_medical_treatment_fnc_surgicalKitProgress
*
* Public: No
*/
params ["_args", "_elapsedTime", "_totalTime"];
_args params ["", "_patient"];
private _bandagedWounds = _patient getVariable [QEGVAR(medical,bandagedWounds), []];
private _stitchedWounds = _patient getVariable [QEGVAR(medical,stitchedWounds), []];
// Stop treatment if there are no wounds that can be stitched remaining
if (_bandagedWounds isEqualTo []) exitWith {false};
// Check if enough time has elapsed to stitch another wound
if (_totalTime - _elapsedTime <= (count _bandagedWounds - 1) * 5) then {
_stitchedWounds pushBack (_bandagedWounds deleteAt 0);
_patient setVariable [QEGVAR(medical,bandagedWounds), _bandagedWounds, true];
_patient setVariable [QEGVAR(medical,stitchedWounds), _stitchedWounds, true];
};
true

View File

@ -0,0 +1,33 @@
#include "script_component.hpp"
/*
* Author: Glowbal, mharis001
* Applies a tourniquet to the patient on the given body part.
*
* Arguments:
* 0: Medic <OBJECT>
* 1: Patient <OBJECT>
* 2: Body Part <STRING>
* 3: Treatment (not used) <STRING>
* 4: Item User (not used) <OBJECT>
* 5: Used Item <STRING>
*
* Return Value:
* None
*
* Example:
* [player, cursorObject, "LeftLeg", "", objNull, "ACE_tourniquet"] call ace_medical_treatment_fnc_tourniquet
*
* Public: No
*/
params ["_medic", "_patient", "_bodyPart", "", "", "_usedItem"];
// Exit if there is a tourniquet already applied to body part
if ([_patient, _bodyPart] call FUNC(hasTourniquetAppliedTo)) exitWith {
["There is already a tourniquet on this body part!", 1.5] call EFUNC(common,displayTextStructured); // todo: localize
};
[_patient, _usedItem] call FUNC(addToTraigeCard);
[_patient, "activity", LSTRING(Activity_appliedTourniquet), [[_medic, false, true] call EFUNC(common,getName)]] call FUNC(addToLog);
[QGVAR(tourniquetLocal), [_patient, _bodyPart], _patient] call CBA_fnc_targetEvent;

View File

@ -0,0 +1,25 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Local callback for applying a tourniquet to a patient.
*
* Arguments:
* 0: Patient <OBJECT>
* 1: Body Part <STRING>
*
* Return Value:
* None
*
* Example:
* [player, "LeftLeg"] call ace_medical_treatment_fnc_tourniquetLocal
*
* Public: No
*/
params ["_patient", "_bodyPart"];
private _partIndex = ALL_BODY_PARTS find toLower _bodyPart;
private _tourniquets = GET_TOURNIQUETS(_patient);
_tourniquets set [_partIndex, CBA_missionTime];
_patient setVariable [VAR_TOURNIQUET, _tourniquets, true];

View File

@ -0,0 +1,55 @@
#include "script_component.hpp"
/*
* Author: Glowbal, mharis001
* Removes the tourniquet from the patient on the given body part.
*
* Arguments:
* 0: Medic <OBJECT>
* 1: Patient <OBJECT>
* 2: Body Part <STRING>
*
* Return Value:
* None
*
* Example:
* [player, cursorObject, "LeftLeg"] call ace_medical_treatment_fnc_tourniquetRemove
*
* Public: No
*/
params ["_medic", "_patient", "_bodyPart"];
// Remove tourniquet from body part, exit if no tourniquet applied
private _partIndex = ALL_BODY_PARTS find toLower _bodyPart;
private _tourniquets = GET_TOURNIQUETS(_patient);
if (_tourniquets select _partIndex == 0) exitWith {
[LSTRING(noTourniquetOnBodyPart), 1.5] call EFUNC(common,displayTextStructured);
};
_tourniquets set [_partIndex, 0];
_patient setVariable [VAR_TOURNIQUET, _tourniquets, true];
// Add tourniquet item to medic's inventory
// todo: should there be a setting to select who receives the removed tourniquet?
[_medic, "ACE_tourniquet", true] call EFUNC(common,addToInventory);
// Handle occluded medications that were blocked due to tourniquet
private _occludedMedications = _patient getVariable [QEGVAR(medical,occludedMedications), []];
private _arrayModified = false;
{
_x params ["_bodyPartN", "_medication"];
if (_partIndex == _bodyPartN) then {
[QGVAR(medicationLocal), [_patient, _bodyPart, _medication], _patient] call CBA_fnc_targetEvent;
_occludedMedications set [_forEachIndex, []];
_arrayModified = true;
};
} forEach _occludedMedications;
if (_arrayModified) then {
_occludedMedications = _occludedMedications - [[]];
_patient setVariable [QEGVAR(medical,occludedMedications), _occludedMedications, true];
};

View File

@ -1,199 +1,147 @@
#include "script_component.hpp"
/*
* Author: Glowbal, KoffeinFlummi
* Starts the treatment process
* Author: Glowbal, KoffeinFlummi, mharis001
* Starts the treatment process.
*
* Arguments:
* 0: The medic <OBJECT>
* 1: The patient <OBJECT>
* 2: Body part <STRING>
* 3: Treatment class name <STRING>
* 0: Medic <OBJECT>
* 1: Patient <OBJECT>
* 2: Body Part <STRING>
* 3: Treatment <STRING>
*
* Return Value:
* Succesful treatment started <BOOL>
* Treatment Started <BOOL>
*
* Example:
* [player, cursorObject, "Head", "BasicBandage"] call ace_medical_treatment_fnc_treatment
*
* Public: No
*/
params ["_caller", "_target", "_bodyPart", "_className"];
params ["_medic", "_patient", "_bodyPart", "_classname"];
// if the cursorMenu is open, the loading bar will fail. If we execute the function one frame later, it will work fine
// Delay by a frame if cursor menu is open to prevent progress bar failing
if (uiNamespace getVariable [QEGVAR(interact_menu,cursorMenuOpened), false]) exitWith {
[DFUNC(treatment), _this] call CBA_fnc_execNextFrame;
[FUNC(treatment), _this] call CBA_fnc_execNextFrame;
};
if !([_caller, _target, _bodyPart, _className] call FUNC(canTreat)) exitWith {false};
if !(_this call FUNC(canTreat)) exitWith {false};
private _config = configFile >> QGVAR(Actions) >> _className;
private _isSelf = _caller isEqualTo _target;
private _config = configFile >> QGVAR(actions) >> _classname;
// handle items
private _items = getArray (_config >> "items");
// Get treatment time from config, exit if treatment time is zero
// Supports number config entries and string entries of code or missionNamespace variables
private _treatmentTime = 0;
private _consumeItems = 0;
if (isText (_config >> "treatmentTime")) then {
_treatmentTime = getText (_config >> "treatmentTime");
if (isNumber (_config >> "itemConsumed")) then {
_consumeItems = getNumber (_config >> "itemConsumed");
} else {
if (isText (_config >> "itemConsumed")) then {
_consumeItems = missionNamespace getVariable [getText (_config >> "itemConsumed"), 0];
if (isNil _treatmentTime) then {
_treatmentTime = compile _treatmentTime;
} else {
_treatmentTime = missionNamespace getVariable _treatmentTime;
};
};
private _usersOfItems = [];
if (_consumeItems > 0) then {
_usersOfItems = ([_caller, _target, _items] call FUNC(useItems)) select 1;
};
// parse the config for the progress callback
private _callbackProgress = getText (_config >> "callbackProgress");
if (_callbackProgress isEqualTo "") then {
_callbackProgress = "true";
};
if (isNil _callbackProgress) then {
_callbackProgress = compile _callbackProgress;
if (_treatmentTime isEqualType {}) then {
_treatmentTime = call _treatmentTime;
};
} else {
_callbackProgress = missionNamespace getVariable _callbackProgress;
_treatmentTime = getNumber (_config >> "treatmentTime");
};
// play animation
private _callerAnim = if (_isSelf) then {
getText (_config >> ["animationCallerSelf", "animationCallerSelfProne"] select (stance _caller == "PRONE"));
if (_treatmentTime == 0) exitWith {false};
// Consume one of the treatment items if needed
// Store item user so that used item can be returned on failure
private _userAndItem = if (GET_NUMBER_ENTRY(_config >> "consumeItem") == 1) then {
[_medic, _patient, getArray (_config >> "items")] call FUNC(useItem);
} else {
getText (_config >> ["animationCaller", "animationCallerProne"] select (stance _caller == "PRONE"));
[objNull, ""]; // Treatment does not require items to be consumed
};
_caller setVariable [QGVAR(selectedWeaponOnTreatment), weaponState _caller];
_userAndItem params ["_itemUser", "_usedItem"];
private _wpn = ["non", "rfl", "lnr", "pst"] param [["", primaryWeapon _caller, secondaryWeapon _caller, handgunWeapon _caller] find currentWeapon _caller, "non"];
_callerAnim = [_callerAnim, "[wpn]", _wpn] call CBA_fnc_replace;
// this one is missing
if (_callerAnim == "AinvPknlMstpSlayWlnrDnon_medic") then {
_callerAnim = "AinvPknlMstpSlayWlnrDnon_medicOther";
// Get treatment animation for the medic
private _medicAnim = if (_medic isEqualTo _patient) then {
getText (_config >> ["animationMedicSelf", "animationMedicSelfProne"] select (stance _medic == "PRONE"));
} else {
getText (_config >> ["animationMedic", "animationMedicProne"] select (stance _medic == "PRONE"));
};
private _animDuration = GVAR(animDurations) getVariable _callerAnim;
_medic setVariable [QGVAR(selectedWeaponOnTreatment), weaponState _medic];
// these animations have transitions that take a bit longer...
if (weaponLowered _caller) then {
// Adjust animation based on the current weapon of the medic
private _wpn = ["non", "rfl", "lnr", "pst"] param [["", primaryWeapon _medic, secondaryWeapon _medic, handgunWeapon _medic] find currentWeapon _medic, "non"];
_medicAnim = [_medicAnim, "[wpn]", _wpn] call CBA_fnc_replace;
// This animation is missing, use alternative
if (_medicAnim == "AinvPknlMstpSlayWlnrDnon_medic") then {
_medicAnim = "AinvPknlMstpSlayWlnrDnon_medicOther";
};
// Determine the animation length
private _animDuration = GVAR(animDurations) getVariable _medicAnim;
// These animations have transitions that take a bit longer...
if (weaponLowered _medic) then {
_animDuration = _animDuration + 0.5;
// fix problems with lowered weapon transitions by raising the weapon first
if (currentWeapon _caller != "" && {_callerAnim != ""}) then {
_caller action ["WeaponInHand", _caller];
// Fix problems with lowered weapon transitions by raising the weapon first
if (currentWeapon _medic != "" && {_medicAnim != ""}) then {
_medic action ["WeaponInHand", _medic];
};
};
if (binocular _caller != "" && {binocular _caller == currentWeapon _caller}) then {
_animDuration = _animDuration + 1.0;
if (binocular _medic != "" && {binocular _medic == currentWeapon _medic}) then {
_animDuration = _animDuration + 1;
};
if (vehicle _caller == _caller && {_callerAnim != ""}) then {
// Play treatment animation for medic and determine the ending animation
if (vehicle _medic == _medic && {_medicAnim != ""}) then {
private _endInAnim = "AmovP[pos]MstpS[stn]W[wpn]Dnon";
private _pos = ["knl", "pne"] select (stance _caller == "PRONE");
private _pos = ["knl", "pne"] select (stance _medic == "PRONE");
private _stn = "non";
if (_wpn != "non") then {
_stn = ["ras", "low"] select (weaponLowered _caller);
_stn = ["ras", "low"] select (weaponLowered _medic);
};
_endInAnim = [_endInAnim, "[pos]", _pos] call CBA_fnc_replace;
_endInAnim = [_endInAnim, "[stn]", _stn] call CBA_fnc_replace;
_endInAnim = [_endInAnim, "[wpn]", _wpn] call CBA_fnc_replace;
TRACE_1("",_endInAnim);
[_caller, _callerAnim] call EFUNC(common,doAnimation);
[_caller, _endInAnim] call EFUNC(common,doAnimation);
_caller setVariable [QGVAR(endInAnim), _endInAnim];
[_medic, _medicAnim] call EFUNC(common,doAnimation);
[_medic, _endInAnim] call EFUNC(common,doAnimation);
_medic setVariable [QGVAR(endInAnim), _endInAnim];
// Speed up animation based on treatment time
[QEGVAR(common,setAnimSpeedCoef), [_medic, _animDuration / _treatmentTime]] call CBA_fnc_globalEvent;
};
// get treatment time from config - also supports variables and code expressions
private _treatmentTime = 0;
if (isNumber (_config >> "treatmentTime")) then {
_treatmentTime = getNumber (_config >> "treatmentTime");
} else {
if (isText (_config >> "treatmentTime")) then {
_treatmentTime = getText (_config >> "treatmentTime");
if (isNil _treatmentTime) then {
_treatmentTime = compile _treatmentTime;
} else {
_treatmentTime = missionNamespace getVariable _treatmentTime;
};
if !(_treatmentTime isEqualType 0) then {
_treatmentTime = call _treatmentTime;
};
};
};
TRACE_1("",_treatmentTime);
if (_treatmentTime == 0) exitWith { false };
// speed up animation depending on treatment time
if (!isNil "_animDuration") then {
[QEGVAR(common,setAnimSpeedCoef), [_caller, _animDuration / _treatmentTime]] call CBA_fnc_globalEvent;
TRACE_2("",_animDuration,_treatmentTime);
};
// play sound
// Play a random treatment sound globally if defined
if (isArray (_config >> "sounds")) then {
selectRandom getArray (_config >> "sounds") params ["_file", ["_volume", 1], ["_pitch", 1], ["_distance", 0]];
TRACE_4("playSound3D",_file,_volume,_pitch,_distance);
playSound3D [
_file,
objNull,
false,
getPosASL _caller,
_volume,
_pitch,
_distance
];
selectRandom getArray (_config >> "sounds") params ["_file", ["_volume", 1], ["_pitch", 1], ["_distance", 10]];
playSound3D [_file, objNull, false, getPosASL _medic, _volume, _pitch, _distance];
};
private _startCallback = getText (_config >> "callbackStart");
if (isNil _startCallback) then {
_startCallback = compile _startCallback;
} else {
_startCallback = missionNamespace getVariable _startCallback;
GET_FUNCTION(_callbackStart,_config >> "callbackStart");
GET_FUNCTION(_callbackProgress,_config >> "callbackProgress");
if (_callbackProgress isEqualTo {}) then {
_callbackProgress = {true};
};
if !(_startCallback isEqualType {}) then {
_startCallback = {TRACE_1("startCallback was NOT code",_startCallback)};
};
[_medic, _patient, _bodyPart, _classname, _itemUser, _usedItem] call _callbackStart;
[_caller, _target, _bodyPart, _className, _items, _usersOfItems] call _startCallback;
// start treatment
[
_treatmentTime,
[_caller, _target, _bodyPart, _className, _items, _usersOfItems],
DFUNC(treatment_success),
DFUNC(treatment_failure),
[_medic, _patient, _bodyPart, _classname, _itemUser, _usedItem],
FUNC(treatmentSuccess),
FUNC(treatmentFailure),
getText (_config >> "displayNameProgress"),
_callbackProgress,
["isnotinside"]
["isNotInside"]
] call EFUNC(common,progressBar);
// display icon
private _iconDisplayed = getText (_config >> "actionIconPath");
if (_iconDisplayed != "") then {
[QGVAR(treatmentActionIcon), true, _iconDisplayed, [1,1,1,1], getNumber (_config >> "actionIconDisplayTime")] call EFUNC(common,displayIcon);
};
// handle display of text/hints
private _displayText = getText (_config >> ["displayTextOther", "displayTextSelf"] select _isSelf);
if (_displayText != "") then {
[QEGVAR(common,displayTextStructured), [[_displayText, _caller call EFUNC(common,getName), _target call EFUNC(common,getName)], 1.5, _caller], _caller] call CBA_fnc_targetEvent;
};
true

View File

@ -1,26 +0,0 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Bandage treatment callback
*
* Arguments:
* 0: The medic <OBJECT>
* 1: The patient <OBJECT>
* 2: Body part <STRING>
* 3: Treatment class name <STRING>
* 4: Item <STRING>
*
* Return Value:
* Succesful treatment started <BOOL>
*
* Public: No
*/
params ["_caller", "_target", "_bodyPart", "_className", "_items"];
[_target, "activity", ELSTRING(medical_treatment,Activity_bandagedPatient), [[_caller, false, true] call EFUNC(common,getName)]] call FUNC(addToLog);
[_target, "activity_view", ELSTRING(medical_treatment,Activity_bandagedPatient), [[_caller, false, true] call EFUNC(common,getName)]] call FUNC(addToLog); // TODO expand message
[QGVAR(treatmentBandageLocal), [_target, _className, _bodyPart], _target] call CBA_fnc_targetEvent;
true

View File

@ -0,0 +1,46 @@
#include "script_component.hpp"
/*
* Author: KoffeinFlummi, Glowbal, mharis001
* Handles treatment process failure.
*
* Arguments:
* 0: Arguments <ARRAY>
* 0: Medic <OBJECT>
* 1: Patient <OBJECT>
* 2: Body Part <STRING>
* 3: Treatment <STRING>
* 4: Item User <OBJECT>
* 5: Used Item <STRING>
*
* Return Value:
* None
*
* Public: No
*/
params ["_args"];
_args params ["_medic", "_patient", "_bodyPart", "_classname", "_itemUser", "_usedItem"];
// Return used item to user (if used)
if (!isNull _itemUser) then {
[_itemUser, _usedItem] call EFUNC(common,addToInventory);
};
// Switch medic to end animation immediately
private _endInAnim = _medic getVariable QGVAR(endInAnim);
if (!isNil "_endInAnim") then {
if (animationState _medic != _endInAnim) then {
[_medic, _endInAnim, 2] call EFUNC(common,doAnimation);
};
_medic setVariable [QGVAR(endInAnim), nil];
};
// Reset medic animation speed coefficient
[QEGVAR(common,setAnimSpeedCoef), [_medic, 1]] call CBA_fnc_globalEvent;
// Call treatment specific failure callback
GET_FUNCTION(_callbackFailure,configFile >> QGVAR(actions) >> _classname >> "callbackFailure");
_args call _callbackFailure;

View File

@ -1,31 +0,0 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Patient IV Treatment callback
*
* Arguments:
* 0: The medic <OBJECT>
* 1: The patient <OBJECT>
* 2: Body part <STRING>
* 3: Treatment class name <STRING>
* 4: Item <STRING>
*
* Return Value:
* Succesful treatment started <BOOL>
*
* Public: No
*/
params ["_caller", "_target", "_bodyPart", "_className", "_items"];
if (_items isEqualTo []) exitWith {false};
_items params ["_removeItem"];
[QGVAR(treatmentIVLocal), [_target, _className, _bodyPart], _target] call CBA_fnc_targetEvent;
[_target, _removeItem] call FUNC(addToTriageCard);
[_target, "activity", ELSTRING(medical_treatment,Activity_gaveIV), [[_caller, false, true] call EFUNC(common,getName)]] call FUNC(addToLog);
[_target, "activity_view", ELSTRING(medical_treatment,Activity_gaveIV), [[_caller, false, true] call EFUNC(common,getName)]] call FUNC(addToLog); // TODO expand message
true

View File

@ -1,48 +0,0 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* IV Treatment local callback
*
* Arguments:
* 0: The patient <OBJECT>
* 1: Treatment class name <STRING>
* 2: Body part <STRING>
*
* Return Value:
* None
*
* Public: No
*/
params ["_target", "_treatmentClassname", "_bodyPart"];
private _partIndex = ALL_BODY_PARTS find toLower _bodyPart;
if (_partIndex < 0) exitWith { false };
private _bloodVolume = GET_BLOOD_VOLUME(_target);
if (_bloodVolume >= DEFAULT_BLOOD_VOLUME) exitWith {};
// Find the proper attributes for the used IV
private _config = configFile >> QUOTE(ADDON) >> "IV";
private _volumeAdded = getNumber (_config >> "volume");
private _type = getText (_config >> "type");
if (isClass (_config >> _treatmentClassname)) then {
_config = _config >> _treatmentClassname;
if (isNumber (_config >> "volume")) then {
_volumeAdded = getNumber (_config >> "volume");
};
if (isText (_config >> "type")) then {
_type = getText (_config >> "type");
};
} else {
ERROR("IV Treatment Classname not found");
};
private _bloodBags = _target getVariable [QEGVAR(medical,ivBags), []];
_bloodBags pushBack [_volumeAdded, _type, _partIndex];
_target setVariable [QEGVAR(medical,ivBags), _bloodBags, true];

View File

@ -1,34 +0,0 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* IV Treatment callback
*
* Arguments:
* 0: The medic <OBJECT>
* 1: The patient <OBJECT>
* 2: Body part <STRING>
* 3: Treatment class name <STRING>
* 4: Items Used <ARRAY>
*
* Return Value:
* Succesful treatment started <BOOL>
*
* Public: No
*/
params ["_caller", "_target", "_bodyPart", "_className", "_items"];
TRACE_5("params",_caller,_target,_bodyPart,_className,_items);
private _partIndex = ALL_BODY_PARTS find toLower _bodyPart;
[QGVAR(treatmentMedicationLocal), [_target, _className, _partIndex], _target] call CBA_fnc_targetEvent;
{
if (_x != "") then {
[_target, _x] call FUNC(addToTriageCard);
[_target, "activity", ELSTRING(medical_treatment,Activity_usedItem), [[_caller, false, true] call EFUNC(common,getName), getText (configFile >> "CfgWeapons" >> _x >> "displayName")]] call FUNC(addToLog);
[_target, "activity_view", ELSTRING(medical_treatment,Activity_usedItem), [[_caller, false, true] call EFUNC(common,getName), getText (configFile >> "CfgWeapons" >> _x >> "displayName")]] call FUNC(addToLog);
};
} forEach _items;
true

View File

@ -1,107 +0,0 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Handles the medication given to a patient.
*
* Arguments:
* 0: The patient <OBJECT>
* 1: Treatment class name <STRING>
* 2: Injection Site Part Number <NUMBER>
*
* Return Value:
* Succesful treatment started <BOOL>
*
* Public: No
*/
#define MORPHINE_PAIN_SUPPRESSION 0.6
params ["_target", "_className", "_partIndex"];
TRACE_3("params",_target,_className,_partIndex);
if (!GVAR(advancedMedication)) exitWith {
TRACE_1("MedicalSettingAdvancedMedication is:", GVAR(advancedMedication));
if (_className == "Morphine") exitWith {
private _painSupress = GET_PAIN_SUPPRESS(_target);
_target setVariable [VAR_PAIN_SUPP, (_painSupress + MORPHINE_PAIN_SUPPRESSION) min 1, true];
};
if (_className == "Epinephrine") exitWith {
[QEGVAR(medical,WakeUp), _target] call CBA_fnc_localEvent;
};
};
TRACE_1("Running treatmentMedicationLocal with Advanced configuration for", _target);
private _tourniquets = GET_TOURNIQUETS(_target);
if (_tourniquets select _partIndex > 0) exitWith {
TRACE_1("unit has tourniquets blocking blood flow on injection site",_tourniquets);
private _delayedMedications = _target getVariable [QEGVAR(medical,occludedMedications), []];
_delayedMedications pushBack _this;
_target setVariable [QEGVAR(medical,occludedMedications), _delayedMedications, true];
true
};
// We have added a new dose of this medication to our system, so let's increase it
private _varName = format [QGVAR(%1_inSystem), _className];
private _currentInSystem = _target getVariable [_varName, 0];
_target setVariable [_varName, _currentInSystem + 1];
// Find the proper attributes for the used medication
private _medicationConfig = configFile >> QUOTE(ADDON) >> "Medication";
private _painReduce = getNumber (_medicationConfig >> "painReduce");
private _hrIncreaseLow = getArray (_medicationConfig >> "hrIncreaseLow");
private _hrIncreaseNorm = getArray (_medicationConfig >> "hrIncreaseNormal");
private _hrIncreaseHigh = getArray (_medicationConfig >> "hrIncreaseHigh");
private _timeInSystem = getNumber (_medicationConfig >> "timeInSystem");
private _timeTillMaxEffect = getNumber (_medicationConfig >> "timeTillMaxEffect");
private _maxDose = getNumber (_medicationConfig >> "maxDose");
private _viscosityChange = getNumber (_medicationConfig >> "viscosityChange");
private _inCompatableMedication = [];
if (isClass (_medicationConfig >> _className)) then {
_medicationConfig = _medicationConfig >> _className;
if (isNumber (_medicationConfig >> "painReduce")) then { _painReduce = getNumber (_medicationConfig >> "painReduce");};
if (isArray (_medicationConfig >> "hrIncreaseLow")) then { _hrIncreaseLow = getArray (_medicationConfig >> "hrIncreaseLow"); };
if (isArray (_medicationConfig >> "hrIncreaseNormal")) then { _hrIncreaseNorm = getArray (_medicationConfig >> "hrIncreaseNormal"); };
if (isArray (_medicationConfig >> "hrIncreaseHigh")) then { _hrIncreaseHigh = getArray (_medicationConfig >> "hrIncreaseHigh"); };
if (isNumber (_medicationConfig >> "timeInSystem")) then { _timeInSystem = getNumber (_medicationConfig >> "timeInSystem"); };
if (isNumber (_medicationConfig >> "timeTillMaxEffect")) then { _timeTillMaxEffect = getNumber (_medicationConfig >> "timeTillMaxEffect"); };
if (isNumber (_medicationConfig >> "maxDose")) then { _maxDose = getNumber (_medicationConfig >> "maxDose"); };
if (isArray (_medicationConfig >> "inCompatableMedication")) then { _inCompatableMedication = getArray (_medicationConfig >> "inCompatableMedication"); };
if (isNumber (_medicationConfig >> "viscosityChange")) then { _viscosityChange = getNumber (_medicationConfig >> "viscosityChange"); };
};
if (alive _target) then {
private _heartRate = GET_HEART_RATE(_target);
private _hrIncrease = [_hrIncreaseLow, _hrIncreaseNorm, _hrIncreaseHigh] select (floor ((0 max _heartRate min 110) / 55));
_hrIncrease params ["_minIncrease", "_maxIncrease"];
private _heartRateChange = _minIncrease + random (_maxIncrease - _minIncrease);
// Adjust the heart rate based upon config entry
if (_heartRateChange != 0) then {
TRACE_1("heartRateChange", _heartRateChange);
private _adjustments = _target getVariable [VAR_HEART_RATE_ADJ,[]];
_adjustments pushBack [_heartRateChange, _timeTillMaxEffect, _timeInSystem, 0];
_target setVariable [VAR_HEART_RATE_ADJ, _adjustments];
};
// Adjust the pain suppression based upon config entry
if (_painReduce > 0) then {
TRACE_1("painReduce", _painReduce);
private _adjustments = _target getVariable [VAR_PAIN_SUPP_ADJ,[]];
_adjustments pushBack [_painReduce, _timeTillMaxEffect, _timeInSystem, 0];
_target setVariable [VAR_PAIN_SUPP_ADJ, _adjustments];
};
// Adjust the peripheral resistance based upon config entry
if (_viscosityChange != 0) then {
TRACE_1("viscosityChange", _viscosityChange);
private _adjustments = _target getVariable [VAR_PERIPH_RES_ADJ,[]];
_adjustments pushBack [_viscosityChange, _timeTillMaxEffect, _timeInSystem, 0];
_target setVariable [VAR_PERIPH_RES_ADJ, _adjustments];
};
};
true

View File

@ -0,0 +1,47 @@
#include "script_component.hpp"
/*
* Author: KoffeinFlummi, Glowbal, mharis001
* Handles treatment process success.
*
* Arguments:
* 0: Arguments <ARRAY>
* 0: Medic <OBJECT>
* 1: Patient <OBJECT>
* 2: Body Part <STRING>
* 3: Treatment <STRING>
* 4: Item User <OBJECT>
* 5: Used Item <STRING>
*
* Return Value:
* None
*
* Public: No
*/
params ["_args"];
_args params ["_medic", "_patient", "_bodyPart", "_classname"];
// Switch medic to end animation immediately
private _endInAnim = _medic getVariable QGVAR(endInAnim);
if (!isNil "_endInAnim") then {
if (animationState _medic != _endInAnim) then {
[_medic, _endInAnim, 2] call EFUNC(common,doAnimation);
};
_medic setVariable [QGVAR(endInAnim), nil];
};
// Reset medic animation speed coefficient
[QEGVAR(common,setAnimSpeedCoef), [_medic, 1]] call CBA_fnc_globalEvent;
// Call treatment specific success callback
GET_FUNCTION(_callbackSuccess,configFile >> QGVAR(actions) >> _classname >> "callbackSuccess");
_args call _callbackSuccess;
// Call litter creation handler
_args call FUNC(createLitter);
// Emit local event for medical API
["ace_treatmentSucceded", [_medic, _patient, _bodyPart, _classname]] call CBA_fnc_localEvent;

View File

@ -1,39 +0,0 @@
#include "script_component.hpp"
/*
* Author: BaerMitUmlaut
* Handles treatment via surgical kit per frame
*
* Arguments:
* 0: Arguments <ARRAY>
* 0: Caller <OBJECT>
* 1: Target <OBJECT>
* 1: Elapsed Time <NUMBER>
* 2: Total Time <NUMBER>
*
* Return Value:
* Succesful treatment started <BOOL>
*
* Example:
* [[bob, kevin], 5, 5] call ace_medical_treatment_fnc_treatmentAdvanced_surgicalKit_onProgress
*
* Public: No
*/
params ["_args", "_elapsedTime", "_totalTime"];
_args params ["_caller", "_target"];
private _bandagedWounds = _target getVariable [QEGVAR(medical,bandagedWounds), []];
private _stitchedWounds = _target getVariable [QEGVAR(medical,stitchedWounds), []];
//In case two people stitch up one patient and the last wound has already been closed we can stop already
if (count _bandagedWounds == 0) exitWith { false };
//Has enough time elapsed that we can close another wound?
if (_totalTime - _elapsedTime <= (count _bandagedWounds - 1) * 5) then {
private _treatedWound = _bandagedWounds deleteAt 0;
_stitchedWounds pushBack _treatedWound;
_target setVariable [QEGVAR(medical,bandagedWounds), _bandagedWounds, true];
_target setVariable [QEGVAR(medical,stitchedWounds), _stitchedWounds, true];
};
true

View File

@ -1,40 +0,0 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Apply a tourniquet to the patient
*
* Arguments:
* 0: The medic <OBJECT>
* 1: The patient <OBJECT>
* 2: Body part <STRING>
* 3: Treatment class name <STRING>
*
* Return Value:
* Succesful treatment started <BOOL>
*
* Public: No
*/
params ["_caller", "_target", "_bodyPart", "_className", "_items"];
if (count _items == 0) exitWith {false};
private _partIndex = ALL_BODY_PARTS find toLower _bodyPart;
private _tourniquets = GET_TOURNIQUETS(_target);
if (_tourniquets select _partIndex > 0) exitWith {
private _output = "There is already a tourniquet on this body part!"; // TODO localization
[QEGVAR(common,displayTextStructured), [_output, 1.5, _caller], _caller] call CBA_fnc_targetEvent;
false
};
private _removeItem = _items select 0;
[QGVAR(treatmentTourniquetLocal), [_target, _removeItem, _bodyPart], _target] call CBA_fnc_targetEvent;
[_target, _removeItem] call FUNC(addToTriageCard);
[_target, "activity", ELSTRING(medical_treatment,Activity_appliedTourniquet), [[_caller, false, true] call EFUNC(common,getName)]] call FUNC(addToLog);
[_target, "activity_view", ELSTRING(medical_treatment,Activity_appliedTourniquet), [[_caller, false, true] call EFUNC(common,getName)]] call FUNC(addToLog); // TODO expand message
true

View File

@ -1,26 +0,0 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Apply a tourniquet to the patient, local callback.
*
* Arguments:
* 0: The patient <OBJECT>
* 1: Item used classname <STRING>
* 2: Body part <STRING>
*
* Return Value:
* None
*
* Public: No
*/
params ["_target", "_tourniquetItem", "_bodyPart"];
private _partIndex = ALL_BODY_PARTS find toLower _bodyPart;
// Place a tourniquet on the bodypart
private _tourniquets = GET_TOURNIQUETS(_target);
_tourniquets set [_partIndex, CBA_missionTime];
_target setVariable [VAR_TOURNIQUET, _tourniquets, true];

View File

@ -1,54 +0,0 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Action for removing the tourniquet on specified selection
*
* Arguments:
* 0: The medic <OBJECT>
* 1: The patient <OBJECT>
* 2: Body part <STRING>
*
* Return Value:
* None
*
* Public: No
*/
params ["_caller", "_target", "_bodyPart"];
TRACE_3("params",_caller,_target,_bodyPart);
// grab the required data
private _partIndex = ALL_BODY_PARTS find toLower _bodyPart;
private _tourniquets = GET_TOURNIQUETS(_target);
// Check if there is a tourniquet on this bodypart
if (_tourniquets select _partIndex == 0) exitWith {
[QEGVAR(common,displayTextStructured), [ELSTRING(medical_treatment,noTourniquetOnBodyPart), 1.5, _caller], [_caller]] call CBA_fnc_targetEvent;
};
// Removing the tourniquet
_tourniquets set [_partIndex, 0];
_target setVariable [VAR_TOURNIQUET, _tourniquets, true];
// Adding the tourniquet item to the caller
[_caller, "ACE_tourniquet", true] call CBA_fnc_addItem;
//Handle all injected medications now that blood is flowing
private _delayedMedications = _target getVariable [QEGVAR(medical,occludedMedications), []];
private _updatedArray = false;
TRACE_2("meds",_partIndex,_delayedMedications);
{
_x params ["", "", "_medPartNum"];
if (_partIndex == _medPartNum) then {
TRACE_1("delayed medication call after tourniquet removeal",_x);
[QGVAR(treatmentMedicationLocal), _x, _target] call CBA_fnc_targetEvent;
_delayedMedications set [_forEachIndex, -1];
_updatedArray = true;
};
} forEach _delayedMedications;
if (_updatedArray) then {
_delayedMedications = _delayedMedications - [-1];
_target setVariable [QEGVAR(medical,occludedMedications), _delayedMedications, true];
};

View File

@ -1,56 +0,0 @@
#include "script_component.hpp"
/*
* Author: KoffeinFlummi, Glowbal
* Callback when the treatment fails
*
* Arguments:
* 0: The medic <OBJECT>
* 1: The patient <OBJECT>
* 2: Body part <STRING>
* 3: Treatment class name <STRING>
* 4: Items available <ARRAY<STRING>>
*
* Return Value:
* None
*
* Public: No
*/
params ["_args"];
_args params ["_caller", "_target", "_bodyPart", "_className", "_items", "_usersOfItems"];
// switch to end anim immediately
private _endInAnim = _caller getVariable QGVAR(endInAnim);
if (!isNil "_endInAnim") then {
if (animationState _caller != _endInAnim) then {
[_caller, _endInAnim, 2] call EFUNC(common,doAnimation);
};
_caller setVariable [QGVAR(endInAnim), nil];
TRACE_1("abort",_endInAnim);
};
// reset sped up animations
[QEGVAR(common,setAnimSpeedCoef), [_caller, 1]] call CBA_fnc_globalEvent;
{
_x params ["_unit", "_item"];
_unit addItem _item;
} forEach _usersOfItems;
// Record specific callback
private _config = configFile >> QGVAR(Actions) >> _className;
private _callback = getText (_config >> "callbackFailure");
if (isNil _callback) then {
_callback = compile _callback;
} else {
_callback = missionNamespace getVariable _callback;
};
if !(_callback isEqualType {}) then {
_callback = {TRACE_1("callback was NOT code",_callback)};
};
_args call _callback;

View File

@ -1,71 +0,0 @@
#include "script_component.hpp"
/*
* Author: KoffeinFlummi, Glowbal
* Callback when the treatment is completed
*
* Arguments:
* 0: The medic <OBJECT>
* 1: The patient <OBJECT>
* 2: Body part <STRING>
* 3: Treatment class name <STRING>
* 4: Items available <ARRAY<STRING>>
*
* Return Value:
* None
*
* Public: No
*/
params ["_args"];
_args params ["_caller", "_target", "_bodyPart", "_className", "_items", "_usersOfItems"];
// switch to end anim immediately
private _endInAnim = _caller getVariable QGVAR(endInAnim);
if (!isNil "_endInAnim") then {
if (animationState _caller != _endInAnim) then {
[_caller, _endInAnim, 2] call EFUNC(common,doAnimation);
};
_caller setVariable [QGVAR(endInAnim), nil];
TRACE_1("abort",_endInAnim);
};
// reset sped up animations
[QEGVAR(common,setAnimSpeedCoef), [_caller, 1]] call CBA_fnc_globalEvent;
// Record specific callback
private _config = configFile >> QGVAR(Actions) >> _className;
private _callback = getText (_config >> "callbackSuccess");
if (isNil _callback) then {
_callback = compile _callback;
} else {
_callback = missionNamespace getVariable _callback;
};
if !(_callback isEqualType {}) then {
_callback = {TRACE_1("callback was NOT code",_callback)};
};
//Get current blood loose on limb (for "bloody" litter)
private _bloodLossOnBodyPart = 0;
private _partIndex = (ALL_BODY_PARTS find toLower _bodyPart) max 0;
// Add all bleeding from wounds on selection
private _openWounds = _target getVariable [QEGVAR(medical,openWounds), []];
{
_x params ["", "", "_bodyPartN", "_amountOf", "_percentageOpen"];
if (_bodyPartN isEqualTo _partIndex) then {
_bloodLossOnBodyPart = _bloodLossOnBodyPart + (_amountOf * _percentageOpen);
};
} forEach _openWounds;
TRACE_1("advanced",_bloodLossOnBodyPart);
_args call _callback;
_args pushBack _bloodLossOnBodyPart;
_args call FUNC(litterCreate);
["ace_treatmentSucceded", [_caller, _target, _bodyPart, _className]] call CBA_fnc_localEvent;

View File

@ -1,45 +1,38 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Use Equipment if any is available. Priority: 1) Medic, 2) Patient. If in vehicle: 3) Crew
* Author: Glowbal, mharis001
* Uses one of the treatment items. Respects the priority defined by the allowSharedEquipment setting.
*
* Arguments:
* 0: Medic <OBJECT>
* 1: Patient <OBJECT>
* 2: Item <STRING>
* 2: Items <ARRAY>
*
* ReturnValue:
* 0: success <BOOL>
* 1: Unit <OBJECT>
* Return Value:
* User and Item <ARRAY>
*
* Example:
* [player, cursorObject, ["bandage"]] call ace_medical_treatment_fnc_useItems
*
* Public: No
*/
params ["_medic", "_patient", "_item"];
params ["_medic", "_patient", "_items"];
if (isNil QEGVAR(medical,setting_allowSharedEquipment)) then {
EGVAR(medical,setting_allowSharedEquipment) = true;
};
scopeName "Main";
if (EGVAR(medical,setting_allowSharedEquipment) && {[_patient, _item] call EFUNC(common,hasItem)}) exitWith {
["ace_useItem", [_patient, _item], _patient] call CBA_fnc_targetEvent;
[true, _patient]
};
private _useOrder = [[_patient, _medic], [_medic, _patient], [_medic]] select GVAR(allowSharedEquipment);
if ([_medic, _item] call EFUNC(common,hasItem)) exitWith {
["ace_useItem", [_medic, _item], _medic] call CBA_fnc_targetEvent;
[true, _medic]
};
{
private _unit = _x;
private _unitItems = _x call EFUNC(common,uniqueItems);
private _return = [false, objNull];
if (vehicle _medic != _medic && {vehicle _medic call FUNC(isMedicalVehicle)}) then {
{
if ([_medic, _x] call FUNC(canAccessMedicalEquipment) && {[_x, _item] call EFUNC(common,hasItem)}) exitWith {
["ace_useItem", [_x, _item], _x] call CBA_fnc_targetEvent;
_return = [true, _x];
if (_x in _unitItems) then {
_unit removeItem _x;
[_unit, _x] breakOut "Main";
};
} forEach crew vehicle _medic;
};
} forEach _items;
} forEach _useOrder;
_return
[objNull, ""]

View File

@ -1,50 +0,0 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Use Equipment items if any is available. Priority: 1) Medic, 2) Patient. If in vehicle: 3) Crew
*
* Arguments:
* 0: Medic <OBJECT>
* 1: Patient <OBJECT>
* 2: Items <ARRAY<STRING>>
*
* Return Value:
* 0: success <BOOL>
* 1: Unit <OBJECT>
*
* Example:
* [unit, patient, ["bandage"]] call ace_medical_treatment_fnc_useItems
*
* Public: No
*/
#define HAS_USED_ITEM(itemUsedInfo) (itemUsedInfo select 0)
#define GET_ITEM_USED_BY(itemUsedInfo) (itemUsedInfo select 1)
params ["_medic", "_patient", "_items"];
private _itemsUsedBy = [];
{
// handle a one of type use item
if (_x isEqualType []) then {
{
private _itemUsedInfo = [_medic, _patient, _x] call FUNC(useItem);
if (HAS_USED_ITEM(_itemUsedInfo)) exitWith {
_itemsUsedBy pushBack [GET_ITEM_USED_BY(_itemUsedInfo), _x];
};
} forEach _x;
};
// handle required item
if (_x isEqualType "") then {
private _itemUsedInfo = [_medic, _patient, _x] call FUNC(useItem);
if (HAS_USED_ITEM(_itemUsedInfo)) exitWith {
_itemsUsedBy pushBack [GET_ITEM_USED_BY(_itemUsedInfo), _x];
};
};
} forEach _items;
[count _items == count _itemsUsedBy, _itemsUsedBy];

View File

@ -1,206 +1,203 @@
// CBA Settings [ADDON: ace_medical_treatment]:
// todo: this setting just disables some treatment options, remove?
[
QGVAR(advancedDiagnose),
"CHECKBOX",
[LSTRING(AdvancedDiagnose_DisplayName), LSTRING(AdvancedDiagnose_Description)],
[ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)],
true,
true
] call CBA_settings_fnc_init;
[
QGVAR(advancedBandages),
"CHECKBOX",
[LSTRING(AdvancedBandages_DisplayName), LSTRING(AdvancedBandages_Description)],
[ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)],
true,
true
] call CBA_settings_fnc_init;
// todo: verify that this setting does not require a restart
// todo: this setting requires advanced bandages to be enabled, they should be independent
[
QGVAR(woundReopening),
"CHECKBOX",
[LSTRING(WoundReopening_DisplayName), LSTRING(WoundReopening_Description)],
[ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)],
true,
true
] call CBA_settings_fnc_init;
[
QGVAR(advancedMedication),
"CHECKBOX",
[LSTRING(AdvancedMedication_DisplayName), LSTRING(AdvancedMedication_Description)],
[ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)],
true,
true
] call CBA_settings_fnc_init;
// todo: should this setting differentiate between medical vehicles and facilities?
[
QGVAR(locationsBoostTraining),
"CHECKBOX",
[LSTRING(LocationsBoostTraining_DisplayName), LSTRING(LocationsBoostTraining_Description)],
[ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)],
false,
true
] call CBA_settings_fnc_init;
[
QGVAR(allowSelfIV),
"LIST",
[LSTRING(AllowSelfIV_DisplayName), LSTRING(AllowSelfIV_Description)],
[ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)],
[[0, 1], [ELSTRING(common,No), ELSTRING(common,Yes)], 0],
true
] call CBA_settings_fnc_init;
[
QGVAR(allowSharedEquipment),
"LIST",
[LSTRING(AllowSharedEquipment_DisplayName), LSTRING(AllowSharedEquipment_Description)],
[ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)],
[[0, 1, 2], [LSTRING(AllowSharedEquipment_PriorityPatient), LSTRING(AllowSharedEquipment_PriorityMedic), ELSTRING(common,No)], 0],
true
] call CBA_settings_fnc_init;
[
QGVAR(convertItems),
"LIST",
[LSTRING(ConvertItems_DisplayName), LSTRING(ConvertItems_Description)],
[ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)],
[[0, 1, 2], [ELSTRING(common,Enabled), LSTRING(ConvertItems_RemoveOnly), ELSTRING(common,Disabled)], 0],
true
] call CBA_settings_fnc_init;
[
QGVAR(medicEpinephrine),
"LIST",
[LSTRING(MedicEpinephrine_DisplayName), LSTRING(MedicEpinephrine_Description)],
[ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)],
[[0, 1, 2], [LSTRING(Anyone), LSTRING(Medics), LSTRING(Doctors)], 0],
true
] call CBA_settings_fnc_init;
[
QGVAR(locationEpinephrine),
"LIST",
[LSTRING(LocationEpinephrine_DisplayName), LSTRING(LocationEpinephrine_Description)],
[ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)],
[[0, 1, 2, 3, 4], [ELSTRING(common,Anywhere), ELSTRING(common,Vehicle), LSTRING(MedicalFacilities), LSTRING(VehiclesAndFacilities), ELSTRING(common,Disabled)], 0],
true
] call CBA_settings_fnc_init;
[
QGVAR(medicPAK),
"LIST",
[LSTRING(MedicPAK_DisplayName), LSTRING(MedicPAK_Description)],
[ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)],
[[0, 1, 2], [LSTRING(Anyone), LSTRING(Medics), LSTRING(Doctors)], 1],
true
] call CBA_settings_fnc_init;
[
QGVAR(locationPAK),
"LIST",
[LSTRING(LocationPAK_DisplayName), LSTRING(LocationPAK_Description)],
[ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)],
[[0, 1, 2, 3, 4], [ELSTRING(common,Anywhere), ELSTRING(common,Vehicle), LSTRING(MedicalFacilities), LSTRING(VehiclesAndFacilities), ELSTRING(common,Disabled)], 3],
true
] call CBA_settings_fnc_init;
[
QGVAR(consumePAK),
"LIST",
[LSTRING(ConsumePAK_DisplayName), LSTRING(ConsumePAK_Description)],
[ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)],
[[0, 1], [ELSTRING(common,No), ELSTRING(common,Yes)], 0],
true
] call CBA_settings_fnc_init;
[
QGVAR(medicSurgicalKit),
"LIST",
[LSTRING(MedicSurgicalKit_DisplayName), LSTRING(MedicSurgicalKit_Description)],
[ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)],
[[0, 1, 2], [LSTRING(Anyone), LSTRING(Medics), LSTRING(Doctors)], 1],
true
] call CBA_settings_fnc_init;
[
QGVAR(locationSurgicalKit),
"LIST",
[LSTRING(LocationSurgicalKit_DisplayName), LSTRING(LocationSurgicalKit_Description)],
[ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)],
[[0, 1, 2, 3, 4], [ELSTRING(common,Anywhere), ELSTRING(common,Vehicle), LSTRING(MedicalFacilities), LSTRING(VehiclesAndFacilities), ELSTRING(common,Disabled)], 2],
true
] call CBA_settings_fnc_init;
[
QGVAR(consumeSurgicalKit),
"LIST",
[LSTRING(ConsumeSurgicalKit_DisplayName), LSTRING(ConsumeSurgicalKit_Description)],
[ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)],
[[0, 1], [ELSTRING(common,No), ELSTRING(common,Yes)], 0],
true
] call CBA_settings_fnc_init;
[
QGVAR(allowLitterCreation),
"CHECKBOX",
[LSTRING(AllowLitterCreation_DisplayName), LSTRING(AllowLitterCreation_Description)],
[ELSTRING(medical,Category), LSTRING(SubCategory_Litter)],
true,
true
] call CBA_settings_fnc_init;
[
QGVAR(maxLitterObjects),
"LIST",
[LSTRING(MaxLitterObjects_DisplayName), LSTRING(MaxLitterObjects_Description)],
[ELSTRING(medical,Category), LSTRING(SubCategory_Litter)],
[[50, 100, 200, 300, 400, 500, 1000, 2000, 3000, 4000, 5000], [/* settings function will auto create names */], 5],
true
] call CBA_settings_fnc_init;
[
QGVAR(litterCleanUpDelay),
"SLIDER",
[LSTRING(LitterCleanUpDelay_DisplayName), LSTRING(LitterCleanUpDelay_Description)],
[ELSTRING(medical,Category), LSTRING(SubCategory_Litter)],
[-1, 3600, 600, 0],
true
] call CBA_settings_fnc_init;
/*
private _categoryArray = [LELSTRING(medical,Category_DisplayName), LLSTRING(subCategory)];
// todo: the strings for all three advanced bandages/medication/diagnose settings are terribly ambigious
[// todo: I don't like that wound reopening requires this setting to be enabled, they should be independent
QGVAR(advancedBandages), "CHECKBOX",
[LSTRING(advancedBandages_DisplayName), LSTRING(advancedBandages_Description)],
_categoryArray,
true, // default value
true, // isGlobal
{[QGVAR(advancedBandages), _this] call EFUNC(common,cbaSettings_settingChanged)},
true // Needs mission restart
] call CBA_settings_fnc_init;
[// todo: this setting just disables some treatment options, remove?
QGVAR(advancedDiagnose), "CHECKBOX",
[LSTRING(advancedDiagnose_DisplayName), LSTRING(advancedDiagnose_Description)],
_categoryArray,
true, // default value
true, // isGlobal
{[QGVAR(advancedDiagnose), _this] call EFUNC(common,cbaSettings_settingChanged)},
true // Needs mission restart
] call CBA_settings_fnc_init;
[
QGVAR(advancedMedication), "CHECKBOX",
[LSTRING(advancedMedication_DisplayName), LSTRING(advancedMedication_Description)],
_categoryArray,
true, // default value
true, // isGlobal
{[QGVAR(advancedMedication), _this] call EFUNC(common,cbaSettings_settingChanged)},
true // Needs mission restart
] call CBA_settings_fnc_init;
[
QGVAR(woundReopening), "CHECKBOX",
[LSTRING(woundReopening_DisplayName), LSTRING(woundReopening_Description)],
_categoryArray,
true, // default value
true, // isGlobal
{[QGVAR(woundReopening), _this] call EFUNC(common,cbaSettings_settingChanged)},
true // Needs mission restart
] call CBA_settings_fnc_init;
[
QGVAR(allowSelfIV), "LIST", // This setting is list because we want number for treatment config
[LSTRING(allowSelfIV_DisplayName), LSTRING(allowSelfIV_Description)],
_categoryArray,
[[0,1],["No","Yes"],0], // [values, titles, defaultIndex]
true, // isGlobal
{[QGVAR(allowSelfIV), _this] call EFUNC(common,cbaSettings_settingChanged)},
true // Needs mission restart
] call CBA_settings_fnc_init;
// Ported Settings:
[
QEGVAR(medical,convertItems), "LIST",
[LSTRING(convertItems_DisplayName), LSTRING(convertItems_Description)],
_categoryArray,
[[0,1,2],[LELSTRING(common,Enabled),LLSTRING(convertItems_remove),LELSTRING(common,Disabled)],0], // [values, titles, defaultIndex]
true, // isGlobal
{[QEGVAR(medical,convertItems), _this] call EFUNC(common,cbaSettings_settingChanged)},
true // Needs mission restart
] call CBA_settings_fnc_init;
[
QEGVAR(medical,allowLitterCreation), "CHECKBOX",
[LSTRING(allowLitterCreation), LSTRING(allowLitterCreation_Description)],
_categoryArray,
true, // default value
true, // isGlobal
{[QEGVAR(medical,allowLitterCreation), _this] call EFUNC(common,cbaSettings_settingChanged)},
true // Needs mission restart
] call CBA_settings_fnc_init;
[
QEGVAR(medical,CPRcreatesPulse), "CHECKBOX",
[LSTRING(CPRcreatesPulse), LSTRING(CPRcreatesPulse_Description)],
_categoryArray,
true, // default value
true, // isGlobal
true,
true,
{[QEGVAR(medical,CPRcreatesPulse), _this] call EFUNC(common,cbaSettings_settingChanged)},
true // Needs mission restart
] call CBA_settings_fnc_init;
[
QEGVAR(medical,litterCleanUpDelay), "SLIDER",
[LSTRING(litterCleanUpDelay), LSTRING(litterCleanUpDelay_Description)],
_categoryArray,
[-1,5000,0,1], // [min, max, default value, trailing decimals (-1 for whole numbers only)]
true, // isGlobal
{[QEGVAR(medical,litterCleanUpDelay), _this] call EFUNC(common,cbaSettings_settingChanged)},
true // Needs mission restart
] call CBA_settings_fnc_init;
[
QEGVAR(medical,litterSimulationDetail), "LIST",
[LSTRING(litterSimulationDetail), LSTRING(litterSimulationDetail_Description)],
_categoryArray,
[[0,1,2,3,4],["Off","Low","Medium","High","Ultra"],3], // [values, titles, defaultIndex]
true, // isGlobal
{[QEGVAR(medical,litterSimulationDetail), _this] call EFUNC(common,cbaSettings_settingChanged)},
true // Needs mission restart
] call CBA_settings_fnc_init;
[
QEGVAR(medical,increaseTrainingInLocations), "CHECKBOX",
[LSTRING(increaseTrainingInLocations_DisplayName), LSTRING(increaseTrainingInLocations_Description)],
_categoryArray,
false, // default value
true, // isGlobal
{[QEGVAR(medical,increaseTrainingInLocations), _this] call EFUNC(common,cbaSettings_settingChanged)},
true // Needs mission restart
true
] call CBA_settings_fnc_init;
[
QEGVAR(medical,PAKTime), "SLIDER",
[LSTRING(PAKTime), LSTRING(PAKTime_Description)],
_categoryArray,
[-1,5000,0,1], // [min, max, default value, trailing decimals (-1 for whole numbers only)]
true, // isGlobal
[-1,5000,0,1],
true,
{[QEGVAR(medical,PAKTime), _this] call EFUNC(common,cbaSettings_settingChanged)},
true // Needs mission restart
true
] call CBA_settings_fnc_init;
[
QEGVAR(medical,medicSetting_Epi), "LIST",
[LSTRING(medicSetting_Epi_DisplayName), LSTRING(medicSetting_Epi_Description)],
_categoryArray,
[[0,1,2],["Anyone","Medics only","Doctors only"],0], // [values, titles, defaultIndex]
true, // isGlobal
{[QEGVAR(medical,medicSetting_Epi), _this] call EFUNC(common,cbaSettings_settingChanged)},
true // Needs mission restart
] call CBA_settings_fnc_init;
[
QEGVAR(medical,medicSetting_PAK), "LIST",
[LSTRING(medicSetting_PAK_DisplayName), LSTRING(medicSetting_PAK_Description)],
_categoryArray,
[[0,1,2],["Anyone","Medics only","Doctors only"],0], // [values, titles, defaultIndex]
true, // isGlobal
{[QEGVAR(medical,medicSetting_PAK), _this] call EFUNC(common,cbaSettings_settingChanged)},
true // Needs mission restart
] call CBA_settings_fnc_init;
[
QEGVAR(medical,medicSetting_SurgicalKit), "LIST",
[LSTRING(MedicalSettings_medicSetting_SurgicalKit_DisplayName), LSTRING(MedicalSettings_medicSetting_SurgicalKit_Description)],
_categoryArray,
[[0,1,2],["Anyone","Medics only","Doctors only"],0], // [values, titles, defaultIndex]
true, // isGlobal
{[QEGVAR(medical,medicSetting_SurgicalKit), _this] call EFUNC(common,cbaSettings_settingChanged)},
true // Needs mission restart
] call CBA_settings_fnc_init;
[
QEGVAR(medical,consumeItem_PAK), "LIST",
[LSTRING(MedicalSettings_consumeItem_PAK_DisplayName), LSTRING(MedicalSettings_consumeItem_PAK_Description)],
_categoryArray,
[[0,1],["No","Yes"],1], // [values, titles, defaultIndex]
true, // isGlobal
{[QEGVAR(medical,consumeItem_PAK), _this] call EFUNC(common,cbaSettings_settingChanged)},
true // Needs mission restart
] call CBA_settings_fnc_init;
[
QEGVAR(medical,consumeItem_SurgicalKit), "LIST",
[LSTRING(MedicalSettings_consumeItem_SurgicalKit_DisplayName), LSTRING(MedicalSettings_consumeItem_SurgicalKit_Description)],
_categoryArray,
[[0,1],["No","Yes"],1], // [values, titles, defaultIndex]
true, // isGlobal
{[QEGVAR(medical,consumeItem_SurgicalKit), _this] call EFUNC(common,cbaSettings_settingChanged)},
true // Needs mission restart
] call CBA_settings_fnc_init;
[
QEGVAR(medical,useLocation_Epi), "LIST",
[LSTRING(MedicalSettings_useLocation_Epi_DisplayName), LSTRING(MedicalSettings_useLocation_Epi_Description)],
_categoryArray,
[[0,1,2,3,4],[LELSTRING(common,Anywhere), LELSTRING(common,Vehicle), LLSTRING(medicalFacility), LLSTRING(vehicleAndFacility), LELSTRING(common,Disabled)],0], // [values, titles, defaultIndex]
true, // isGlobal
{[QEGVAR(medical,useLocation_Epi), _this] call EFUNC(common,cbaSettings_settingChanged)},
true // Needs mission restart
] call CBA_settings_fnc_init;
[
QEGVAR(medical,useLocation_PAK), "LIST",
[LSTRING(MedicalSettings_useLocation_PAK_DisplayName), LSTRING(MedicalSettings_useLocation_PAK_Description)],
_categoryArray,
[[0,1,2,3,4],[LELSTRING(common,Anywhere), LELSTRING(common,Vehicle), LLSTRING(medicalFacility), LLSTRING(vehicleAndFacility), LELSTRING(common,Disabled)],0], // [values, titles, defaultIndex]
true, // isGlobal
{[QEGVAR(medical,useLocation_PAK), _this] call EFUNC(common,cbaSettings_settingChanged)},
true // Needs mission restart
] call CBA_settings_fnc_init;
[
QEGVAR(medical,useLocation_SurgicalKit), "LIST",
[LSTRING(MedicalSettings_useLocation_SurgicalKit_DisplayName), LSTRING(MedicalSettings_useLocation_SurgicalKit_Description)],
_categoryArray,
[[0,1,2,3,4],[LELSTRING(common,Anywhere), LELSTRING(common,Vehicle), LLSTRING(medicalFacility), LLSTRING(vehicleAndFacility), LELSTRING(common,Disabled)],0], // [values, titles, defaultIndex]
true, // isGlobal
{[QEGVAR(medical,useLocation_SurgicalKit), _this] call EFUNC(common,cbaSettings_settingChanged)},
true // Needs mission restart
] call CBA_settings_fnc_init;
*/

View File

@ -2,8 +2,8 @@
#define COMPONENT_BEAUTIFIED Medical Treatment
#include "\z\ace\addons\main\script_mod.hpp"
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
#define DEBUG_MODE_FULL
#define DISABLE_COMPILE_CACHE
// #define ENABLE_PERFORMANCE_COUNTERS
#ifdef DEBUG_ENABLED_MEDICAL_TREATMENT
@ -16,3 +16,36 @@
#include "\z\ace\addons\main\script_macros.hpp"
#include "\z\ace\addons\medical_engine\script_macros_medical.hpp"
#define GET_FUNCTION(var,cfg) \
private var = getText (cfg); \
if (isNil var) then { \
var = compile var; \
} else { \
var = missionNamespace getVariable var; \
}
// Returns a number config entry with default value of 0
// If entry is a string, will get the variable from missionNamespace
#define GET_NUMBER_ENTRY(cfg) \
if (isText (cfg)) then { \
missionNamespace getVariable [getText (cfg), 0]; \
} else { \
getNumber (cfg); \
}
// Macros for checking if unit is in medical vehicle or facility
// Defined mostly to make location check in canTreat more readable
#define IN_MED_VEHICLE(unit) (unit call FUNC(isInMedicalVehicle))
#define IN_MED_FACILITY(unit) (unit call FUNC(isInMedicalFacility))
#define TREATMENT_LOCATIONS_NONE 0
#define TREATMENT_LOCATIONS_VEHICLES 1
#define TREATMENT_LOCATIONS_FACILITIES 2
#define TREATMENT_LOCATIONS_VEHICLES_AND_FACILITIES 3
#define TREATMENT_LOCATIONS_ALL 4
#define LITTER_CLEANUP_CHECK_DELAY 30
#define MAX_LOG_ENTRIES 8
#define LOG_VARNAME(type) (format [QEGVAR(medical,log_%1), type])

View File

@ -1,64 +1,238 @@
<?xml version="1.0" encoding="utf-8"?>
<Project name="ACE">
<Package name="Medical_Treatment">
<Key ID="STR_ACE_Medical_Treatment_SubCategory_Treatment">
<English>Treatment</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_SubCategory_Litter">
<English>Litter</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_AdvancedDiagnose_DisplayName">
<English>Advanced Diagnose</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_AdvancedDiagnose_Description">
<English>Enables the Check Pulse, Check Blood Pressure, and Check Response treatment actions instead of the generic Diagnose action.</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_AdvancedBandages_DisplayName">
<English>Advanced Bandages</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_AdvancedBandages_Description">
<English>Enables treatment actions for different bandage types instead of the generic Bandage action.</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_WoundReopening_DisplayName">
<English>Wound Reopening</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_WoundReopening_Description">
<English>Enables the reopening of bandaged wounds. Requires Advanced Bandages to be enabled.</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_AdvancedMedication_DisplayName">
<English>Advanced Medication</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_AdvancedMedication_Description">
<English>Enables extended, more in-depth medication handling. Also, enables the use of Adenosine and Atropine.</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_LocationsBoostTraining_DisplayName">
<English>Locations Boost Training</English>
<Czech>Místa pro vylepšení zkušeností</Czech>
<Italian>Località aumentano addestramento</Italian>
<German>Örtliche Trainingssteigerung</German>
<Spanish>Ubicación mejora entrenamiento.</Spanish>
<Polish>Miejsca zwiększają wyszkolenie</Polish>
<Portuguese>Localização melhora treinamento</Portuguese>
<French>Le lieu améliore l'efficacité</French>
<Russian>Места ускоренного обучения</Russian>
<Japanese>衛生兵としての能力を与える場所</Japanese>
<Korean>교육 증가 지역</Korean>
<Chinesesimp>受所在位置影响提升医疗能力</Chinesesimp>
<Chinese>受所在位置影響提升醫療能力</Chinese>
</Key>
<Key ID="STR_ACE_Medical_treatment_LocationsBoostTraining_Description">
<English>Boost medical training when in medical vehicles or facilities. Untrained becomes medic, medic becomes doctor.</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_AllowSelfIV_DisplayName">
<English>Self IV Transfusion</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_AllowSelfIV_Description">
<English>Enables the use of IV Transfusions on oneself.</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_AllowSharedEquipment_DisplayName">
<English>Allow Shared Equipment</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_AllowSharedEquipment_Description">
<English>Controls whether medical equipment can be shared between the patient and the medic.</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_AllowSharedEquipment_PriorityPatient">
<English>Patient's Equipment First</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_AllowSharedEquipment_PriorityMedic">
<English>Medic's Equipment First</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_MedicEpinephrine_DisplayName">
<English>Allow Epinephrine</English>
<German>Erlaube Epiniphrin</German>
<Spanish>Permitir Epinefrina</Spanish>
<Polish>Ograniczenia adrenaliny</Polish>
<French>Activer l'épinéphrine</French>
<Italian>Permette epinefrina</Italian>
<Czech>Povolit adrenalin</Czech>
<Portuguese>Permitir Epinefrina</Portuguese>
<Russian>Разрешить Адреналин</Russian>
<Japanese>アドレナリンの許可</Japanese>
<Korean>에피네프린 활성화</Korean>
<Chinesesimp>允许使用肾上腺素</Chinesesimp>
<Chinese>允許使用腎上腺素</Chinese>
</Key>
<Key ID="STR_ACE_Medical_Treatment_MedicEpinephrine_Description">
<English>Training level required to use Epinephrine.</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_LocationEpinephrine_DisplayName">
<English>Locations Epinephrine</English>
<German>Orte für Epiniphrin</German>
<Spanish>Ubicaciones epinefrina</Spanish>
<Polish>Ograniczenia adrenaliny</Polish>
<French>Utilisation de l'épinéphrine</French>
<Italian>Ubicazione epinefrina</Italian>
<Czech>Oblast k použití adrenalinu</Czech>
<Portuguese>Localizações de Epinefrina</Portuguese>
<Russian>Место использования адреналина</Russian>
<Japanese>アドレナリンをつかう場所</Japanese>
<Korean>에피네프린 사용 장소</Korean>
<Chinesesimp>肾上腺素使用地点</Chinesesimp>
<Chinese>腎上腺素使用地點</Chinese>
</Key>
<Key ID="STR_ACE_Medical_Treatment_LocationEpinephrine_Description">
<English>Controls where Epinephrine can be used.</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_MedicPAK_DisplayName">
<English>Allow PAK</English>
<Russian>Использование аптечки</Russian>
<Polish>Ustawienie apteczek osobistych</Polish>
<Spanish>Permitir EPA</Spanish>
<German>Erlaube Erste-Hilfe-Set</German>
<Czech>Povolit osobní lékárničky (PAK)</Czech>
<Portuguese>Permitir Kit de Primeiros Socorros</Portuguese>
<French>Activer la trousse sanitaire</French>
<Hungarian>Elsősegélycsomag engedélyezése</Hungarian>
<Italian>Consenti Kit di Pronto Soccorso</Italian>
<Japanese>応急処置キットの許可</Japanese>
<Korean>개인응급키트 활성화</Korean>
<Chinesesimp>允许使用个人急救包</Chinesesimp>
<Chinese>允許使用個人急救包</Chinese>
</Key>
<Key ID="STR_ACE_Medical_Treatment_MedicPAK_Description">
<English>Training level required to use a PAK.</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_LocationPAK_DisplayName">
<English>Locations PAK</English>
<Russian>Место использования аптечки</Russian>
<Polish>Ograniczenie apteczek osobistych</Polish>
<Spanish>Ubicaciones del EPA</Spanish>
<German>Orte für Erste-Hilfe-Set</German>
<Czech>Oblast k použití PAK</Czech>
<Portuguese>Localizações do KPS</Portuguese>
<French>Lieu d'utilisation da trousse sanitaire</French>
<Hungarian>Elsősegélycsomag helyek</Hungarian>
<Italian>Locazioni Kit Pronto Soccorso</Italian>
<Japanese>応急処置キットを使う場所</Japanese>
<Korean>개인응급키트 사용 장소</Korean>
<Chinesesimp>个人急救包使用地点</Chinesesimp>
<Chinese>個人急救包使用地點</Chinese>
</Key>
<Key ID="STR_ACE_Medical_Treatment_LocationPAK_Description">
<English>Controls where a PAK can be used.</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_ConsumePAK_DisplayName">
<English>Consume PAK</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_ConsumePAK_Description">
<English>Controls whether a PAK should be consumed after use.</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_MedicSurgicalKit_DisplayName">
<English>Allow Surgical Kit</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_MedicSurgicalKit_Description">
<English>Training level required to use a Surgical Kit.</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_LocationSurgicalKit_DisplayName">
<English>Locations Surgical Kit</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_LocationSurgicalKit_Description">
<English>Controls where a Surgical Kit can be used.</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_ConsumeSurgicalKit_DisplayName">
<English>Consume Surgical Kit</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_ConsumeSurgicalKit_Description">
<English>Controls whether a Surgical Kit should be consumed after use.</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_ConvertItems_DisplayName">
<English>Convert Vanilla Items</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_ConvertItems_Description">
<English>Controls whether vanilla medical items are converted to ACE Medical items, removed only, or ignored.</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_ConvertItems_RemoveOnly">
<English>Remove Only</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_AllowLitterCreation_DisplayName">
<English>Enable Litter</English>
<Russian>Включить мусор</Russian>
<Polish>Aktywuj odpadki</Polish>
<Spanish>Activar restos médicos</Spanish>
<German>Abfälle aktivieren</German>
<Czech>Povolit odpadky</Czech>
<Portuguese>Ativar lixo médico</Portuguese>
<French>Activer les détritus</French>
<Hungarian>Szemét engedélyezése</Hungarian>
<Italian>Abilita Barella</Italian>
<Japanese>医療廃棄物の表示を有効化</Japanese>
</Key>
<Key ID="STR_ACE_Medical_Treatment_AllowLitterCreation_Description">
<English>Enables the creation of litter upon treatment.</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_MaxLitterObjects_DisplayName">
<English>Max Litter Objects</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_MaxLitterObjects_Description">
<English>Sets the maximum number of litter objects which can be spawned, excessive amounts can cause FPS lag.</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_LitterCleanUpDelay_DisplayName">
<English>Litter Lifetime</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_LitterCleanUpDelay_Description">
<English>Controls the lifetime of litter objects, in seconds. -1 is forever.</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_Anyone">
<English>Anyone</English>
<Russian>Кем угодно</Russian>
<Polish>Wszyscy</Polish>
<Spanish>Nadie</Spanish>
<German>Jeder</German>
<Czech>Kdokoliv</Czech>
<Portuguese>Qualquer um</Portuguese>
<French>Tous</French>
<Hungarian>Akárki</Hungarian>
<Italian>Chiunque</Italian>
<Japanese>だれでも</Japanese>
<Korean>모두</Korean>
<Chinesesimp>任何人</Chinesesimp>
<Chinese>任何人</Chinese>
</Key>
<Key ID="STR_ACE_Medical_Treatment_Medics">
<English>Medics</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_Doctors">
<English>Doctors</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_MedicalFacilities">
<English>Medical Facilities</English>
</Key>
<Key ID="STR_ACE_Medical_treatment_VehiclesAndFacilities">
<English>Vehicles &amp; Facilities</English>
</Key>
<Container name="Settings">
<Key ID="STR_ACE_Medical_treatment_subCategory">
<English>Treatment</English>
</Key>
<Key ID="STR_ACE_Medical_treatment_advancedBandages_DisplayName">
<English>Advanced Bandages</English>
</Key>
<Key ID="STR_ACE_Medical_treatment_advancedBandages_Description">
<English>Enable advanced bandages (required for wound reopening)</English>
</Key>
<Key ID="STR_ACE_Medical_treatment_advancedDiagnose_DisplayName">
<English>Advanced Diagnose</English>
</Key>
<Key ID="STR_ACE_Medical_treatment_advancedDiagnose_Description">
<English>Enable advanced diagnose</English>
</Key>
<Key ID="STR_ACE_Medical_treatment_advancedMedication_DisplayName">
<English>Advanced Medication</English>
</Key>
<Key ID="STR_ACE_Medical_treatment_advancedMedication_Description">
<English>Enable advanced medication</English>
</Key>
<Key ID="STR_ACE_Medical_treatment_increaseTrainingInLocations_DisplayName">
<English>Locations boost training</English>
<Czech>Místa pro vylepšení zkušeností</Czech>
<Italian>Località aumentano addestramento</Italian>
<German>Örtliche Trainingssteigerung</German>
<Spanish>Ubicación mejora entrenamiento.</Spanish>
<Polish>Miejsca zwiększają wyszkolenie</Polish>
<Portuguese>Localização melhora treinamento</Portuguese>
<French>Le lieu améliore l'efficacité</French>
<Russian>Места ускоренного обучения</Russian>
<Japanese>衛生兵としての能力を与える場所</Japanese>
<Korean>교육 증가 지역</Korean>
<Chinesesimp>受所在位置影响提升医疗能力</Chinesesimp>
<Chinese>受所在位置影響提升醫療能力</Chinese>
</Key>
<Key ID="STR_ACE_Medical_treatment_increaseTrainingInLocations_Description">
<English>Boost medic rating in medical vehicles or near medical facilities [untrained becomes medic, medic becomes doctor]</English>
<Czech>Zlepšit zkušenosti zdravotníka v medickém vozidle nebo poblíž zdravotního zařízení [nezkušení se stane zdravotníkem, zdravotník se stane doktorem]</Czech>
<Italian>Aumenta il rating medico in veicoli medici o vicino strutture mediche [non addestrato diventa medico, medico diventa dottore]</Italian>
<German>Steigert die medizinische Einstufung eines Soldaten in Sanitätsfarhzeugen oder in der Nähe von Sanitätseinrichtungen [untrainiert wird zu Sanitäter, Sanitäter zu Doktor]</German>
<Spanish>Mejora el entrenamiento médico dentro de vehículos médicos o cerca de instalaciones médicas (no entrenados se convierten en médicos, médicos se convierten en doctores)</Spanish>
<Polish>Zwiększa poziom wyszkolenia medyków wewnątrz pojazdów medycznych lub w pobliżu budynków medycznych [niedoświadczony zostaje medykiem, medyk zostaje doktorem]</Polish>
<Portuguese>Aumenta a classificação do médico dentro de veículos médicos ou perto de instalações médicas [sem treinamento vira médico, médico vira doutor]</Portuguese>
<French>Améliore l'efficacité des soins dans les véhicules ou structures de soins [non formés deviennent médecins, médecins deviennent docteurs]</French>
<Russian>Улучшает медицинскую подготовку в мед. транспорте и около мед. строений [нетренированные становятся медиками, медики становятся врачами]</Russian>
<Japanese>医療車両や医療施設の近くは衛生兵としての能力を与える場所となり、衛生兵の訓練を受けていないのに衛生兵としてなる (未訓練は衛生兵に、衛生兵は医師に)</Japanese>
<Korean>의무병의 수준이 주변의 차량이나 의료시설에 따라 증가합니다. [비교육자가 의무병이되고, 의무병이 의사가 됩니다]</Korean>
<Chinesesimp>当人员在医疗载具或是医护设施旁进行医疗时, 该员医疗能力将会有所提升 (未受训人员提升为医疗兵, 医疗兵提升为军医)</Chinesesimp>
<Chinese>當人員在醫療載具或是醫護設施旁進行醫療時, 該員醫療能力將會有所提升 (未受訓人員提升為醫療兵, 醫療兵提升為軍醫)</Chinese>
</Key>
<Key ID="STR_ACE_Medical_treatment_allowSelfIV_DisplayName">
<English>Self IV Transfusion</English>
</Key>
<Key ID="STR_ACE_Medical_treatment_allowSelfIV_Description">
<English>Allows using IV Transfusions on yourself</English>
</Key>
<Key ID="STR_ACE_Medical_treatment_CPRcreatesPulse">
<English>CPR creates pulse</English>
<German>HLW erzeugt einen Puls</German>
@ -67,307 +241,14 @@
<English>CPR will create a pulse for the patient while performing</English>
<German>HLW erzeugt während der Behandlung beim Patienten einen Puls</German>
</Key>
<Key ID="STR_ACE_Medical_treatment_woundReopening_DisplayName">
<English>Enable Advanced wounds</English>
<Russian>Усложненные раны</Russian>
<Polish>Aktywuj zaawansowane rany</Polish>
<Spanish>Activa heridas avanzadas</Spanish>
<German>Aktiviere erweiterte Wunden</German>
<Czech>Povolit pokročilé zranění</Czech>
<Portuguese>Ativar ferimentos avançados</Portuguese>
<French>Activer les plaies compliquées</French>
<Hungarian>Komplex sebek engedélyezése</Hungarian>
<Italian>Abilita ferite Avanzate</Italian>
<Japanese>アドバンスドな傷を有効化</Japanese>
<Korean>고급 부상 활성화</Korean>
<Chinesesimp>启用进阶伤口系统</Chinesesimp>
<Chinese>啟用進階傷口系統</Chinese>
</Key>
<Key ID="STR_ACE_Medical_treatment_woundReopening_Description">
<English>Allow reopening of bandaged wounds?</English>
<Russian>Будут ли открываться уже перевязанные раны?</Russian>
<Polish>Pozwól na otwieranie się zabandażowanych ran?</Polish>
<Spanish>Permitir la reapertura de las heridas vendadas?</Spanish>
<German>Erlaube das Öffnen von bandagierten Wunden?</German>
<Czech>Umožnit znovuotevření zavázané rány?</Czech>
<Portuguese>Permitr reabertura de ferimentos enfaixados?</Portuguese>
<French>Les plaies peuvent se rouvrir</French>
<Hungarian>Visszanyílhatnak a bekötözött sebek?</Hungarian>
<Italian>Permetti la riapertura di ferite bendate?</Italian>
<Japanese>包帯で巻かれた傷を再び開くようにしますか?</Japanese>
<Korean>붕대가 풀리는것을 활성화합니까?</Korean>
<Chinesesimp>启用进阶伤口系统会使已被包扎的伤口有机率裂开</Chinesesimp>
<Chinese>啟用進階傷口系統會使已被包紮的傷口有機率裂開</Chinese>
</Key>
</Container>
<Container name="SettingsItems">
<Key ID="STR_ACE_Medical_treatment_medicSetting_Epi_DisplayName">
<English>Allow Epinephrine</English>
<German>Erlaube Epiniphrin</German>
<Spanish>Permitir Epinefrina</Spanish>
<Polish>Ograniczenia adrenaliny</Polish>
<French>Activer l'épinéphrine</French>
<Italian>Permette epinefrina</Italian>
<Czech>Povolit adrenalin</Czech>
<Portuguese>Permitir Epinefrina</Portuguese>
<Russian>Разрешить Адреналин</Russian>
<Japanese>アドレナリンの許可</Japanese>
<Korean>에피네프린 활성화</Korean>
<Chinesesimp>允许使用肾上腺素</Chinesesimp>
<Chinese>允許使用腎上腺素</Chinese>
</Key>
<Key ID="STR_ACE_Medical_treatment_medicSetting_Epi_Description">
<English>Who can use Epinephrine?</English>
</Key>
<Key ID="STR_ACE_Medical_treatment_medicSetting_PAK_DisplayName">
<English>Allow PAK</English>
<Russian>Использование аптечки</Russian>
<Polish>Ustawienie apteczek osobistych</Polish>
<Spanish>Permitir EPA</Spanish>
<German>Erlaube Erste-Hilfe-Set</German>
<Czech>Povolit osobní lékárničky (PAK)</Czech>
<Portuguese>Permitir Kit de Primeiros Socorros</Portuguese>
<French>Activer la trousse sanitaire</French>
<Hungarian>Elsősegélycsomag engedélyezése</Hungarian>
<Italian>Consenti Kit di Pronto Soccorso</Italian>
<Japanese>応急処置キットの許可</Japanese>
<Korean>개인응급키트 활성화</Korean>
<Chinesesimp>允许使用个人急救包</Chinesesimp>
<Chinese>允許使用個人急救包</Chinese>
</Key>
<Key ID="STR_ACE_Medical_treatment_medicSetting_PAK_Description">
<English>Who can use the PAK for full heal?</English>
<Russian>Кому разрешено выполнять полное лечение с помощью аптечки?</Russian>
<Polish>Kto może skorzystać z apteczki osobistej w celu pełnego uleczenia?</Polish>
<Spanish>¿Quién puede utilizar el EPA para una cura completa?</Spanish>
<German>Wer kann das Erste-Hilfe-Set für eine Endheilung verwenden?</German>
<Czech>Kdo může použít osobní lékárničku pro plné vyléčení?</Czech>
<Portuguese>Quem pode usar o KPS para cura completa?</Portuguese>
<French>Qui peut utilier la trousse sanitaire pour des soins complets?</French>
<Hungarian>Ki használhatja az elsősegélycsomagot teljes gyógyításra?</Hungarian>
<Italian>Chi può usare il KPS per cura completa?</Italian>
<Japanese>完全に回復できるよう誰しもが応急処置キットを使えるようにしますか?</Japanese>
<Korean>완전한 체력회복을 위해 어느 인원이 개인응급키트을 쓸 수 있습니까? (기본 의료 전용)</Korean>
<Chinesesimp>谁能够使用个人急救包来达到完整医疗?</Chinesesimp>
<Chinese>誰能夠使用個人急救包來達到完整醫療?</Chinese>
</Key>
<Key ID="STR_ACE_Medical_treatment_anyone">
<English>Anyone</English>
<Russian>Кем угодно</Russian>
<Polish>Wszyscy</Polish>
<Spanish>Nadie</Spanish>
<German>Jeder</German>
<Czech>Kdokoliv</Czech>
<Portuguese>Qualquer um</Portuguese>
<French>Tous</French>
<Hungarian>Akárki</Hungarian>
<Italian>Chiunque</Italian>
<Japanese>だれでも</Japanese>
<Korean>모두</Korean>
<Chinesesimp>任何人</Chinesesimp>
<Chinese>任何人</Chinese>
</Key>
<Key ID="STR_ACE_Medical_treatment_medicsOnly">
<English>Medics only</English>
<Russian>Только медиками</Russian>
<Polish>Tylko medycy</Polish>
<Spanish>Solo médicos</Spanish>
<German>Nur Sanitäter</German>
<Czech>Pouze zdravotník</Czech>
<Portuguese>Somente médicos</Portuguese>
<French>Infirmiers uniquement</French>
<Hungarian>Csak orvosok</Hungarian>
<Italian>Solo medici</Italian>
<Japanese>衛生兵のみ</Japanese>
<Korean>의무병만</Korean>
<Chinesesimp>只限医疗兵</Chinesesimp>
<Chinese>只限醫療兵</Chinese>
</Key>
<Key ID="STR_ACE_Medical_treatment_doctorsOnly">
<English>Doctors only</English>
<Russian>Только врачами</Russian>
<Polish>Tylko doktorzy</Polish>
<Spanish>Solo doctores</Spanish>
<German>Nur Ärzte</German>
<Czech>Pouze doktor</Czech>
<Portuguese>Somente doutores</Portuguese>
<French>Médecins uniquement</French>
<Hungarian>Csak doktorok</Hungarian>
<Italian>Solo dottori</Italian>
<Japanese>医師のみ</Japanese>
<Korean>오직 의사만</Korean>
<Chinesesimp>只限军医</Chinesesimp>
<Chinese>只限軍醫</Chinese>
</Key>
<Key ID="STR_ACE_Medical_treatment_medicalFacility">
<English>Medical facility</English>
<Russian>В госпитале</Russian>
<Polish>Budynki medyczne</Polish>
<Spanish>Centro médico</Spanish>
<German>Medizinische Einrichtungen</German>
<Czech>Zdravotnické zařízení</Czech>
<Portuguese>Instalação médica</Portuguese>
<French>Dans les structures sanitaires</French>
<Hungarian>Orvosi létesítmény</Hungarian>
<Italian>Strutture mediche</Italian>
<Japanese>医療施設でのみ</Japanese>
<Korean>의료시설</Korean>
<Chinesesimp>医疗设施</Chinesesimp>
<Chinese>醫療設施</Chinese>
</Key>
<Key ID="STR_ACE_Medical_treatment_vehicleAndFacility">
<English>Vehicles &amp; facility</English>
<Russian>В транспорте и госпитале</Russian>
<Polish>Pojazdy i budynki medyczne</Polish>
<Spanish>Vehículos y centros</Spanish>
<German>Fahrzeuge &amp; Einrichtungen</German>
<Czech>Vozidla a zařízení</Czech>
<Portuguese>Veículos e instalações</Portuguese>
<French>Dans les véhicules et les structures sanitaires</French>
<Hungarian>Járművek &amp; létesítmény</Hungarian>
<Italian>Veicoli e Strutture</Italian>
<Japanese>車両 &amp; 施設</Japanese>
<Korean>차량 및 시설</Korean>
<Chinesesimp>医疗载具 &amp; 医疗设施</Chinesesimp>
<Chinese>醫療載具 &amp; 醫療設施</Chinese>
</Key>
<Key ID="STR_ACE_Medical_treatment_MedicalSettings_consumeItem_PAK_DisplayName">
<English>Remove PAK on use</English>
<Russian>Удалять аптечки после использования</Russian>
<Polish>Usuń apteczkę po użyciu</Polish>
<Spanish>Eliminar EPA después del uso</Spanish>
<German>Entf. Erste-Hilfe-Set bei Verwendung</German>
<Czech>Odebrat osobní lékárničku po použití</Czech>
<Portuguese>Remover o KPS depois do uso</Portuguese>
<French>Utilisation unique de la trousse sanitaire</French>
<Hungarian>Elsősegélycsomag eltávolítása használatkor</Hungarian>
<Italian>Rimuovi Kit Pronto Soccorso dopo l'uso</Italian>
<Japanese>応急処置キットの削除</Japanese>
<Korean>개인응급키트 사용후 사라짐</Korean>
<Chinesesimp>在使用后删除个人急救包</Chinesesimp>
<Chinese>在使用後刪除個人急救包</Chinese>
</Key>
<Key ID="STR_ACE_Medical_treatment_MedicalSettings_consumeItem_PAK_Description">
<English>Should PAK be removed on usage?</English>
<Russian>Нужно ли удалять аптечки после использования?</Russian>
<Polish>Czy apteczka osobista powinna zniknąć z ekwipunku po jej użyciu?</Polish>
<Spanish>El EPA será eliminado después de usarlo</Spanish>
<German>Sollen Erste-Hilfe-Sets bei Verwendung entfernt werden?</German>
<Czech>Má se osobní lékárnička odstranit po použití?</Czech>
<Portuguese>Deve o KPS ser removido depois do uso?</Portuguese>
<French>La trousse sanitaire doit être consommée à l'utilisation?</French>
<Hungarian>Eltávolítódjon az elsősegélycsomag használatkor?</Hungarian>
<Italian>Il Kit Pronto Soccorso dev'essere rimosso dopo l'utilizzo?</Italian>
<Japanese>応急処置キットを使うと削除しますか?</Japanese>
<Korean>개인응급키트를 사용하고 나서 제거합니까?</Korean>
<Chinesesimp>要在使用后删除个人急救包吗?</Chinesesimp>
<Chinese>要在使用後刪除個人急救包嗎?</Chinese>
</Key>
<Key ID="STR_ACE_Medical_treatment_MedicalSettings_useLocation_Epi_DisplayName">
<English>Locations Epinephrine</English>
<German>Orte für Epiniphrin</German>
<Spanish>Ubicaciones epinefrina</Spanish>
<Polish>Ograniczenia adrenaliny</Polish>
<French>Utilisation de l'épinéphrine</French>
<Italian>Ubicazione epinefrina</Italian>
<Czech>Oblast k použití adrenalinu</Czech>
<Portuguese>Localizações de Epinefrina</Portuguese>
<Russian>Место использования адреналина</Russian>
<Japanese>アドレナリンをつかう場所</Japanese>
<Korean>에피네프린 사용 장소</Korean>
<Chinesesimp>肾上腺素使用地点</Chinesesimp>
<Chinese>腎上腺素使用地點</Chinese>
</Key>
<Key ID="STR_ACE_Medical_treatment_MedicalSettings_useLocation_Epi_Description">
<English>Where can the Epinephrine be used?</English>
</Key>
<Key ID="STR_ACE_Medical_treatment_PAKTime">
<English>How long should PAK take to apply?</English>
</Key>
<Key ID="STR_ACE_Medical_treatment_PAKTime_Description">
<English>How long should PAK take to apply? Use 0 for default (based on damage)</English>
</Key>
</Container>
<Container name="SettingsLitter">
<Key ID="STR_ACE_Medical_treatment_allowLitterCreation">
<English>Enable Litter</English>
<Russian>Включить мусор</Russian>
<Polish>Aktywuj odpadki</Polish>
<Spanish>Activar restos médicos</Spanish>
<German>Abfälle aktivieren</German>
<Czech>Povolit odpadky</Czech>
<Portuguese>Ativar lixo médico</Portuguese>
<French>Activer les détritus</French>
<Hungarian>Szemét engedélyezése</Hungarian>
<Italian>Abilita Barella</Italian>
<Japanese>医療廃棄物の表示を有効化</Japanese>
</Key>
<Key ID="STR_ACE_Medical_treatment_allowLitterCreation_Description">
<English>Enable litter being created upon treatment</English>
<Russian>Включить появление мусора после лечения</Russian>
<Polish>Twórz odpadki medyczne podczas leczenia</Polish>
<Spanish>Activar los restos médicos que se crean en el tratamiento</Spanish>
<German>Aktiviere Abfälle, wenn eine Behandlung durchgeführt wurde</German>
<Czech>Vytváří odpad zdravotnického materiálu pří léčení</Czech>
<Portuguese>Ativar lixo ser criado após tratamento</Portuguese>
<French>Activer la création de détrimus au début des traitements</French>
<Hungarian>Engedélyezi a szemét keletkezését ellátáskor</Hungarian>
<Italian>Abilita la creazione della barella dopo trattamento</Italian>
<Japanese>治療を始めると、医療廃棄物の作成を有効化する</Japanese>
</Key>
<Key ID="STR_ACE_Medical_treatment_litterSimulationDetail">
<English>Litter Simulation Detail</English>
<Polish>Detale zużytych medykamentów</Polish>
<Spanish>Detalle de simulación de basura</Spanish>
<Russian>Количество мусора от медицины</Russian>
<Italian>Dettagli Simulazione Rifiuti</Italian>
<French>Niveau de simulation des détritus</French>
<German>Abfall-Detaillevel</German>
<Hungarian>Hulladékszimuláció részletessége</Hungarian>
<Portuguese>Detalhe da simulação de sujeira</Portuguese>
<Czech>Počet zobrazených předmětů po použití zdravotnického materiálu</Czech>
<Japanese>医療廃棄物を再現する詳細度</Japanese>
</Key>
<Key ID="STR_ACE_Medical_treatment_litterSimulationDetail_Description">
<English>Litter simulation detail level sets the number of litter items which will be locally spawned in the client. Excessive amounts in local areas could cause FPS lag, so this is a client only setting.</English>
<Polish>Opcja ta ustawia liczbę zużytych medykamentów, jakie pojawiają się lokalnie wokół gracza. Ich zbyt duża ilość może spowodować spadki FPS, dlatego jest to ustawienie tylko po stronie klienta.</Polish>
<Spanish>Detalle simulación de basura establece el número de artículos de basura que se generan a nivel local en el cliente. Las cantidades excesivas en áreas locales podrían causar caída de rendimiento, así que esto es un ajuste de cliente únicamente.</Spanish>
<Russian>Устанавливает количество мусора, который появляется после использования мед. препаратов. Большое количество мусора может уменьшить производительность, поэтому данная настройка локальна для клиента.</Russian>
<Italian>Il numero di rifiuti che verranno creati localmente. La creazione di troppi rifiuti in aree locali potrebbe causare lag e calo di FPS. Questo è un settaggio lato client.</Italian>
<French>Le niveau de simulation des détritus règle la quantité de déchets qui vont être créés localement chez le client. Des quantitées excessive chez certains clients peuvent causer des chutes de FPS, c'est donc une option client uniquement.</French>
<German>Die Einstellung für das Abfall-Detaillevel stellt die Menge des lokal angezeigten medizinischen Abfalls ein. Zuviel Abfall kann FPS-Einbrüche erzeugen, weswegen diese Einstellung nur clientseitig ist.</German>
<Hungarian>A hulladékszimuláció részletessége megszabja a kliens által megjelenített hulladékobjektumok mennyiségét. Súlyos mennyiségek izolált területeken alacsony FPS-t okozhatnak, így ez egy kliensoldali beállítás.</Hungarian>
<Portuguese>O nível de detalhe de sujeira determina o número de itens que irão aparecer no cliente. Quantidades excessivas em áreas locais podem aumentar o lag do FPS, então esta é uma opção somente para o cliente.</Portuguese>
<Czech>Počet zobrazených předmětů po použití zdravotnického materiálu ovlivňuje počet objektů, které budou zobrazeny klientovi v místě použití zdravotnického materiálu. Vyšší množství objektů může způsobovat poklesy FPS a proto je toto nastavení čistě na klientovi.</Czech>
<Japanese>医療廃棄物再現度は各クライアントでローカルに作成される、医療廃棄物への詳細度を決定できます。ローカルで多くのアイテムがあると FPS の低下を引き起こすため、クライアント側のみの設定です。</Japanese>
</Key>
<Key ID="STR_ACE_Medical_treatment_litterCleanUpDelay">
<English>Life time of litter objects</English>
<Russian>Время удаления мусора</Russian>
<Polish>Długość życia odpadków</Polish>
<Spanish>Tiempo de vida de los restos médicos</Spanish>
<German>Dauer des angezeigten Abfalls</German>
<Czech>Životnost pro odpadky</Czech>
<Portuguese>Tempo de vida dos objetos do lixo</Portuguese>
<French>Durée d'affichage des détritus</French>
<Hungarian>Szemétobjektumok élettartama</Hungarian>
<Italian>Tempo di vita delle barelle</Italian>
<Japanese>医療廃棄物の作成限界数を設定</Japanese>
</Key>
<Key ID="STR_ACE_Medical_treatment_litterCleanUpDelay_Description">
<English>How long should litter objects stay? In seconds. -1 is forever.</English>
<Russian>Как долго мусор будет оставаться на земле? В секундах. -1 означает бесконечное время.</Russian>
<Polish>Ile czasu musi upłynąć, aby odpadki zaczęły znikać? W sekundach. -1 dla nieskończoności.</Polish>
<Spanish>¿Por cuánto tiempo deben permanecer los restos médicos? En segundos. -1 es para siempre.</Spanish>
<German>Wie lange sollen Abfälle am Boden liegen (in Sekunden)? -1 ist für immer.</German>
<Czech>Za jak dlouho začnou odpadky mizet? V sekundách. -1 navždy.</Czech>
<Portuguese>Quanto tempo os objetos do lixo devem ficar? Em segundos. -1 é para sempre.</Portuguese>
<French>Combien de temps doivent rester affiché les détritus? En secondes. -1 pour tout le temps</French>
<Hungarian>Milyen sokáig legyenek jelen a szemétobjektumok (másodpercben)? A -1 végtelen időt jelent.</Hungarian>
<Italian>Per quanto devono restare le barelle? In secondi. -1 è permanente</Italian>
<Japanese>医療廃棄物オブジェクトが表示されつづける時間を設定しますか?-1 は永遠です。</Japanese>
</Key>
</Container>
<Key ID="STR_ACE_Medical_treatment_PAKTime">
<English>How long should PAK take to apply?</English>
</Key>
<Key ID="STR_ACE_Medical_treatment_PAKTime_Description">
<English>How long should PAK take to apply? Use 0 for default (based on damage)</English>
</Key>
<Key ID="STR_ACE_Medical_treatment_medicalSupplyCrate">
<English>[ACE] Medical Supply Crate (Basic)</English>
<Russian>[ACE] Ящик с медикаментами (базовая медицина)</Russian>
@ -478,7 +359,7 @@
<Chinese></Chinese>
</Key>
<Key ID="STR_ACE_Medical_treatment_AssignMedicRoles_role_medic">
<English>Regular medic</English>
<English>Regular Medic</English>
<Russian>Обычный медик</Russian>
<Polish>Zwykły medyk</Polish>
<Spanish>Médico regular</Spanish>
@ -3440,95 +3321,9 @@
<Chinesesimp>移除军用止血带中...</Chinesesimp>
<Chinese>移除軍用止血帶中...</Chinese>
</Key>
<Key ID="STR_ACE_Medical_treatment_convertItems_DisplayName">
<English>Convert vanilla items</English>
</Key>
<Key ID="STR_ACE_Medical_treatment_convertItems_Description">
<English>Enables or disables whether vanilla medical items are converted to ACE medical items or just removed</English>
</Key>
<Key ID="STR_ACE_Medical_treatment_convertItems_remove">
<English>Just remove vanilla medical</English>
</Key>
<Key ID="STR_ACE_Medical_treatment_MedicalSettings_useLocation_PAK_DisplayName">
<English>Locations PAK</English>
<Russian>Место использования аптечки</Russian>
<Polish>Ograniczenie apteczek osobistych</Polish>
<Spanish>Ubicaciones del EPA</Spanish>
<German>Orte für Erste-Hilfe-Set</German>
<Czech>Oblast k použití PAK</Czech>
<Portuguese>Localizações do KPS</Portuguese>
<French>Lieu d'utilisation da trousse sanitaire</French>
<Hungarian>Elsősegélycsomag helyek</Hungarian>
<Italian>Locazioni Kit Pronto Soccorso</Italian>
<Japanese>応急処置キットを使う場所</Japanese>
<Korean>개인응급키트 사용 장소</Korean>
<Chinesesimp>个人急救包使用地点</Chinesesimp>
<Chinese>個人急救包使用地點</Chinese>
</Key>
<Key ID="STR_ACE_Medical_treatment_MedicalSettings_consumeItem_SurgicalKit_DisplayName">
<English>Remove Surgical Kit (Adv)</English>
<Russian>Удалять хирургический набор (усл.)</Russian>
<Polish>Usuń zestaw chirurgiczny po użyciu</Polish>
<Spanish>Eliminar equipo quirúrgico (Avanzado)</Spanish>
<German>Entferne Operationskasten (erweitert)</German>
<Czech>Odebrat chirurgickou soupravu (Pokr.)</Czech>
<Portuguese>Remover kit cirúrgico (avançado)</Portuguese>
<French>Consommer les trousses chirurgicales (Av.)</French>
<Hungarian>Sebészkészlet (Fejlett) eltávolítása</Hungarian>
<Italian>Rimuovi Kit Chirurgico (Avanzato)</Italian>
<Japanese>縫合キットを削除 (アド)</Japanese>
<Korean>봉합키트 제거 (고급)</Korean>
<Chinesesimp>在使用后删除手术包 (进阶伤口)</Chinesesimp>
<Chinese>在使用後刪除手術包 (進階傷口)</Chinese>
</Key>
<Key ID="STR_ACE_Medical_treatment_MedicalSettings_consumeItem_SurgicalKit_Description">
<English>Should Surgical kit be removed on usage?</English>
<Russian>Нужно ли удалять хирургический набор после использования?</Russian>
<Polish>Czy zestaw chirurgiczny powinien zniknąć z ekwipunku po jego użyciu?</Polish>
<Spanish>Eliminar el equipo quirúrgico después del uso</Spanish>
<German>Entferne Operationskästen bei Verwendung?</German>
<Czech>Odebrat chirurgickou soupravu po použití?</Czech>
<Portuguese>Deve o kit cirúrgico ser removido após o uso?</Portuguese>
<French>La trousse chirurgicale doit être consommée à l'utilisation?</French>
<Hungarian>Eltávolítódjon a sebészkészlet használatkor?</Hungarian>
<Italian>Il Kit Chirurgico dev'essere rimosso dopo l'uso?</Italian>
<Japanese>縫合キットを使った後に削除しますか?</Japanese>
<Korean>봉합키트를 사용하고 나서 제거합니까?</Korean>
<Chinesesimp>手术包会在使用后被删除吗?</Chinesesimp>
<Chinese>手術包會在使用後被刪除嗎?</Chinese>
</Key>
<Key ID="STR_ACE_Medical_treatment_MedicalSettings_medicSetting_SurgicalKit_DisplayName">
<English>Allow Surgical Kit (Adv)</English>
<Russian>Хирургический набор может использоваться (усл.)</Russian>
<Polish>Ustawienia zestawu chirurgicznego</Polish>
<Spanish>Permitir equipo quirúrgico (Avanzado)</Spanish>
<German>Erlaube Operationskasten</German>
<Czech>Povolit chirurgickou soupravu (Pokr.)</Czech>
<Portuguese>Permite kit cirúrgico (avançado)</Portuguese>
<French>Permettre les trousses chirurgicales (Avancé)</French>
<Hungarian>Sebészkészlet (Fejlett) engedélyezése</Hungarian>
<Italian>Permetti Kit Chirurgico (Avanzato)</Italian>
<Japanese>縫合キットの許可 (アド)</Japanese>
<Korean>봉합키트 활성화 (고급)</Korean>
<Chinesesimp>允许使用手术包 (进阶伤口)</Chinesesimp>
<Chinese>允許使用手術包 (進階傷口)</Chinese>
</Key>
<Key ID="STR_ACE_Medical_treatment_MedicalSettings_medicSetting_SurgicalKit_Description">
<English>Who can use the Surgical Kit?</English>
<Russian>Кто может использовать хирургический набор?</Russian>
<Polish>Kto może skorzystać z zestawu chirurgicznego w celu zszycia ran?</Polish>
<Spanish>¿Quién puede utilizar el equipo quirúrgico?</Spanish>
<German>Wer kann den Operationskasten verwenden?</German>
<Czech>Kdo může použít chirurgickou soupravu?</Czech>
<Portuguese>Quem pode usar o kit cirúrgico?</Portuguese>
<French>Qui peut utiliser les trousses chirurgicales?</French>
<Hungarian>Ki használhatja a sebészkészletet?</Hungarian>
<Italian>Chi può usare il Kit Chirurgico?</Italian>
<Japanese>だれでも縫合キットを使えるようにしますか?</Japanese>
<Korean>어느 인원이 봉합키트를 사용할 수 있습니까?</Korean>
<Chinesesimp>谁能够使用手术包?</Chinesesimp>
<Chinese>誰能夠使用手術包?</Chinese>
</Key>
<Key ID="STR_ACE_Medical_treatment_noTourniquetOnBodyPart">
<English>There is no tourniquet on this body part!</English>
<German>An diesem Körperteil befindet sich kein Tourniquet!</German>
@ -3560,38 +3355,8 @@
<Chinesesimp>何时可以使用个人急救包?</Chinesesimp>
<Chinese>何時可以使用個人急救包?</Chinese>
</Key>
<Key ID="STR_ACE_Medical_treatment_MedicalSettings_useLocation_SurgicalKit_DisplayName">
<English>Locations Surgical Kit (Adv)</English>
<Russian>Место использования хирургического набора (усл.)</Russian>
<Polish>Ograniczenie zestawu chirurgicznego</Polish>
<Spanish>Ubicaciones del equipo quirúrgico (Avanzado)</Spanish>
<German>Orte für Operationskästen (erweitert)</German>
<Czech>Lokace chirurgické soupravy (Pokr.)</Czech>
<Portuguese>Localizações do kit cirúrgico (avançado)</Portuguese>
<French>Lieu d'utilisation des trousses chirurgicales</French>
<Hungarian>Sebészkészlet (Fejlett) helyei</Hungarian>
<Italian>Località Kit Chirurgico (Avanzato)</Italian>
<Japanese>縫合キットをつかう場所 (アド)</Japanese>
<Korean>봉합키트 사용 장소 (고급)</Korean>
<Chinesesimp>手术包使用地点 (进阶伤口)</Chinesesimp>
<Chinese>手術包使用地點 (進階傷口)</Chinese>
</Key>
<Key ID="STR_ACE_Medical_treatment_MedicalSettings_useLocation_SurgicalKit_Description">
<English>Where can the Surgical Kit be used?</English>
<Russian>Где может использоваться хирургический набор?</Russian>
<Polish>Gdzie można korzystać z zestawu chirurgicznego?</Polish>
<Spanish>Dónde se puede utilizar el equipo quirúrgico</Spanish>
<German>Wo kann der Operationskasten verwendet werden?</German>
<Czech>Kde může být použita chirurgická souprava?</Czech>
<Portuguese>Onde o kit cirúrgico pode ser utilizado?</Portuguese>
<French>Où peut être utilisé les trousses chirurgicales?</French>
<Hungarian>Hol lehet a sebészkészletet használni?</Hungarian>
<Italian>Dove può essere usato il Kit Chirurgico?</Italian>
<Japanese>どこでも縫合キットを使えるようにしますか?</Japanese>
<Korean>어디에서 봉합키트를 사용할 수 있게 합니까?</Korean>
<Chinesesimp>定义手术包可被使用的地方?</Chinesesimp>
<Chinese>定義手術包可被使用的地方?</Chinese>
</Key>
<Key ID="STR_ACE_Medical_treatment_MedicalSettings_useCondition_SurgicalKit_DisplayName">
<English>Condition Surgical Kit (Adv)</English>
<German>Beding. für d. Operationskasten (erw.)</German>
@ -3624,22 +3389,7 @@
<Chinesesimp>何时可以使用手术工具包?</Chinesesimp>
<Chinese>何時可以使用手術工具包?</Chinese>
</Key>
<Key ID="STR_ACE_Medical_treatment_MedicalSettings_useLocation_PAK_Description">
<English>Where can the PAK be used?</English>
<Russian>Где может использоваться аптечка?</Russian>
<Polish>Gdzie można korzystać z apteczek osobistych?</Polish>
<Spanish>¿Dónde se puede utilizar el equipo de primeros auxilios?</Spanish>
<German>Wo kann das Erste-Hilfe-Set verwendet werden?</German>
<Czech>Kde může být použita osobní lékárnička (PAK)?</Czech>
<Portuguese>Onde o kit de primeiros socorros pode ser utilizado?</Portuguese>
<French>Où la trousse sanitaire peut être utilisée ?</French>
<Hungarian>Hol lehet az elsősegélycsomagot használni?</Hungarian>
<Italian>Dove può essere usato il Kit Pronto Soccorso?</Italian>
<Japanese>どこでも応急処置キットを使えるようにしますか?</Japanese>
<Korean>어디에서 개인응급키트를 사용할 수 있습니까?</Korean>
<Chinesesimp>在哪里可以使用个人急救包?</Chinesesimp>
<Chinese>在哪裡可以使用個人急救包?</Chinese>
</Key>
<Key ID="STR_ACE_Medical_treatment_MedicalSettings_useCondition_PAK_DisplayName">
<English>Condition PAK</English>
<German>Bedingungen für d. Erste-Hilfe-Set</German>