From 146dfe33ea06726a1b4e2078278919a0ecdfbf54 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Thu, 9 Nov 2017 01:44:49 -0500 Subject: [PATCH 1/3] Adds a config option to change world.sleep_offline --- code/controllers/configuration/entries/config.dm | 10 ++++++++++ code/controllers/master.dm | 4 +++- config/config.txt | 6 ++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/code/controllers/configuration/entries/config.dm b/code/controllers/configuration/entries/config.dm index f1ee6a557c..bef6809e52 100644 --- a/code/controllers/configuration/entries/config.dm +++ b/code/controllers/configuration/entries/config.dm @@ -372,3 +372,13 @@ CONFIG_TWEAK(number/mc_tick_rate/ValidateAndSet(str_val)) . = ..() if (.) Master.UpdateTickRate() +<<<<<<< HEAD +======= + +CONFIG_DEF(flag/resume_after_initializations) + +CONFIG_TWEAK(flag/ValidateAndSet(str_val)) + . = ..() + if(. && Master.current_runlevel) + world.sleep_offline = !value +>>>>>>> 73fbac3... Adds a config option to change world.sleep_offline (#32505) diff --git a/code/controllers/master.dm b/code/controllers/master.dm index 852437705b..568257e10f 100644 --- a/code/controllers/master.dm +++ b/code/controllers/master.dm @@ -189,10 +189,12 @@ GLOBAL_REAL(Master, /datum/controller/master) = new // Sort subsystems by display setting for easy access. sortTim(subsystems, /proc/cmp_subsystem_display) // Set world options. - world.sleep_offline = 1 + world.sleep_offline = TRUE world.fps = CONFIG_GET(number/fps) var/initialized_tod = REALTIMEOFDAY sleep(1) + if(CONFIG_GET(flag/resume_after_initializations)) + world.sleep_offline = FALSE initializations_finished_with_no_players_logged_in = initialized_tod < REALTIMEOFDAY - 10 // Loop. Master.StartProcessing(0) diff --git a/config/config.txt b/config/config.txt index 168f5202ac..0f3dfd5d84 100644 --- a/config/config.txt +++ b/config/config.txt @@ -380,4 +380,10 @@ HIGH_POP_MC_MODE_AMOUNT 65 ##Disengage high pop mode if player count drops below this DISABLE_HIGH_POP_MC_MODE_AMOUNT 60 +<<<<<<< HEAD >>>>>>> bc4d4e7... Merge pull request #31374 from MrStonedOne/highpopmode +======= + +## Uncomment to prevent the world from sleeping while no players are connected after initializations +#RESUME_AFTER_INITIALIZATIONS +>>>>>>> 73fbac3... Adds a config option to change world.sleep_offline (#32505) From e96f42a877715fc03b3895d25b07b862055f8690 Mon Sep 17 00:00:00 2001 From: LetterJay Date: Thu, 9 Nov 2017 03:16:36 -0600 Subject: [PATCH 2/3] Update config.dm --- code/controllers/configuration/entries/config.dm | 3 --- 1 file changed, 3 deletions(-) diff --git a/code/controllers/configuration/entries/config.dm b/code/controllers/configuration/entries/config.dm index bef6809e52..2c7e5c97cf 100644 --- a/code/controllers/configuration/entries/config.dm +++ b/code/controllers/configuration/entries/config.dm @@ -372,8 +372,6 @@ CONFIG_TWEAK(number/mc_tick_rate/ValidateAndSet(str_val)) . = ..() if (.) Master.UpdateTickRate() -<<<<<<< HEAD -======= CONFIG_DEF(flag/resume_after_initializations) @@ -381,4 +379,3 @@ CONFIG_TWEAK(flag/ValidateAndSet(str_val)) . = ..() if(. && Master.current_runlevel) world.sleep_offline = !value ->>>>>>> 73fbac3... Adds a config option to change world.sleep_offline (#32505) From 0d3aa9d07b673db5cf05c1da778608ce25836466 Mon Sep 17 00:00:00 2001 From: LetterJay Date: Thu, 9 Nov 2017 03:17:00 -0600 Subject: [PATCH 3/3] Update config.txt --- config/config.txt | 6 ------ 1 file changed, 6 deletions(-) diff --git a/config/config.txt b/config/config.txt index 0f3dfd5d84..9aae4a789c 100644 --- a/config/config.txt +++ b/config/config.txt @@ -358,8 +358,6 @@ MINUTE_TOPIC_LIMIT 100 ## Allow admin hrefs that don't use the new token system, will eventually be removed DEBUG_ADMIN_HREFS -<<<<<<< HEAD -======= ###Master Controller High Pop Mode### @@ -380,10 +378,6 @@ HIGH_POP_MC_MODE_AMOUNT 65 ##Disengage high pop mode if player count drops below this DISABLE_HIGH_POP_MC_MODE_AMOUNT 60 -<<<<<<< HEAD ->>>>>>> bc4d4e7... Merge pull request #31374 from MrStonedOne/highpopmode -======= ## Uncomment to prevent the world from sleeping while no players are connected after initializations #RESUME_AFTER_INITIALIZATIONS ->>>>>>> 73fbac3... Adds a config option to change world.sleep_offline (#32505)