From e5ee2342928fbc03c8813963f479e11be81d53e7 Mon Sep 17 00:00:00 2001 From: Fox-McCloud Date: Sat, 11 Jul 2015 09:38:20 -0400 Subject: [PATCH 1/2] Auto-Toggling OOC --- code/controllers/configuration.dm | 5 +++++ code/game/gamemodes/gameticker.dm | 4 +++- code/game/verbs/ooc.dm | 11 +++++++++++ code/modules/admin/admin.dm | 6 +----- config/example/game_options.txt | 3 +++ 5 files changed, 23 insertions(+), 6 deletions(-) diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index 658d255aa64..7094f72c9bc 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -100,6 +100,9 @@ var/revival_cloning = 1 var/revival_brain_life = -1 + + var/ooc_during_round = 0 + //Used for modifying movement speed for mobs. //Unversal modifiers var/run_speed = 0 @@ -534,6 +537,8 @@ config.revival_cloning = value if("revival_brain_life") config.revival_brain_life = value + if("ooc_during_round") + config.ooc_during_round = 1 if("run_speed") config.run_speed = value if("walk_speed") diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm index 26c88144d78..bd6bae72d6f 100644 --- a/code/game/gamemodes/gameticker.dm +++ b/code/game/gamemodes/gameticker.dm @@ -219,6 +219,7 @@ var/global/datum/controller/gameticker/ticker admins_number++ if(admins_number == 0) send2adminirc("Round has started with no admins online.") + auto_toggle_ooc(0) // Turn it off /* DONE THROUGH PROCESS SCHEDULER supply_controller.process() //Start the supply shuttle regenerating points -- TLE @@ -250,6 +251,7 @@ var/global/datum/controller/gameticker/ticker proc/station_explosion_cinematic(var/station_missed=0, var/override = null) if( cinematic ) return //already a cinematic in progress! + auto_toggle_ooc(1) // Turn it on //initialise our cinematic screen object cinematic = new(src) cinematic.icon = 'icons/effects/station_explosion.dmi' @@ -400,7 +402,7 @@ var/global/datum/controller/gameticker/ticker if(!mode.explosion_in_progress && game_finished && (mode_finished || post_game)) current_state = GAME_STATE_FINISHED - + auto_toggle_ooc(1) // Turn it on spawn declare_completion() diff --git a/code/game/verbs/ooc.dm b/code/game/verbs/ooc.dm index 2f8249c8401..c8a1d058592 100644 --- a/code/game/verbs/ooc.dm +++ b/code/game/verbs/ooc.dm @@ -75,6 +75,17 @@ var/global/normal_ooc_colour = "#002eb8" C << "OOC: [src.key]: [msg]" */ +/proc/toggle_ooc() + ooc_allowed = !( ooc_allowed ) + if (ooc_allowed) + world << "The OOC channel has been globally enabled!" + else + world << "The OOC channel has been globally disabled!" + +/proc/auto_toggle_ooc(var/on) + if(!config.ooc_during_round && ooc_allowed != on) + toggle_ooc() + /client/proc/set_ooc(newColor as color) set name = "Set Player OOC Colour" set desc = "Set to yellow for eye burning goodness." diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 9cd97ddcb42..39304707b44 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -629,11 +629,7 @@ var/global/nologevent = 0 set category = "Server" set desc="Globally Toggles OOC" set name="Toggle OOC" - ooc_allowed = !( ooc_allowed ) - if (ooc_allowed) - world << "The OOC channel has been globally enabled!" - else - world << "The OOC channel has been globally disabled!" + toggle_ooc() log_admin("[key_name(usr)] toggled OOC.") message_admins("[key_name_admin(usr)] toggled OOC.", 1) feedback_add_details("admin_verb","TOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! diff --git a/config/example/game_options.txt b/config/example/game_options.txt index 3f282e5a6ce..0d4b371ae59 100644 --- a/config/example/game_options.txt +++ b/config/example/game_options.txt @@ -33,6 +33,9 @@ REVIVAL_CLONING 1 REVIVAL_BRAIN_LIFE -1 +### OOC DURING ROUND ### +#Comment this out if you want OOC to be automatically disabled during the round, it will be enabled during the lobby and after the round end results. +OOC_DURING_ROUND ### MOB MOVEMENT ### From a1b56cd4a0ad84cac2ccddf93bf93c311824a4dd Mon Sep 17 00:00:00 2001 From: Fox-McCloud Date: Sun, 12 Jul 2015 18:46:13 -0400 Subject: [PATCH 2/2] adjustments --- code/controllers/configuration.dm | 6 +++--- code/game/verbs/ooc.dm | 2 +- config/example/game_options.txt | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index 7094f72c9bc..f2fbfd5d730 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -101,7 +101,7 @@ var/revival_brain_life = -1 - var/ooc_during_round = 0 + var/auto_toggle_ooc_during_round = 0 //Used for modifying movement speed for mobs. //Unversal modifiers @@ -537,8 +537,8 @@ config.revival_cloning = value if("revival_brain_life") config.revival_brain_life = value - if("ooc_during_round") - config.ooc_during_round = 1 + if("auto_toggle_ooc_during_round") + config.auto_toggle_ooc_during_round = 1 if("run_speed") config.run_speed = value if("walk_speed") diff --git a/code/game/verbs/ooc.dm b/code/game/verbs/ooc.dm index c8a1d058592..1cf5e73bc19 100644 --- a/code/game/verbs/ooc.dm +++ b/code/game/verbs/ooc.dm @@ -83,7 +83,7 @@ var/global/normal_ooc_colour = "#002eb8" world << "The OOC channel has been globally disabled!" /proc/auto_toggle_ooc(var/on) - if(!config.ooc_during_round && ooc_allowed != on) + if(config.auto_toggle_ooc_during_round && ooc_allowed != on) toggle_ooc() /client/proc/set_ooc(newColor as color) diff --git a/config/example/game_options.txt b/config/example/game_options.txt index 0d4b371ae59..31d2bf1d9c8 100644 --- a/config/example/game_options.txt +++ b/config/example/game_options.txt @@ -33,9 +33,9 @@ REVIVAL_CLONING 1 REVIVAL_BRAIN_LIFE -1 -### OOC DURING ROUND ### -#Comment this out if you want OOC to be automatically disabled during the round, it will be enabled during the lobby and after the round end results. -OOC_DURING_ROUND +### AUTO TOGGLE OOC DURING ROUND ### +#Uncomment this if you want OOC to be automatically disabled during the round, it will be enabled during the lobby and after the round end results. +#AUTO_TOGGLE_OOC_DURING_ROUND ### MOB MOVEMENT ###