Refactors SSTicker checks (#28469)

* SSTicker check update

* Wilk first pass
This commit is contained in:
Silverplate
2025-03-01 03:29:36 +00:00
committed by GitHub
parent 5303115e4a
commit eb1d866fa7
23 changed files with 39 additions and 38 deletions
+2 -2
View File
@@ -516,7 +516,7 @@ GLOBAL_VAR_INIT(disable_explosions, FALSE)
if(!check_rights(R_SERVER))
return
if(!SSticker)
if(SSticker.current_state < GAME_STATE_PREGAME)
alert("Unable to start the game as it is not set up.")
return
@@ -604,7 +604,7 @@ GLOBAL_VAR_INIT(disable_explosions, FALSE)
if(!check_rights(R_SERVER))
return
if(!SSticker)
if(SSticker.current_state < GAME_STATE_STARTUP)
alert("Slow down a moment, let the ticker start first!")
return
+4 -4
View File
@@ -2722,7 +2722,7 @@
else if(href_list["traitor"])
if(!check_rights(R_ADMIN|R_MOD)) return
if(!SSticker || !SSticker.mode)
if(SSticker.current_state < GAME_STATE_PLAYING)
alert("The game hasn't started yet!")
return
@@ -2998,7 +2998,7 @@
SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Power All SMESs")
log_and_message_admins("<span class='notice'>[key_name(usr)] made all SMESs powered</span>", 1)
if("prisonwarp")
if(!SSticker)
if(SSticker.current_state < GAME_STATE_PLAYING)
alert("The game hasn't started yet!", null, null, null, null, null)
return
if(alert(usr, "Are you sure you want to do this?", "Confirmation", "Yes", "No") != "Yes")
@@ -3039,7 +3039,7 @@
H.loc = pick(GLOB.prisonsecuritywarp)
GLOB.prisonwarped += H
if("traitor_all")
if(!SSticker)
if(SSticker.current_state < GAME_STATE_PLAYING)
alert("The game hasn't started yet!")
return
if(alert(usr, "Are you sure you want to do this?", "Confirmation", "Yes", "No") != "Yes")
@@ -3303,7 +3303,7 @@
if("showailaws")
output_ai_laws()
if("showgm")
if(!SSticker)
if(SSticker.current_state < GAME_STATE_PLAYING)
alert("The game hasn't started yet!")
else if(SSticker.mode)
alert("The game mode is [SSticker.mode.name]")
+1 -1
View File
@@ -2,7 +2,7 @@
set name = "cinematic"
set desc = "Shows a cinematic." // Intended for testing but I thought it might be nice for events on the rare occasion Feel free to comment it out if it's not wanted.
set hidden = 1
if(!SSticker)
if(SSticker.current_state < GAME_STATE_PREGAME)
return
if(!check_rights(R_MAINTAINER))
+7 -7
View File
@@ -248,7 +248,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
if(!check_rights(R_SPAWN))
return
if(!SSticker)
if(SSticker.current_state < GAME_STATE_PLAYING)
alert("Wait until the game starts")
return
if(ishuman(M))
@@ -266,7 +266,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
if(!check_rights(R_SPAWN))
return
if(!SSticker)
if(SSticker.current_state < GAME_STATE_PLAYING)
alert("Wait until the game starts")
return
@@ -326,7 +326,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
if(!check_rights(R_SPAWN))
return
if(!SSticker)
if(SSticker.current_state < GAME_STATE_PLAYING)
alert("Wait until the game starts")
return
if(ishuman(M))
@@ -346,7 +346,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
if(!check_rights(R_SPAWN))
return
if(!SSticker)
if(SSticker.current_state < GAME_STATE_PLAYING)
alert("Wait until the game starts")
return
if(ishuman(M))
@@ -366,7 +366,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
if(!check_rights(R_SPAWN))
return
if(!SSticker)
if(SSticker.current_state < GAME_STATE_PLAYING)
alert("Wait until the game starts")
return
if(ishuman(M))
@@ -419,7 +419,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
if(!check_rights(R_EVENT))
return
if(!SSticker)
if(SSticker.current_state < GAME_STATE_PLAYING)
alert("Wait until the game starts")
return
if(ishuman(M))
@@ -859,7 +859,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
if(!check_rights(R_SPAWN))
return
if(!SSticker)
if(SSticker.current_state < GAME_STATE_PLAYING)
alert("Wait until the game starts")
return
if(ishuman(M))
+1 -1
View File
@@ -7,7 +7,7 @@
set desc = "Spawns a group of players in the specified outfit."
if(!check_rights(R_EVENT))
return
if(!SSticker)
if(SSticker.current_state < GAME_STATE_PLAYING)
alert("The game hasn't started yet!")
return
if(alert("Do you want to spawn a Gimmick Team at YOUR CURRENT LOCATION?", null,"Yes","No")=="No")
@@ -10,7 +10,7 @@ GLOBAL_VAR_INIT(sent_syndicate_infiltration_team, 0)
if(!check_rights(R_ADMIN))
to_chat(src, "Only administrators may use this command.")
return
if(!SSticker)
if(SSticker.current_state < GAME_STATE_PLAYING)
alert("The game hasn't started yet!")
return
if(alert("Do you want to send in the Syndicate Infiltration Team?", null,"Yes","No")=="No")
+2 -2
View File
@@ -1,5 +1,5 @@
/client/proc/only_one()
if(!SSticker)
if(SSticker.current_state < GAME_STATE_PLAYING)
alert("The game hasn't started yet!")
return
@@ -61,7 +61,7 @@
SEND_SOUND(M, music)
/client/proc/only_me()
if(!SSticker)
if(SSticker.current_state < GAME_STATE_PLAYING)
alert("The game hasn't started yet!")
return
+4 -3
View File
@@ -898,7 +898,8 @@ Traitors and the like can also be revived with the previous role mostly intact.
set category = "Admin"
set name = "Toggle Deny Shuttle"
if(!SSticker)
if(SSticker.current_state < GAME_STATE_PLAYING)
alert("The game hasn't started yet!")
return
if(!check_rights(R_ADMIN))
@@ -1134,7 +1135,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!input)
return
if(!SSticker)
if(SSticker.current_state < GAME_STATE_PREGAME)
return
SSticker.selected_tip = input
@@ -1159,7 +1160,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
holder.modify_goals()
/datum/admins/proc/modify_goals()
if(!SSticker || !SSticker.mode)
if(SSticker.current_state < GAME_STATE_PLAYING)
to_chat(usr, "<span class='warning'>This verb can only be used if the round has started.</span>")
return
@@ -9,7 +9,7 @@ GLOBAL_VAR_INIT(sent_syndicate_strike_team, 0)
if(!src.holder)
to_chat(src, "Only administrators may use this command.")
return
if(!SSticker)
if(SSticker.current_state < GAME_STATE_PLAYING)
alert("The game hasn't started yet!")
return
if(GLOB.sent_syndicate_strike_team == 1)