Changes a lot of ticker and ticker.mode checks to SSticker.hasRoundStarted (#26720)

This commit is contained in:
Leo
2017-04-30 23:35:13 +02:00
committed by AnturK
parent 8958aca8f9
commit 89e60cb88f
17 changed files with 27 additions and 33 deletions
+2 -2
View File
@@ -238,7 +238,7 @@
if("showgm")
if(!check_rights(R_ADMIN))
return
if(!SSticker || !SSticker.mode)
if(!SSticker.HasRoundStarted())
alert("The game hasn't started yet!")
else if (SSticker.mode)
alert("The game mode is [SSticker.mode.name]")
@@ -327,7 +327,7 @@
if("traitor_all")
if(!check_rights(R_FUN))
return
if(!SSticker || !SSticker.mode)
if(!SSticker.HasRoundStarted())
alert("The game hasn't started yet!")
return
var/objective = copytext(sanitize(input("Enter an objective")),1,MAX_MESSAGE_LEN)
+6 -6
View File
@@ -8,7 +8,7 @@
if(href_list["ahelp"])
if(!check_rights(R_ADMIN))
return
var/ahelp_ref = href_list["ahelp"]
var/datum/admin_help/AH = locate(ahelp_ref)
if(AH)
@@ -1170,7 +1170,7 @@
if(!check_rights(R_ADMIN))
return
if(SSticker && SSticker.mode)
if(SSticker.HasRoundStarted())
return alert(usr, "The game has already started.", null, null, null, null)
var/dat = {"<B>What mode do you wish to play?</B><HR>"}
for(var/mode in config.modes)
@@ -1184,7 +1184,7 @@
if(!check_rights(R_ADMIN))
return
if(SSticker && SSticker.mode)
if(SSticker.HasRoundStarted())
return alert(usr, "The game has already started.", null, null, null, null)
if(GLOB.master_mode != "secret")
return alert(usr, "The game mode has to be secret!", null, null, null, null)
@@ -1199,7 +1199,7 @@
if(!check_rights(R_ADMIN|R_SERVER))
return
if (SSticker && SSticker.mode)
if (SSticker.HasRoundStarted())
return alert(usr, "The game has already started.", null, null, null, null)
GLOB.master_mode = href_list["c_mode2"]
log_admin("[key_name(usr)] set the mode as [GLOB.master_mode].")
@@ -1213,7 +1213,7 @@
if(!check_rights(R_ADMIN|R_SERVER))
return
if(SSticker && SSticker.mode)
if(SSticker.HasRoundStarted())
return alert(usr, "The game has already started.", null, null, null, null)
if(GLOB.master_mode != "secret")
return alert(usr, "The game mode has to be secret!", null, null, null, null)
@@ -1810,7 +1810,7 @@
if(!check_rights(R_ADMIN))
return
if(!SSticker || !SSticker.mode)
if(!SSticker.HasRoundStarted())
alert("The game hasn't started yet!")
return
+6 -6
View File
@@ -213,7 +213,7 @@ GLOBAL_PROTECT(AdminProcCallCount)
set category = "Fun"
set name = "Make Robot"
if(!SSticker || !SSticker.mode)
if(!SSticker.HasRoundStarted())
alert("Wait until the game starts")
return
if(ishuman(M))
@@ -229,7 +229,7 @@ GLOBAL_PROTECT(AdminProcCallCount)
set category = "Fun"
set name = "Make Blob"
if(!SSticker || !SSticker.mode)
if(!SSticker.HasRoundStarted())
alert("Wait until the game starts")
return
if(ishuman(M))
@@ -247,7 +247,7 @@ GLOBAL_PROTECT(AdminProcCallCount)
set category = "Fun"
set name = "Make Simple Animal"
if(!SSticker || !SSticker.mode)
if(!SSticker.HasRoundStarted())
alert("Wait until the game starts")
return
@@ -295,7 +295,7 @@ GLOBAL_PROTECT(AdminProcCallCount)
set category = "Fun"
set name = "Make Alien"
if(!SSticker || !SSticker.mode)
if(!SSticker.HasRoundStarted())
alert("Wait until the game starts")
return
if(ishuman(M))
@@ -312,7 +312,7 @@ GLOBAL_PROTECT(AdminProcCallCount)
set category = "Fun"
set name = "Make slime"
if(!SSticker || !SSticker.mode)
if(!SSticker.HasRoundStarted())
alert("Wait until the game starts")
return
if(ishuman(M))
@@ -423,7 +423,7 @@ GLOBAL_PROTECT(AdminProcCallCount)
set category = "Admin"
set name = "Grant Full Access"
if(!SSticker || !SSticker.mode)
if(!SSticker.HasRoundStarted())
alert("Wait until the game starts")
return
if(ishuman(M))
+2 -2
View File
@@ -1,6 +1,6 @@
GLOBAL_VAR_INIT(highlander, FALSE)
/client/proc/only_one() //Gives everyone kilts, berets, claymores, and pinpointers, with the objective to hijack the emergency shuttle.
if(!SSticker || !SSticker.mode)
if(!SSticker.HasRoundStarted())
alert("The game hasn't started yet!")
return
GLOB.highlander = TRUE
@@ -79,7 +79,7 @@ GLOBAL_VAR_INIT(highlander, FALSE)
Activate it in your hand, and it will lead to the nearest target. Attack the nuclear authentication disk with it, and you will store it.</span>")
/proc/only_me()
if(!SSticker || !SSticker.mode)
if(!SSticker.HasRoundStarted())
alert("The game hasn't started yet!")
return
+1 -1
View File
@@ -701,7 +701,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
set name = "Make Everyone Random"
set desc = "Make everyone have a random appearance. You can only use this before rounds!"
if(SSticker && SSticker.mode)
if(SSticker.HasRoundStarted())
to_chat(usr, "Nope you can't do this, the game's already started. This only works before rounds!")
return