Script: Allow changing ops limit and memory limit settings in game

This commit is contained in:
Jonathan G Rennison
2020-09-14 18:04:19 +01:00
parent 15fc3f5ba3
commit 45386efcd0
6 changed files with 82 additions and 2 deletions

View File

@@ -40,6 +40,8 @@ static bool InvalidateCompanyLiveryWindow(int32 p1);
static bool InvalidateNewGRFChangeWindows(int32 p1);
static bool InvalidateIndustryViewWindow(int32 p1);
static bool InvalidateAISettingsWindow(int32 p1);
static bool ScriptMaxOpsChange(int32 p1);
static bool ScriptMaxMemoryChange(int32 p1);
static bool RedrawTownAuthority(int32 p1);
static bool InvalidateCompanyInfrastructureWindow(int32 p1);
static bool InvalidateCompanyWindow(int32 p1);
@@ -2593,7 +2595,6 @@ base = GameSettings
var = script.script_max_opcode_till_suspend
type = SLE_UINT32
from = SLV_107
guiflags = SGF_NEWGAME_ONLY
def = 10000
min = 500
max = 250000
@@ -2601,6 +2602,7 @@ interval = 2500
str = STR_CONFIG_SETTING_SCRIPT_MAX_OPCODES
strhelp = STR_CONFIG_SETTING_SCRIPT_MAX_OPCODES_HELPTEXT
strval = STR_JUST_COMMA
proc = ScriptMaxOpsChange
cat = SC_EXPERT
[SDT_VAR]
@@ -2608,7 +2610,6 @@ base = GameSettings
var = script.script_max_memory_megabytes
type = SLE_UINT32
from = SLV_SCRIPT_MEMLIMIT
guiflags = SGF_NEWGAME_ONLY
def = 1024
min = 8
max = 8192
@@ -2616,6 +2617,7 @@ interval = 8
str = STR_CONFIG_SETTING_SCRIPT_MAX_MEMORY
strhelp = STR_CONFIG_SETTING_SCRIPT_MAX_MEMORY_HELPTEXT
strval = STR_CONFIG_SETTING_SCRIPT_MAX_MEMORY_VALUE
proc = ScriptMaxMemoryChange
cat = SC_EXPERT
##