From 1322de868c505c418e13931fc554516a77db7318 Mon Sep 17 00:00:00 2001
From: Will/KJW <100206101+SpicyBagpipes@users.noreply.github.com>
Date: Wed, 8 Jan 2025 14:47:54 -0600
Subject: [PATCH 1/7] Update fnc_updateCategories.sqf
---
addons/medical_gui/functions/fnc_updateCategories.sqf | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/addons/medical_gui/functions/fnc_updateCategories.sqf b/addons/medical_gui/functions/fnc_updateCategories.sqf
index c2f1d2a11c8..618345b4a2c 100644
--- a/addons/medical_gui/functions/fnc_updateCategories.sqf
+++ b/addons/medical_gui/functions/fnc_updateCategories.sqf
@@ -26,6 +26,12 @@ params ["_display"];
};
_ctrl ctrlEnable _enable;
+ if (!_enable && (EGVAR(medical_treatment,holsterRequired) == 1)) then {
+ _ctrl ctrlSetTooltip LSTRING(needToHolster);
+ } else {
+ _ctrl ctrlSetTooltip "";
+ };
+
private _selectedColor = [
profileNamespace getVariable ["GUI_BCG_RGB_R", 0.13],
profileNamespace getVariable ["GUI_BCG_RGB_G", 0.54],
From c80315669447dcb17d1db27e222c7a929c75cb14 Mon Sep 17 00:00:00 2001
From: Will/KJW <100206101+SpicyBagpipes@users.noreply.github.com>
Date: Wed, 8 Jan 2025 14:49:49 -0600
Subject: [PATCH 2/7] Update stringtable.xml
---
addons/medical_gui/stringtable.xml | 3 +++
1 file changed, 3 insertions(+)
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!
+
From b5822e51a9da94b1484c16ad3273d1ac2463ea0e Mon Sep 17 00:00:00 2001
From: Will/KJW <100206101+SpicyBagpipes@users.noreply.github.com>
Date: Wed, 8 Jan 2025 14:53:26 -0600
Subject: [PATCH 3/7] Update fnc_updateCategories.sqf
---
addons/medical_gui/functions/fnc_updateCategories.sqf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/medical_gui/functions/fnc_updateCategories.sqf b/addons/medical_gui/functions/fnc_updateCategories.sqf
index 618345b4a2c..07b950d3cff 100644
--- a/addons/medical_gui/functions/fnc_updateCategories.sqf
+++ b/addons/medical_gui/functions/fnc_updateCategories.sqf
@@ -26,7 +26,7 @@ params ["_display"];
};
_ctrl ctrlEnable _enable;
- if (!_enable && (EGVAR(medical_treatment,holsterRequired) == 1)) then {
+ if (!_enable && ((EGVAR(medical_treatment,holsterRequired) > 0) && currentWeapon ace_player isNotEqualTo "")) then {
_ctrl ctrlSetTooltip LSTRING(needToHolster);
} else {
_ctrl ctrlSetTooltip "";
From 41262a5501e5b48df83096b48f403c5b13ed9ba2 Mon Sep 17 00:00:00 2001
From: Will/KJW <100206101+SpicyBagpipes@users.noreply.github.com>
Date: Wed, 8 Jan 2025 15:08:50 -0600
Subject: [PATCH 4/7] Update fnc_updateCategories.sqf
Tooltips are already handled elsewhere
---
addons/medical_gui/functions/fnc_updateCategories.sqf | 2 --
1 file changed, 2 deletions(-)
diff --git a/addons/medical_gui/functions/fnc_updateCategories.sqf b/addons/medical_gui/functions/fnc_updateCategories.sqf
index 07b950d3cff..b1d559e47ee 100644
--- a/addons/medical_gui/functions/fnc_updateCategories.sqf
+++ b/addons/medical_gui/functions/fnc_updateCategories.sqf
@@ -28,8 +28,6 @@ params ["_display"];
if (!_enable && ((EGVAR(medical_treatment,holsterRequired) > 0) && currentWeapon ace_player isNotEqualTo "")) then {
_ctrl ctrlSetTooltip LSTRING(needToHolster);
- } else {
- _ctrl ctrlSetTooltip "";
};
private _selectedColor = [
From b7a5e41587e31da3b79db79665889efe676fe733 Mon Sep 17 00:00:00 2001
From: Will/KJW <100206101+SpicyBagpipes@users.noreply.github.com>
Date: Wed, 8 Jan 2025 15:14:08 -0600
Subject: [PATCH 5/7] Fix typo
---
addons/medical_gui/functions/fnc_updateCategories.sqf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/medical_gui/functions/fnc_updateCategories.sqf b/addons/medical_gui/functions/fnc_updateCategories.sqf
index b1d559e47ee..530c6585701 100644
--- a/addons/medical_gui/functions/fnc_updateCategories.sqf
+++ b/addons/medical_gui/functions/fnc_updateCategories.sqf
@@ -27,7 +27,7 @@ params ["_display"];
_ctrl ctrlEnable _enable;
if (!_enable && ((EGVAR(medical_treatment,holsterRequired) > 0) && currentWeapon ace_player isNotEqualTo "")) then {
- _ctrl ctrlSetTooltip LSTRING(needToHolster);
+ _ctrl ctrlSetTooltip LLSTRING(needToHolster);
};
private _selectedColor = [
From 1a5a3e1e2364de4337701b2175cd58532dacfa82 Mon Sep 17 00:00:00 2001
From: Will/KJW <100206101+SpicyBagpipes@users.noreply.github.com>
Date: Wed, 8 Jan 2025 15:33:17 -0600
Subject: [PATCH 6/7] Update
addons/medical_gui/functions/fnc_updateCategories.sqf
Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
---
addons/medical_gui/functions/fnc_updateCategories.sqf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/medical_gui/functions/fnc_updateCategories.sqf b/addons/medical_gui/functions/fnc_updateCategories.sqf
index 530c6585701..1bcbde298ec 100644
--- a/addons/medical_gui/functions/fnc_updateCategories.sqf
+++ b/addons/medical_gui/functions/fnc_updateCategories.sqf
@@ -26,7 +26,7 @@ params ["_display"];
};
_ctrl ctrlEnable _enable;
- if (!_enable && ((EGVAR(medical_treatment,holsterRequired) > 0) && currentWeapon ace_player isNotEqualTo "")) then {
+ if (!_enable && ((EGVAR(medical_treatment,holsterRequired) > 0) && currentWeapon ACE_player isNotEqualTo "")) then {
_ctrl ctrlSetTooltip LLSTRING(needToHolster);
};
From 502c50117b354e151361f851a5f556dc3a7c47f7 Mon Sep 17 00:00:00 2001
From: Will/KJW <100206101+SpicyBagpipes@users.noreply.github.com>
Date: Wed, 8 Jan 2025 20:11:24 -0600
Subject: [PATCH 7/7] Update
addons/medical_gui/functions/fnc_updateCategories.sqf
Co-authored-by: PabstMirror
---
addons/medical_gui/functions/fnc_updateCategories.sqf | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/addons/medical_gui/functions/fnc_updateCategories.sqf b/addons/medical_gui/functions/fnc_updateCategories.sqf
index 1bcbde298ec..c973aaf3cd6 100644
--- a/addons/medical_gui/functions/fnc_updateCategories.sqf
+++ b/addons/medical_gui/functions/fnc_updateCategories.sqf
@@ -26,7 +26,16 @@ params ["_display"];
};
_ctrl ctrlEnable _enable;
- if (!_enable && ((EGVAR(medical_treatment,holsterRequired) > 0) && currentWeapon ACE_player isNotEqualTo "")) then {
+ 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);
};