Files
vgstation13/code/datums/gamemode/sandbox.dm
kane-f 67a420e5e9 Makes round ending with no players PR more true to name (#32015)
* Makes round ending after few minutes with no players PR more true to name

* Else if change

Co-authored-by: kanef <kanef9x@protonmail.com>
2022-02-08 12:09:06 -06:00

26 lines
765 B
Plaintext

/datum/gamemode/sandbox
name = "sandbox"
var/last_time_of_players = 0
/datum/gamemode/sandbox/Setup()
log_admin("Starting a round of sandbox.")
message_admins("Starting a round of sandbox.")
return 1
/datum/gamemode/sandbox/PostSetup()
..()
for(var/mob/M in player_list)
M.CanBuild()
/datum/gamemode/sandbox/latespawn(var/mob/mob)
mob.CanBuild()
to_chat(mob, "<B>Build your own station with the sandbox-panel command!</B>")
/datum/gamemode/sandbox/process()
. = ..()
if(player_list.len) //if anybody is in the current round
last_time_of_players = world.time
if(last_time_of_players && world.time - last_time_of_players > 5 MINUTES && world.time > 15 MINUTES) //if enough time has passed without them
CallHook("Reboot",list())
world.Reboot()