First working version of the medical menu

This commit is contained in:
Glowbal 2015-08-06 23:51:17 +02:00
parent 5ac2972573
commit 9b380315e5
18 changed files with 611 additions and 357 deletions

View File

@ -1,2 +1,32 @@
#include "script_component.hpp"
if (!hasInterface) exitwith {};
["medical_treatmentSuccess", {
if (GVAR(openAfterTreatment) && {GVAR(pendingReopen)}) then {
GVAR(pendingReopen) = false;
[{
[GVAR(INTERACTION_TARGET)] call FUNC(openMenu);
}, []] call EFUNC(common,execNextFrame);
};
}] call EFUNC(common,addEventhandler);
["ACE3 Common", QGVAR(DisplayMenuKey), localize LSTRING(DisplayMenuKey),
{
_target = cursorTarget;
if (!(_target isKindOf "CAManBase") || ACE_player distance _target > 10) then {_target = ACE_player};
// Conditions: canInteract
if !([ACE_player, _target, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Statement
[_target] call FUNC(openMenu);
false
},
{
if (ACE_time - GVAR(lastOpenedOn) > 0.5) then {
[ObjNull] call FUNC(openMenu);
};
},
[0, [true, false, false]], false, 0] call CBA_fnc_addKeybind;

View File

@ -10,5 +10,17 @@ PREP(updateUIInfo);
PREP(handleUI_DisplayOptions);
PREP(handleUI_dropDownTriageCard);
PREP(getTreatmentOptions);
PREP(updateActivityLog);
PREP(updateBodyImage);
PREP(updateInformationLists);
PREP(setTriageStatus);
PREP(collectActions);
GVAR(INTERACTION_TARGET) = objNull;
GVAR(actionsOther) = [];
GVAR(actionsSelf) = [];
GVAR(selectedBodyPart) = 0;
call FUNC(collectActions);
ADDON = true;

View File

@ -6,9 +6,9 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_medical"};
version = VERSION;
author[] = {$STR_ACE_Common_ACETeam, "Glowbal"};
authorUrl = "http://ace3mod.com";
VERSION_CONFIG;
};
};
class CfgAddons {
@ -20,5 +20,49 @@ class CfgAddons {
};
#include "CfgEventHandlers.hpp"
#include "ui\define.hpp"
#include "ui\menu.hpp"
class ACE_Settings {
class GVAR(allow) {
displayName = CSTRING(allow);
description = CSTRING(allow_Descr);
typeName = "BOOL";
value = 1;
};
class GVAR(useMenu) {
displayName = CSTRING(useMenu);
description = CSTRING(useMenu_Descr);
typeName = "BOOL";
value = 1;
isClientSettable = 1;
};
class GVAR(openAfterTreatment) {
displayName = CSTRING(openAfterTreatment);
description = CSTRING(openAfterTreatment_Descr);
typeName = "BOOL";
value = 1;
isClientSettable = 1;
};
};
class CfgVehicles {
class Man;
class CAManBase: Man {
class ACE_SelfActions {
};
class ACE_Actions {
// Create a consolidates medical menu for treatment while boarded
class ACE_MainActions {
class Medical_Menu {
displayName = CSTRING(OpenMenu);
runOnHover = 0;
exceptions[] = {"isNotInside"};
condition = QUOTE(GVAR(allow) && GVAR(useMenu));
statement = QUOTE([_target] call DFUNC(openMenu));
icon = PATHTOEF(medical,UI\icons\medical_cross.paa);
};
};
};
};
};

View File

@ -0,0 +1,40 @@
/*
* Author: Glowbal
* Collect treatment actions from medical config
*
* Arguments:
*
* Return Value:
* NONE
*
* Public: No
*/
#include "script_component.hpp"
private ["_configBasic", "_configAdvanced", "_compileActionsLevel"];
_configBasic = (configFile >> "ACE_Medical_Actions" >> "Basic");
_configAdvanced = (configFile >> "ACE_Medical_Actions" >> "Advanced");
_compileActionsLevel = {
private [ "_config", "_entryCount", "_actions", "_action", "_displayName","_condition", "_category", "_statement"];
_config = _this select 0;
_entryCount = (count _config) - 1;
_actions = [];
for "_i" from 0 to _entryCount /* step +1 */ do {
_action = _config select _i;
if (isClass _action) then {
_displayName = getText (_action >> "displayName");
_category = getText (_action >> "category");
_condition = format[QUOTE([ARR_4(ACE_player, GVAR(INTERACTION_TARGET), EGVAR(medical,SELECTIONS) select GVAR(selectedBodyPart), '%1')] call DEFUNC(medical,canTreatCached)), configName _action];
_statement = format[QUOTE([ARR_4(ACE_player, GVAR(INTERACTION_TARGET), EGVAR(medical,SELECTIONS) select GVAR(selectedBodyPart), '%1')] call DEFUNC(medical,treatment)), configName _action];
_actions pushback [_displayName, _category, compile _condition, compile _statement];
};
};
_actions;
};
GVAR(actionsBasic) = [_configBasic] call _compileActionsLevel;
GVAR(actionsAdvanced) = [_configAdvanced] call _compileActionsLevel;

View File

@ -1 +1,39 @@
// TODO implement, grab/parse from config ?
/*
* Author: Glowbal
* Grab available treatment options for given category
*
* Arguments:
* 0: The medic <OBJECT>
* 1: The patient <OBJECT>
* 2: Category name <STRING>
*
* Return Value:
* Available actions <ARRAY>
*
* Public: No
*/
#include "script_component.hpp"
private ["_player", "_target", "_name", "_actions"];
_player = _this select 0;
_target = _this select 1;
_name = _this select 2;
if !([ACE_player, _target, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitwith {[]};
_actions = if (EGVAR(medical,level) == 2) then {
GVAR(actionsAdvanced);
} else {
GVAR(actionsBasic);
};
_collectedActions = [];
_bodyPart = EGVAR(medical,SELECTIONS) select GVAR(selectedBodyPart);
{
if (_name == (_x select 1) && {call (_x select 2)}) then {
_collectedActions pushback _x;
};
}foreach _actions;
_collectedActions;

View File

@ -1,11 +1,14 @@
/**
* fn_displayOptions.sqf
* @Descr: N/A
* @Author: Glowbal
/*
* Author: Glowbal
* Display the available treatment options in category
*
* @Arguments: []
* @Return:
* @PublicAPI: false
* Arguments:
* 0: Category name <STRING>
*
* Return Value:
* NONE
*
* Public: No
*/
#include "script_component.hpp"
@ -65,7 +68,7 @@ if (_name == "triage") exitwith {
ctrlEnable[212,false];
_entries = [ACE_player, GVAR(INTERACTION_TARGET),_name] call FUNC(getTreatmentOptions);
_entries = [ACE_player, GVAR(INTERACTION_TARGET), _name] call FUNC(getTreatmentOptions);
{
//player sidechat format["TRIGGERED: %1",_x];
@ -73,9 +76,9 @@ _entries = [ACE_player, GVAR(INTERACTION_TARGET),_name] call FUNC(getTreatmentOp
_ctrl = (_display displayCtrl (START_IDC + _foreachIndex));
if (!(_foreachIndex > AMOUNT_OF_ENTRIES)) then {
_ctrl ctrlSetText (_x select 0);
_code = format["[ACE_player, ACE_medical_INTERACTION_TARGET] call %1;",(_x select 1)];
_code = format["ace_medical_menu_pendingReopen = true; call %1;",(_x select 3)];
_ctrl ctrlSetEventHandler ["ButtonClick", _code];
_ctrl ctrlSetTooltip (_x select 2);
_ctrl ctrlSetTooltip (_x select 0); // TODO implement
_ctrl ctrlShow true;
} else {
_ctrl ctrlSetText "";

View File

@ -1,11 +1,13 @@
/**
* fn_handleUI_dropDownTriageCard.sqf
* @Descr: N/A
* @Author: Glowbal
/*
* Author: Glowbal
* Handle the triage card display
*
* @Arguments: []
* @Return:
* @PublicAPI: false
* Arguments:
*
* Return Value:
* NONE
*
* Public: No
*/
#include "script_component.hpp"

View File

@ -1,13 +1,16 @@
/**
* fn_onMenuOpen.sqf
* @Descr: N/A
* @Author: Glowbal
/*
* Author: Glowbal
* Handle medical menu opened
*
* @Arguments: []
* @Return:
* @PublicAPI: false
* Arguments:
*
* Return Value:
* NONE
*
* Public: No
*/
#include "script_component.hpp"
if (isnil QGVAR(LatestDisplayOptionMenu)) then {
@ -26,33 +29,29 @@ if (isnil QGVAR(INTERACTION_TARGET_PREVIOUS)) then {
};
[GVAR(LatestDisplayOptionMenu)] call FUNC(handleUI_DisplayOptions);
[] call FUNC(updateActivityLog);
[_target] call FUNC(updateUIInfo);
// 11 till 18
disableSerialization;
_display = _this select 0; //uiNamespace getVariable QGVAR(medicalMenu);
if (isnil "_display") exitwith {
if (isnil "_display") exitwith {};
[_target, _display] call FUNC(updateUIInfo);
};
(_display displayCtrl 11) ctrlSetTooltip localize "STR_ACE_UI_VIEW_TRIAGE_CARD";
(_display displayCtrl 12) ctrlSetTooltip localize "STR_ACE_UI_EXAMINE_PATIENT";
(_display displayCtrl 13) ctrlSetTooltip localize "STR_ACE_UI_BANDAGE_FRACTURES";
(_display displayCtrl 14) ctrlSetTooltip localize "STR_ACE_UI_MEDICATION";
(_display displayCtrl 15) ctrlSetTooltip localize "STR_ACE_UI_AIRWAY_MANAGEMENT";
(_display displayCtrl 16) ctrlSetTooltip localize "STR_ACE_UI_ADVANCED_TREATMENT";
(_display displayCtrl 17) ctrlSetTooltip localize "STR_ACE_UI_DRAG_CARRY";
(_display displayCtrl 18) ctrlSetTooltip localize "STR_ACE_UI_TOGGLE_SELF";
(_display displayCtrl 301) ctrlSetTooltip localize "STR_ACE_UI_SELECT_HEAD";
(_display displayCtrl 302) ctrlSetTooltip localize "STR_ACE_UI_SELECT_TORSO";
(_display displayCtrl 303) ctrlSetTooltip localize "STR_ACE_UI_SELECT_ARM_R";
(_display displayCtrl 304) ctrlSetTooltip localize "STR_ACE_UI_SELECT_ARM_L";
(_display displayCtrl 305) ctrlSetTooltip localize "STR_ACE_UI_SELECT_LEG_R";
(_display displayCtrl 306) ctrlSetTooltip localize "STR_ACE_UI_SELECT_LEG_L";
(_display displayCtrl 2001) ctrlSetTooltip localize "STR_ACE_UI_SELECT_TRIAGE_STATUS";
(_display displayCtrl 11) ctrlSetTooltip localize "STR_ACE_Medical_Menu_VIEW_TRIAGE_CARD";
(_display displayCtrl 12) ctrlSetTooltip localize "STR_ACE_Medical_Menu_EXAMINE_PATIENT";
(_display displayCtrl 13) ctrlSetTooltip localize "STR_ACE_Medical_Menu_BANDAGE_FRACTURES";
(_display displayCtrl 14) ctrlSetTooltip localize "STR_ACE_Medical_Menu_MEDICATION";
(_display displayCtrl 15) ctrlSetTooltip localize "STR_ACE_Medical_Menu_AIRWAY_MANAGEMENT";
(_display displayCtrl 16) ctrlSetTooltip localize "STR_ACE_Medical_Menu_ADVANCED_TREATMENT";
(_display displayCtrl 17) ctrlSetTooltip localize "STR_ACE_Medical_Menu_DRAG_CARRY";
(_display displayCtrl 18) ctrlSetTooltip localize "STR_ACE_Medical_Menu_TOGGLE_SELF";
(_display displayCtrl 301) ctrlSetTooltip localize "STR_ACE_Medical_Menu_SELECT_HEAD";
(_display displayCtrl 302) ctrlSetTooltip localize "STR_ACE_Medical_Menu_SELECT_TORSO";
(_display displayCtrl 303) ctrlSetTooltip localize "STR_ACE_Medical_Menu_SELECT_ARM_R";
(_display displayCtrl 304) ctrlSetTooltip localize "STR_ACE_Medical_Menu_SELECT_ARM_L";
(_display displayCtrl 305) ctrlSetTooltip localize "STR_ACE_Medical_Menu_SELECT_LEG_R";
(_display displayCtrl 306) ctrlSetTooltip localize "STR_ACE_Medical_Menu_SELECT_LEG_L";
(_display displayCtrl 2001) ctrlSetTooltip localize "STR_ACE_Medical_Menu_SELECT_TRIAGE_STATUS";
(_display displayCtrl 1) ctrlSetText format["%1",[_target] call EFUNC(common,getName)];
setMousePosition [ 0.4, 0.4];
@ -61,12 +60,10 @@ setMousePosition [ 0.4, 0.4];
if (isNull GVAR(INTERACTION_TARGET)) then {
GVAR(INTERACTION_TARGET) = ACE_player;
};
[GVAR(INTERACTION_TARGET)] call FUNC(updateUIInfo);
[GVAR(INTERACTION_TARGET), _this select 0] call FUNC(updateUIInfo);
[GVAR(INTERACTION_TARGET)] call FUNC(updateIcons);
[GVAR(LatestDisplayOptionMenu)] call FUNC(handleUI_DisplayOptions);
[] call FUNC(updateActivityLog);
_status = [GVAR(INTERACTION_TARGET)] call FUNC(getTriageStatus);
((_this select 0) displayCtrl 2000) ctrlSetText (_status select 0);
((_this select 0) displayCtrl 2000) ctrlSetBackgroundColor (_status select 2);

View File

@ -1,6 +1,22 @@
/*
* Author: Glowbal
* Open the medical menu for target
*
* Arguments:
* 0: Target <OBJECT>
*
* Return Value:
* NONE
*
* Public: No
*/
#include "script_component.hpp"
if (dialog) exitwith {
private ["_interactionTarget"];
_interactionTarget = _this select 0;
if (dialog || isNull _interactionTarget) exitwith {
disableSerialization;
private "_display";
@ -8,26 +24,9 @@ if (dialog) exitwith {
if (!isnil "_display") then {
closeDialog 314412;
};
};
private ["_interactionTarget"];
_interactionTarget = objNull;
if (count _this > 0) then {
_interactionTarget = _this select 0;
} else {
_interactionTarget = cursortarget;
if (isNull _interactionTarget) then {
_interactionTarget = ACE_player;
};
if (_interactionTarget distance ACE_player > 5 || !(_interactionTarget isKindOf "CaManBase")) then {
_interactionTarget = ACE_player;
};
};
if (isNull _interactionTarget) then {
_interactionTarget = ACE_player;
};
GVAR(INTERACTION_TARGET) = _interactionTarget;
createDialog QGVAR(medicalMenu);
GVAR(lastOpenedOn) = ACE_time;

View File

@ -0,0 +1,21 @@
/*
* Author: Glowbal
* Set the triage status of object
*
* Arguments:
* 0: Target <OBJECT>
* 1: Status <NUMBER>
*
* Return Value:
* NONE
*
* Public: No
*/
#include "script_component.hpp"
private ["_target", "_status"];
_target = _this select 0;
_status = _this select 1;
_target setvariable [QEGVAR(medical,triageLevel), _status, true];

View File

@ -0,0 +1,41 @@
/*
* Author: Glowbal
* Update the activity log
*
* Arguments:
* 0: display <DISPLAY>
* 1: log collection <ARRAY>
*
* Return Value:
* NONE
*
* Public: No
*/
#include "script_component.hpp"
private ["_display", "_logs", "_logCtrl"];
_display = _this select 0;
_logs = _this select 1;
_logCtrl = (_display displayCtrl 214);
lbClear _logCtrl;
private ["_message", "_moment", "_arguments"];
{
// [_message,_moment,_type, _arguments]
_message = _x select 0;
_moment = _x select 1;
_arguments = _x select 3;
if (isLocalized _message) then {
_message = localize _message;
};
{
if (typeName _x == "STRING" && {isLocalized _x}) then {
_arguments set [_foreachIndex, localize _x];
};
}foreach _arguments;
_message = format([_message] + _arguments);
_logCtrl lbAdd format["%1 %2", _moment, _message];
}foreach _logs;

View File

@ -0,0 +1,41 @@
/*
* Author: Glowbal
* Update the body image on the menu
*
* Arguments:
* 0: selection bloodloss <ARRAY>
* 1: display <DISPLAY>
*
* Return Value:
* NONE
*
* Public: No
*/
#include "script_component.hpp"
private ["_selectionBloodLoss", "_display"];
_selectionBloodLoss = _this select 0;
_display = _this select 1;
// Handle the body image coloring
_availableSelections = [50,51,52,53,54,55];
{
private ["_red", "_green", "_blue"];
_total = _x;
_red = 1;
_green = 1;
_blue = 1;
if (_total > 0) then {
if (_damaged select _forEachIndex) then {
_green = (0.9 - _total) max 0;
_blue = _green;
} else {
_green = (0.9 - _total) max 0;
_red = _green;
//_blue = _green;
};
};
(_display displayCtrl (_availableSelections select _foreachIndex)) ctrlSetTextColor [_red, _green, _blue, 1.0];
}foreach _selectionBloodLoss;

View File

@ -1,11 +1,13 @@
/**
* fn_updateIcons.sqf
* @Descr: N/A
* @Author: Glowbal
/*
* Author: Glowbal
* Update the category icons
*
* @Arguments: []
* @Return:
* @PublicAPI: false
* Arguments:
*
* Return Value:
* NONE
*
* Public: No
*/
#include "script_component.hpp"

View File

@ -0,0 +1,37 @@
/*
* Author: Glowbal
* Update the treatment information list
*
* Arguments:
* 0: display <DISPLAY>
* 1: message collection <ARRAY>
* 2: injury collection <ARRAY>
*
* Return Value:
* NONE
*
* Public: No
*/
#include "script_component.hpp"
private ["_display", "_genericMessages", "_allInjuryTexts", "_lbCtrl"];
_display = _this select 0;
_genericMessages = _this select 1;
_allInjuryTexts = _this select 2;
_lbCtrl = (_display displayCtrl 213);
lbClear _lbCtrl;
{
_lbCtrl lbAdd (_x select 0);
_lbCtrl lbSetColor [_foreachIndex, _x select 1];
}foreach _genericMessages;
_amountOfGeneric = count _genericMessages;
{
_lbCtrl lbAdd (_x select 0);
_lbCtrl lbSetColor [_foreachIndex + _amountOfGeneric, _x select 1];
}foreach _allInjuryTexts;
if (count _allInjuryTexts == 0) then {
_lbCtrl lbAdd (localize ELSTRING(medical,NoInjuriesBodypart));
};

View File

@ -1,215 +1,137 @@
/**
* fn_updateUIInfo.sqf
* @Descr: N/A
* @Author: Glowbal
/*
* Author: Glowbal
* Update all UI information in the medical menu
*
* @Arguments: []
* @Return:
* @PublicAPI: false
* Arguments:
* 0: target <OBJECT>
* 1: display <DISPLAY>
*
* Return Value:
* NONE
*
* Public: No
*/
#include "script_component.hpp"
private ["_targetObj","_bodyPartText","_bodyPartN","_openWounds","_bandagedWounds","_fractures","_listOfWounds","_listOfBandagedWounds","_listOfFractures","_counter","_nameEntry","_untreatedWounds" ,"_remainder", "_numberOf", "_airwayStatus", "_airwayTreated"];
_targetObj = _this select 0;
private ["_targeT", "_display", "_genericMessages", "_totalIvVolume", "_damaged", "_selectionBloodLoss", "_allInjuryTexts"];
_target = _this select 0;
_display = _this select 1;
_bodyPartText = (call FUNC(getSelectedBodyPart));
_bodyPartN = [_bodyPartText] call FUNC(getBodyPartNumber);
_selectionN = GVAR(selectedBodyPart);
if (_selectionN < 0 || _selectionN > 5) exitwith {};
if (_bodyPartN < 0 || _bodyPartN > 5) exitwith {};
_openWounds = [_targetObj,QGVAR(openWounds)] call EFUNC(common,getDefinedVariable);
_bandagedWounds = [_targetObj,QGVAR(bandagedWounds)] call EFUNC(common,getDefinedVariable);
_fractures = [_targetObj,QGVAR(fractures)] call EFUNC(common,getDefinedVariable);
_airwayStatus = [_targetObj,QGVAR(airway)] call EFUNC(common,getDefinedVariable);
if (count _this > 1) then {
switch (_this select 1) do {
case QGVAR(openWounds): { _openWounds = _this select 2; };
case QGVAR(bandagedWounds): { _bandagedWounds = _this select 2; };
case QGVAR(fractures): { _fractures = _this select 2; };
};
_genericMessages = [];
if (EGVAR(medical,level) >= 2) then {
_partText = [ELSTRING(medical,Head), ELSTRING(medical,Torso), ELSTRING(medical,LeftArm) ,ELSTRING(medical,RightArm) ,ELSTRING(medical,LeftLeg), ELSTRING(medical,RightLeg)] select _selectionN;
_genericMessages pushback [localize _partText, [1, 1, 1, 1]];
};
[_openWounds,_bandagedWounds] call FUNC(updateBodyImg);
_listOfWounds = _openWounds select _bodyPartN;
_listOfBandagedWounds = _bandagedWounds select _bodyPartN;
_listOfFractures = _fractures select _bodyPartN;
// TODO collect all information first, then clear the lb and fill in with details. Also; use ctrl instead of IDC.
_numberOf = 0;
lbClear 213;
_displayBodyPartText = switch (_bodyPartText) do {
case "head": {
localize "STR_ACE_UI_HEAD";
};
case "body": {
localize "STR_ACE_UI_TORSO";
};
case "hand_r": {
localize "STR_ACE_UI_ARM_R";
};
case "hand_l": {
localize "STR_ACE_UI_ARM_L";
};
case "leg_r": {
localize "STR_ACE_UI_LEG_R";
};
case "leg_l": {
localize "STR_ACE_UI_LEG_L";
};
default {"-"};
if (_target getvariable[QGVAR(isBleeding), false]) then {
_genericMessages pushback [localize ELSTRING(medical,Status_Bleeding), [1, 0.1, 0.1, 1]];
};
if (_target getvariable[QGVAR(hasLostBlood), 0] > 1) then {
_genericMessages pushback [localize ELSTRING(medical,Status_Lost_Blood), [1, 0.1, 0.1, 1]];
};
lbadd[213,format[localize "STR_ACE_UI_SELECTED_BODY_PART",_displayBodyPartText]];
lbSetData [213, _numberOf, ""];
lbSetColor [213, _numberOf, [0.27, 0.40, 0.26, 1]];
_numberOf = _numberOf + 1;
if (GVAR(setting_allowAirwayInjuries)) then {
_airwayTreated = _targetObj getvariable [QGVAR(airwayTreated), false];
if (_airwayStatus > 0) then {
_nameEntry = switch (_airwayStatus) do {
case 0: {localize "STR_ACE_UI_NORMAL_BREATHING"};
case 1: {localize "STR_ACE_UI_DIFFICULT_BREATHING"};
case 2: {localize "STR_ACE_UI_ALMOST_NO_BREATHING"};
default {localize "STR_ACE_UI_NO_BREATHING"};
};
if (!(alive _targetObj) || (_targetObj getvariable [QEGVAR(common,isDead), false])) then {
lbadd[213,format["%1",localize "STR_ACE_UI_NO_BREATHING"]];
} else {
lbadd[213,format["%1",_nameEntry]];
};
lbSetData [213, _numberOf, ""];
_numberOf = _numberOf + 1;
} else {
if (!(alive _targetObj) || (_targetObj getvariable [QEGVAR(common,isDead), false])) then {
lbadd[213,format["%1",localize "STR_ACE_UI_NO_BREATHING"]];
lbSetData [213, _numberOf, ""];
_numberOf = _numberOf + 1;
};
};
if (_airwayTreated) then {
lbadd[213,localize "STR_ACE_UI_STATUS_NPA_APPLIED"];
lbSetData [213, _numberOf, ""];
lbSetColor [213, _numberOf, [0.5, 0.5, 0, 1]];
_numberOf = _numberOf + 1;
};
if (((_target getvariable [QGVAR(tourniquets), [0,0,0,0,0,0]]) select _selectionN) > 0) then {
_genericMessages pushback [localize ELSTRING(medical,Status_Tourniquet_Applied), [0.77, 0.51, 0.08, 1]];
};
if (_target getvariable[QGVAR(hasPain), false]) then {
_genericMessages pushback [localize ELSTRING(medical,Status_Pain), [1, 1, 1, 1]];
};
if (([_targetObj,QGVAR(isBleeding)] call EFUNC(common,getDefinedVariable))) then {
lbadd[213,localize "STR_ACE_UI_STATUS_BLEEDING"];
lbSetData [213, _numberOf, ""];
_numberOf = _numberOf + 1;
};
if (([_targetObj,QGVAR(hasLostBlood)] call EFUNC(common,getDefinedVariable))) then {
lbadd[213,localize "STR_ACE_UI_STATUS_LOST_BLOOD"];
lbSetData [213, _numberOf, ""];
_numberOf = _numberOf + 1;
};
if (([_targetObj,QGVAR(hasPain)] call EFUNC(common,getDefinedVariable))) then {
lbadd[213,localize "STR_ACE_UI_STATUS_PAIN"];
lbSetData [213, _numberOf, ""];
_numberOf = _numberOf + 1;
};
if (([_targetObj, _bodyPartText] call FUNC(hasTourniquetAppliedTo))) then {
lbadd[213,localize "STR_ACE_UI_STATUS_TOURNIQUET_APPLIED"];
lbSetColor [213, _numberOf, [0.5, 0.5, 0, 1]];
lbSetData [213, _numberOf, ""];
_numberOf = _numberOf + 1;
};
_counter = 0;
_totalIvVolume = 0;
{
if (_x > 0) then {
_untreatedWounds = floor _x;
_remainder = _x - (floor _x);
_nameEntry = switch (_counter) do {
case 0: {localize "STR_ACE_UI_SMALL"};
case 1: {localize "STR_ACE_UI_MEDIUM"};
case 2: {localize "STR_ACE_UI_LARGE"};
default {localize "STR_ACE_UI_SMALL"};
private "_value";
_value = _target getvariable _x;
if !(isnil "_value") then {
_totalIvVolume = _totalIvVolume + (_target getvariable [_x, 0]);
};
}foreach GVAR(IVBags);
if (_totalIvVolume >= 1) then {
_genericMessages pushback [format[localize ELSTRING(medical,receivingIvVolume), floor _totalIvVolume], [1, 1, 1, 1]];
};
if (_untreatedWounds > 1) then {
lbadd[213,format[localize "STR_ACE_UI_MULTIPLE_OPEN_WOUNDS",_nameEntry,_untreatedWounds]];
lbSetData [213, _numberOf, format["open_wound_%1",_counter]];
lbSetColor [213, _numberOf, [0.6, 0, 0, 1]];
_numberOf = _numberOf + 1;
_damaged = [false, false, false, false, false, false];
_selectionBloodLoss = [0,0,0,0,0,0];
_allInjuryTexts = [];
if (EGVAR(medical,level) >= 2) then {
_openWounds = _target getvariable [QEGVAR(medical,openWounds), []];
private "_amountOf";
{
_amountOf = _x select 3;
// Find how much this bodypart is bleeding
if (_amountOf > 0) then {
_damaged set[_x select 2, true];
_selectionBloodLoss set [(_x select 2), (_selectionBloodLoss select (_x select 2)) + (20 * ((_x select 4) * _amountOf))];
if (_selectionN == (_x select 2)) then {
// Collect the text to be displayed for this injury [ Select injury class type definition - select the classname DisplayName (6th), amount of injuries for this]
if (_amountOf >= 1) then {
// TODO localization
_allInjuryTexts pushback [format["%2x %1", (EGVAR(medical,AllWoundInjuryTypes) select (_x select 1)) select 6, _amountOf], [1,1,1,1]];
} else {
if (_untreatedWounds == 1) then {
lbadd[213,format[localize "STR_ACE_UI_SINGLE_OPEN_WOUND",_nameEntry]];
lbSetData [213, _numberOf, format["open_wound_%1",_counter]];
lbSetColor [213, _numberOf, [0.6, 0, 0, 1]];
_numberOf = _numberOf + 1;
// TODO localization
_allInjuryTexts pushback [format["Partial %1", (EGVAR(medical,AllWoundInjuryTypes) select (_x select 1)) select 6], [1,1,1,1]];
};
};
if (_remainder > 0) then {
lbadd[213,format[localize "STR_ACE_UI_PARTIAL_OPEN_WOUND",_nameEntry]];
lbSetData [213, _numberOf, format["open_wound_%1",_counter]];
lbSetColor [213, _numberOf, [0.6, 0, 0, 1]];
_numberOf = _numberOf + 1;
};
}foreach _openWounds;
_bandagedwounds = _target getvariable [QEGVAR(medical,bandagedWounds), []];
{
_amountOf = _x select 3;
// Find how much this bodypart is bleeding
if !(_damaged select (_x select 2)) then {
_selectionBloodLoss set [(_x select 2), (_selectionBloodLoss select (_x select 2)) + (20 * ((_x select 4) * _amountOf))];
};
_counter = _counter + 1;
}foreach _listOfWounds;
_counter = 0;
{
if (_x > 0) then {
_untreatedWounds = floor _x;
_remainder = _x - (floor _x);
_nameEntry = switch (_counter) do {
case 0: {localize "STR_ACE_UI_SMALL"};
case 1: {localize "STR_ACE_UI_MEDIUM"};
case 2: {localize "STR_ACE_UI_LARGE"};
default {localize "STR_ACE_UI_SMALL"};
};
if (_untreatedWounds > 1) then {
lbadd[213,format[localize "STR_ACE_UI_MULTIPLE_BANDAGED_WOUNDS",_nameEntry,_untreatedWounds]];
lbSetData [213, _numberOf, format["bandaged_wound_%1",_counter]];
_numberOf = _numberOf + 1;
if (_selectionN == (_x select 2)) then {
// Collect the text to be displayed for this injury [ Select injury class type definition - select the classname DisplayName (6th), amount of injuries for this]
if (_amountOf > 0) then {
if (_amountOf >= 1) then {
// TODO localization
_allInjuryTexts pushback [format["[B] %2x %1", (EGVAR(medical,AllWoundInjuryTypes) select (_x select 1)) select 6, _amountOf], [0.88,0.7,0.65,1]];
} else {
if (_untreatedWounds == 1) then {
lbadd[213,format[localize "STR_ACE_UI_SINGLE_BANDAGED_WOUND",_nameEntry]];
lbSetData [213, _numberOf, format["bandaged_wound_%1",_counter]];
_numberOf = _numberOf + 1;
// TODO localization
_allInjuryTexts pushback [format["[B] Partial %1", (EGVAR(medical,AllWoundInjuryTypes) select (_x select 1)) select 6], [0.88,0.7,0.65,1]];
};
};
};
}foreach _bandagedwounds;
} else {
_damaged = [true, true, true, true, true, true];
{
_selectionBloodLoss set [_forEachIndex, _target getHitPointDamage _x];
if (_remainder > 0) then {
lbadd[213,format[localize "STR_ACE_UI_PARTIAL_BANDAGED_WOUND",_nameEntry]];
lbSetData [213, _numberOf, format["bandaged_wound_%1",_counter]];
_numberOf = _numberOf + 1;
if (_target getHitPointDamage _x > 0 && {_forEachIndex == _selectionN}) then {
_pointDamage = _target getHitPointDamage _x;
_severity = switch (true) do {
case (_pointDamage > 0.5): {localize ELSTRING(medical,HeavilyWounded)};
case (_pointDamage > 0.1): {localize ELSTRING(medical,LightlyWounded)};
default {localize ELSTRING(medical,VeryLightlyWounded)};
};
_part = localize ([
ELSTRING(medical,Head),
ELSTRING(medical,Torso),
ELSTRING(medical,LeftArm),
ELSTRING(medical,RightArm),
ELSTRING(medical,LeftLeg),
ELSTRING(medical,RightLeg)
] select _forEachIndex);
_allInjuryTexts pushBack [format ["%1 %2", _severity, toLower _part], [1,1,1,1]];
};
_counter = _counter + 1;
}foreach _listOfBandagedWounds;
} forEach ["HitHead", "HitBody", "HitLeftArm", "HitRightArm", "HitLeftLeg", "HitRightLeg"];
};
_counter = 0;
{
if (_x > 0) then {
_nameEntry = switch (_counter) do {
case 0: {localize "STR_ACE_UI_SMALL"};
case 1: {localize "STR_ACE_UI_MEDIUM"};
case 2: {localize "STR_ACE_UI_LARGE"};
default {localize "STR_ACE_UI_SMALL"};
};
lbadd[213,format["%1 Fracture x%2",_nameEntry,_x]];
lbSetData [213, _numberOf, ""];
_numberOf = _numberOf + 1;
};
_counter = _counter + 1;
}foreach _listOfFractures;
[_selectionBloodLoss, _display] call FUNC(updateBodyImage);
[_display, _genericMessages, _allInjuryTexts] call FUNC(updateInformationLists);
_logs = _target getvariable [QEGVAR(medical,logFile_Activity), []];
[_display, _logs] call FUNC(updateActivityLog);
_triageStatus = [_target] call EFUNC(medical,getTriageStatus);
(_display displayCtrl 2000) ctrlSetText (_triageStatus select 0);
(_display displayCtrl 2000) ctrlSetBackgroundColor (_triageStatus select 2);

View File

@ -1 +1 @@
#include "\z\ace\addons\medical\script_component.hpp"
#include "\z\ace\addons\medical_menu\script_component.hpp"

View File

@ -2,7 +2,32 @@
<Project name="Combat Space Enhancement">
<Package name="Combat Medical System">
<Container name="UI">
<Key ID="STR_ACE_UI_EXAMINE_TREATMENT">
<Key ID="STR_ACE_Medical_Menu_OpenMenu">
<English>Medical Menu</English>
</Key>
<Key ID="STR_ACE_Medical_Menu_allow">
<English>Allow Medical Menu</English>
</Key>
<Key ID="STR_ACE_Medical_Menu_allow_Descr">
<English>Allow clients to use the medical menu</English>
</Key>
<Key ID="STR_ACE_Medical_Menu_useMenu">
<English>Use Medical menu</English>
</Key>
<Key ID="STR_ACE_Medical_Menu_useMenu_Descr">
<English>If allowed by server, enable the option to use the Medical Menu through keybinding and interaction menu</English>
</Key>
<Key ID="STR_ACE_Medical_Menu_openAfterTreatment">
<English>Re-open Medical menu</English>
</Key>
<Key ID="STR_ACE_Medical_Menu_openAfterTreatment_Descr">
<English>Re-open the medical menu after succesful treatment</English>
</Key>
<Key ID="STR_ACE_Medical_Menu_DisplayMenuKey">
<English>Open Medical Menu</English>
</Key>
<Key ID="STR_ACE_Medical_Menu_EXAMINE_TREATMENT">
<Original>EXAMINE &amp; TREATMENT</Original>
<Russian>ОСМОТР И ЛЕЧЕНИЕ</Russian>
<English>EXAMINE &amp; TREATMENT</English>
@ -10,7 +35,7 @@
<French>EXAMINER &amp; TRAITEMENTS</French>
<Polish>BADANIE &amp; LECZENIE</Polish>
</Key>
<Key ID="STR_ACE_UI_STATUS">
<Key ID="STR_ACE_Medical_Menu_STATUS">
<Original>STATUS</Original>
<Russian>СОСТОЯНИЕ</Russian>
<English>STATUS</English>
@ -18,7 +43,7 @@
<French>ÉTATS</French>
<Polish>STATUS</Polish>
</Key>
<Key ID="STR_ACE_UI_OVERVIEW">
<Key ID="STR_ACE_Medical_Menu_OVERVIEW">
<Original>OVERVIEW</Original>
<Russian>ОБЩАЯ ИНФОРМАЦИЯ</Russian>
<English>OVERVIEW</English>
@ -26,7 +51,7 @@
<French>DESCRIPTION</French>
<Polish>OPIS</Polish>
</Key>
<Key ID="STR_ACE_UI_ACTIVITY_LOG">
<Key ID="STR_ACE_Medical_Menu_ACTIVITY_LOG">
<Original>ACTIVITY LOG</Original>
<Russian>ПРОВЕДЕННЫЕ МАНИПУЛЯЦИИ</Russian>
<English>ACTIVITY LOG</English>
@ -34,7 +59,7 @@
<French>REGISTRE DES SOINS</French>
<Polish>LOGI AKTYWNOŚCI</Polish>
</Key>
<Key ID="STR_ACE_UI_QUICK_VIEW">
<Key ID="STR_ACE_Medical_Menu_QUICK_VIEW">
<Original>QUICK VIEW</Original>
<Russian>БЫСТРЫЙ ОСМОТР</Russian>
<English>QUICK VIEW</English>
@ -42,314 +67,314 @@
<French>VUE RAPIDE</French>
<Polish>SZYBKI PODGLĄD</Polish>
</Key>
<Key ID="STR_ACE_UI_TRIAGE_NONE">
<Key ID="STR_ACE_Medical_Menu_TRIAGE_NONE">
<Original>None</Original>
<Russian>Не ранен</Russian>
<Spanish>Ninguno</Spanish>
<French>Aucun</French>
<Polish>Brak</Polish>
</Key>
<Key ID="STR_ACE_UI_TRIAGE_MINOR">
<Key ID="STR_ACE_Medical_Menu_TRIAGE_MINOR">
<Original>Minor</Original>
<Russian>Несрочная помощь</Russian>
<Spanish>Menor</Spanish>
<French>Mineur</French>
<Polish>Normalny</Polish>
</Key>
<Key ID="STR_ACE_UI_TRIAGE_DELAYED">
<Key ID="STR_ACE_Medical_Menu_TRIAGE_DELAYED">
<Original>Delayed</Original>
<Russian>Срочная помощь</Russian>
<Spanish>Diferido</Spanish>
<French>Urgent</French>
<Polish>Opóźniony</Polish>
</Key>
<Key ID="STR_ACE_UI_TRIAGE_IMMEDIATE">
<Key ID="STR_ACE_Medical_Menu_TRIAGE_IMMEDIATE">
<Original>Immediate</Original>
<Russian>Неотложная помощь</Russian>
<Spanish>Inmediato</Spanish>
<French>Immédiat</French>
<Polish>Natychmiastowy</Polish>
</Key>
<Key ID="STR_ACE_UI_TRIAGE_DECEASED">
<Key ID="STR_ACE_Medical_Menu_TRIAGE_DECEASED">
<Original>Deceased</Original>
<Russian>Морг</Russian>
<Spanish>Fallecido</Spanish>
<French>Décédé</French>
<Polish>Nie żyje</Polish>
</Key>
<Key ID="STR_ACE_UI_VIEW_TRIAGE_CARD">
<Key ID="STR_ACE_Medical_Menu_VIEW_TRIAGE_CARD">
<Original>View triage Card</Original>
<Russian>Смотреть первичную карточку</Russian>
<Spanish>Ver Triage</Spanish>
<French>Voir Carte de Triage</French>
<Polish>Pokaż kartę segregacyjną</Polish>
</Key>
<Key ID="STR_ACE_UI_EXAMINE_PATIENT">
<Key ID="STR_ACE_Medical_Menu_EXAMINE_PATIENT">
<Original>Examine Patient</Original>
<Russian>Осмотреть пациента</Russian>
<Spanish>Examinar Paciente</Spanish>
<French>Examiner Patient</French>
<Polish>Zbadaj pacjenta</Polish>
</Key>
<Key ID="STR_ACE_UI_BANDAGE_FRACTURES">
<Key ID="STR_ACE_Medical_Menu_BANDAGE_FRACTURES">
<Original>Bandage / Fractures</Original>
<Russian>Раны / переломы</Russian>
<Spanish>Vendajes/Fracturas </Spanish>
<French>Bandages / Fractures</French>
<Polish>Bandaże / Złamania</Polish>
</Key>
<Key ID="STR_ACE_UI_MEDICATION">
<Key ID="STR_ACE_Medical_Menu_MEDICATION">
<Original>Medication</Original>
<Russian>Медикаменты</Russian>
<Spanish>Medicación</Spanish>
<French>Médications</French>
<Polish>Leki</Polish>
</Key>
<Key ID="STR_ACE_UI_AIRWAY_MANAGEMENT">
<Key ID="STR_ACE_Medical_Menu_AIRWAY_MANAGEMENT">
<Original>Airway Management</Original>
<Russian>Дыхательные пути</Russian>
<Spanish>Vías Aéreas</Spanish>
<French>Gestion Des Voie REspiratoire</French>
<Polish>Drogi oddechowe</Polish>
</Key>
<Key ID="STR_ACE_UI_ADVANCED_TREATMENT">
<Key ID="STR_ACE_Medical_Menu_ADVANCED_TREATMENT">
<Original>Advanced Treatments</Original>
<Russian>Специальная медпомощь</Russian>
<Spanish>Tratamientos Avanzados</Spanish>
<French>Traitement Avancé</French>
<Polish>Zaawansowane zabiegi</Polish>
</Key>
<Key ID="STR_ACE_UI_DRAG_CARRY">
<Key ID="STR_ACE_Medical_Menu_DRAG_CARRY">
<Original>Drag/Carry</Original>
<Russian>Тащить/нести</Russian>
<Spanish>Arrastrar/Cargar</Spanish>
<French>Glisser/Porter</French>
<Polish>Ciągnij/Nieś</Polish>
</Key>
<Key ID="STR_ACE_UI_TOGGLE_SELF">
<Key ID="STR_ACE_Medical_Menu_TOGGLE_SELF">
<Original>Toggle (Self)</Original>
<Russian>Лечить себя/другого раненого</Russian>
<French>Activer (sois)</French>
<Polish>Przełącz (na siebie)</Polish>
<Spanish>Alternar</Spanish>
</Key>
<Key ID="STR_ACE_UI_SELECT_TRIAGE_STATUS">
<Key ID="STR_ACE_Medical_Menu_SELECT_TRIAGE_STATUS">
<Original>Select triage status</Original>
<Russian>Сортировка</Russian>
<Spanish>Seleccionar estado de Triage</Spanish>
<French>Selectioner l'état de Triage</French>
<Polish>Wybierz priorytet</Polish>
</Key>
<Key ID="STR_ACE_UI_SELECT_HEAD">
<Key ID="STR_ACE_Medical_Menu_SELECT_HEAD">
<Original>Select Head</Original>
<Russian>Выбрать голову</Russian>
<Spanish>Seleccionar Cabeza</Spanish>
<French>Selectioner Tête</French>
<Polish>Wybierz głowę</Polish>
</Key>
<Key ID="STR_ACE_UI_SELECT_TORSO">
<Key ID="STR_ACE_Medical_Menu_SELECT_TORSO">
<Original>Select Torso</Original>
<Russian>Выбрать торс</Russian>
<Spanish>Seleccionar Torso</Spanish>
<French>Selectioner Torse</French>
<Polish>Wybierz tors</Polish>
</Key>
<Key ID="STR_ACE_UI_SELECT_ARM_L">
<Key ID="STR_ACE_Medical_Menu_SELECT_ARM_L">
<Original>Select Left Arm</Original>
<Russian>Выбрать левую руку</Russian>
<Spanish>Seleccionar Brazo Izquierdo</Spanish>
<French>Selectioner Bras Gauche</French>
<Polish>Wybierz lewą rękę</Polish>
</Key>
<Key ID="STR_ACE_UI_SELECT_ARM_R">
<Key ID="STR_ACE_Medical_Menu_SELECT_ARM_R">
<Original>Select Right Arm</Original>
<Russian>Выбрать правую руку</Russian>
<Spanish>Seleccionar Brazo Derecho</Spanish>
<French>Selectioner Bras Droit</French>
<Polish>Wybierz prawą rękę</Polish>
</Key>
<Key ID="STR_ACE_UI_SELECT_LEG_L">
<Key ID="STR_ACE_Medical_Menu_SELECT_LEG_L">
<Original>Select Left Leg</Original>
<Russian>Выбрать левую ногу</Russian>
<Spanish>Seleccionar Pierna Izquierda</Spanish>
<French>Selectioner Jambe Gauche</French>
<Polish>Wybierz lewą nogę</Polish>
</Key>
<Key ID="STR_ACE_UI_SELECT_LEG_R">
<Key ID="STR_ACE_Medical_Menu_SELECT_LEG_R">
<Original>Select Right Leg</Original>
<Russian>Выбрать правую ногу</Russian>
<Spanish>Seleccionar Pierna Derecha</Spanish>
<French>Selectioner Jambe Droite</French>
<Polish>Wybierz prawą nogę</Polish>
</Key>
<Key ID="STR_ACE_UI_HEAD">
<Key ID="STR_ACE_Medical_Menu_HEAD">
<Original>Head</Original>
<Russian>Голова</Russian>
<Spanish>Cabeza</Spanish>
<French>Tête</French>
<Polish>Głowa</Polish>
</Key>
<Key ID="STR_ACE_UI_TORSO">
<Key ID="STR_ACE_Medical_Menu_TORSO">
<Original>Torso</Original>
<Russian>Торс</Russian>
<French>Torse</French>
<Polish>Tors</Polish>
</Key>
<Key ID="STR_ACE_UI_ARM_L">
<Key ID="STR_ACE_Medical_Menu_ARM_L">
<Original>Left Arm</Original>
<Russian>Левая рука</Russian>
<Spanish>Brazo Izquierdo</Spanish>
<French>Bras Gauche</French>
<Polish>Lewa ręka</Polish>
</Key>
<Key ID="STR_ACE_UI_ARM_R">
<Key ID="STR_ACE_Medical_Menu_ARM_R">
<Original>Right Arm</Original>
<Russian>Правая рука</Russian>
<Spanish>Brazo Derecho</Spanish>
<French>Bras Droit</French>
<Polish>Prawa ręka</Polish>
</Key>
<Key ID="STR_ACE_UI_LEG_L">
<Key ID="STR_ACE_Medical_Menu_LEG_L">
<Original>Left Leg</Original>
<Russian>Левая нога</Russian>
<Spanish>Pierna Izquierda</Spanish>
<French>Jambe Gauche</French>
<Polish>Lewa noga</Polish>
</Key>
<Key ID="STR_ACE_UI_LEG_R">
<Key ID="STR_ACE_Medical_Menu_LEG_R">
<Original>Right Leg</Original>
<Russian>Правая нога</Russian>
<Spanish>Pierna Derecha</Spanish>
<French>Jambe Droite</French>
<Polish>Prawa noga</Polish>
</Key>
<Key ID="STR_ACE_UI_SELECTED_BODY_PART">
<Key ID="STR_ACE_Medical_Menu_SELECTED_BODY_PART">
<Original>Body Part: %1</Original>
<Russian>Часть тела: %1</Russian>
<Spanish>Parte del cuerpo: %1</Spanish>
<French>Partie du corps: %1</French>
<Polish>Część ciała: %1</Polish>
</Key>
<Key ID="STR_ACE_UI_SMALL">
<Key ID="STR_ACE_Medical_Menu_SMALL">
<Original>Small</Original>
<Russian>малого размера</Russian>
<Spanish>Pequeña</Spanish>
<French>Petite</French>
<Polish>małym</Polish>
</Key>
<Key ID="STR_ACE_UI_MEDIUM">
<Key ID="STR_ACE_Medical_Menu_MEDIUM">
<Original>Medium</Original>
<Russian>среднего размера</Russian>
<Spanish>Mediana</Spanish>
<French>moyenne</French>
<Polish>średnim</Polish>
</Key>
<Key ID="STR_ACE_UI_LARGE">
<Key ID="STR_ACE_Medical_Menu_LARGE">
<Original>Large</Original>
<Russian>большого размера</Russian>
<Spanish>Grande</Spanish>
<French>Grande</French>
<Polish>dużym</Polish>
</Key>
<Key ID="STR_ACE_UI_MULTIPLE_OPEN_WOUNDS">
<Key ID="STR_ACE_Medical_Menu_MULTIPLE_OPEN_WOUNDS">
<Original>There are %2 %1 Open Wounds</Original>
<Russian>%2 открытые раны %1</Russian>
<Spanish>Hay %2 Heridas Abiertas %1</Spanish>
<French>Il y a %2 %1 Blessure Ouverte</French>
<Polish>Widzisz otwarte rany w ilości %2 o %1 rozmiarze</Polish>
</Key>
<Key ID="STR_ACE_UI_SINGLE_OPEN_WOUND">
<Key ID="STR_ACE_Medical_Menu_SINGLE_OPEN_WOUND">
<Original>There is 1 %1 Open Wound</Original>
<Russian>Открытая рана %1</Russian>
<Spanish>Hay 1 Herida Abierta %1</Spanish>
<French>Il y a 1 blessure ouverte %1</French>
<Polish>Widzisz 1 otwartą ranę o %1 rozmiarze</Polish>
</Key>
<Key ID="STR_ACE_UI_PARTIAL_OPEN_WOUND">
<Key ID="STR_ACE_Medical_Menu_PARTIAL_OPEN_WOUND">
<Original>There is a partial %1 Open wound</Original>
<Russian>Частично открытая рана %1</Russian>
<Spanish>Hay una herida parcial abierta %1</Spanish>
<French>Il y a une Blessure Patiellement Ouverte %1</French>
<Polish>Widzisz częściowo otwartą ranę o %1 rozmiarze</Polish>
</Key>
<Key ID="STR_ACE_UI_MULTIPLE_BANDAGED_WOUNDS">
<Key ID="STR_ACE_Medical_Menu_MULTIPLE_BANDAGED_WOUNDS">
<Original>There are %2 %1 Bandaged Wounds</Original>
<Russian>%2 перевязанные раны %1</Russian>
<Spanish>Hay %2 Heridas %1 Vendadas</Spanish>
<French>Il y a %2 %1 Blessure Bandée</French>
<Polish>Widzisz %2 zabandażowanych ran o %1 rozmiarze</Polish>
</Key>
<Key ID="STR_ACE_UI_SINGLE_BANDAGED_WOUND">
<Key ID="STR_ACE_Medical_Menu_SINGLE_BANDAGED_WOUND">
<Original>There is 1 %1 Bandaged Wound</Original>
<Russian>1 перевязанная рана %1</Russian>
<Spanish>Hay 1 Herida Vendada %1</Spanish>
<French>Il y a 1 %1 Blessure Bandée</French>
<Polish>Widzisz 1 zabandażowaną ranę o %1 rozmiarze</Polish>
</Key>
<Key ID="STR_ACE_UI_PARTIAL_BANDAGED_WOUND">
<Key ID="STR_ACE_Medical_Menu_PARTIAL_BANDAGED_WOUND">
<Original>There is a partial %1 Bandaged wound</Original>
<Russian>Частично перевязанная рана %1</Russian>
<Spanish>Hay una Herida parcial %1 Vendada</Spanish>
<French>Il y a %1 Blessure Partielment Bandée</French>
<Polish>Widzisz 1 częściowo zabandażowaną ranę o %1 rozmiarze</Polish>
</Key>
<Key ID="STR_ACE_UI_NORMAL_BREATHING">
<Key ID="STR_ACE_Medical_Menu_NORMAL_BREATHING">
<Original>Normal breathing</Original>
<Russian>Дыхание в норме</Russian>
<Spanish>Respiración normal</Spanish>
<French>Respiration Normale</French>
<Polish>Normalny oddech</Polish>
</Key>
<Key ID="STR_ACE_UI_NO_BREATHING">
<Key ID="STR_ACE_Medical_Menu_NO_BREATHING">
<Original>No breathing</Original>
<Russian>Дыхания нет</Russian>
<Spanish>No respira</Spanish>
<French>Apnée</French>
<Polish>Brak oddechu</Polish>
</Key>
<Key ID="STR_ACE_UI_DIFFICULT_BREATHING">
<Key ID="STR_ACE_Medical_Menu_DIFFICULT_BREATHING">
<Original>Difficult breathing</Original>
<Russian>Дыхание затруднено</Russian>
<Spanish>Dificultad para respirar</Spanish>
<French>Difficultée Respiratoire</French>
<Polish>Trudności z oddychaniem</Polish>
</Key>
<Key ID="STR_ACE_UI_ALMOST_NO_BREATHING">
<Key ID="STR_ACE_Medical_Menu_ALMOST_NO_BREATHING">
<Original>Almost no breathing</Original>
<Russian>Дыхания почти нет</Russian>
<Spanish>Casi sin respirar</Spanish>
<French>Respiration Faible</French>
<Polish>Prawie brak oddechu</Polish>
</Key>
<Key ID="STR_ACE_UI_STATUS_BLEEDING">
<Key ID="STR_ACE_Medical_Menu_STATUS_BLEEDING">
<Original>Bleeding</Original>
<Russian>Кровотечение</Russian>
<Spanish>Sangrando</Spanish>
<French>Seignement</French>
<Polish>Krwawienie zewnętrzne</Polish>
</Key>
<Key ID="STR_ACE_UI_STATUS_PAIN">
<Key ID="STR_ACE_Medical_Menu_STATUS_PAIN">
<Original>in Pain</Original>
<Russian>Испытывает боль</Russian>
<Spanish>Con Dolor</Spanish>
<French>A De La Douleur</French>
<Polish>W bólu</Polish>
</Key>
<Key ID="STR_ACE_UI_STATUS_LOST_BLOOD">
<Key ID="STR_ACE_Medical_Menu_STATUS_LOST_BLOOD">
<Original>Lost a lot of Blood</Original>
<Russian>Большая кровопотеря</Russian>
<Spanish>Mucha Sangre perdida</Spanish>
<French>A Perdu Bcp de Sang</French>
<Polish>Stracił dużo krwi</Polish>
</Key>
<Key ID="STR_ACE_UI_STATUS_TOURNIQUET_APPLIED">
<Key ID="STR_ACE_Medical_Menu_STATUS_TOURNIQUET_APPLIED">
<Original>Tourniquet [CAT]</Original>
<Russian>Жгут</Russian>
<Spanish>Torniquete [CAT]</Spanish>
<French>Garot [CAT]</French>
<Polish>Opaska uciskowa [CAT]</Polish>
</Key>
<Key ID="STR_ACE_UI_STATUS_NPA_APPLIED">
<Key ID="STR_ACE_Medical_Menu_STATUS_NPA_APPLIED">
<Original>Nasopharyngeal Tube [NPA]</Original>
<Russian>Назотрахеальная трубка</Russian>
<Spanish>Torniquete [CAT]</Spanish>

View File

@ -1,4 +1,4 @@
#include "\z\ace\addons\main\define.hpp"
#include "\z\ace\addons\common\define.hpp"
class GVAR(medicalMenu) {
idd = 314412;
@ -63,15 +63,15 @@ class GVAR(medicalMenu) {
colorText[] = {1, 1, 1.0, 0.9};
colorBackground[] = {0,0,0,0};
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.2)";
text = $STR_ACE_UI_EXAMINE_TREATMENT;
text = $STR_ACE_Medical_Menu_EXAMINE_TREATMENT;
};
class CatagoryCenter: CatagoryLeft {
x = "13.33 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
text = $STR_ACE_UI_STATUS;
text = $STR_ACE_Medical_Menu_STATUS;
};
class CatagoryRight: CatagoryCenter{
x = "25.66 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
text = $STR_ACE_UI_OVERVIEW;
text = $STR_ACE_Medical_Menu_OVERVIEW;
};
class Line: ACE_gui_backgroundBase {
idc = -1;
@ -325,7 +325,7 @@ class GVAR(medicalMenu) {
animTextureFocused = "#(argb,8,8,3)color(0,0,0,0.0)";
animTexturePressed = "#(argb,8,8,3)color(0,0,0,0.0)";
animTextureDefault = "#(argb,8,8,3)color(0,0,0,0.0)";
action = QUOTE(GVAR(selectedBodyPart) = 'head'; [GVAR(INTERACTION_TARGET)] call FUNC(updateUIInfo););
action = QUOTE(GVAR(selectedBodyPart) = 0; [GVAR(INTERACTION_TARGET)] call FUNC(updateUIInfo););
};
class selectTorso : selectHead {
idc = 302;
@ -333,7 +333,7 @@ class GVAR(medicalMenu) {
y = "5.4 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "2.2 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "4.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
action = QUOTE(GVAR(selectedBodyPart) = 'body'; [GVAR(INTERACTION_TARGET)] call FUNC(updateUIInfo););
action = QUOTE(GVAR(selectedBodyPart) = 1; [GVAR(INTERACTION_TARGET)] call FUNC(updateUIInfo););
};
class selectLeftArm: selectHead{
idc = 303;
@ -341,12 +341,12 @@ class GVAR(medicalMenu) {
y = "5.9 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "1.1 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "4.3 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
action = QUOTE(GVAR(selectedBodyPart) = 'hand_r'; [GVAR(INTERACTION_TARGET)] call FUNC(updateUIInfo););
action = QUOTE(GVAR(selectedBodyPart) = 3; [GVAR(INTERACTION_TARGET)] call FUNC(updateUIInfo););
};
class selectRightArm: selectLeftArm{
idc = 304;
x = "20.6 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
action = QUOTE(GVAR(selectedBodyPart) = 'hand_l'; [GVAR(INTERACTION_TARGET)] call FUNC(updateUIInfo););
action = QUOTE(GVAR(selectedBodyPart) = 2; [GVAR(INTERACTION_TARGET)] call FUNC(updateUIInfo););
};
class selectLeftLeg :selectHead {
idc = 305;
@ -354,12 +354,12 @@ class GVAR(medicalMenu) {
y = "9.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "1.1 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "6 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
action = QUOTE(GVAR(selectedBodyPart) = 'leg_r'; [GVAR(INTERACTION_TARGET)] call FUNC(updateUIInfo););
action = QUOTE(GVAR(selectedBodyPart) = 5; [GVAR(INTERACTION_TARGET)] call FUNC(updateUIInfo););
};
class selectRightLeg :selectLeftLeg {
idc = 306;
x = "19.6 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
action = QUOTE(GVAR(selectedBodyPart) = 'leg_l'; [GVAR(INTERACTION_TARGET)] call FUNC(updateUIInfo););
action = QUOTE(GVAR(selectedBodyPart) = 4; [GVAR(INTERACTION_TARGET)] call FUNC(updateUIInfo););
};
@ -404,35 +404,35 @@ class GVAR(medicalMenu) {
colorText[] = {0.6, 0.7, 1.0, 1};
colorBackground[] = {0,0,0,0};
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
text = $STR_ACE_UI_ACTIVITY_LOG;
text = $STR_ACE_Medical_Menu_ACTIVITY_LOG;
};
class QuickViewHeader: ActivityLogHeader {
x = "19.5 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
text = $STR_ACE_UI_QUICK_VIEW;
text = $STR_ACE_Medical_Menu_QUICK_VIEW;
};
class LineBottomHeaders: Line {
y = "19.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
};
class ActivityLog: InjuryList {
idc = 214;
style = 16;
type = 102;
rows=1;
colorBackground[] = {0, 0, 0, 1};
//style = 16;
//type = 102;
//rows=1;
colorBackground[] = {0, 0, 0, 0};
x = "1.5 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "(19.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2))";
w = "18.5 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "6.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.7)";
colorSelectBackground[] = {0, 0, 0, 0.0};
colorSelectBackground2[] = {0.0, 0.0, 0.0, 0.0};
columns[] = {0.0, 0.08};
canDrag=true;
arrowEmpty = "#(argb,8,8,3)color(1,1,1,1)";
arrowFull = "#(argb,8,8,3)color(1,1,1,1)";
//colorSelectBackground[] = {0, 0, 0, 0.0};
//colorSelectBackground2[] = {0.0, 0.0, 0.0, 0.0};
//columns[] = {0.0, 0.08};
//canDrag=true;
//arrowEmpty = "#(argb,8,8,3)color(1,1,1,1)";
// arrowFull = "#(argb,8,8,3)color(1,1,1,1)";
drawSideArrows = 0;
idcLeft = -1;
idcRight = -1;
//idcLeft = -1;
//idcRight = -1;
};
class QuikViewLog: InjuryList {
@ -481,7 +481,7 @@ class GVAR(medicalMenu) {
y = 0;
w = 0;
h = 0;
text = $STR_ACE_UI_TRIAGE_NONE;
text = $STR_ACE_Medical_Menu_TRIAGE_NONE;
style = ST_CENTER;
size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
@ -500,7 +500,7 @@ class GVAR(medicalMenu) {
y = 0;
w = 0;
h = 0;
text = $STR_ACE_UI_TRIAGE_MINOR;
text = $STR_ACE_Medical_Menu_TRIAGE_MINOR;
style = ST_CENTER;
size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
@ -518,7 +518,7 @@ class GVAR(medicalMenu) {
y = 0;
w = 0;
h = 0;
text = $STR_ACE_UI_TRIAGE_DELAYED;
text = $STR_ACE_Medical_Menu_TRIAGE_DELAYED;
style = ST_CENTER;
size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
@ -536,7 +536,7 @@ class GVAR(medicalMenu) {
y = 0;
w = 0;
h = 0;
text = $STR_ACE_UI_TRIAGE_IMMEDIATE;
text = $STR_ACE_Medical_Menu_TRIAGE_IMMEDIATE;
style = ST_CENTER;
size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
@ -554,7 +554,7 @@ class GVAR(medicalMenu) {
y = 0;
w = 0;
h = 0;
text = $STR_ACE_UI_TRIAGE_DECEASED;
text = $STR_ACE_Medical_Menu_TRIAGE_DECEASED;
style = ST_CENTER;
size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";