mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
8d2bba4b35
* 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>
51 lines
1.7 KiB
Plaintext
51 lines
1.7 KiB
Plaintext
#include "script_component.hpp"
|
|
/*
|
|
* Author: Glowbal, mharis001
|
|
* Collect treatment actions for medical menu from config.
|
|
* Adds dragging actions if it exists.
|
|
*
|
|
* Arguments:
|
|
* None
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* [] call ace_medical_gui_fnc_collectAction
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
GVAR(actions) = [];
|
|
|
|
{
|
|
private _configName = configName _x;
|
|
private _displayName = getText (_x >> "displayName");
|
|
private _category = getText (_x >> "category");
|
|
private _condition = compile format [QUOTE([ARR_4(ACE_player, GVAR(target), %1 select GVAR(selectedBodyPart), '%2')] call DEFUNC(medical_treatment,canTreatCached)), ALL_BODY_PARTS, _configName];
|
|
private _statement = compile format [QUOTE([ARR_4(ACE_player, GVAR(target), %1 select GVAR(selectedBodyPart), '%2')] call DEFUNC(medical_treatment,treatment)), ALL_BODY_PARTS, _configName];
|
|
|
|
GVAR(actions) pushBack [_displayName, _category, _condition, _statement];
|
|
} forEach configProperties [configFile >> QEGVAR(medical_treatment,actions), "isClass _x"];
|
|
|
|
|
|
if ("ace_dragging" call EFUNC(common,isModLoaded)) then {
|
|
GVAR(actions) pushBack [
|
|
localize ELSTRING(dragging,Drag), "drag",
|
|
{ACE_player != GVAR(target) && {[ACE_player, GVAR(target)] call EFUNC(dragging,canDrag)}},
|
|
{
|
|
GVAR(pendingReopen) = false;
|
|
[ACE_player, GVAR(target)] call EFUNC(dragging,startDrag);
|
|
}
|
|
];
|
|
|
|
GVAR(actions) pushBack [
|
|
localize ELSTRING(dragging,Carry), "drag",
|
|
{ACE_player != GVAR(target) && {[ACE_player, GVAR(target)] call EFUNC(dragging,canCarry)}},
|
|
{
|
|
GVAR(pendingReopen) = false;
|
|
[ACE_player, GVAR(target)] call EFUNC(dragging,startCarry);
|
|
}
|
|
];
|
|
};
|