diff --git a/addons/gui/functions/fnc_onMenuOpen.sqf b/addons/gui/functions/fnc_onMenuOpen.sqf index 3b3a1e1ad..4b838845e 100644 --- a/addons/gui/functions/fnc_onMenuOpen.sqf +++ b/addons/gui/functions/fnc_onMenuOpen.sqf @@ -98,6 +98,9 @@ if (EGVAR(pharma,RequireInsIV) && EGVAR(pharma,IVflowControl)) then { (_display displayCtrl IDC_IV_FLOW_SHOWBUTTON) ctrlShow true; }; +if (EGVAR(pharma,AMS_Enabled)) then { + (_display displayCtrl IDC_SYRINGE_OPEN) ctrlShow true; +}; // Set toggle button icon and tooltip private _ctrl = _display displayCtrl IDC_TOGGLE; if (ACEGVAR(medical_gui,target) == ACE_player) then { diff --git a/addons/gui/functions/fnc_prepSyringe.sqf b/addons/gui/functions/fnc_prepSyringe.sqf index b1ec6d728..60f151060 100644 --- a/addons/gui/functions/fnc_prepSyringe.sqf +++ b/addons/gui/functions/fnc_prepSyringe.sqf @@ -14,23 +14,25 @@ * * Public: No */ -if !(EGVAR(pharma,AMS_Enabled)) exitWith {}; private _playerMedicalLevel = [_player] call ace_medical_fnc_getMedicLevel; private _requiredMedicalLevel = GVAR(medLvl_PrepSyringe); if (_playerMedicalLevel < _requiredMedicalLevel) exitWith {}; - -[EGVAR(pharma,prepTime_PrepSyringe), [], { private _syringeBox = findDisplay 38580 displayCtrl 71303; private _medicationBox = findDisplay 38580 displayCtrl 71305; private _doseCombo = findDisplay 38580 displayCtrl 71307; - private _syringeSelected = lbCurSel _syringeBox; private _medicationSelected = lbCurSel _medicationBox; private _doseSelected = lbCurSel _doseCombo; - private _syringeType = _syringeBox lbData _syringeSelected; private _medicationType = _medicationBox lbData _medicationSelected; private _doseType = _doseCombo lbValue _doseSelected; +private _syringeClassName = format ["kat_syringe_%1_%2_%3", _medicationType, _syringeType, _doseType]; +private _hasSyringe = isClass (configFile >> "CfgWeapons" >> _syringeClassName); +if (!_hasSyringe) exitWith { + hint format ["This syringe combination does not exist. kat_syringe %1 %2 %3", _medicationType, _syringeType, _doseType]; + [{hint ""}, [], 5] call CBA_fnc_waitAndExecute; +}; +[EGVAR(pharma,prepTime_PrepSyringe), [], { + [player, _medicationType, _syringeType, _doseType] call kat_pharma_fnc_prepareSyringe; +}, {}, "Preparing Syringe..."] call ace_common_fnc_progressBar; - -[player, _medicationType, _syringeType, _doseType] call kat_pharma_fnc_prepareSyringe;}, {}, "Preparing Syringe..."] call ace_common_fnc_progressBar; \ No newline at end of file diff --git a/addons/gui/gui.hpp b/addons/gui/gui.hpp index 2c22bd343..eb4980dca 100644 --- a/addons/gui/gui.hpp +++ b/addons/gui/gui.hpp @@ -668,8 +668,11 @@ class ACE_Medical_Menu { y = QUOTE(POS_Y(0)); w = QUOTE(POS_W(4.4)); h = QUOTE(POS_H(1)); - colorBackgroundDisabled[] = GUI_BCG_COLOR; - colorBackground[] = GUI_BCG_COLOR; + show = 0; + colorBackground[] = {0, 0, 0, 0}; + colorBackgroundActive[] = {1, 1, 1, 0.4}; + colorBackgroundDisabled[] = {0, 0, 0, 0}; + colorBorder[] = {0,0,0,0}; onButtonClick = QUOTE([] call FUNC(openSyringeMenu)); class Attributes { align = "Right"; diff --git a/addons/pharma/stringtable.xml b/addons/pharma/stringtable.xml index f656055a7..a15b1ba26 100644 --- a/addons/pharma/stringtable.xml +++ b/addons/pharma/stringtable.xml @@ -4151,16 +4151,16 @@ 5ml Syringe loaded with 0.2mg of Flumazenil - 5ml Syringe/0.2mg Etomidate + 5ml Syringe/20mg Etomidate - 5ml Syringe loaded with 0.2mg of Etomidate + 5ml Syringe loaded with 20mg of Etomidate - 5ml Syringe/0.3mg Etomidate + 5ml Syringe/30mg Etomidate - 5ml Syringe loaded with 0.3mg of Etomidate + 5ml Syringe loaded with 30mg of Etomidate 5ml Syringe/10mcg Epinephrine