Turn /vg/ into what it always wanted to be, a 24/7 highlander server.

This commit is contained in:
Rob Nelson
2017-10-13 12:29:47 -07:00
parent c4bd1c57b7
commit 2c20333904
2 changed files with 19 additions and 2 deletions

View File

@@ -184,7 +184,6 @@
/datum/configuration/New()
. = ..()
var/list/L = typesof(/datum/game_mode) - /datum/game_mode
for (var/T in L)
// I wish I didn't have to instance the game modes in order to look up
// their information, but it is the only way (at least that I know of).
@@ -305,7 +304,7 @@
if ("log_pda")
config.log_pda = 1
if ("log_rc")
config.log_rc = 1
@@ -724,11 +723,13 @@
/datum/configuration/proc/pick_mode(mode_name)
// I wish I didn't have to instance the game modes in order to look up
// their information, but it is the only way (at least that I know of).
/*
for (var/T in (typesof(/datum/game_mode) - /datum/game_mode))
var/datum/game_mode/M = new T()
if (M.config_tag && M.config_tag == mode_name)
return M
del(M)
*/
return new /datum/game_mode/extended()
/datum/configuration/proc/get_runnable_modes()

View File

@@ -170,6 +170,22 @@ var/datum/controller/gameticker/ticker
//here to initialize the random events nicely at round start
setup_economy()
// The true spirit of /vg/
spawn(10 SECONDS)
var/datum/only_one/event = new ()
if(event.event_setup_start())
var/list/mobs_to_convert = list()
for(var/mob/M in event.eligible_mobs)
if(event.check_eligibility(M))
mobs_to_convert += M
for(var/mob/M in mobs_to_convert)
event.convert_mob(M)
event.event_setup_end(mobs_to_convert)
qdel(event)
spawn(0)//Forking here so we dont have to wait for this to finish
mode.post_setup()
//Cleanup some stuff