From a94a8f9ab452d4e9af31b1860ef47f692a0ad156 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Sun, 17 Sep 2017 22:20:15 -0500 Subject: [PATCH] [MIRROR] Enables Dead OOC at round-end (#2835) * Enables Dead OOC at round-end (#30716) * Enables Dead OOC at roundend * proc * proc #2 * Enables Dead OOC at round-end --- code/controllers/subsystem/ticker.dm | 5 +++-- code/modules/admin/admin.dm | 2 +- code/modules/client/verbs/ooc.dm | 9 +++++++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm index 2c41985678..220c0e355a 100755 --- a/code/controllers/subsystem/ticker.dm +++ b/code/controllers/subsystem/ticker.dm @@ -139,7 +139,8 @@ SUBSYSTEM_DEF(ticker) if(!mode.explosion_in_progress && mode.check_finished(force_ending) || force_ending) current_state = GAME_STATE_FINISHED - toggle_ooc(1) // Turn it on + toggle_ooc(TRUE) // Turn it on + toggle_dooc(TRUE) declare_completion(force_ending) Master.SetRunLevel(RUNLEVEL_POSTGAME) @@ -207,7 +208,7 @@ SUBSYSTEM_DEF(ticker) mode.announce() if(!config.ooc_during_round) - toggle_ooc(0) // Turn it off + toggle_ooc(FALSE) // Turn it off CHECK_TICK GLOB.start_landmarks_list = shuffle(GLOB.start_landmarks_list) //Shuffle the order of spawn points so they dont always predictably spawn bottom-up and right-to-left diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 28a1b58235..c2b5c1cd8d 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -513,7 +513,7 @@ set category = "Server" set desc="Toggle dis bitch" set name="Toggle Dead OOC" - GLOB.dooc_allowed = !( GLOB.dooc_allowed ) + toggle_dooc() log_admin("[key_name(usr)] toggled OOC.") message_admins("[key_name_admin(usr)] toggled Dead OOC.") diff --git a/code/modules/client/verbs/ooc.dm b/code/modules/client/verbs/ooc.dm index a86b30e605..7715362c06 100644 --- a/code/modules/client/verbs/ooc.dm +++ b/code/modules/client/verbs/ooc.dm @@ -80,6 +80,15 @@ GLOB.ooc_allowed = !GLOB.ooc_allowed to_chat(world, "The OOC channel has been globally [GLOB.ooc_allowed ? "enabled" : "disabled"].") +/proc/toggle_dooc(toggle = null) + if(toggle != null) + if(toggle != GLOB.dooc_allowed) + GLOB.dooc_allowed = toggle + else + return + else + GLOB.dooc_allowed = !GLOB.dooc_allowed + GLOBAL_VAR_INIT(normal_ooc_colour, OOC_COLOR) /client/proc/set_ooc(newColor as color)