mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Add setting for medical ai
This commit is contained in:
parent
9cd50c89a0
commit
ec4c2276a5
7
addons/medical_ai/ACE_Settings.hpp
Normal file
7
addons/medical_ai/ACE_Settings.hpp
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
class ACE_Settings {
|
||||||
|
class GVAR(enabledFor) {
|
||||||
|
value = 2;
|
||||||
|
typeName = "SCALAR";
|
||||||
|
values[] = {ECSTRING(Common,Disabled), CSTRING(enabledFor_OnlyServerAndHC), ECSTRING(Common,Enabled)};
|
||||||
|
};
|
||||||
|
};
|
@ -1,6 +1,10 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
["ace_settingsInitialized", {
|
["ace_settingsInitialized", {
|
||||||
|
TRACE_1("settingsInitialized", GVAR(enabledFor));
|
||||||
|
if (GVAR(enabledFor) == 0) exitWith {}; // 0: disabled
|
||||||
|
if ((GVAR(enabledFor) == 1) && {!isServer} && {hasInterface}) exitWith {}; // 1: Don't Run on non-hc Clients
|
||||||
|
|
||||||
// Only run for AI that does not have to deal with advanced medical
|
// Only run for AI that does not have to deal with advanced medical
|
||||||
if (EGVAR(medical,enableFor) == 1 || {hasInterface && {EGVAR(medical,level) == 2}}) exitWith {};
|
if (EGVAR(medical,enableFor) == 1 || {hasInterface && {EGVAR(medical,level) == 2}}) exitWith {};
|
||||||
|
|
||||||
|
@ -14,5 +14,6 @@ class CfgPatches {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#include "ACE_Settings.hpp"
|
||||||
#include "CfgEventHandlers.hpp"
|
#include "CfgEventHandlers.hpp"
|
||||||
#include "StateMachine.hpp"
|
#include "StateMachine.hpp"
|
||||||
|
11
addons/medical_ai/stringtable.xml
Normal file
11
addons/medical_ai/stringtable.xml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project name="ACE">
|
||||||
|
<Package name="medical_ai">
|
||||||
|
<Key ID="STR_ACE_medical_ai_enabledFor_OnlyServerAndHC">
|
||||||
|
<English>Only Server and HC</English>
|
||||||
|
<German>Nur Server und HC</German>
|
||||||
|
<Spanish>Sólo Server y HC</Spanish>
|
||||||
|
<Russian>Нур сервера унд HC</Russian>
|
||||||
|
</Key>
|
||||||
|
</Package>
|
||||||
|
</Project>
|
Loading…
Reference in New Issue
Block a user