Files
vgstation13/code/datums/gamemode/sandbox.dm
nervere e6444e3669 deprecate remaining hook handlers to use events instead (#34504)
* deprecate revs hook handler

* properly deprecate revs hook, deprecate apes hook, make apes into faction and role datums

* make apes into faction and role datums

* remove redundant reboot hook handler and hook

* handle media setup in login

* remove mob hooks

* replace MobAreaChange hook

* remove rest of hooks and remove files from dme

* no more SetupHooks()

* MobAreaChanged event and move jukebox hook into proc

* fix OnMobAreaChanged proc

* byond sux

* remove unused event

* fix title music

---------

Co-authored-by: nervere <sage@lulz>
2023-11-19 00:44:37 +00:00

25 lines
708 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 > 1 HOURS) //if enough time has passed without them
world.Reboot()