From 630c35bf855ea179b86779a9107548fd27bd8966 Mon Sep 17 00:00:00 2001 From: Will/KJW <100206101+SpicyBagpipes@users.noreply.github.com> Date: Mon, 13 Jan 2025 13:37:11 -0600 Subject: [PATCH] Medical GUI - Add medical menu tooltip for holster required (#10634) Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> Co-authored-by: PabstMirror --- .../medical_gui/functions/fnc_updateCategories.sqf | 13 +++++++++++++ addons/medical_gui/stringtable.xml | 3 +++ 2 files changed, 16 insertions(+) diff --git a/addons/medical_gui/functions/fnc_updateCategories.sqf b/addons/medical_gui/functions/fnc_updateCategories.sqf index c2f1d2a11c8..c973aaf3cd6 100644 --- a/addons/medical_gui/functions/fnc_updateCategories.sqf +++ b/addons/medical_gui/functions/fnc_updateCategories.sqf @@ -26,6 +26,19 @@ params ["_display"]; }; _ctrl ctrlEnable _enable; + if (!_enable + && {isNull findDisplay 312} + && {!( + EGVAR(medical_treatment,holsterRequired) == 0 + || {!isNull objectParent ACE_player} // medic is in a vehicle, so weapon is considered holstered + || {!isNull objectParent GVAR(target)} // patient is in a vehicle, ^ + || {(EGVAR(medical_treatment,holsterRequired) in [2,4]) && {_category == "examine"}} // if examine bypass is on + || {currentWeapon ACE_player isEqualTo ""} // weapon is holstered + || {(EGVAR(medical_treatment,holsterRequired) <= 2) && {weaponLowered ACE_player}} // if just lowered is allowed + )}) then { + _ctrl ctrlSetTooltip LLSTRING(needToHolster); + }; + private _selectedColor = [ profileNamespace getVariable ["GUI_BCG_RGB_R", 0.13], profileNamespace getVariable ["GUI_BCG_RGB_G", 0.54], diff --git a/addons/medical_gui/stringtable.xml b/addons/medical_gui/stringtable.xml index 93c2bed5dc9..5bb16e8b721 100644 --- a/addons/medical_gui/stringtable.xml +++ b/addons/medical_gui/stringtable.xml @@ -1693,5 +1693,8 @@ 重篤な外傷 慢性创伤 + + You must holster your weapon first! +