Make Delay saner. (#24873)

* Make Delay saner.

* Whoops, missed some uncommitted changes.

* Apply review suggestion.

* Update code/controllers/subsystem/SSticker.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

---------

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
This commit is contained in:
Charlie Nolan
2024-04-06 16:44:26 -07:00
committed by GitHub
parent be11f172d1
commit 61059db67d
2 changed files with 14 additions and 3 deletions
+12 -2
View File
@@ -508,6 +508,10 @@ GLOBAL_VAR_INIT(nologevent, 0)
alert("Unable to start the game as it is not set up.")
return
if(!SSticker.ticker_going)
alert("Remove the round-start delay first.")
return
if(GLOB.configuration.general.start_now_confirmation)
if(alert(usr, "This is a live server. Are you sure you want to start now?", "Start game", "Yes", "No") != "Yes")
return
@@ -588,7 +592,14 @@ GLOBAL_VAR_INIT(nologevent, 0)
if(!check_rights(R_SERVER))
return
if(!SSticker || SSticker.current_state != GAME_STATE_PREGAME)
if(!SSticker)
alert("Slow down a moment, let the ticker start first!")
return
if(SSblackbox)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Delay") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
if(SSticker.current_state > GAME_STATE_PREGAME)
SSticker.delay_end = !SSticker.delay_end
log_admin("[key_name(usr)] [SSticker.delay_end ? "delayed the round end" : "has made the round end normally"].")
message_admins("[key_name(usr)] [SSticker.delay_end ? "delayed the round end" : "has made the round end normally"].", 1)
@@ -604,7 +615,6 @@ GLOBAL_VAR_INIT(nologevent, 0)
SSticker.ticker_going = TRUE
to_chat(world, "<b>The game will start soon.</b>")
log_admin("[key_name(usr)] removed the delay.")
SSblackbox.record_feedback("tally", "admin_verb", 1, "Delay") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
////////////////////////////////////////////////////////////////////////////////////////////////ADMIN HELPER PROCS