Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Medical GUI - Add medical menu tooltip for holster required #10634

Merged
merged 7 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>
Loading