diff --git a/addons/medical/ACE_Medical_Treatments.hpp b/addons/medical/ACE_Medical_Treatments.hpp index 201db4519a..834bc905ea 100644 --- a/addons/medical/ACE_Medical_Treatments.hpp +++ b/addons/medical/ACE_Medical_Treatments.hpp @@ -50,12 +50,13 @@ class ACE_Medical_Actions { allowedSelections[] = {"hand_l", "hand_r", "leg_l", "leg_r"}; allowSelfTreatment = 1; category = "medication"; - requiredMedic = 1; + requiredMedic = QGVAR(medicSetting_basicEpi); treatmentTime = 3; items[] = {"ACE_epinephrine"}; callbackSuccess = QUOTE(DFUNC(treatmentBasic_epipen)); animationCaller = "AinvPknlMstpSnonWnonDnon_medic1"; litter[] = { {"All", "", {"ACE_MedicalLitter_epinephrine"}} }; + treatmentLocations[] = {QGVAR(useLocation_basicEpi)}; }; class BloodIV: Bandage { displayName = CSTRING(Transfuse_Blood); diff --git a/addons/medical/ACE_Settings.hpp b/addons/medical/ACE_Settings.hpp index 5c3ba86b12..e4dc1ea69c 100644 --- a/addons/medical/ACE_Settings.hpp +++ b/addons/medical/ACE_Settings.hpp @@ -133,6 +133,12 @@ class ACE_Settings { typeName = "SCALAR"; value = 0; }; + class GVAR(medicSetting_basicEpi) { + category = CSTRING(Category_Medical); + typeName = "SCALAR"; + value = 1; + values[] = {"Anyone", "Medics only", "Doctors only"}; + }; class GVAR(medicSetting_PAK) { category = CSTRING(Category_Medical); typeName = "SCALAR"; @@ -157,6 +163,12 @@ class ACE_Settings { value = 0; values[] = {"No", "Yes"}; }; + class GVAR(useLocation_basicEpi) { + category = CSTRING(Category_Medical); + typeName = "SCALAR"; + value = 0; + values[] = {CSTRING(AdvancedMedicalSettings_anywhere), CSTRING(AdvancedMedicalSettings_vehicle), CSTRING(AdvancedMedicalSettings_facility), CSTRING(AdvancedMedicalSettings_vehicleAndFacility), ECSTRING(common,Disabled)}; + }; class GVAR(useLocation_PAK) { category = CSTRING(Category_Medical); typeName = "SCALAR"; diff --git a/addons/medical/CfgVehicles.hpp b/addons/medical/CfgVehicles.hpp index a7b4765ce2..bddb8fc8a6 100644 --- a/addons/medical/CfgVehicles.hpp +++ b/addons/medical/CfgVehicles.hpp @@ -151,7 +151,48 @@ class CfgVehicles { sync[] = {}; }; }; + class ACE_moduleBasicMedicalSettings: ACE_Module { + scope = 2; + displayName = CSTRING(BasicMedicalSettings_Module_DisplayName); + icon = QUOTE(PATHTOF(UI\Icon_Module_Medical_ca.paa)); + category = "ACE_medical"; + function = QUOTE(FUNC(moduleBasicMedicalSettings)); + functionPriority = 10; + isGlobal = 2; + isSingular = 1; + isTriggerActivated = 0; + isDisposable = 0; + author = ECSTRING(common,ACETeam); + class Arguments { + class medicSetting_basicEpi { + displayName = CSTRING(BasicMedicalSettings_medicSetting_basicEpi_DisplayName); + description = CSTRING(BasicMedicalSettings_medicSetting_basicEpi_Description); + typeName = "NUMBER"; + class values { + class anyone { name = CSTRING(AdvancedMedicalSettings_anyone); value = 0; }; + class Medic { name = CSTRING(AdvancedMedicalSettings_Medic); value = 1; default = 1; }; + class Special { name = CSTRING(AdvancedMedicalSettings_Special); value = 2; }; + }; + }; + class useLocation_basicEpi { + displayName = CSTRING(BasicMedicalSettings_useLocation_basicEpi_DisplayName); + description = CSTRING(BasicMedicalSettings_useLocation_basicEpi_Description); + typeName = "NUMBER"; + class values { + class anywhere { name = CSTRING(AdvancedMedicalSettings_anywhere); value = 0; default = 1; }; + class vehicle { name = CSTRING(AdvancedMedicalSettings_vehicle); value = 1; }; + class facility { name = CSTRING(AdvancedMedicalSettings_facility); value = 2; }; + class vehicleAndFacility { name = CSTRING(AdvancedMedicalSettings_vehicleAndFacility); value = 3; }; + class disabled { name = ECSTRING(common,Disabled); value = 4;}; + }; + }; + }; + class ModuleDescription { + description = CSTRING(BasicMedicalSettings_Module_Description); + sync[] = {}; + }; + }; class ACE_moduleAdvancedMedicalSettings: ACE_Module { scope = 2; displayName = CSTRING(AdvancedMedicalSettings_Module_DisplayName); diff --git a/addons/medical/XEH_preInit.sqf b/addons/medical/XEH_preInit.sqf index 78f3a6bbc0..a12ebf05ea 100644 --- a/addons/medical/XEH_preInit.sqf +++ b/addons/medical/XEH_preInit.sqf @@ -107,6 +107,7 @@ PREP(displayPatientInformation); PREP(displayTriageCard); PREP(dropDownTriageCard); PREP(moduleMedicalSettings); +PREP(moduleBasicMedicalSettings); PREP(moduleAdvancedMedicalSettings); PREP(moduleReviveSettings); PREP(moduleAssignMedicRoles); diff --git a/addons/medical/functions/fnc_moduleBasicMedicalSettings.sqf b/addons/medical/functions/fnc_moduleBasicMedicalSettings.sqf new file mode 100644 index 0000000000..08076878f2 --- /dev/null +++ b/addons/medical/functions/fnc_moduleBasicMedicalSettings.sqf @@ -0,0 +1,23 @@ +/* + * Author: Glowbal + * Module for adjusting the medical treatment settings + * + * Arguments: + * 0: The module logic + * 1: units + * 2: activated + * + * Return Value: + * None + * + * Public: No + */ + +#include "script_component.hpp" + +params ["_logic", "_units", "_activated"]; + +if !(_activated) exitWith {}; + +[_logic, QGVAR(medicSetting_basicEpi), "medicSetting_basicEpi"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(useLocation_basicEpi), "useLocation_basicEpi"] call EFUNC(common,readSettingFromModule); diff --git a/addons/medical/stringtable.xml b/addons/medical/stringtable.xml index ab57789eb3..1a422f5fa1 100644 --- a/addons/medical/stringtable.xml +++ b/addons/medical/stringtable.xml @@ -3126,6 +3126,9 @@ Fourni un système médical pour les joueurs tout comme pour les IA. Egy orvosi rendszert ad játékosok és AI-k számára. + + Basic Medical Settings [ACE] + Advanced Medical Settings [ACE] Настройки усложненной медицины [ACE] @@ -3225,6 +3228,12 @@ Les unités subissent des dégats lors d'accident Sérülnek-e az egységek autós ütközés során? + + Allow Epinephrine + + + Who can use Epinephrine for full heal? (Basic medical only) + Allow PAK Использование аптечки @@ -3302,6 +3311,12 @@ Le Kit de Premier Secours doit il être enlevé à l'utilisation? Eltávolítódjon az elsősegélycsomag használatkor? + + Locations Epinephrine + + + Where can the Epinephrine be used? (Basic Medical) + Locations PAK Место использования аптечки @@ -3518,8 +3533,11 @@ A fájdalom csak ideiglenesen csökken, nem távolítódik el Боль приглушается только временно + + Configure the treatment settings from ACE Basic Medical + - Configure the treatment settings from ACE Medical + Configure the treatment settings from ACE Advanced Medical Настройка лечения в медицинской системе ACE Skonfiguruj zaawansowane ustawienia leczenia systemu medycznego ACE Configure las opciones de tratamiento del ACE Médico