Refactors roundstart checks slightly
This commit is contained in:
@@ -804,7 +804,7 @@
|
||||
return 1
|
||||
|
||||
/client/proc/adminGreet(logout)
|
||||
if(SSticker && SSticker.current_state == GAME_STATE_PLAYING)
|
||||
if(SSticker.HasRoundStarted())
|
||||
var/string
|
||||
if(logout && config && config.announce_admin_logout)
|
||||
string = pick(
|
||||
|
||||
@@ -310,7 +310,7 @@
|
||||
usr << browse(dat, "window=players;size=600x480")
|
||||
|
||||
/datum/admins/proc/check_antagonists()
|
||||
if (SSticker && SSticker.current_state >= GAME_STATE_PLAYING)
|
||||
if (SSticker.HasRoundStarted())
|
||||
var/dat = "<html><head><title>Round Status</title></head><body><h1><B>Round Status</B></h1>"
|
||||
if(SSticker.mode.replacementmode)
|
||||
dat += "Former Game Mode: <B>[SSticker.mode.name]</B><BR>"
|
||||
|
||||
@@ -2161,7 +2161,7 @@
|
||||
else if(href_list["kick_all_from_lobby"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
if(SSticker && SSticker.current_state == GAME_STATE_PLAYING)
|
||||
if(SSticker.IsRoundInProgress())
|
||||
var/afkonly = text2num(href_list["afkonly"])
|
||||
if(alert("Are you sure you want to kick all [afkonly ? "AFK" : ""] clients from the lobby??","Message","Yes","Cancel") != "Yes")
|
||||
to_chat(usr, "Kick clients from lobby aborted")
|
||||
|
||||
@@ -206,7 +206,7 @@
|
||||
toggle_all_ctf(user)
|
||||
return
|
||||
|
||||
if(SSticker.current_state < GAME_STATE_PLAYING)
|
||||
if(!SSticker.HasRoundStarted())
|
||||
return
|
||||
if(user.ckey in team_members)
|
||||
if(user.ckey in recently_dead_ckeys)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
anchored = 1
|
||||
|
||||
/obj/effect/mob_spawn/attack_ghost(mob/user)
|
||||
if(SSticker.current_state != GAME_STATE_PLAYING || !loc)
|
||||
if(!SSticker.HasRoundStarted() || !loc)
|
||||
return
|
||||
if(!uses)
|
||||
to_chat(user, "<span class='warning'>This spawner is out of charges!</span>")
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
return 1
|
||||
|
||||
if(href_list["late_join"])
|
||||
if(!SSticker || SSticker.current_state != GAME_STATE_PLAYING)
|
||||
if(!SSticker || !SSticker.IsRoundInProgress())
|
||||
to_chat(usr, "<span class='danger'>The round is either not ready, or has already finished...</span>")
|
||||
return
|
||||
|
||||
|
||||
@@ -337,7 +337,7 @@
|
||||
. = 1
|
||||
|
||||
/mob/living/simple_animal/proc/make_babies() // <3 <3 <3
|
||||
if(gender != FEMALE || stat || next_scan_time > world.time || !childtype || !animal_species || SSticker.current_state != GAME_STATE_PLAYING)
|
||||
if(gender != FEMALE || stat || next_scan_time > world.time || !childtype || !animal_species || !SSticker.IsRoundInProgress())
|
||||
return
|
||||
next_scan_time = world.time + 400
|
||||
var/alone = 1
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
diff a/code/modules/mob/logout.dm b/code/modules/mob/logout.dm (rejected hunks)
|
||||
@@ -3,7 +3,7 @@
|
||||
unset_machine()
|
||||
GLOB.player_list -= src
|
||||
if(GLOB.admin_datums[src.ckey])
|
||||
- if (SSticker && SSticker.current_state == GAME_STATE_PLAYING) //Only report this stuff if we are currently playing.
|
||||
+ if (SSticker && SSticker.IsRoundInProgress()) //Only report this stuff if we are currently playing.
|
||||
var/admins_number = GLOB.admins.len
|
||||
if(admins_number == 0) //Apparently the admin logging out is no longer an admin at this point, so we have to check this towards 0 and not towards 1. Awell.
|
||||
var/cheesy_message = pick( list( \
|
||||
@@ -304,7 +304,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne
|
||||
// Sound the alert if gravity was just enabled or disabled.
|
||||
var/alert = 0
|
||||
var/area/area = get_area(src)
|
||||
if(on && SSticker && SSticker.current_state == GAME_STATE_PLAYING) // If we turned on and the game is live.
|
||||
if(on && SSticker.IsRoundInProgress()) // If we turned on and the game is live.
|
||||
if(gravity_in_level() == 0)
|
||||
alert = 1
|
||||
investigate_log("was brought online and is now producing gravity for this level.", "gravity")
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
diff a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm (rejected hunks)
|
||||
@@ -88,7 +88,7 @@
|
||||
connect_to_network()
|
||||
|
||||
/obj/machinery/power/emitter/Destroy()
|
||||
- if(SSticker && SSticker.current_state == GAME_STATE_PLAYING)
|
||||
+ if(SSticker && SSticker.IsRoundInProgress())
|
||||
message_admins("Emitter deleted at ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
log_game("Emitter deleted at ([x],[y],[z])")
|
||||
investigate_log("<font color='red'>deleted</font> at ([x],[y],[z]) at [get_area(src)]","singulo")
|
||||
@@ -191,7 +191,7 @@
|
||||
cell.charge = (charge / capacity) * cell.maxcharge
|
||||
|
||||
/obj/machinery/power/smes/Destroy()
|
||||
if(SSticker && SSticker.current_state == GAME_STATE_PLAYING)
|
||||
if(SSticker && SSticker.IsRoundInProgress())
|
||||
var/area/area = get_area(src)
|
||||
message_admins("SMES deleted at (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>[area.name]</a>)")
|
||||
log_game("SMES deleted at ([area.name])")
|
||||
|
||||
Reference in New Issue
Block a user