Skip to content

Commit

Permalink
Merge pull request NebulaSS13#4701 from MistakeNot4892/tweak/reboot
Browse files Browse the repository at this point in the history
Prevented MC restarts from spamming Discord.
  • Loading branch information
MistakeNot4892 authored Jan 7, 2025
2 parents 29d180f + 2b87100 commit 5ea1d2b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion code/controllers/master.dm
Original file line number Diff line number Diff line change
Expand Up @@ -220,12 +220,17 @@ var/global/datum/controller/master/Master = new
CRASH("Attempted to set invalid runlevel: [new_runlevel]")

// Starts the mc, and sticks around to restart it if the loop ever ends.
var/global/_announced_start = FALSE
/datum/controller/master/proc/StartProcessing(delay)
set waitfor = 0
if(delay)
sleep(delay)
report_progress("Master starting processing")
SSwebhooks.send(WEBHOOK_ROUNDPREP, list("map" = station_name(), "url" = get_world_url()))

if(!global._announced_start) // Only announce roundstart once.
SSwebhooks.send(WEBHOOK_ROUNDPREP, list("map" = station_name(), "url" = get_world_url()))
global._announced_start = TRUE

var/rtn = Loop()
if (rtn > 0 || processing < 0)
return //this was suppose to happen.
Expand Down

0 comments on commit 5ea1d2b

Please sign in to comment.