From 920213cd522b1a13c0b17d03dfbca939253a8eb1 Mon Sep 17 00:00:00 2001 From: "eugene.tretyak" Date: Tue, 20 Jul 2021 22:51:22 +0300 Subject: [PATCH 01/11] Adds the indication of applied CATs/Splints --- addons/medical_feedback/RscInGameUI.hpp | 21 +++++++++- addons/medical_feedback/XEH_PREP.hpp | 1 + addons/medical_feedback/data/cat.paa | Bin 0 -> 5625 bytes addons/medical_feedback/data/splint.paa | Bin 0 -> 5625 bytes .../functions/fnc_handleEffects.sqf | 5 +++ ..._handleTourniquetsAndSplintsIndication.sqf | 36 ++++++++++++++++++ addons/medical_feedback/initSettings.sqf | 15 ++++++++ addons/medical_feedback/script_component.hpp | 3 ++ addons/medical_feedback/stringtable.xml | 9 +++++ 9 files changed, 89 insertions(+), 1 deletion(-) create mode 100644 addons/medical_feedback/data/cat.paa create mode 100644 addons/medical_feedback/data/splint.paa create mode 100644 addons/medical_feedback/functions/fnc_handleTourniquetsAndSplintsIndication.sqf diff --git a/addons/medical_feedback/RscInGameUI.hpp b/addons/medical_feedback/RscInGameUI.hpp index 275117ca8ef..a54cfa0a483 100644 --- a/addons/medical_feedback/RscInGameUI.hpp +++ b/addons/medical_feedback/RscInGameUI.hpp @@ -1,7 +1,11 @@ class RscPictureKeepAspect; class RscInGameUI { class RscStanceInfo { - controls[] += {QGVAR(bloodVolumeIndicator)}; + controls[] += { + QGVAR(bloodVolumeIndicator), + QGVAR(tourniquetIndicator), + QGVAR(splintIndicator) + }; class GVAR(bloodVolumeIndicator): RscPictureKeepAspect { onLoad = QUOTE(uiNamespace setVariable [ARR_2(QQGVAR(bloodVolumeIndicator),_this select 0)]); x = IGUI_GRID_STANCE_X; @@ -9,5 +13,20 @@ class RscInGameUI { w = IGUI_GRID_STANCE_WAbs / 4; h = IGUI_GRID_STANCE_HAbs / 4; }; + + class GVAR(tourniquetIndicator): RscPictureKeepAspect { + onLoad = QUOTE(uiNamespace setVariable [ARR_2(QQGVAR(tourniquetIndicator), _this select 0)]); + x = IGUI_GRID_STANCE_X + IGUI_GRID_STANCE_WAbs * 3 / 4; + y = IGUI_GRID_STANCE_Y; + w = IGUI_GRID_STANCE_WAbs / 4; + h = IGUI_GRID_STANCE_HAbs / 4; + }; + class GVAR(splintIndicator): RscPictureKeepAspect { + onLoad = QUOTE(uiNamespace setVariable [ARR_2(QQGVAR(splintIndicator), _this select 0)]); + x = IGUI_GRID_STANCE_X + IGUI_GRID_STANCE_WAbs * 3 / 4; + y = IGUI_GRID_STANCE_Y + IGUI_GRID_STANCE_HAbs / 4; + w = IGUI_GRID_STANCE_WAbs / 4; + h = IGUI_GRID_STANCE_HAbs / 4; + }; }; }; diff --git a/addons/medical_feedback/XEH_PREP.hpp b/addons/medical_feedback/XEH_PREP.hpp index e6c48d65069..7ae611cd9cd 100644 --- a/addons/medical_feedback/XEH_PREP.hpp +++ b/addons/medical_feedback/XEH_PREP.hpp @@ -5,6 +5,7 @@ PREP(effectHeartBeat); PREP(effectIncapacitated); PREP(effectPain); PREP(effectUnconscious); +PREP(handleTourniquetsAndSplintsIndication); PREP(handleEffects); PREP(initEffects); PREP(playInjuredSound); diff --git a/addons/medical_feedback/data/cat.paa b/addons/medical_feedback/data/cat.paa new file mode 100644 index 0000000000000000000000000000000000000000..4083cd8478d31a7f4b2a6946a0814da0c715a50a GIT binary patch literal 5625 zcmdT|4N%kP8GjQ9@}Ux|Q7Te%3aip7ZZ|TjD1UT^Fr~&dFHKXh0jDC91l^U>IYvM> z+dD1PYiMz!W?D9hXMxWAy=m1{Tckq4vs0pRpu&mmq`;_(nDFj-{z*s#ZD+6N*5~r^ z|KaLX0v(F2noLh$9>!u)`x#%HR3Sj(nYiF+yY#iD<#mTIWgD59|`6f*li&^11d} zX9HqN@t5y6i8DbSK68Of9+`|bHkY!yXdahQ@EghX3w$>au`hm>))m;c7hJ-5N~KaQ zO#U8ytiQys_ShTDEgB{7Nco3xMKj?z`LvEw=cTs_PPW7E8jXhge-~X=a=*RV_z6n1 z=&*f<<#TDms}Gc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feedback/data/splint.paa b/addons/medical_feedback/data/splint.paa new file mode 100644 index 0000000000000000000000000000000000000000..d4efbbda8ce7b2076464945eac15bf511f254730 GIT binary patch literal 5625 zcmcgw4OEm>8ou8*3^Ic-gE}h-Zc~CNfno^KhBC?qt1atf^C4R3DBD`G!%!wiGh!f< z>?qg|x)FbyODl8;HJNQ|#W6jTE!*^CfHpa!D2`if!;dm3Gu(aOZ}A-WKW?aqiV)c07LQ3Mj5@1P7ZsI72*+^@xc~>O@1=X15Z6bhUWR#7 zFQ^AtAtH&d8J~Bfwt&U3bXj|s`*zyLV-;X=HmpA|-O8`$G#dEn7af!S#OpI7I-A!= zOwPjb@>4Vov4SCzp7@!UKw88of79SeR0hV|8@Xt7q*q)@H#JCzVa+J!8c5BP>ji9c zZE8sP^vR_HZgz1E;_%ygCN&m&zC7yw5Pw&zRVwdpzue!*W}DM()_;TkWEe&)$d{HK zmF3mbE6aFHsV-Z@1dOb=fj)cF_vZ@F=Q}qwEW58$BH(7w-*sq7x_~obo*B5$|F@sg zo+SPtV-w3T(m;%#cc!1lbr25fpW70f$z3=N^M3{_!|PIbbjsOhRBh5O3T}}1dNTJ*DSBAOp>R2ian>3 zhT}n{Vt;P^$L~M4FMj<)-~!ZN3HZ=15J>{UNA-QL&3DlE;wVmZ{7N*n zV-%mNFy*E{Jc|1&niSy@{RJT&%G>;XqU643jRC)8JdC$Ta8I6ohVhYkD5vLY>wY?b zQ30{p5S0btq8XJxDoatujfsZ@bIbwLvC;WNM_F#XXcULo&q>DmKh!}C?Ki~7x#b4J zd|vG_(UEvqGG4wPi>06Od>7;8YmNzh->3`87^15z$ajR?Wr=?m`5H0u9kpX=B4mpt z!CVhRkbjjWDk~$`G{S!+8z&-Pz@z+fVy97Aj6^&p9?IL8z!M3=Jf)!T!yoM(#iuF^ z+M<#D?6j|fWyBH5M{bOVdk=y9KcQZP8!dWI{Cd9L?Dt&d(ridRrS4T0VEDLE|M8fJ z;sp7|>why&%T5P_2OFyFDhF_7=c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bjB9{f+p zqhx=*tnWAP#LkwOke220*SR3`*|m-)HU#6JWw-CSt@o)vIOfYjuuN^=zWq(~9S$XY z(Nc1J703`jvr(57ub+Y4JqOii${}C4fg#rt5-k$>=k>gWX|)#B`mVGBW3RKCJ3JUB zWgIg*?ff;QYN-CY?C`1OPtz;jw5W2evP>a{8pSras=*5`6cf{8+CI2?fmzTDSE0L7 zd`laLpkYE>-{?7^`x|GPf?^Z5!zl!W_Fi3qb&I!GL-7B9tn!$~Jvl6O_Y0E*;y-Icqu%&9niWPpukEjTl z-eP`yD6hng*(aGjyJ+UQ!u&6j+^0}&d|?~B bpw 160) [!_unconscious, _pain] call FUNC(effectPain); [!_unconscious, _bleedingStrength, _manualUpdate] call FUNC(effectBleeding); +// - Tourniquets and Splints indication --------------------------------------- +if (GVAR(tourniquetsAndSplintsIndication)) then { + [] call FUNC(handleTourniquetsAndSplintsIndication); +}; + END_COUNTER(handleEffects); diff --git a/addons/medical_feedback/functions/fnc_handleTourniquetsAndSplintsIndication.sqf b/addons/medical_feedback/functions/fnc_handleTourniquetsAndSplintsIndication.sqf new file mode 100644 index 00000000000..8d486d2aaa1 --- /dev/null +++ b/addons/medical_feedback/functions/fnc_handleTourniquetsAndSplintsIndication.sqf @@ -0,0 +1,36 @@ +#include "script_component.hpp" +/* + * Author: 10Dozen + * Handles indication of the applied tourniquets and splints over Stance indicator. + * Draws an icon if there is at least 1 tourniquet/splint applied. + * + * Arguments: + * 0: Drop indicator + * + * Return Value: + * None + * + * Example: + * [false] call ace_medical_feedback_fnc_handleTourniquetsAndSplintsIndication + * + * Public: No + */ +params [["_dropIndicator", false]]; + +private _indicatorTourniquetCtrl = uiNamespace getVariable [QGVAR(tourniquetIndicator), controlNull]; +private _indicatorSplintCtrl = uiNamespace getVariable [QGVAR(splintIndicator), controlNull]; + +// --- Removes any indication and exit +if (_dropIndicator) exitWith { + _indicatorTourniquetCtrl ctrlSetText ""; + _indicatorSplintCtrl ctrlSetText ""; +}; + +private _hasTourniquets = {_x > 0} count GET_TOURNIQUETS(ACE_player) > 0; +private _tourniquetIcon = ["",ICON_TOURNIQUET_PATH] select _hasTourniquets; + +private _hasSplints = {_x isEqualTo -1} count GET_FRACTURES(ACE_player) > 0; +private _splintIcon = ["",ICON_SPLINT_PATH] select _hasSplints; + +_indicatorTourniquetCtrl ctrlSetText _tourniquetIcon; +_indicatorSplintCtrl ctrlSetText _splintIcon; diff --git a/addons/medical_feedback/initSettings.sqf b/addons/medical_feedback/initSettings.sqf index 128f1f6b911..dad94bcd8ce 100644 --- a/addons/medical_feedback/initSettings.sqf +++ b/addons/medical_feedback/initSettings.sqf @@ -39,3 +39,18 @@ [true] call FUNC(initEffects); } ] call CBA_fnc_addSetting; + +[ + QGVAR(tourniquetsAndSplintsIndication), + "CHECKBOX", + [LSTRING(TourniquetsAndSplintsIndication_DisplayName), LSTRING(TourniquetsAndSplintsIndication_Description)], + [ELSTRING(medical,Category), LSTRING(SubCategory)], + true, + false, + { + // --- Drop indication on disabling + if (!_this) exitWith { + [true] call FUNC(handleTourniquetsAndSplintsIndication); + }; + } +] call CBA_fnc_addSetting; diff --git a/addons/medical_feedback/script_component.hpp b/addons/medical_feedback/script_component.hpp index 54127b6619b..4130e4656a5 100644 --- a/addons/medical_feedback/script_component.hpp +++ b/addons/medical_feedback/script_component.hpp @@ -55,3 +55,6 @@ #define ICON_BLOODVOLUME_COLOR_WHITE [1, 1, 1, 1] #define ICON_BLOODVOLUME_COLOR_ORANGE [1, 0.6, 0, 1] #define ICON_BLOODVOLUME_COLOR_RED [0.8, 0.2, 0, 1] + +#define ICON_TOURNIQUET_PATH QPATHTOF(data\cat.paa) +#define ICON_SPLINT_PATH QPATHTOF(data\splint.paa) diff --git a/addons/medical_feedback/stringtable.xml b/addons/medical_feedback/stringtable.xml index f51f16cdcd4..7c80ec49b3f 100644 --- a/addons/medical_feedback/stringtable.xml +++ b/addons/medical_feedback/stringtable.xml @@ -189,6 +189,15 @@ 啟用傷者的尖叫聲 Yaralı birimler tarafından çığlık atmayı etkinleştir + + + Enable CAT/Splint Indication + Включить индикацию жгутов\шин + + + Enables the indication of the applied CATs and splints over the Stance indicator. + Включает индикацию наложенных жгутов и шин поверх индикатора положения тела. + From b56b5dd7f27fe45d45e072131ccd0ec4be0887f4 Mon Sep 17 00:00:00 2001 From: "eugene.tretyak" Date: Tue, 20 Jul 2021 23:04:48 +0300 Subject: [PATCH 02/11] Removed empty lines from strintable --- addons/medical_feedback/stringtable.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/medical_feedback/stringtable.xml b/addons/medical_feedback/stringtable.xml index 7c80ec49b3f..b8800bc84e7 100644 --- a/addons/medical_feedback/stringtable.xml +++ b/addons/medical_feedback/stringtable.xml @@ -189,7 +189,6 @@ 啟用傷者的尖叫聲 Yaralı birimler tarafından çığlık atmayı etkinleştir - Enable CAT/Splint Indication Включить индикацию жгутов\шин From d96ddc879babc529e8c63885f886d84d3631c61d Mon Sep 17 00:00:00 2001 From: "eugene.tretyak" Date: Wed, 21 Jul 2021 23:26:06 +0300 Subject: [PATCH 03/11] Added indication of fractures --- addons/medical_feedback/RscInGameUI.hpp | 20 +++--- addons/medical_feedback/XEH_PREP.hpp | 2 +- addons/medical_feedback/data/cat.paa | Bin 5625 -> 5625 bytes addons/medical_feedback/data/fracture.paa | Bin 0 -> 5625 bytes addons/medical_feedback/data/splint.paa | Bin 5625 -> 5625 bytes .../functions/fnc_handleEffects.sqf | 6 +- .../functions/fnc_handleGUIIndication.sqf | 63 ++++++++++++++++++ ..._handleTourniquetsAndSplintsIndication.sqf | 36 ---------- addons/medical_feedback/initSettings.sqf | 6 +- addons/medical_feedback/script_component.hpp | 1 + addons/medical_feedback/stringtable.xml | 12 ++-- 11 files changed, 89 insertions(+), 57 deletions(-) create mode 100644 addons/medical_feedback/data/fracture.paa create mode 100644 addons/medical_feedback/functions/fnc_handleGUIIndication.sqf delete mode 100644 addons/medical_feedback/functions/fnc_handleTourniquetsAndSplintsIndication.sqf diff --git a/addons/medical_feedback/RscInGameUI.hpp b/addons/medical_feedback/RscInGameUI.hpp index a54cfa0a483..db52dbf5464 100644 --- a/addons/medical_feedback/RscInGameUI.hpp +++ b/addons/medical_feedback/RscInGameUI.hpp @@ -3,8 +3,9 @@ class RscInGameUI { class RscStanceInfo { controls[] += { QGVAR(bloodVolumeIndicator), - QGVAR(tourniquetIndicator), - QGVAR(splintIndicator) + QGVAR(stateIndicator1), + QGVAR(stateIndicator2), + QGVAR(stateIndicator3) }; class GVAR(bloodVolumeIndicator): RscPictureKeepAspect { onLoad = QUOTE(uiNamespace setVariable [ARR_2(QQGVAR(bloodVolumeIndicator),_this select 0)]); @@ -14,19 +15,22 @@ class RscInGameUI { h = IGUI_GRID_STANCE_HAbs / 4; }; - class GVAR(tourniquetIndicator): RscPictureKeepAspect { - onLoad = QUOTE(uiNamespace setVariable [ARR_2(QQGVAR(tourniquetIndicator), _this select 0)]); + class GVAR(stateIndicator1): RscPictureKeepAspect { + onLoad = QUOTE(uiNamespace setVariable [ARR_2(QQGVAR(stateIndicator1), _this select 0)]); x = IGUI_GRID_STANCE_X + IGUI_GRID_STANCE_WAbs * 3 / 4; y = IGUI_GRID_STANCE_Y; w = IGUI_GRID_STANCE_WAbs / 4; h = IGUI_GRID_STANCE_HAbs / 4; }; - class GVAR(splintIndicator): RscPictureKeepAspect { - onLoad = QUOTE(uiNamespace setVariable [ARR_2(QQGVAR(splintIndicator), _this select 0)]); + class GVAR(stateIndicator2): GVAR(stateIndicator1) { + onLoad = QUOTE(uiNamespace setVariable [ARR_2(QQGVAR(stateIndicator2), _this select 0)]); x = IGUI_GRID_STANCE_X + IGUI_GRID_STANCE_WAbs * 3 / 4; y = IGUI_GRID_STANCE_Y + IGUI_GRID_STANCE_HAbs / 4; - w = IGUI_GRID_STANCE_WAbs / 4; - h = IGUI_GRID_STANCE_HAbs / 4; + }; + class GVAR(stateIndicator3): GVAR(stateIndicator1) { + onLoad = QUOTE(uiNamespace setVariable [ARR_2(QQGVAR(stateIndicator3), _this select 0)]); + x = IGUI_GRID_STANCE_X + IGUI_GRID_STANCE_WAbs * 3 / 4; + y = IGUI_GRID_STANCE_Y + IGUI_GRID_STANCE_HAbs * 2 / 4; }; }; }; diff --git a/addons/medical_feedback/XEH_PREP.hpp b/addons/medical_feedback/XEH_PREP.hpp index 7ae611cd9cd..44087528e7e 100644 --- a/addons/medical_feedback/XEH_PREP.hpp +++ b/addons/medical_feedback/XEH_PREP.hpp @@ -5,7 +5,7 @@ PREP(effectHeartBeat); PREP(effectIncapacitated); PREP(effectPain); PREP(effectUnconscious); -PREP(handleTourniquetsAndSplintsIndication); +PREP(handleGUIIndication); PREP(handleEffects); PREP(initEffects); PREP(playInjuredSound); diff --git a/addons/medical_feedback/data/cat.paa b/addons/medical_feedback/data/cat.paa index 4083cd8478d31a7f4b2a6946a0814da0c715a50a..50c1a66fafa0a044a35eee44e78ef935fe56d5ff 100644 GIT binary patch literal 5625 zcmdT|3s6&68a_7?iXakKV^xY|6~+g?+EMCgCD+FwRA{5-u!u;ajuul%7&~>_6}=b4 z+MQX8wZ+QLD5!-s**1WW>rT77q-xbFiqqB_O)FX$v2HC;O6w!x?El~70z&Ps-5qy( z=H|ke^ZLL4b^a4In>%-=arWG_nL&h*ulB#OO2+9kQxP+0i095sNkq)S2l2wh#AkW< zUxd$Q4I!@$BBWSL$mj5Ru*MUf5Ln>>+vI9#X~SBpS8x)dRjavC2daEWSQ|rZgcYAS zAmwbcMeH_{`Jz!6^Yas&`U(d$c8sX-8wJOF zy??!XbJRtgZ!{Rv{iA<5?>-l#<;{uT_yma%FgMqWZ%_UKY^s=AOn8?rqM^ul>82&mGO10YOnYAD$bz6)enYP=}zW3wn6#VvA_&aM-M)wQl z*l)#q{9z@NmbjCPV`P5-ZO}`w-+rG}-$*OybN z6h6KAqI`r``b{uCGmTOON3URU6KNO5{?Hzn{H?2Ba7K@-n${h&I6^8r*E3Z_kAwZr zKiN^~J0jd-Ch!;V7S+%l0sjf)+vRe;T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ic$fPfiHpN@QD}_FxIDlP6+$ky5X>o`csj! zF~NBP7brO`nInX$t9yYk9VJ$jr4g$~460cy4z5oA0`|VE|LQnY2lC#5ST`#?u(@act^@g9~c~D*D@>3vVxnUZr#YjcP@&*=q-ELcY9IC50 z*1BoZPIhm4;RjY!lfk6T8PmMr(AH#q9?myON%fQczd3xUYla%bsF=*!JwS>k#%=#~ z0`ixcnUw>q2qcG3;FJZDK*ABSqBo#>m7{bnPJ`q;Bcux0jBzBy!#4PzW-Uo+GyYh+ r6R{D3=IKLsUkWH$XhUx!2DREBGAigZ<=Wey{)|+Ah(Q6n!VBp?6dtQY diff --git a/addons/medical_feedback/data/fracture.paa b/addons/medical_feedback/data/fracture.paa new file mode 100644 index 0000000000000000000000000000000000000000..b1a48138d79c0955291422210e9f685e32e2ca29 GIT binary patch literal 5625 zcmeHL3s6*L6h3$1CJ@N=v6>li3pIQNsL{(}(OiOT!rC7hhH)3L5_AP?BF4yFbw*|^ zAxx*H*IJpGO%e)sdRXkF6+WpUL|xx9Vpc8=iVyDcch22qu+5p3DJv(>%)i`^^WXnG z{&UWM{wwm7lw{N7l#JwH04OeQov7i=G8E2TQ7EpFUp0 zi-!5IY0j~}zeOJ}R0$jG3m3vVR5QpVPt)cP9vtz-lAR5#Y$|t73I2 zIWb;&dU4|Gigon`&NYlxWAqEk+u!hWUTgq(#;0F-qo%K^xAOew=Y6Z>4Mi15o?g#b z>CrMzB015Ny}iS1)L3eRkZuUjh1rg;hZN*5<)=MY{5h z0BdIzWWl2(K~D7A!(hgHWM4!=H{N*ak2tKlxX@GYwO2%YIrnNPsqW5oNdEXX`)i)f zNuKYeGXUA8C8hrM{8c<5w|Fl3VEoYF9FP&H6Q=?*GRC_epq9C z`8_=DjFLYyt!+H*mnhhsLzPfdJ z9{F(qpIl<^FQ}Pt3BK%p_J)5F<6%r^P1N2H(8SRZny%@Et zxI)FlnlSDk@GgV4q@-HE`~jbC*`1`;X#CBR0kd1KQFhiRovG8_r+h!;42y+O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SIyapW<6gQpuc29U8mP}u6(xB zPIoL5%Ve_XYlWT<3OsA^e6?0<_|l!H-H`Wau?;YYD_(H@x;-rQSdw=Tu`WljdveXS9^bhJE*OmJ0Mfl)))KBf8eeU)GU={hc zPHsHx(R%6KQ)Zb{(jQ`M%~Vo948+i z(BDsJH%qN$o(RmRI!y*qIn zYW`~ z=D2I0`~bC6i);wX7SMjKutUBxDvO0aR=~|JxVC6P&MydmHEVVqdQ}2#8u>SgAxt;l z4uCmEuC2oP3m!D;?(NSBF*bpH#kFP2zr{A&4%&eBgpH&wZ=1c!QnFEHKs&&mFsh(T zge&&05iq5h&hz#wa|K-GnqNChoI+Jnh0YUUQo_-a_#?u&-Fc zRXx!L@?Db+;ft6>3(MO5;35JP;YaDzX5$*-z{-$E^%Plk;5SW6+hW=)OH2aJ~&v(zTP`1bLR#+Fki@v+qb8@QCx{_iXHUH zSj}-t>z>Z1QgT92zZz0kc2~zUc1Nj{rv;+)D{mpeN5k%anJ*hyH>R2IsrbjB9{f+p zqhx=*tnWAP#LkwOke220*SR3`*|m-)HU#6JWw-CSt@o)vIOfYjuuN^=zWq(~9S$XY z(Nc1J703`jvr(57ub+Y4JqOii${}C4fg#rt5-k$>=k>gWX|)#B`mVGBW3RKCJ3JUB zWgIg*?ff;QYN-CY?C`1OPtz;jw5W2evP>a{8pSras=*5`6cf{8+CI2?fmzTDSE0L7 zd`laLpkYE>-{?7^`x|GPf?^Z5!zl!W_Fi3qb&I!GL-7B9tn!$~Jvl6O_Y0E*;y-Icqu%&9niWPpukEjTl z-eP`yD6hng*(aGjyJ+UQ!u&6j+^0}&d|?~B bpw 160) [!_unconscious, _pain] call FUNC(effectPain); [!_unconscious, _bleedingStrength, _manualUpdate] call FUNC(effectBleeding); -// - Tourniquets and Splints indication --------------------------------------- -if (GVAR(tourniquetsAndSplintsIndication)) then { - [] call FUNC(handleTourniquetsAndSplintsIndication); +// - Tourniquets, fractures and splints indication --------------------------------------- +if (GVAR(GUIIndication)) then { + [] call FUNC(handleGUIIndication); }; END_COUNTER(handleEffects); diff --git a/addons/medical_feedback/functions/fnc_handleGUIIndication.sqf b/addons/medical_feedback/functions/fnc_handleGUIIndication.sqf new file mode 100644 index 00000000000..fb1ce414302 --- /dev/null +++ b/addons/medical_feedback/functions/fnc_handleGUIIndication.sqf @@ -0,0 +1,63 @@ +#include "script_component.hpp" +/* + * Author: 10Dozen + * Handles indication of the fractures, applied tourniquets and splints over Stance indicator. + * Draws an icon if there is at least 1 fracture/splint/tourniquet applied. + * + * Arguments: + * 0: Drop indicator + * + * Return Value: + * None + * + * Example: + * [false] call ace_medical_feedback_fnc_handleGUIIndication + * + * Public: No + */ +params [["_dropIndicator", false]]; +private _indicatorSlots = [ + uiNamespace getVariable [QGVAR(stateIndicator1), controlNull], + uiNamespace getVariable [QGVAR(stateIndicator2), controlNull], + uiNamespace getVariable [QGVAR(stateIndicator3), controlNull] +]; + +// --- Removes any indication and exit +if (_dropIndicator) exitWith { + { + _x ctrlSetText ""; + } forEach _indicatorSlots; +}; + +// --- Tourniquets +private _hasTourniquets = {_x > 0} count GET_TOURNIQUETS(ACE_player) > 0; +private _tourniquetIcon = ["",ICON_TOURNIQUET_PATH] select _hasTourniquets; + +// --- Fractures and Splints +private _fractureSettings = EGVAR(medical,fractures); +private _fractureIcon = ""; +private _splintIcon = ""; + +if (_fractureSettings > 0) then { + // --- Fractures enabled: check for fracture indication + private _hasFractures = {_x > 0} count GET_FRACTURES(ACE_player) > 0; + _fractureIcon = ["",ICON_FRACTURE_PATH] select _hasFractures; + + if (_fractureSettings > 1) then { + // --- Fractures can not be fully healed: check for splint indication + private _hasSplints = {_x isEqualTo -1} count GET_FRACTURES(ACE_player) > 0; + _splintIcon = ["",ICON_SPLINT_PATH] select _hasSplints; + }; +}; + +// --- Getting prioritized list of icons to apply +private _icons = [ + _fractureIcon, + _tourniquetIcon, + _splintIcon +] select {_x isNotEqualTo ""}; + +// --- Applying icons to indicator slots, if no icon for slot - remove slot's text +{ + _x ctrlSetText (_icons param [_forEachIndex, ""]); +} forEach _indicatorSlots; diff --git a/addons/medical_feedback/functions/fnc_handleTourniquetsAndSplintsIndication.sqf b/addons/medical_feedback/functions/fnc_handleTourniquetsAndSplintsIndication.sqf deleted file mode 100644 index 8d486d2aaa1..00000000000 --- a/addons/medical_feedback/functions/fnc_handleTourniquetsAndSplintsIndication.sqf +++ /dev/null @@ -1,36 +0,0 @@ -#include "script_component.hpp" -/* - * Author: 10Dozen - * Handles indication of the applied tourniquets and splints over Stance indicator. - * Draws an icon if there is at least 1 tourniquet/splint applied. - * - * Arguments: - * 0: Drop indicator - * - * Return Value: - * None - * - * Example: - * [false] call ace_medical_feedback_fnc_handleTourniquetsAndSplintsIndication - * - * Public: No - */ -params [["_dropIndicator", false]]; - -private _indicatorTourniquetCtrl = uiNamespace getVariable [QGVAR(tourniquetIndicator), controlNull]; -private _indicatorSplintCtrl = uiNamespace getVariable [QGVAR(splintIndicator), controlNull]; - -// --- Removes any indication and exit -if (_dropIndicator) exitWith { - _indicatorTourniquetCtrl ctrlSetText ""; - _indicatorSplintCtrl ctrlSetText ""; -}; - -private _hasTourniquets = {_x > 0} count GET_TOURNIQUETS(ACE_player) > 0; -private _tourniquetIcon = ["",ICON_TOURNIQUET_PATH] select _hasTourniquets; - -private _hasSplints = {_x isEqualTo -1} count GET_FRACTURES(ACE_player) > 0; -private _splintIcon = ["",ICON_SPLINT_PATH] select _hasSplints; - -_indicatorTourniquetCtrl ctrlSetText _tourniquetIcon; -_indicatorSplintCtrl ctrlSetText _splintIcon; diff --git a/addons/medical_feedback/initSettings.sqf b/addons/medical_feedback/initSettings.sqf index dad94bcd8ce..531556d5241 100644 --- a/addons/medical_feedback/initSettings.sqf +++ b/addons/medical_feedback/initSettings.sqf @@ -41,16 +41,16 @@ ] call CBA_fnc_addSetting; [ - QGVAR(tourniquetsAndSplintsIndication), + QGVAR(GUIIndication), "CHECKBOX", - [LSTRING(TourniquetsAndSplintsIndication_DisplayName), LSTRING(TourniquetsAndSplintsIndication_Description)], + [LSTRING(GUIIndication_DisplayName), LSTRING(GUIIndication_Description)], [ELSTRING(medical,Category), LSTRING(SubCategory)], true, false, { // --- Drop indication on disabling if (!_this) exitWith { - [true] call FUNC(handleTourniquetsAndSplintsIndication); + [true] call FUNC(handleGUIIndication); }; } ] call CBA_fnc_addSetting; diff --git a/addons/medical_feedback/script_component.hpp b/addons/medical_feedback/script_component.hpp index 4130e4656a5..1024b0b6798 100644 --- a/addons/medical_feedback/script_component.hpp +++ b/addons/medical_feedback/script_component.hpp @@ -58,3 +58,4 @@ #define ICON_TOURNIQUET_PATH QPATHTOF(data\cat.paa) #define ICON_SPLINT_PATH QPATHTOF(data\splint.paa) +#define ICON_FRACTURE_PATH QPATHTOF(data\fracture.paa) diff --git a/addons/medical_feedback/stringtable.xml b/addons/medical_feedback/stringtable.xml index b8800bc84e7..f614fa4d87c 100644 --- a/addons/medical_feedback/stringtable.xml +++ b/addons/medical_feedback/stringtable.xml @@ -189,13 +189,13 @@ 啟用傷者的尖叫聲 Yaralı birimler tarafından çığlık atmayı etkinleştir - - Enable CAT/Splint Indication - Включить индикацию жгутов\шин + + Enable Fractures/CATs Indication + Включить индикацию переломов/жгутов - - Enables the indication of the applied CATs and splints over the Stance indicator. - Включает индикацию наложенных жгутов и шин поверх индикатора положения тела. + + Enables the indication of the fractures, applied CATs and splints over the Stance indicator. + Включает индикацию переломов, а также наложенных жгутов и шин поверх индикатора положения тела. From cdba317decfb669e19651abed6d29d1e758a3d3b Mon Sep 17 00:00:00 2001 From: "eugene.tretyak" Date: Thu, 22 Jul 2021 14:39:42 +0300 Subject: [PATCH 04/11] Replace all counts with findIf in state detection --- .../functions/fnc_handleGUIIndication.sqf | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/addons/medical_feedback/functions/fnc_handleGUIIndication.sqf b/addons/medical_feedback/functions/fnc_handleGUIIndication.sqf index fb1ce414302..9a98488d7a2 100644 --- a/addons/medical_feedback/functions/fnc_handleGUIIndication.sqf +++ b/addons/medical_feedback/functions/fnc_handleGUIIndication.sqf @@ -16,6 +16,7 @@ * Public: No */ params [["_dropIndicator", false]]; + private _indicatorSlots = [ uiNamespace getVariable [QGVAR(stateIndicator1), controlNull], uiNamespace getVariable [QGVAR(stateIndicator2), controlNull], @@ -30,7 +31,7 @@ if (_dropIndicator) exitWith { }; // --- Tourniquets -private _hasTourniquets = {_x > 0} count GET_TOURNIQUETS(ACE_player) > 0; +private _hasTourniquets = GET_TOURNIQUETS(ACE_player) findIf {_x > 0} > -1; private _tourniquetIcon = ["",ICON_TOURNIQUET_PATH] select _hasTourniquets; // --- Fractures and Splints @@ -40,24 +41,24 @@ private _splintIcon = ""; if (_fractureSettings > 0) then { // --- Fractures enabled: check for fracture indication - private _hasFractures = {_x > 0} count GET_FRACTURES(ACE_player) > 0; + private _hasFractures = GET_FRACTURES(ACE_player) findIf {_x > 0} > -1; _fractureIcon = ["",ICON_FRACTURE_PATH] select _hasFractures; if (_fractureSettings > 1) then { // --- Fractures can not be fully healed: check for splint indication - private _hasSplints = {_x isEqualTo -1} count GET_FRACTURES(ACE_player) > 0; + private _hasSplints = GET_FRACTURES(ACE_player) findIf {_x isEqualTo -1} > -1; _splintIcon = ["",ICON_SPLINT_PATH] select _hasSplints; }; }; -// --- Getting prioritized list of icons to apply +// --- Get prioritized list of icons to apply private _icons = [ _fractureIcon, _tourniquetIcon, _splintIcon ] select {_x isNotEqualTo ""}; -// --- Applying icons to indicator slots, if no icon for slot - remove slot's text +// --- Apply icons to indicator slots, if no icon for slot - remove slot's text { _x ctrlSetText (_icons param [_forEachIndex, ""]); } forEach _indicatorSlots; From 23422b05683d46352c9c2643ab188658a0b509ff Mon Sep 17 00:00:00 2001 From: "eugene.tretyak" Date: Fri, 23 Jul 2021 19:48:20 +0300 Subject: [PATCH 05/11] Replaced tourniquet icon with textless one --- addons/medical_feedback/data/cat.paa | Bin 5625 -> 0 bytes addons/medical_feedback/data/tourniquet.paa | Bin 0 -> 5625 bytes addons/medical_feedback/script_component.hpp | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 addons/medical_feedback/data/cat.paa create mode 100644 addons/medical_feedback/data/tourniquet.paa diff --git a/addons/medical_feedback/data/cat.paa b/addons/medical_feedback/data/cat.paa deleted file mode 100644 index 50c1a66fafa0a044a35eee44e78ef935fe56d5ff..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5625 zcmdT|3s6&68a_7?iXakKV^xY|6~+g?+EMCgCD+FwRA{5-u!u;ajuul%7&~>_6}=b4 z+MQX8wZ+QLD5!-s**1WW>rT77q-xbFiqqB_O)FX$v2HC;O6w!x?El~70z&Ps-5qy( z=H|ke^ZLL4b^a4In>%-=arWG_nL&h*ulB#OO2+9kQxP+0i095sNkq)S2l2wh#AkW< zUxd$Q4I!@$BBWSL$mj5Ru*MUf5Ln>>+vI9#X~SBpS8x)dRjavC2daEWSQ|rZgcYAS zAmwbcMeH_{`Jz!6^Yas&`U(d$c8sX-8wJOF zy??!XbJRtgZ!{Rv{iA<5?>-l#<;{uT_yma%FgMqWZ%_UKY^s=AOn8?rqM^ul>82&mGO10YOnYAD$bz6)enYP=}zW3wn6#VvA_&aM-M)wQl z*l)#q{9z@NmbjCPV`P5-ZO}`w-+rG}-$*OybN z6h6KAqI`r``b{uCGmTOON3URU6KNO5{?Hzn{H?2Ba7K@-n${h&I6^8r*E3Z_kAwZr zKiN^~J0jd-Ch!;V7S+%l0sjf)+vRe;TJTgrKfFxlCtg!_ueEN3B{YQ?-;|o~)>U?# zwSAXWp(*SW+a-_5i6i;7e|t}qCJ$wVm>-$Ym2u={sr_mw!FM}uMe$P1ocGo zIudrM%io;`3yCOx)x}4c69x&T6IbYS;Cz{+V2Ga;9Aw%q+*6;2^9U)+{ndLwzQ}hG z_s_OuWGHg|ul|nNlW2_$_zSoTo#thA`e4Q1II6zv_n*Z*{Ko|GNl4$m_vh>PAM+*D zZ(Fpn!6guU z$=}NR7ejy8_0zV-H4`RcJrQbu`)!54KR<<^SFqrml;;w!WUOGxJ6-lD_v4@~!t=f2 zUE3(-L`tismqL95$GzHk^HwQpOkPjq%~96@)D3o{{)xkpp=lCY^uA{A%jInI*s=TU zGb%wJ)$84uFR0OI;J&<89h{aH zQp+k?(lQTXvd=*q7#JtDAVzSe7n51DcwH^*|Lht!^2Pm~Z6)h3ZS?1Bjln=w7a+MP z`3W3o;XbHMUtJx@S3He9Qyq@^>G3~6?t}aUtK8E@tcCMYwp$?NxLj_~#I*5=#^GFGbz z*;>t7^`HRMU*>2+O8&97|93L>U*gCGed{Bvy>toaE8ARF)^q)b&Hw2@envi!e(0k& zSv@;xYeX!9$ivT9MZF913xEfMu)FTu0#pk8AYZ%8ne6-!aVFd&vnra`_2o7mnP1M> z;iC0!v=>^e!h9#p=pZ`~&=t<8|eZy$m~y}X!ez6B%HE?W^bG9R=*&=5y*|n$*O1 zu$NbQWc!PbMUigScH!h|&vcMyk2#yxGJ|EJ^qj{B*N#wb6YbZUo6vO7Uq%E6SJ3>e z)iS@p{+(&#e)fd~jDey_*fRuE~Z?8?j(!2=5fzWfa+H@#kFS87IrsU_^S)mB$k;i zkDQ%;a9xru7u8s%A@-qdzdL-eX+-*CfD6dzKi(qw1E+3&K_3a@mo8mq0a4_pgEu;C z2niuPA*n6FH?zD&6NUo~$UY-N?|_)U_HH)q0x^yJzABP@x%dh577rA&#V~c$!P|?2 i3um~$C>rw2hs1$`!6-En3Pv48Ld41-nS!S+w(ZXhK9 diff --git a/addons/medical_feedback/data/tourniquet.paa b/addons/medical_feedback/data/tourniquet.paa new file mode 100644 index 0000000000000000000000000000000000000000..59e0076ed260d4beaf916bc9cb2bdfe168c24e1d GIT binary patch literal 5625 zcmeHLeNa@_6+a8?1Qv0rvet?S7*fV(sTl>EQSmL-0r{#surI81<0GPC3K^U8hzRi6^Wy%m=8PIExITf6;iPZD61g*xIOpnzSV3dHngLE zd1l_i@7;UP*FEQ+bDx@IWTY9tpYd#32moB!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HE;Hu;Y~tpU2_|Fi zs?{{!A&5wS>7n-2dc679%8_1K?ss@OAN#m`xjN*x^Y+XvsOGsu9`}2n)wO;PKqX%= zZhHgWL*Vu8k+0VUQ~T9wwJQBO@w{JKb-oo(OFaJmYrP5NH*Wl0@A-h%(e&fOV>V#_ zWOY$&Ks;`K<6JQ9?8P$A?NzS#=3;N6QgdKSELY*}j8-dy!T8YSk5k>p(;s`_fgXs1 zH~{*E!Ao)YhaNCKNCzJYp7dwTVbS_DFJHU3SrK}~%kKKFVF2HvXJq_<4_CwF!#f%} zSkFuJ8dX?Ys?jZ`>ti~7*C_un^mX;0{_hW3$>=d`E1XQ{jfoQ!53tSOoJ~mAn+oo> z9ANrNODh%3;)aEx9d66=C*1)NjAk=50HTdVD2Q9RAXE z%uN(NT-Hn5z)(&29)&+|Ka?FZK@;A0O^a78+6FlpgQ2sl$CG+17V+Yr4K5LEHfHj9 z@^R0h^~Ym(Vi$e%wm$ts92_aT@%GH4iEVWbNu2{p%A^p}R|6J|&s0m3%t_7AMbY|b7#okx1abFk9nP1t((`oImUG$ z!nGC4oWXSOvxTB>;QB~kTTR;xbSI~QW%M&c0>#*M_{+pstqBOEtOKLu!0eA~JwwMQD|1y38@cBZU1P5$OD1?F@AW9M=N~G?@?oFtct)+VA1>~7{<~MToV)91(^|P{sooigbUW+~1 ptP(E!R@vzgoN@s#kpNXFCWQKP!sm4j>$5bSvD*MjTQt5y^*^u0V-ElT literal 0 HcmV?d00001 diff --git a/addons/medical_feedback/script_component.hpp b/addons/medical_feedback/script_component.hpp index 1024b0b6798..99167c08a79 100644 --- a/addons/medical_feedback/script_component.hpp +++ b/addons/medical_feedback/script_component.hpp @@ -56,6 +56,6 @@ #define ICON_BLOODVOLUME_COLOR_ORANGE [1, 0.6, 0, 1] #define ICON_BLOODVOLUME_COLOR_RED [0.8, 0.2, 0, 1] -#define ICON_TOURNIQUET_PATH QPATHTOF(data\cat.paa) +#define ICON_TOURNIQUET_PATH QPATHTOF(data\tourniquet.paa) #define ICON_SPLINT_PATH QPATHTOF(data\splint.paa) #define ICON_FRACTURE_PATH QPATHTOF(data\fracture.paa) From 0d73f2fe7bbbd2be36e51d5d23a155d0496886f8 Mon Sep 17 00:00:00 2001 From: "eugene.tretyak" Date: Sat, 24 Jul 2021 11:59:59 +0300 Subject: [PATCH 06/11] Updated inheritance of UI elements properties --- addons/medical_feedback/RscInGameUI.hpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/addons/medical_feedback/RscInGameUI.hpp b/addons/medical_feedback/RscInGameUI.hpp index db52dbf5464..cc2712d8ab3 100644 --- a/addons/medical_feedback/RscInGameUI.hpp +++ b/addons/medical_feedback/RscInGameUI.hpp @@ -24,12 +24,10 @@ class RscInGameUI { }; class GVAR(stateIndicator2): GVAR(stateIndicator1) { onLoad = QUOTE(uiNamespace setVariable [ARR_2(QQGVAR(stateIndicator2), _this select 0)]); - x = IGUI_GRID_STANCE_X + IGUI_GRID_STANCE_WAbs * 3 / 4; y = IGUI_GRID_STANCE_Y + IGUI_GRID_STANCE_HAbs / 4; }; class GVAR(stateIndicator3): GVAR(stateIndicator1) { onLoad = QUOTE(uiNamespace setVariable [ARR_2(QQGVAR(stateIndicator3), _this select 0)]); - x = IGUI_GRID_STANCE_X + IGUI_GRID_STANCE_WAbs * 3 / 4; y = IGUI_GRID_STANCE_Y + IGUI_GRID_STANCE_HAbs * 2 / 4; }; }; From 59462d3ff36bb099b94493d311e04879315b9c9f Mon Sep 17 00:00:00 2001 From: "eugene.tretyak" Date: Sat, 24 Jul 2021 20:38:41 +0300 Subject: [PATCH 07/11] Tweak namings --- addons/medical_feedback/XEH_PREP.hpp | 2 +- .../functions/fnc_handleEffects.sqf | 4 ++-- ...ndication.sqf => fnc_handleHUDIndication.sqf} | 16 ++++++++-------- addons/medical_feedback/initSettings.sqf | 6 +++--- addons/medical_feedback/stringtable.xml | 8 ++++---- 5 files changed, 18 insertions(+), 18 deletions(-) rename addons/medical_feedback/functions/{fnc_handleGUIIndication.sqf => fnc_handleHUDIndication.sqf} (79%) diff --git a/addons/medical_feedback/XEH_PREP.hpp b/addons/medical_feedback/XEH_PREP.hpp index 44087528e7e..0ad956b9c43 100644 --- a/addons/medical_feedback/XEH_PREP.hpp +++ b/addons/medical_feedback/XEH_PREP.hpp @@ -5,7 +5,7 @@ PREP(effectHeartBeat); PREP(effectIncapacitated); PREP(effectPain); PREP(effectUnconscious); -PREP(handleGUIIndication); +PREP(handleHUDIndication); PREP(handleEffects); PREP(initEffects); PREP(playInjuredSound); diff --git a/addons/medical_feedback/functions/fnc_handleEffects.sqf b/addons/medical_feedback/functions/fnc_handleEffects.sqf index 47604b6e0c3..0630b17b129 100644 --- a/addons/medical_feedback/functions/fnc_handleEffects.sqf +++ b/addons/medical_feedback/functions/fnc_handleEffects.sqf @@ -59,8 +59,8 @@ if ((!GVAR(heartBeatEffectRunning)) && {_heartRate != 0} && {(_heartRate > 160) [!_unconscious, _bleedingStrength, _manualUpdate] call FUNC(effectBleeding); // - Tourniquets, fractures and splints indication --------------------------------------- -if (GVAR(GUIIndication)) then { - [] call FUNC(handleGUIIndication); +if (GVAR(enableHUDIndication)) then { + [] call FUNC(handleHUDIndication); }; END_COUNTER(handleEffects); diff --git a/addons/medical_feedback/functions/fnc_handleGUIIndication.sqf b/addons/medical_feedback/functions/fnc_handleHUDIndication.sqf similarity index 79% rename from addons/medical_feedback/functions/fnc_handleGUIIndication.sqf rename to addons/medical_feedback/functions/fnc_handleHUDIndication.sqf index 9a98488d7a2..8bf033d5112 100644 --- a/addons/medical_feedback/functions/fnc_handleGUIIndication.sqf +++ b/addons/medical_feedback/functions/fnc_handleHUDIndication.sqf @@ -5,17 +5,17 @@ * Draws an icon if there is at least 1 fracture/splint/tourniquet applied. * * Arguments: - * 0: Drop indicator + * 0: Flag to drop all indicators (optional) * * Return Value: * None * * Example: - * [false] call ace_medical_feedback_fnc_handleGUIIndication + * [false] call ace_medical_feedback_fnc_handleHUDIndication * * Public: No */ -params [["_dropIndicator", false]]; +params [["_dropAllIndicators", false]]; private _indicatorSlots = [ uiNamespace getVariable [QGVAR(stateIndicator1), controlNull], @@ -24,7 +24,7 @@ private _indicatorSlots = [ ]; // --- Removes any indication and exit -if (_dropIndicator) exitWith { +if (_dropAllIndicators) exitWith { { _x ctrlSetText ""; } forEach _indicatorSlots; @@ -32,7 +32,7 @@ if (_dropIndicator) exitWith { // --- Tourniquets private _hasTourniquets = GET_TOURNIQUETS(ACE_player) findIf {_x > 0} > -1; -private _tourniquetIcon = ["",ICON_TOURNIQUET_PATH] select _hasTourniquets; +private _tourniquetIcon = ["", ICON_TOURNIQUET_PATH] select _hasTourniquets; // --- Fractures and Splints private _fractureSettings = EGVAR(medical,fractures); @@ -42,12 +42,12 @@ private _splintIcon = ""; if (_fractureSettings > 0) then { // --- Fractures enabled: check for fracture indication private _hasFractures = GET_FRACTURES(ACE_player) findIf {_x > 0} > -1; - _fractureIcon = ["",ICON_FRACTURE_PATH] select _hasFractures; + _fractureIcon = ["", ICON_FRACTURE_PATH] select _hasFractures; if (_fractureSettings > 1) then { // --- Fractures can not be fully healed: check for splint indication - private _hasSplints = GET_FRACTURES(ACE_player) findIf {_x isEqualTo -1} > -1; - _splintIcon = ["",ICON_SPLINT_PATH] select _hasSplints; + private _hasSplints = GET_FRACTURES(ACE_player) findIf {_x == -1} > -1; + _splintIcon = ["", ICON_SPLINT_PATH] select _hasSplints; }; }; diff --git a/addons/medical_feedback/initSettings.sqf b/addons/medical_feedback/initSettings.sqf index 531556d5241..c1577a77d84 100644 --- a/addons/medical_feedback/initSettings.sqf +++ b/addons/medical_feedback/initSettings.sqf @@ -41,16 +41,16 @@ ] call CBA_fnc_addSetting; [ - QGVAR(GUIIndication), + QGVAR(enableHUDIndication), "CHECKBOX", - [LSTRING(GUIIndication_DisplayName), LSTRING(GUIIndication_Description)], + [LSTRING(enableHUDIndication_DisplayName), LSTRING(enableHUDIndication_Description)], [ELSTRING(medical,Category), LSTRING(SubCategory)], true, false, { // --- Drop indication on disabling if (!_this) exitWith { - [true] call FUNC(handleGUIIndication); + [true] call FUNC(handleHUDIndication); }; } ] call CBA_fnc_addSetting; diff --git a/addons/medical_feedback/stringtable.xml b/addons/medical_feedback/stringtable.xml index f614fa4d87c..b841b1d9ca8 100644 --- a/addons/medical_feedback/stringtable.xml +++ b/addons/medical_feedback/stringtable.xml @@ -189,12 +189,12 @@ 啟用傷者的尖叫聲 Yaralı birimler tarafından çığlık atmayı etkinleştir - - Enable Fractures/CATs Indication + + Enable Fractures/Tourniquets Indication Включить индикацию переломов/жгутов - - Enables the indication of the fractures, applied CATs and splints over the Stance indicator. + + Enables the indication of the fractures, applied tourniquets and splints over the Stance indicator. Включает индикацию переломов, а также наложенных жгутов и шин поверх индикатора положения тела. From 90a3e9ecbe8c7a6d748024c2d00e1fc06896acf6 Mon Sep 17 00:00:00 2001 From: "eugene.tretyak" Date: Mon, 26 Jul 2021 15:55:24 +0300 Subject: [PATCH 08/11] Namings tweak 2.0 --- addons/medical_feedback/XEH_PREP.hpp | 2 +- .../medical_feedback/functions/fnc_handleEffects.sqf | 4 ++-- ...leHUDIndication.sqf => fnc_handleHUDIndicators.sqf} | 2 +- addons/medical_feedback/initSettings.sqf | 6 +++--- addons/medical_feedback/stringtable.xml | 10 +++++----- 5 files changed, 12 insertions(+), 12 deletions(-) rename addons/medical_feedback/functions/{fnc_handleHUDIndication.sqf => fnc_handleHUDIndicators.sqf} (96%) diff --git a/addons/medical_feedback/XEH_PREP.hpp b/addons/medical_feedback/XEH_PREP.hpp index 0ad956b9c43..85dcd64d430 100644 --- a/addons/medical_feedback/XEH_PREP.hpp +++ b/addons/medical_feedback/XEH_PREP.hpp @@ -5,7 +5,7 @@ PREP(effectHeartBeat); PREP(effectIncapacitated); PREP(effectPain); PREP(effectUnconscious); -PREP(handleHUDIndication); +PREP(handleHUDIndicators); PREP(handleEffects); PREP(initEffects); PREP(playInjuredSound); diff --git a/addons/medical_feedback/functions/fnc_handleEffects.sqf b/addons/medical_feedback/functions/fnc_handleEffects.sqf index 0630b17b129..4f81ba46896 100644 --- a/addons/medical_feedback/functions/fnc_handleEffects.sqf +++ b/addons/medical_feedback/functions/fnc_handleEffects.sqf @@ -59,8 +59,8 @@ if ((!GVAR(heartBeatEffectRunning)) && {_heartRate != 0} && {(_heartRate > 160) [!_unconscious, _bleedingStrength, _manualUpdate] call FUNC(effectBleeding); // - Tourniquets, fractures and splints indication --------------------------------------- -if (GVAR(enableHUDIndication)) then { - [] call FUNC(handleHUDIndication); +if (GVAR(enableHUDIndicators)) then { + [] call FUNC(handleHUDIndicators); }; END_COUNTER(handleEffects); diff --git a/addons/medical_feedback/functions/fnc_handleHUDIndication.sqf b/addons/medical_feedback/functions/fnc_handleHUDIndicators.sqf similarity index 96% rename from addons/medical_feedback/functions/fnc_handleHUDIndication.sqf rename to addons/medical_feedback/functions/fnc_handleHUDIndicators.sqf index 8bf033d5112..5579c621101 100644 --- a/addons/medical_feedback/functions/fnc_handleHUDIndication.sqf +++ b/addons/medical_feedback/functions/fnc_handleHUDIndicators.sqf @@ -11,7 +11,7 @@ * None * * Example: - * [false] call ace_medical_feedback_fnc_handleHUDIndication + * [false] call ace_medical_feedback_fnc_handleHUDIndicators * * Public: No */ diff --git a/addons/medical_feedback/initSettings.sqf b/addons/medical_feedback/initSettings.sqf index c1577a77d84..84664f3e69f 100644 --- a/addons/medical_feedback/initSettings.sqf +++ b/addons/medical_feedback/initSettings.sqf @@ -41,16 +41,16 @@ ] call CBA_fnc_addSetting; [ - QGVAR(enableHUDIndication), + QGVAR(enableHUDIndicators), "CHECKBOX", - [LSTRING(enableHUDIndication_DisplayName), LSTRING(enableHUDIndication_Description)], + [LSTRING(enableHUDIndicators_DisplayName), LSTRING(enableHUDIndicators_Description)], [ELSTRING(medical,Category), LSTRING(SubCategory)], true, false, { // --- Drop indication on disabling if (!_this) exitWith { - [true] call FUNC(handleHUDIndication); + [true] call FUNC(handleHUDIndicators); }; } ] call CBA_fnc_addSetting; diff --git a/addons/medical_feedback/stringtable.xml b/addons/medical_feedback/stringtable.xml index b841b1d9ca8..e07e65a0c99 100644 --- a/addons/medical_feedback/stringtable.xml +++ b/addons/medical_feedback/stringtable.xml @@ -189,12 +189,12 @@ 啟用傷者的尖叫聲 Yaralı birimler tarafından çığlık atmayı etkinleştir - - Enable Fractures/Tourniquets Indication - Включить индикацию переломов/жгутов + + Enable Fractures/Tourniquets Indicators + Включить индикаторы переломов/жгутов - - Enables the indication of the fractures, applied tourniquets and splints over the Stance indicator. + + Enables the indicators of the fractures, applied tourniquets and splints over the Stance indicator. Включает индикацию переломов, а также наложенных жгутов и шин поверх индикатора положения тела. From 0c42b85bbacb7f820f5cb37859a92185ab812848 Mon Sep 17 00:00:00 2001 From: 10Dozen Date: Mon, 11 Oct 2021 11:44:20 +0300 Subject: [PATCH 09/11] Update addons/medical_feedback/stringtable.xml Co-authored-by: mharis001 <34453221+mharis001@users.noreply.github.com> --- addons/medical_feedback/stringtable.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/medical_feedback/stringtable.xml b/addons/medical_feedback/stringtable.xml index e07e65a0c99..b5e04b533de 100644 --- a/addons/medical_feedback/stringtable.xml +++ b/addons/medical_feedback/stringtable.xml @@ -190,7 +190,7 @@ Yaralı birimler tarafından çığlık atmayı etkinleştir - Enable Fractures/Tourniquets Indicators + Enable Fracture/Tourniquet/Splint Indicators Включить индикаторы переломов/жгутов From 4babcd0e514519a10c4d715a6ff426d28f4d638a Mon Sep 17 00:00:00 2001 From: "eugene.tretyak" Date: Mon, 11 Oct 2021 12:02:23 +0300 Subject: [PATCH 10/11] Capitalize stringtable keys & lines --- addons/medical_feedback/initSettings.sqf | 2 +- addons/medical_feedback/stringtable.xml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/medical_feedback/initSettings.sqf b/addons/medical_feedback/initSettings.sqf index 84664f3e69f..997a5f061b7 100644 --- a/addons/medical_feedback/initSettings.sqf +++ b/addons/medical_feedback/initSettings.sqf @@ -43,7 +43,7 @@ [ QGVAR(enableHUDIndicators), "CHECKBOX", - [LSTRING(enableHUDIndicators_DisplayName), LSTRING(enableHUDIndicators_Description)], + [LSTRING(EnableHUDIndicators_DisplayName), LSTRING(EnableHUDIndicators_Description)], [ELSTRING(medical,Category), LSTRING(SubCategory)], true, false, diff --git a/addons/medical_feedback/stringtable.xml b/addons/medical_feedback/stringtable.xml index b5e04b533de..1f89dee2a2a 100644 --- a/addons/medical_feedback/stringtable.xml +++ b/addons/medical_feedback/stringtable.xml @@ -189,13 +189,13 @@ 啟用傷者的尖叫聲 Yaralı birimler tarafından çığlık atmayı etkinleştir - + Enable Fracture/Tourniquet/Splint Indicators - Включить индикаторы переломов/жгутов + Включить индикаторы переломов/жгутов/шин - - Enables the indicators of the fractures, applied tourniquets and splints over the Stance indicator. - Включает индикацию переломов, а также наложенных жгутов и шин поверх индикатора положения тела. + + Enables indicators for the fractures, applied tourniquets and splints over the Stance Indicator. + Включает индикацию переломов, наложенных шин и жгутов поверх индикатора положения тела. From a0b2e00ddd5b240c647612e00fc82d64e9e51e55 Mon Sep 17 00:00:00 2001 From: jonpas Date: Tue, 12 Oct 2021 10:55:15 +0200 Subject: [PATCH 11/11] Update addons/medical_feedback/stringtable.xml Co-authored-by: mharis001 <34453221+mharis001@users.noreply.github.com> --- addons/medical_feedback/stringtable.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/medical_feedback/stringtable.xml b/addons/medical_feedback/stringtable.xml index 1f89dee2a2a..d695f8f5a4a 100644 --- a/addons/medical_feedback/stringtable.xml +++ b/addons/medical_feedback/stringtable.xml @@ -194,7 +194,7 @@ Включить индикаторы переломов/жгутов/шин - Enables indicators for the fractures, applied tourniquets and splints over the Stance Indicator. + Enables indicators for fractures and applied tourniquets and splints over the Stance Indicator. Включает индикацию переломов, наложенных шин и жгутов поверх индикатора положения тела.