ACE3/addons/medical_treatment/ACE_Medical_Treatment_Actions.hpp

305 lines
13 KiB
C++
Raw Normal View History

2016-09-18 17:48:49 +00:00
class GVAR(Actions) {
2016-10-13 07:47:52 +00:00
// --- bandages
class BasicBandage {
displayName = CSTRING(Bandage);
displayNameProgress = CSTRING(Bandaging);
Rewrite Medical GUI (#6831) * Add a macro for the bloodloss scaling factor * Adjust bloodloss threshold for red icon * Remove bloodloss color scaling factor The issue is actually the other way round, the factor of 20 would instantly make bodyparts red on taking a wound. * Implemet 10 color steps provided by ShackTac This replaces the old method of colouring the interaction menu icons and body image selections with a new method that has 10 distinct color steps (matching across the icons and the body image). * Use macros for constants * Implement blue damage colouring This re-adds visualisation for colouring based on damage. The case where a limb has a tourniquet will hopefully be handled by an overlayed icon. * Tidy up file structure * Move patient information display to medical_ui * Make common colour conversion code into functions * Add tourniquet icon overlay to body image * Fix mispelling I forgot to commit * Update icon paths to new white cross icon * Clean mess after rebase * Add new medical menu gui * Add updating injury list and body image * Add updating treatment category buttons * Update onMenuClose function * Delete unused functions * Add action buttons and triage card to menu * Move medical menu PFH to separate function * Move setTriageStatus to treatment * Add triage select dropdown * Add toggle button action * Fix mouse moving randomly when opening * Add logs list update and remove unused functions * Hide tourniquet icons by default * Remove CfgInGameUI (already in feedback) * Update patient info display * Update triage card display * Add settings to control interact menu actions * Cleanup files/paths * Move triage status update to common function * Add icons for interact menu actions * Modify icon color for interact menu actions * Update canOpenMenu for new setting * Hide pain information for unconscious * Stringtable cleanup * Use switch for pain text * Change minor triage status to minimal * Fix injury list to use new stringtable entry names * Fix medical actions check when disabled * Skip distance check in same vehicle * More cleanup * Fix CI error * Requested changes * Fix INJURIES string * Fix include after comment block * Fix missing ; Co-Authored-By: mharis001 <34453221+mharis001@users.noreply.github.com>
2019-03-24 22:17:48 +00:00
icon = QPATHTOEF(medical_gui,ui\bandage.paa);
2016-10-13 07:47:52 +00:00
category = "bandage";
treatmentLocations[] = {"All"};
allowedSelections[] = {"All"};
allowSelfTreatment = 1;
requiredMedic = 0;
treatmentTime = QFUNC(getBandageTime);
2016-10-13 07:47:52 +00:00
treatmentTimeSelfCoef = 1;
items[] = {{"ACE_fieldDressing", "ACE_packingBandage", "ACE_elasticBandage", "ACE_quikclot"}};
condition = QUOTE(!GVAR(advancedBandages));
2016-10-13 07:47:52 +00:00
itemConsumed = 1;
callbackSuccess = QFUNC(treatmentBandage);
callbackFailure = "";
callbackProgress = "";
2016-09-18 17:48:49 +00:00
2016-10-13 07:47:52 +00:00
animationCaller = "AinvPknlMstpSlayW[wpn]Dnon_medicOther";
animationCallerProne = "AinvPpneMstpSlayW[wpn]Dnon_medicOther";
animationCallerSelf = "AinvPknlMstpSlayW[wpn]Dnon_medic";
animationCallerSelfProne = "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"}}
2016-09-18 17:48:49 +00:00
};
2016-10-13 07:47:52 +00:00
};
class FieldDressing: BasicBandage {
displayName = CSTRING(Actions_FieldDressing);
2016-10-13 07:47:52 +00:00
items[] = {"ACE_fieldDressing"};
condition = QGVAR(advancedBandages);
2016-10-13 07:47:52 +00:00
litter[] = {
{"All", "_bloodLossOnBodyPart > 0", {{"ACE_MedicalLitter_bandage2", "ACE_MedicalLitter_bandage3"}}},
{"All", "_bloodLossOnBodyPart <= 0", {"ACE_MedicalLitter_clean"}}
2016-10-12 23:55:10 +00:00
};
2016-10-13 07:47:52 +00:00
};
class PackingBandage: BasicBandage {
displayName = CSTRING(Actions_PackingBandage);
Rewrite Medical GUI (#6831) * Add a macro for the bloodloss scaling factor * Adjust bloodloss threshold for red icon * Remove bloodloss color scaling factor The issue is actually the other way round, the factor of 20 would instantly make bodyparts red on taking a wound. * Implemet 10 color steps provided by ShackTac This replaces the old method of colouring the interaction menu icons and body image selections with a new method that has 10 distinct color steps (matching across the icons and the body image). * Use macros for constants * Implement blue damage colouring This re-adds visualisation for colouring based on damage. The case where a limb has a tourniquet will hopefully be handled by an overlayed icon. * Tidy up file structure * Move patient information display to medical_ui * Make common colour conversion code into functions * Add tourniquet icon overlay to body image * Fix mispelling I forgot to commit * Update icon paths to new white cross icon * Clean mess after rebase * Add new medical menu gui * Add updating injury list and body image * Add updating treatment category buttons * Update onMenuClose function * Delete unused functions * Add action buttons and triage card to menu * Move medical menu PFH to separate function * Move setTriageStatus to treatment * Add triage select dropdown * Add toggle button action * Fix mouse moving randomly when opening * Add logs list update and remove unused functions * Hide tourniquet icons by default * Remove CfgInGameUI (already in feedback) * Update patient info display * Update triage card display * Add settings to control interact menu actions * Cleanup files/paths * Move triage status update to common function * Add icons for interact menu actions * Modify icon color for interact menu actions * Update canOpenMenu for new setting * Hide pain information for unconscious * Stringtable cleanup * Use switch for pain text * Change minor triage status to minimal * Fix injury list to use new stringtable entry names * Fix medical actions check when disabled * Skip distance check in same vehicle * More cleanup * Fix CI error * Requested changes * Fix INJURIES string * Fix include after comment block * Fix missing ; Co-Authored-By: mharis001 <34453221+mharis001@users.noreply.github.com>
2019-03-24 22:17:48 +00:00
icon = QPATHTOEF(medical_gui,ui\packing_bandage.paa);
2016-10-13 07:47:52 +00:00
items[] = {"ACE_packingBandage"};
condition = QGVAR(advancedBandages);
2016-10-13 07:47:52 +00:00
litter[] = {
{"All", "", {"ACE_MedicalLitter_packingBandage"}},
{"All", "_bloodLossOnBodyPart > 0", {{"ACE_MedicalLitter_bandage2", "ACE_MedicalLitter_bandage3"}}},
{"All", "_bloodLossOnBodyPart <= 0", {"ACE_MedicalLitter_clean"}}
2016-10-12 23:55:10 +00:00
};
2016-10-13 07:47:52 +00:00
};
class ElasticBandage: BasicBandage {
displayName = CSTRING(Actions_ElasticBandage);
2016-10-13 07:47:52 +00:00
items[] = {"ACE_elasticBandage"};
condition = QGVAR(advancedBandages);
2016-10-13 07:47:52 +00:00
litter[] = {
{"All", "_bloodLossOnBodyPart > 0", {{"ACE_MedicalLitter_bandage2", "ACE_MedicalLitter_bandage3"}}},
{"All", "_bloodLossOnBodyPart <= 0", {"ACE_MedicalLitter_clean"}}
2016-10-12 23:55:10 +00:00
};
2016-10-13 07:47:52 +00:00
};
class QuikClot: BasicBandage {
displayName = CSTRING(Actions_QuikClot);
2016-10-13 07:47:52 +00:00
items[] = {"ACE_quikclot"};
condition = QGVAR(advancedBandages);
2016-10-13 07:47:52 +00:00
litter[] = {
{"All", "", {"ACE_MedicalLitter_QuickClot"}},
{"All", "_bloodLossOnBodyPart > 0", {{"ACE_MedicalLitter_bandage2", "ACE_MedicalLitter_bandage3"}}},
{"All", "_bloodLossOnBodyPart <= 0", {"ACE_MedicalLitter_clean"}}
2016-10-12 23:55:10 +00:00
};
2016-10-13 07:47:52 +00:00
};
2016-10-12 23:55:10 +00:00
2016-10-13 07:47:52 +00:00
// --- tourniquet
class Tourniquet: BasicBandage {
displayName = CSTRING(Apply_Tourniquet);
displayNameProgress = CSTRING(Applying_Tourniquet);
Rewrite Medical GUI (#6831) * Add a macro for the bloodloss scaling factor * Adjust bloodloss threshold for red icon * Remove bloodloss color scaling factor The issue is actually the other way round, the factor of 20 would instantly make bodyparts red on taking a wound. * Implemet 10 color steps provided by ShackTac This replaces the old method of colouring the interaction menu icons and body image selections with a new method that has 10 distinct color steps (matching across the icons and the body image). * Use macros for constants * Implement blue damage colouring This re-adds visualisation for colouring based on damage. The case where a limb has a tourniquet will hopefully be handled by an overlayed icon. * Tidy up file structure * Move patient information display to medical_ui * Make common colour conversion code into functions * Add tourniquet icon overlay to body image * Fix mispelling I forgot to commit * Update icon paths to new white cross icon * Clean mess after rebase * Add new medical menu gui * Add updating injury list and body image * Add updating treatment category buttons * Update onMenuClose function * Delete unused functions * Add action buttons and triage card to menu * Move medical menu PFH to separate function * Move setTriageStatus to treatment * Add triage select dropdown * Add toggle button action * Fix mouse moving randomly when opening * Add logs list update and remove unused functions * Hide tourniquet icons by default * Remove CfgInGameUI (already in feedback) * Update patient info display * Update triage card display * Add settings to control interact menu actions * Cleanup files/paths * Move triage status update to common function * Add icons for interact menu actions * Modify icon color for interact menu actions * Update canOpenMenu for new setting * Hide pain information for unconscious * Stringtable cleanup * Use switch for pain text * Change minor triage status to minimal * Fix injury list to use new stringtable entry names * Fix medical actions check when disabled * Skip distance check in same vehicle * More cleanup * Fix CI error * Requested changes * Fix INJURIES string * Fix include after comment block * Fix missing ; Co-Authored-By: mharis001 <34453221+mharis001@users.noreply.github.com>
2019-03-24 22:17:48 +00:00
icon = QPATHTOEF(medical_gui,ui\tourniquet.paa);
2016-10-13 07:47:52 +00:00
allowedSelections[] = {"LeftArm", "RightArm", "LeftLeg", "RightLeg"};
items[] = {"ACE_tourniquet"};
2016-12-08 10:38:43 +00:00
treatmentTime = 7;
2016-10-13 07:47:52 +00:00
callbackSuccess = QFUNC(treatmentTourniquet);
condition = QUOTE(!([ARR_2(_target,_bodyPart)] call FUNC(hasTourniquetAppliedTo)));
2016-10-13 07:47:52 +00:00
litter[] = {};
};
class RemoveTourniquet: Tourniquet {
displayName = CSTRING(Actions_RemoveTourniquet);
displayNameProgress = CSTRING(RemovingTourniquet);
2016-10-13 07:47:52 +00:00
items[] = {};
2016-10-13 08:28:28 +00:00
callbackSuccess = QFUNC(treatmentTourniquetRemove);
condition = QUOTE([ARR_2(_target,_bodyPart)] call FUNC(hasTourniquetAppliedTo));
2016-10-13 07:47:52 +00:00
};
// --- syringes
2016-12-15 13:06:09 +00:00
class Morphine: FieldDressing {
displayName = CSTRING(Inject_Morphine);
displayNameProgress = CSTRING(Injecting_Morphine);
Rewrite Medical GUI (#6831) * Add a macro for the bloodloss scaling factor * Adjust bloodloss threshold for red icon * Remove bloodloss color scaling factor The issue is actually the other way round, the factor of 20 would instantly make bodyparts red on taking a wound. * Implemet 10 color steps provided by ShackTac This replaces the old method of colouring the interaction menu icons and body image selections with a new method that has 10 distinct color steps (matching across the icons and the body image). * Use macros for constants * Implement blue damage colouring This re-adds visualisation for colouring based on damage. The case where a limb has a tourniquet will hopefully be handled by an overlayed icon. * Tidy up file structure * Move patient information display to medical_ui * Make common colour conversion code into functions * Add tourniquet icon overlay to body image * Fix mispelling I forgot to commit * Update icon paths to new white cross icon * Clean mess after rebase * Add new medical menu gui * Add updating injury list and body image * Add updating treatment category buttons * Update onMenuClose function * Delete unused functions * Add action buttons and triage card to menu * Move medical menu PFH to separate function * Move setTriageStatus to treatment * Add triage select dropdown * Add toggle button action * Fix mouse moving randomly when opening * Add logs list update and remove unused functions * Hide tourniquet icons by default * Remove CfgInGameUI (already in feedback) * Update patient info display * Update triage card display * Add settings to control interact menu actions * Cleanup files/paths * Move triage status update to common function * Add icons for interact menu actions * Modify icon color for interact menu actions * Update canOpenMenu for new setting * Hide pain information for unconscious * Stringtable cleanup * Use switch for pain text * Change minor triage status to minimal * Fix injury list to use new stringtable entry names * Fix medical actions check when disabled * Skip distance check in same vehicle * More cleanup * Fix CI error * Requested changes * Fix INJURIES string * Fix include after comment block * Fix missing ; Co-Authored-By: mharis001 <34453221+mharis001@users.noreply.github.com>
2019-03-24 22:17:48 +00:00
icon = QPATHTOEF(medical_gui,ui\auto_injector.paa);
2016-10-13 07:47:52 +00:00
allowedSelections[] = {"LeftArm", "RightArm", "LeftLeg", "RightLeg"};
category = "medication";
items[] = {"ACE_morphine"};
condition = "";
treatmentTime = 5;
2016-10-20 00:14:11 +00:00
callbackSuccess = QFUNC(treatmentMedication);
2016-10-13 07:47:52 +00:00
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
litter[] = { {"All", "", {"ACE_MedicalLitter_morphine"}} };
sounds[] = {{QPATHTO_R(sounds\Inject.ogg),1,1,50}};
};
2016-10-20 00:14:11 +00:00
class Adenosine: Morphine {
displayName = CSTRING(Inject_Adenosine);
displayNameProgress = CSTRING(Injecting_Adenosine);
condition = QGVAR(advancedMedication);
2016-10-20 00:14:11 +00:00
items[] = {"ACE_adenosine"};
litter[] = { {"All", "", {"ACE_MedicalLitter_adenosine"}} };
};
class Atropine: Morphine {
displayName = CSTRING(Inject_Atropine);
displayNameProgress = CSTRING(Injecting_Atropine);
condition = QGVAR(advancedMedication);
2016-10-20 00:14:11 +00:00
items[] = {"ACE_atropine"};
litter[] = { {"All", "", {"ACE_MedicalLitter_atropine"}} };
};
2016-10-13 07:47:52 +00:00
class Epinephrine: Morphine {
displayName = CSTRING(Inject_Epinephrine);
displayNameProgress = CSTRING(Injecting_Epinephrine);
requiredMedic = QEGVAR(medical,medicSetting_Epi);
2016-10-13 07:47:52 +00:00
items[] = {"ACE_epinephrine"};
litter[] = { {"All", "", {"ACE_MedicalLitter_epinephrine"}} };
treatmentLocations[] = {QEGVAR(medical,useLocation_Epi)};
2016-10-13 07:47:52 +00:00
};
// --- iv bags
class BloodIV: BasicBandage {
displayName = CSTRING(Actions_Blood4_1000);
displayNameProgress = CSTRING(Transfusing_Blood);
Rewrite Medical GUI (#6831) * Add a macro for the bloodloss scaling factor * Adjust bloodloss threshold for red icon * Remove bloodloss color scaling factor The issue is actually the other way round, the factor of 20 would instantly make bodyparts red on taking a wound. * Implemet 10 color steps provided by ShackTac This replaces the old method of colouring the interaction menu icons and body image selections with a new method that has 10 distinct color steps (matching across the icons and the body image). * Use macros for constants * Implement blue damage colouring This re-adds visualisation for colouring based on damage. The case where a limb has a tourniquet will hopefully be handled by an overlayed icon. * Tidy up file structure * Move patient information display to medical_ui * Make common colour conversion code into functions * Add tourniquet icon overlay to body image * Fix mispelling I forgot to commit * Update icon paths to new white cross icon * Clean mess after rebase * Add new medical menu gui * Add updating injury list and body image * Add updating treatment category buttons * Update onMenuClose function * Delete unused functions * Add action buttons and triage card to menu * Move medical menu PFH to separate function * Move setTriageStatus to treatment * Add triage select dropdown * Add toggle button action * Fix mouse moving randomly when opening * Add logs list update and remove unused functions * Hide tourniquet icons by default * Remove CfgInGameUI (already in feedback) * Update patient info display * Update triage card display * Add settings to control interact menu actions * Cleanup files/paths * Move triage status update to common function * Add icons for interact menu actions * Modify icon color for interact menu actions * Update canOpenMenu for new setting * Hide pain information for unconscious * Stringtable cleanup * Use switch for pain text * Change minor triage status to minimal * Fix injury list to use new stringtable entry names * Fix medical actions check when disabled * Skip distance check in same vehicle * More cleanup * Fix CI error * Requested changes * Fix INJURIES string * Fix include after comment block * Fix missing ; Co-Authored-By: mharis001 <34453221+mharis001@users.noreply.github.com>
2019-03-24 22:17:48 +00:00
icon = QPATHTOEF(medical_gui,ui\iv.paa);
2016-10-13 07:47:52 +00:00
allowedSelections[] = {"LeftArm", "RightArm", "LeftLeg", "RightLeg"};
allowSelfTreatment = QGVAR(allowSelfIV);
2016-10-13 07:47:52 +00:00
category = "advanced";
requiredMedic = 1;
treatmentTime = 12;
items[] = {"ACE_bloodIV"};
condition = "";
callbackSuccess = QFUNC(treatmentIV);
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
litter[] = {};
};
class BloodIV_500: BloodIV {
displayName = CSTRING(Actions_Blood4_500);
2016-10-13 07:47:52 +00:00
items[] = {"ACE_bloodIV_500"};
};
class BloodIV_250: BloodIV {
displayName = CSTRING(Actions_Blood4_250);
2016-10-13 07:47:52 +00:00
items[] = {"ACE_bloodIV_250"};
};
class PlasmaIV: BloodIV {
displayName = CSTRING(Actions_Plasma4_1000);
displayNameProgress = CSTRING(Transfusing_Plasma);
2016-10-13 07:47:52 +00:00
items[] = {"ACE_plasmaIV"};
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
};
class PlasmaIV_500: PlasmaIV {
displayName = CSTRING(Actions_Plasma4_500);
2016-10-13 07:47:52 +00:00
items[] = {"ACE_plasmaIV_500"};
};
class PlasmaIV_250: PlasmaIV {
displayName = CSTRING(Actions_Plasma4_250);
2016-10-13 07:47:52 +00:00
items[] = {"ACE_plasmaIV_250"};
};
class SalineIV: BloodIV {
displayName = CSTRING(Actions_Saline4_1000);
displayNameProgress = CSTRING(Transfusing_Saline);
2016-10-13 07:47:52 +00:00
items[] = {"ACE_salineIV"};
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
};
class SalineIV_500: SalineIV {
displayName = CSTRING(Actions_Saline4_500);
2016-10-13 07:47:52 +00:00
items[] = {"ACE_salineIV_500"};
};
class SalineIV_250: SalineIV {
displayName = CSTRING(Actions_Saline4_250);
2016-10-13 07:47:52 +00:00
items[] = {"ACE_salineIV_250"};
2016-09-18 17:48:49 +00:00
};
2016-10-13 07:47:52 +00:00
// --- diagnose
class Diagnose: BasicBandage {
displayName = CSTRING(Actions_Diagnose);
displayNameProgress = CSTRING(Actions_Diagnosing);
Rewrite Medical GUI (#6831) * Add a macro for the bloodloss scaling factor * Adjust bloodloss threshold for red icon * Remove bloodloss color scaling factor The issue is actually the other way round, the factor of 20 would instantly make bodyparts red on taking a wound. * Implemet 10 color steps provided by ShackTac This replaces the old method of colouring the interaction menu icons and body image selections with a new method that has 10 distinct color steps (matching across the icons and the body image). * Use macros for constants * Implement blue damage colouring This re-adds visualisation for colouring based on damage. The case where a limb has a tourniquet will hopefully be handled by an overlayed icon. * Tidy up file structure * Move patient information display to medical_ui * Make common colour conversion code into functions * Add tourniquet icon overlay to body image * Fix mispelling I forgot to commit * Update icon paths to new white cross icon * Clean mess after rebase * Add new medical menu gui * Add updating injury list and body image * Add updating treatment category buttons * Update onMenuClose function * Delete unused functions * Add action buttons and triage card to menu * Move medical menu PFH to separate function * Move setTriageStatus to treatment * Add triage select dropdown * Add toggle button action * Fix mouse moving randomly when opening * Add logs list update and remove unused functions * Hide tourniquet icons by default * Remove CfgInGameUI (already in feedback) * Update patient info display * Update triage card display * Add settings to control interact menu actions * Cleanup files/paths * Move triage status update to common function * Add icons for interact menu actions * Modify icon color for interact menu actions * Update canOpenMenu for new setting * Hide pain information for unconscious * Stringtable cleanup * Use switch for pain text * Change minor triage status to minimal * Fix injury list to use new stringtable entry names * Fix medical actions check when disabled * Skip distance check in same vehicle * More cleanup * Fix CI error * Requested changes * Fix INJURIES string * Fix include after comment block * Fix missing ; Co-Authored-By: mharis001 <34453221+mharis001@users.noreply.github.com>
2019-03-24 22:17:48 +00:00
icon = "";
2016-10-13 07:47:52 +00:00
category = "examine";
treatmentLocations[] = {"All"};
allowedSelections[] = {"Head", "Body"};
requiredMedic = 0;
2016-10-13 15:39:01 +00:00
treatmentTime = 2.5;
2016-10-13 07:47:52 +00:00
items[] = {};
condition = QUOTE(!GVAR(advancedDiagnose));
2016-10-13 07:47:52 +00:00
callbackSuccess = QFUNC(actionDiagnose);
callbackFailure = "";
callbackProgress = "";
animationCaller = ""; // TODO
itemConsumed = 0;
litter[] = {};
};
class CheckPulse: Diagnose {
displayName = CSTRING(Actions_CheckPulse);
displayNameProgress = CSTRING(Check_Pulse_Content);
2016-10-13 07:47:52 +00:00
allowedSelections[] = {"All"};
condition = QGVAR(advancedDiagnose);
2016-10-13 07:47:52 +00:00
callbackSuccess = QFUNC(actionCheckPulse);
animationCallerProne = "";
animationCallerSelfProne = "";
};
class CheckBloodPressure: CheckPulse {
displayName = CSTRING(Actions_CheckBloodPressure);
displayNameProgress = CSTRING(Check_Bloodpressure_Content);
2016-12-05 20:34:20 +00:00
allowedSelections[] = {"LeftArm", "RightArm", "LeftLeg", "RightLeg"};
2016-10-13 07:47:52 +00:00
callbackSuccess = QFUNC(actionCheckBloodPressure);
};
class CheckResponse: CheckPulse {
displayName = CSTRING(Check_Response);
displayNameProgress = CSTRING(Check_Response_Content);
2016-10-13 15:39:01 +00:00
allowedSelections[] = {"Head"};
2016-10-13 07:47:52 +00:00
allowSelfTreatment = 0;
callbackSuccess = QFUNC(actionCheckResponse);
};
// --- misc
class BodyBag: BasicBandage {
displayName = CSTRING(PlaceInBodyBag);
displayNameProgress = CSTRING(PlacingInBodyBag);
Rewrite Medical GUI (#6831) * Add a macro for the bloodloss scaling factor * Adjust bloodloss threshold for red icon * Remove bloodloss color scaling factor The issue is actually the other way round, the factor of 20 would instantly make bodyparts red on taking a wound. * Implemet 10 color steps provided by ShackTac This replaces the old method of colouring the interaction menu icons and body image selections with a new method that has 10 distinct color steps (matching across the icons and the body image). * Use macros for constants * Implement blue damage colouring This re-adds visualisation for colouring based on damage. The case where a limb has a tourniquet will hopefully be handled by an overlayed icon. * Tidy up file structure * Move patient information display to medical_ui * Make common colour conversion code into functions * Add tourniquet icon overlay to body image * Fix mispelling I forgot to commit * Update icon paths to new white cross icon * Clean mess after rebase * Add new medical menu gui * Add updating injury list and body image * Add updating treatment category buttons * Update onMenuClose function * Delete unused functions * Add action buttons and triage card to menu * Move medical menu PFH to separate function * Move setTriageStatus to treatment * Add triage select dropdown * Add toggle button action * Fix mouse moving randomly when opening * Add logs list update and remove unused functions * Hide tourniquet icons by default * Remove CfgInGameUI (already in feedback) * Update patient info display * Update triage card display * Add settings to control interact menu actions * Cleanup files/paths * Move triage status update to common function * Add icons for interact menu actions * Modify icon color for interact menu actions * Update canOpenMenu for new setting * Hide pain information for unconscious * Stringtable cleanup * Use switch for pain text * Change minor triage status to minimal * Fix injury list to use new stringtable entry names * Fix medical actions check when disabled * Skip distance check in same vehicle * More cleanup * Fix CI error * Requested changes * Fix INJURIES string * Fix include after comment block * Fix missing ; Co-Authored-By: mharis001 <34453221+mharis001@users.noreply.github.com>
2019-03-24 22:17:48 +00:00
icon = QPATHTOEF(medical_gui,ui\bodybag.paa);
2016-10-13 07:47:52 +00:00
category = "advanced";
treatmentLocations[] = {"All"};
allowSelfTreatment = 0;
requiredMedic = 0;
treatmentTime = 15;
2016-12-10 03:03:52 +00:00
items[] = {"ACE_bodyBag"};
2016-10-13 07:47:52 +00:00
condition = "!alive _target";
callbackSuccess = QFUNC(actionPlaceInBodyBag);
callbackFailure = "";
callbackProgress = "";
itemConsumed = 1;
litter[] = {};
};
class CPR: BasicBandage {
displayName = CSTRING(Actions_CPR);
displayNameProgress = CSTRING(Actions_PerformingCPR);
Rewrite Medical GUI (#6831) * Add a macro for the bloodloss scaling factor * Adjust bloodloss threshold for red icon * Remove bloodloss color scaling factor The issue is actually the other way round, the factor of 20 would instantly make bodyparts red on taking a wound. * Implemet 10 color steps provided by ShackTac This replaces the old method of colouring the interaction menu icons and body image selections with a new method that has 10 distinct color steps (matching across the icons and the body image). * Use macros for constants * Implement blue damage colouring This re-adds visualisation for colouring based on damage. The case where a limb has a tourniquet will hopefully be handled by an overlayed icon. * Tidy up file structure * Move patient information display to medical_ui * Make common colour conversion code into functions * Add tourniquet icon overlay to body image * Fix mispelling I forgot to commit * Update icon paths to new white cross icon * Clean mess after rebase * Add new medical menu gui * Add updating injury list and body image * Add updating treatment category buttons * Update onMenuClose function * Delete unused functions * Add action buttons and triage card to menu * Move medical menu PFH to separate function * Move setTriageStatus to treatment * Add triage select dropdown * Add toggle button action * Fix mouse moving randomly when opening * Add logs list update and remove unused functions * Hide tourniquet icons by default * Remove CfgInGameUI (already in feedback) * Update patient info display * Update triage card display * Add settings to control interact menu actions * Cleanup files/paths * Move triage status update to common function * Add icons for interact menu actions * Modify icon color for interact menu actions * Update canOpenMenu for new setting * Hide pain information for unconscious * Stringtable cleanup * Use switch for pain text * Change minor triage status to minimal * Fix injury list to use new stringtable entry names * Fix medical actions check when disabled * Skip distance check in same vehicle * More cleanup * Fix CI error * Requested changes * Fix INJURIES string * Fix include after comment block * Fix missing ; Co-Authored-By: mharis001 <34453221+mharis001@users.noreply.github.com>
2019-03-24 22:17:48 +00:00
icon = "";
2016-10-13 07:47:52 +00:00
category = "advanced";
treatmentLocations[] = {"All"};
allowedSelections[] = {"Body"};
allowSelfTreatment = 0;
requiredMedic = 0;
treatmentTime = 15;
items[] = {};
2017-03-23 13:01:07 +00:00
condition = QUOTE(!(_target call EFUNC(common,isAwake)) && {!(_target getVariable [ARR_2('GVAR(receiveCPR)', false)])});
2016-10-13 07:47:52 +00:00
callbackSuccess = QFUNC(treatmentCPR);
2017-03-23 12:32:49 +00:00
callbackFailure = QFUNC(treatmentCPR_failure);
2017-03-23 12:34:25 +00:00
callbackProgress = QFUNC(treatmentCPR_progress);
2017-03-23 12:15:17 +00:00
callbackStart = QFUNC(treatmentCPR_start);
2016-10-13 07:47:52 +00:00
animationCaller = "AinvPknlMstpSlayW[wpn]Dnon_medic";
animationCallerProne = "AinvPpneMstpSlayW[wpn]Dnon_medic";
animationCallerSelf = "";
animationCallerSelfProne = "";
itemConsumed = 0;
litter[] = {};
};
2016-12-15 13:06:09 +00:00
class SurgicalKit: FieldDressing {
displayName = CSTRING(Use_SurgicalKit);
displayNameProgress = CSTRING(Stitching);
Rewrite Medical GUI (#6831) * Add a macro for the bloodloss scaling factor * Adjust bloodloss threshold for red icon * Remove bloodloss color scaling factor The issue is actually the other way round, the factor of 20 would instantly make bodyparts red on taking a wound. * Implemet 10 color steps provided by ShackTac This replaces the old method of colouring the interaction menu icons and body image selections with a new method that has 10 distinct color steps (matching across the icons and the body image). * Use macros for constants * Implement blue damage colouring This re-adds visualisation for colouring based on damage. The case where a limb has a tourniquet will hopefully be handled by an overlayed icon. * Tidy up file structure * Move patient information display to medical_ui * Make common colour conversion code into functions * Add tourniquet icon overlay to body image * Fix mispelling I forgot to commit * Update icon paths to new white cross icon * Clean mess after rebase * Add new medical menu gui * Add updating injury list and body image * Add updating treatment category buttons * Update onMenuClose function * Delete unused functions * Add action buttons and triage card to menu * Move medical menu PFH to separate function * Move setTriageStatus to treatment * Add triage select dropdown * Add toggle button action * Fix mouse moving randomly when opening * Add logs list update and remove unused functions * Hide tourniquet icons by default * Remove CfgInGameUI (already in feedback) * Update patient info display * Update triage card display * Add settings to control interact menu actions * Cleanup files/paths * Move triage status update to common function * Add icons for interact menu actions * Modify icon color for interact menu actions * Update canOpenMenu for new setting * Hide pain information for unconscious * Stringtable cleanup * Use switch for pain text * Change minor triage status to minimal * Fix injury list to use new stringtable entry names * Fix medical actions check when disabled * Skip distance check in same vehicle * More cleanup * Fix CI error * Requested changes * Fix INJURIES string * Fix include after comment block * Fix missing ; Co-Authored-By: mharis001 <34453221+mharis001@users.noreply.github.com>
2019-03-24 22:17:48 +00:00
icon = QPATHTOEF(medical_gui,ui\surgical_kit.paa);
2016-12-05 20:34:20 +00:00
category = "advanced";
items[] = {"ACE_surgicalKit"};
treatmentLocations[] = {QEGVAR(medical,useLocation_SurgicalKit)};
allowSelfTreatment = 0;
requiredMedic = QEGVAR(medical,medicSetting_SurgicalKit);
treatmentTime = QUOTE(count (_target 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"} }};
};
class PersonalAidKit: BasicBandage {
displayName = CSTRING(Use_Aid_Kit);
displayNameProgress = CSTRING(TreatmentAction);
Rewrite Medical GUI (#6831) * Add a macro for the bloodloss scaling factor * Adjust bloodloss threshold for red icon * Remove bloodloss color scaling factor The issue is actually the other way round, the factor of 20 would instantly make bodyparts red on taking a wound. * Implemet 10 color steps provided by ShackTac This replaces the old method of colouring the interaction menu icons and body image selections with a new method that has 10 distinct color steps (matching across the icons and the body image). * Use macros for constants * Implement blue damage colouring This re-adds visualisation for colouring based on damage. The case where a limb has a tourniquet will hopefully be handled by an overlayed icon. * Tidy up file structure * Move patient information display to medical_ui * Make common colour conversion code into functions * Add tourniquet icon overlay to body image * Fix mispelling I forgot to commit * Update icon paths to new white cross icon * Clean mess after rebase * Add new medical menu gui * Add updating injury list and body image * Add updating treatment category buttons * Update onMenuClose function * Delete unused functions * Add action buttons and triage card to menu * Move medical menu PFH to separate function * Move setTriageStatus to treatment * Add triage select dropdown * Add toggle button action * Fix mouse moving randomly when opening * Add logs list update and remove unused functions * Hide tourniquet icons by default * Remove CfgInGameUI (already in feedback) * Update patient info display * Update triage card display * Add settings to control interact menu actions * Cleanup files/paths * Move triage status update to common function * Add icons for interact menu actions * Modify icon color for interact menu actions * Update canOpenMenu for new setting * Hide pain information for unconscious * Stringtable cleanup * Use switch for pain text * Change minor triage status to minimal * Fix injury list to use new stringtable entry names * Fix medical actions check when disabled * Skip distance check in same vehicle * More cleanup * Fix CI error * Requested changes * Fix INJURIES string * Fix include after comment block * Fix missing ; Co-Authored-By: mharis001 <34453221+mharis001@users.noreply.github.com>
2019-03-24 22:17:48 +00:00
icon = "";
2016-12-05 20:34:20 +00:00
category = "advanced";
2018-05-08 09:16:12 +00:00
condition = QUOTE(_target call EFUNC(medical_status,isInStableCondition));
2016-12-05 20:34:20 +00:00
items[] = {"ACE_personalAidKit"};
treatmentLocations[] = {QEGVAR(medical,useLocation_PAK)};
requiredMedic = QEGVAR(medical,medicSetting_PAK);
2016-12-08 11:30:59 +00:00
treatmentTime = QUOTE(_target call FUNC(healTime));
2016-12-05 20:34:20 +00:00
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"}}
2016-09-18 17:48:49 +00:00
};
};
};