ACE3/addons/medical_gui/InteractionBodyParts.hpp
Kyle Mckay 02365609b5
Medical - Change medical to use hashmaps for wound storage (#8926)
* Refactor medical to use hashmaps for wound storage

- We most frequently want to access wounds by body part, so this makes
  that a constant time lookup.
- The body part index is no longer stored in every wound since it's
  inherent in the wound storage.
- Using body part names as the keys of the hashmap to improve code
  clarity (no more magic numbers).

closes #6468

* Add deserilization migration from old wound arrays

Will migrate from old form array wound storage to the new hashmap
strucutre during deserlization. This is relevant for communities piping
medical state out to a database or similar between sessions.

* fix issue with suture stitching

* change version number in comment

---------

Co-authored-by: Salluci <salluci.lovi@gmail.com>
2023-06-24 08:11:56 +03:00

68 lines
2.7 KiB
C++

class ACE_Head {
displayName = ECSTRING(interaction,Head);
distance = MEDICAL_ACTION_DISTANCE;
icon = QPATHTOF(ui\cross.paa);
exceptions[] = {"isNotInside", "isNotSitting"};
ACTION_CONDITION
statement = QUOTE([ARR_2(_target,0)] call FUNC(displayPatientInformation));
modifierFunction = QUOTE([ARR_3(_target,""head"",_this select 3)] call FUNC(modifyAction));
runOnHover = 1;
};
class ACE_Torso {
displayName = ECSTRING(interaction,Torso);
distance = MEDICAL_ACTION_DISTANCE;
icon = QPATHTOF(ui\cross.paa);
exceptions[] = {"isNotInside", "isNotSitting"};
ACTION_CONDITION
statement = QUOTE([ARR_2(_target,1)] call FUNC(displayPatientInformation));
modifierFunction = QUOTE([ARR_3(_target,""body"",_this select 3)] call FUNC(modifyAction));
runOnHover = 1;
class TriageCard {
displayName = CSTRING(Actions_TriageCard);
exceptions[] = {"isNotInside", "isNotSitting"};
condition = "true";
statement = QUOTE(_target call FUNC(displayTriageCard));
icon = QPATHTOF(ui\triage_card.paa);
};
};
class ACE_ArmLeft {
displayName = ECSTRING(interaction,ArmLeft);
distance = MEDICAL_ACTION_DISTANCE;
icon = QPATHTOF(ui\cross.paa);
exceptions[] = {"isNotInside", "isNotSitting"};
ACTION_CONDITION
statement = QUOTE([ARR_2(_target,2)] call FUNC(displayPatientInformation));
modifierFunction = QUOTE([ARR_3(_target,""leftarm"",_this select 3)] call FUNC(modifyAction));
runOnHover = 1;
};
class ACE_ArmRight {
displayName = ECSTRING(interaction,ArmRight);
distance = MEDICAL_ACTION_DISTANCE;
icon = QPATHTOF(ui\cross.paa);
exceptions[] = {"isNotInside", "isNotSitting"};
ACTION_CONDITION
statement = QUOTE([ARR_2(_target,3)] call FUNC(displayPatientInformation));
modifierFunction = QUOTE([ARR_3(_target,""rightarm"",_this select 3)] call FUNC(modifyAction));
runOnHover = 1;
};
class ACE_LegLeft {
displayName = ECSTRING(interaction,LegLeft);
distance = MEDICAL_ACTION_DISTANCE;
icon = QPATHTOF(ui\cross.paa);
exceptions[] = {"isNotInside", "isNotSitting"};
ACTION_CONDITION
statement = QUOTE([ARR_2(_target,4)] call FUNC(displayPatientInformation));
modifierFunction = QUOTE([ARR_3(_target,""leftleg"",_this select 3)] call FUNC(modifyAction));
runOnHover = 1;
};
class ACE_LegRight {
displayName = ECSTRING(interaction,LegRight);
distance = MEDICAL_ACTION_DISTANCE;
icon = QPATHTOF(ui\cross.paa);
exceptions[] = {"isNotInside", "isNotSitting"};
ACTION_CONDITION
statement = QUOTE([ARR_2(_target,5)] call FUNC(displayPatientInformation));
modifierFunction = QUOTE([ARR_3(_target,""rightleg"",_this select 3)] call FUNC(modifyAction));
runOnHover = 1;
};