Added setting to toggle litter creation on/off

This commit is contained in:
Glowbal 2015-04-04 01:47:56 +02:00
parent 7f45d25ee5
commit 83fbc1ff10
4 changed files with 14 additions and 1 deletions

View File

@ -72,4 +72,8 @@ class ACE_Settings {
typeName = "BOOL";
value = false;
};
class GVAR(allowLitterCreation) {
typeName = "BOOL";
value = true;
};
};

View File

@ -116,6 +116,12 @@ class CfgVehicles {
};
};
};
class allowLitterCreation {
displayName = "Enable Litter";
description = "Enable litter being created upon treatment";
typeName = "BOOL";
defaultValue = 1;
};
class preventInstaDeath {
displayName = "Prevent instant death";
description = "Have a unit move to unconscious instead of death";
@ -131,7 +137,7 @@ class CfgVehicles {
class ACE_moduleTreatmentConfiguration: ACE_Module {
scope = 2;
displayName = "Treatment Configuration [ACE]";
displayName = "Treatment Settings [ACE]";
icon = QUOTE(PATHTOF(UI\Icon_Module_Medical_ca.paa));
category = "ACE_medical";
function = QUOTE(FUNC(moduleTreatmentConfiguration));

View File

@ -18,6 +18,8 @@ private ["_target", "_className", "_config", "_litter", "_createLitter", "_litte
_target = _this select 0;
_className = _this select 1;
if !(GVAR(allowLitterCreation)) exitwith {};
_config = (configFile >> "ACE_Medical_Actions" >> "Basic" >> _className);
if (GVAR(level) >= 2) then {
_config = (configFile >> "ACE_Medical_Actions" >> "Advanced" >> _className);

View File

@ -33,3 +33,4 @@ if !(_activated) exitWith {};
[_logic, QGVAR(AIDamageThreshold), "AIDamageThreshold"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(enableUnsconsiousnessAI), "enableUnsconsiousnessAI"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(preventInstaDeath), "preventInstaDeath"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(allowLitterCreation), "allowLitterCreation"] call EFUNC(common,readSettingFromModule);