ACE3/addons/medical_gui/CfgVehicles.hpp
mharis001 8d2bba4b35
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 18:17:48 -04:00

66 lines
3.4 KiB
C++

class CfgVehicles {
class Man;
class CAManBase: Man {
class ACE_SelfActions {
class ACE_Medical {
displayName = CSTRING(Medical);
condition = QGVAR(enableSelfActions);
exceptions[] = {"isNotInside", "isNotSitting"};
statement = QUOTE([ARR_2(_target,0)] call FUNC(displayPatientInformation));
runOnHover = 1;
icon = QPATHTOF(ui\cross.paa);
#define ACTION_CONDITION condition = "true";
#include "InteractionBodyParts.hpp"
#undef ACTION_CONDITION
};
class ACE_Medical_Menu {
displayName = CSTRING(MedicalMenu);
condition = QUOTE([ARR_2(_player,_target)] call FUNC(canOpenMenu));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE(_target call FUNC(openMenu));
icon = QPATHTOF(ui\cross.paa);
};
};
class ACE_Actions {
#define ACTION_CONDITION condition = QUOTE(GVAR(enableActions) == 0);
#include "InteractionBodyParts.hpp"
#undef ACTION_CONDITION
class ACE_MainActions {
class ACE_Medical_Menu {
displayName = CSTRING(MedicalMenu);
condition = QUOTE([ARR_2(ACE_player,_target)] call FUNC(canOpenMenu));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE(_target call FUNC(openMenu));
icon = QPATHTOF(ui\cross.paa);
};
class ACE_Medical_Radial {
displayName = CSTRING(Medical);
condition = QUOTE((GVAR(enableActions) == 1 || {GVAR(enableActions) != 2 && {vehicle _target != _target && {vehicle _target == vehicle _player}}}));
exceptions[] = {"isNotInside", "isNotSitting"};
statement = QUOTE([ARR_2(_target,0)] call FUNC(displayPatientInformation));
runOnHover = 1;
icon = QPATHTOF(ui\cross.paa);
#define ACTION_CONDITION condition = "true";
#include "InteractionBodyParts.hpp"
#undef ACTION_CONDITION
};
class ACE_LoadPatient {
displayName = CSTRING(LoadPatient);
condition = QUOTE(_target getVariable [ARR_2('ACE_isUnconscious',false)] && {alive _target} && {vehicle _target == _target});
exceptions[] = {"isNotDragging", "isNotCarrying"};
statement = QUOTE([ARR_2(_player, _target)] call EFUNC(medical_treatment,actionLoadUnit));
icon = QPATHTOF(ui\cross.paa);
insertChildren = QUOTE(call DEFUNC(medical_treatment,addLoadPatientActions));
};
class ACE_UnloadPatient {
displayName = CSTRING(UnloadPatient);
condition = QUOTE(_target getVariable [ARR_2('ACE_isUnconscious',false)] && {vehicle _target != _target} && {vehicle _player == _player});
exceptions[] = {"isNotDragging", "isNotCarrying", "isNotInside"};
statement = QUOTE([ARR_2(_player, _target)] call EFUNC(medical_treatment,actionUnloadUnit));
icon = QPATHTOF(ui\cross.paa);
};
};
};
};
};