From 99f5d2ea0afb83cd2fafec85a0759d2a09511216 Mon Sep 17 00:00:00 2001 From: Magnetar Date: Sun, 17 Mar 2019 17:59:49 +0100 Subject: [PATCH] Rewrite rectify convert option (#6825) * Rewrite Rectify - Adding option to convert vanilla medical gear * Oops --- addons/medical_treatment/ACE_Settings.hpp | 8 ++++++++ addons/medical_treatment/functions/fnc_checkItems.sqf | 2 ++ addons/medical_treatment/stringtable.xml | 9 +++++++++ 3 files changed, 19 insertions(+) diff --git a/addons/medical_treatment/ACE_Settings.hpp b/addons/medical_treatment/ACE_Settings.hpp index 55d8eacac41..9ca37bab096 100644 --- a/addons/medical_treatment/ACE_Settings.hpp +++ b/addons/medical_treatment/ACE_Settings.hpp @@ -135,4 +135,12 @@ class ACE_Settings { value = 0; values[] = {"No", "Yes"}; }; + class GVAR(convertItems) { + category = CSTRING(Category_Medical); + displayName = CSTRING(convertItems_DisplayName); + description = CSTRING(convertItems_Description); + typeName = "SCALAR"; + value = 0; + values[] = {ECSTRING(common,Enabled), CSTRING(convertItems_remove), ECSTRING(common,Disabled)}; + }; }; diff --git a/addons/medical_treatment/functions/fnc_checkItems.sqf b/addons/medical_treatment/functions/fnc_checkItems.sqf index d216d4f91de..1db27830419 100644 --- a/addons/medical_treatment/functions/fnc_checkItems.sqf +++ b/addons/medical_treatment/functions/fnc_checkItems.sqf @@ -20,6 +20,8 @@ _unit removeItems "FirstAidKit"; private _countMedikit = [_unit, "Medikit"] call EFUNC(common,getCountOfItem); _unit removeItems "Medikit"; +if (GVAR(convertItems) != 0) exitWith {}; + for "_i" from 1 to _countFirstAidKit do { _unit addItem "ACE_fieldDressing"; _unit addItem "ACE_packingBandage"; diff --git a/addons/medical_treatment/stringtable.xml b/addons/medical_treatment/stringtable.xml index bbc0ca36e07..851d58e75c7 100644 --- a/addons/medical_treatment/stringtable.xml +++ b/addons/medical_treatment/stringtable.xml @@ -3484,5 +3484,14 @@ 移除军用止血带中... 移除軍用止血帶中... + + Convert vanilla items + + + Enables or disables whether vanilla medical items are converted to ACE medical items or just removed + + + Just remove vanilla medical +