From 99db6802bb334d3abcbd1fd0d0e8da2501b543d6 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sun, 6 Oct 2019 11:10:56 -0500 Subject: [PATCH] Inventory - Adjust for changes to medical (#7112) * Inventory - Adjust for changes to medical * Add medical replacement items * adjust for change to medical-replacementItems --- addons/captives/functions/fnc_addLoadCaptiveActions.sqf | 2 +- addons/common/functions/fnc_disableUserInput.sqf | 2 +- addons/common/functions/fnc_watchVariable.sqf | 2 +- addons/inventory/XEH_preStart.sqf | 8 ++------ 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/addons/captives/functions/fnc_addLoadCaptiveActions.sqf b/addons/captives/functions/fnc_addLoadCaptiveActions.sqf index 81710f161d..d1ad8f603d 100644 --- a/addons/captives/functions/fnc_addLoadCaptiveActions.sqf +++ b/addons/captives/functions/fnc_addLoadCaptiveActions.sqf @@ -10,7 +10,7 @@ * Child actions * * Example: - * [kevin] call ace_medical_fnc_addLoadCaptiveActions + * [kevin] call ace_captives_fnc_addLoadCaptiveActions * * Public: No */ diff --git a/addons/common/functions/fnc_disableUserInput.sqf b/addons/common/functions/fnc_disableUserInput.sqf index ecc3a0a987..c8a6bdc5aa 100644 --- a/addons/common/functions/fnc_disableUserInput.sqf +++ b/addons/common/functions/fnc_disableUserInput.sqf @@ -82,7 +82,7 @@ if (_state) then { openMap true; }; - if (isServer || {serverCommandAvailable "#kick"} || {player getVariable ["ACE_isUnconscious", false] && {(call FUNC(player)) getVariable [QEGVAR(medical,AllowChatWhileUnconscious), missionNamespace getVariable [QEGVAR(medical,AllowChatWhileUnconscious), false]]}}) then { + if (isServer || {serverCommandAvailable "#kick"}) then { if (!(_key in (actionKeys "DefaultAction" + actionKeys "Throw")) && {_key in (actionKeys "Chat" + actionKeys "PrevChannel" + actionKeys "NextChannel")}) then { _key = 0; }; diff --git a/addons/common/functions/fnc_watchVariable.sqf b/addons/common/functions/fnc_watchVariable.sqf index 6fa86dc9bc..b3ec33bddc 100644 --- a/addons/common/functions/fnc_watchVariable.sqf +++ b/addons/common/functions/fnc_watchVariable.sqf @@ -20,7 +20,7 @@ * Example: * ["CBA_missionTime"] call ace_common_fnc_watchVariable // Uses title as code * ["diag_frameNo", {diag_frameNo}, [false]] call ace_common_fnc_watchVariable // Won't show delta - * ["blood", {player getVariable "ace_medical_bloodVolume"}, [true, 0, 100]] call ace_common_fnc_watchVariable // Shows slider + * ["blood", {player getVariable "ace_medical_bloodVolume"}, [true, 0, 6]] call ace_common_fnc_watchVariable // Shows slider * ["multiLine text", {"Line 1
Line 2"}, [2]] call ace_common_fnc_watchVariable * ["player names", {allPlayers apply {name _x}}, [5]] call ace_common_fnc_watchVariable // handles any data types * diff --git a/addons/inventory/XEH_preStart.sqf b/addons/inventory/XEH_preStart.sqf index ae4ce6500c..18999d638e 100644 --- a/addons/inventory/XEH_preStart.sqf +++ b/addons/inventory/XEH_preStart.sqf @@ -36,14 +36,10 @@ _grenades_ItemList = _grenades_ItemList arrayIntersect _grenades_ItemList; uiNamespace setVariable [QGVAR(Grenades_ItemList), _grenades_ItemList]; // generate list of medical items -private _medical_ItemList = []; - +private _medical_ItemList = ["FirstAidKit", "Medikit"]; { _medical_ItemList append getArray (_x >> "items"); -} forEach ( - ("true" configClasses (configFile >> QEGVAR(Medical,Actions) >> "Basic")) + - ("true" configClasses (configFile >> QEGVAR(Medical,Actions) >> "Advanced")) -); +} forEach ("true" configClasses (configFile >> QEGVAR(medical_treatment,Actions))); // remove all numbers from list _medical_ItemList = _medical_ItemList select {_x isEqualType ""};