Skip to content

Commit

Permalink
Medical GUI - Add medical menu tooltip for holster required (#10634)
Browse files Browse the repository at this point in the history
Co-authored-by: johnb432 <[email protected]>
Co-authored-by: PabstMirror <[email protected]>
  • Loading branch information
3 people authored Jan 13, 2025
1 parent 4af2e74 commit 630c35b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
13 changes: 13 additions & 0 deletions addons/medical_gui/functions/fnc_updateCategories.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down
3 changes: 3 additions & 0 deletions addons/medical_gui/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1693,5 +1693,8 @@
<Japanese>重篤な外傷</Japanese>
<Chinesesimp>慢性创伤</Chinesesimp>
</Key>
<Key ID="STR_ACE_Medical_GUI_needToHolster">
<English>You must holster your weapon first!</English>
</Key>
</Package>
</Project>

0 comments on commit 630c35b

Please sign in to comment.