2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2020-10-29 00:08:00 +00:00
|
|
|
/*
|
2021-06-27 05:01:12 +00:00
|
|
|
* Author: Brett Mayson
|
2020-10-29 00:08:00 +00:00
|
|
|
* Modifies the action color to match the triage level.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Target <OBJECT>
|
|
|
|
* 1: Player <OBJECT>
|
|
|
|
* 2: Args <ANY>
|
|
|
|
* 3: Action Data <ARRAY>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
2021-10-11 09:51:05 +00:00
|
|
|
* [cursorObject, player, [], []] call ace_medical_gui_fnc_modifyActionTriageLevel
|
2020-10-29 00:08:00 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
|
|
|
params ["_target", "_player", "", "_actionData"];
|
|
|
|
if (
|
|
|
|
GVAR(interactionMenuShowTriage) == 1 // Anyone
|
|
|
|
|| {GVAR(interactionMenuShowTriage) == 2 && {[_player] call EFUNC(medical_treatment,isMedic)}} // Medics & Doctors
|
|
|
|
) then {
|
|
|
|
private _colorHex = switch (_target getVariable [QEGVAR(medical,triageLevel), 0]) do {
|
|
|
|
case 1: {
|
|
|
|
[TRIAGE_COLOR_MINIMAL] call BIS_fnc_colorRGBtoHTML
|
|
|
|
};
|
|
|
|
case 2: {
|
|
|
|
[TRIAGE_COLOR_DELAYED] call BIS_fnc_colorRGBtoHTML
|
|
|
|
};
|
|
|
|
case 3: {
|
|
|
|
[TRIAGE_COLOR_IMMEDIATE] call BIS_fnc_colorRGBtoHTML
|
|
|
|
};
|
|
|
|
case 4: {
|
|
|
|
[TRIAGE_COLOR_DECEASED] call BIS_fnc_colorRGBtoHTML
|
|
|
|
};
|
|
|
|
default {
|
|
|
|
"#FFFFFF"
|
|
|
|
};
|
|
|
|
};
|
2021-06-27 05:01:12 +00:00
|
|
|
|
2020-10-29 00:08:00 +00:00
|
|
|
_actionData params ["", "", "_icon"];
|
|
|
|
_icon set [1, _colorHex];
|
|
|
|
};
|