mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Medical GUI - Show warning if tourniquet will interfere with medical menu action (#9475)
* Warn if tourniquet will interfere with medical action * Add setting to enable, default to off * Tweak tooltip message * Tweak code style, missing semicolon Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> * Use localize macro Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> --------- Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
This commit is contained in:
parent
b54be029df
commit
c54a26cc42
@ -58,8 +58,19 @@ private _shownIndex = 0;
|
||||
private _counts = [_items] call FUNC(countTreatmentItems);
|
||||
_countText = _counts call FUNC(formatItemCounts);
|
||||
};
|
||||
_ctrl ctrlSetTooltipColorText [1, 1, 1, 1];
|
||||
_ctrl ctrlSetTooltip _countText;
|
||||
|
||||
// Show warning if tourniquet will interfere with action
|
||||
if (
|
||||
GVAR(tourniquetWarning) &&
|
||||
{(_category in ["examine", "medication"]) || (_items findIf {"IV" in _x}) > -1} &&
|
||||
{HAS_TOURNIQUET_APPLIED_ON(GVAR(target),GVAR(selectedBodyPart))}
|
||||
) then {
|
||||
_ctrl ctrlSetTooltipColorText [1, 1, 0, 1];
|
||||
_ctrl ctrlSetTooltip LLSTRING(TourniquetWarning);
|
||||
};
|
||||
|
||||
_ctrl ctrlSetText _displayName;
|
||||
_ctrl ctrlShow true;
|
||||
|
||||
|
@ -162,3 +162,12 @@ private _categoryColors = [ELSTRING(medical,Category), format ["| %1 |", LELSTRI
|
||||
[0, 5, 1],
|
||||
false
|
||||
] call CBA_fnc_addSetting;
|
||||
|
||||
[
|
||||
QGVAR(tourniquetWarning),
|
||||
"CHECKBOX",
|
||||
[LSTRING(TourniquetWarning_DisplayName), LSTRING(TourniquetWarning_Description)],
|
||||
[ELSTRING(medical,Category), LSTRING(SubCategory)],
|
||||
false,
|
||||
false
|
||||
] call CBA_fnc_addSetting;
|
||||
|
@ -1348,5 +1348,14 @@
|
||||
<Key ID="STR_ACE_Medical_GUI_TreatmentItemCount_Vehicle">
|
||||
<English>in vehicle's inventory</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Medical_GUI_TourniquetWarning">
|
||||
<English>No effect until tourniquet removed</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Medical_GUI_TourniquetWarning_DisplayName">
|
||||
<English>Show Tourniquet Warning</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Medical_GUI_TourniquetWarning_Description">
|
||||
<English>Show a warning tooltip when a tourniquet will interfere with a medical action.</English>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
|
Loading…
Reference in New Issue
Block a user