From 91cbc0e4d4a68db4cff0032370262ac19ed0116a Mon Sep 17 00:00:00 2001 From: ulteq Date: Thu, 15 Dec 2016 14:00:09 +0100 Subject: [PATCH] Added new setting 'advancedDiagnose' * Which allows to choose between the old basic- and advanced diagnose actions --- addons/medical/ACE_Settings.hpp | 7 +++++++ addons/medical/stringtable.xml | 6 ++++++ addons/medical_treatment/ACE_Medical_Treatment_Actions.hpp | 3 ++- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/addons/medical/ACE_Settings.hpp b/addons/medical/ACE_Settings.hpp index 7c6c8d1bbe..cccd2a58fa 100644 --- a/addons/medical/ACE_Settings.hpp +++ b/addons/medical/ACE_Settings.hpp @@ -52,6 +52,13 @@ class ACE_Settings { typeName = "BOOL"; value = 1; }; + class GVAR(advancedDiagnose) { + category = CSTRING(Category_Medical); + displayName = CSTRING(AdvancedMedicalSettings_advancedDiagnose_DisplayName); + description = CSTRING(AdvancedMedicalSettings_advancedDiagnose_Description); + typeName = "BOOL"; + value = 1; + }; class GVAR(woundReopening) { category = CSTRING(Category_Medical); displayName = CSTRING(AdvancedMedicalSettings_enableAdvancedWounds_DisplayName); diff --git a/addons/medical/stringtable.xml b/addons/medical/stringtable.xml index e60b21f63b..d1e23ac583 100644 --- a/addons/medical/stringtable.xml +++ b/addons/medical/stringtable.xml @@ -2904,6 +2904,12 @@ Enable advanced medication + + Advanced Diagnose + + + Enable advanced diagnose + Provides a medical system for both players and AI. Включает медицинскую систему как для игроков, так и для ботов. diff --git a/addons/medical_treatment/ACE_Medical_Treatment_Actions.hpp b/addons/medical_treatment/ACE_Medical_Treatment_Actions.hpp index 291ea9bce8..0127df1088 100644 --- a/addons/medical_treatment/ACE_Medical_Treatment_Actions.hpp +++ b/addons/medical_treatment/ACE_Medical_Treatment_Actions.hpp @@ -187,7 +187,7 @@ class GVAR(Actions) { requiredMedic = 0; treatmentTime = 2.5; items[] = {}; - condition = ""; + condition = QUOTE(!EGVAR(medical,advancedDiagnose)); callbackSuccess = QFUNC(actionDiagnose); callbackFailure = ""; callbackProgress = ""; @@ -200,6 +200,7 @@ class GVAR(Actions) { displayName = ECSTRING(medical,Actions_CheckPulse); displayNameProgress = ECSTRING(medical,Check_Pulse_Content); allowedSelections[] = {"All"}; + condition = QEGVAR(medical,advancedDiagnose); callbackSuccess = QFUNC(actionCheckPulse); animationCallerProne = ""; animationCallerSelfProne = "";