From 70f06cfe356b35d6b42db922ada1cf593b42f313 Mon Sep 17 00:00:00 2001 From: deathride58 Date: Sun, 1 Oct 2017 19:56:44 -0400 Subject: [PATCH] config. > CONFIG_GET --- code/controllers/configuration/entries/game_options.dm | 4 ++++ code/controllers/subsystem/ticker.dm | 6 +++--- code/modules/mob/dead/new_player/new_player.dm | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/code/controllers/configuration/entries/game_options.dm b/code/controllers/configuration/entries/game_options.dm index 106804a576..65c7dbaf4c 100644 --- a/code/controllers/configuration/entries/game_options.dm +++ b/code/controllers/configuration/entries/game_options.dm @@ -256,6 +256,10 @@ CONFIG_DEF(number/bombcap) value = 14 min_val = 4 +CONFIG_DEF(flag/allow_crew_objectives) +CONFIG_DEF(flag/allow_miscreants) +CONFIG_DEF(flag/allow_extended_miscreants) + /datum/config_entry/number/bombcap/ValidateAndSet(str_val) . = ..() if(.) diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm index 6cbd70fd96..911b72e4da 100755 --- a/code/controllers/subsystem/ticker.dm +++ b/code/controllers/subsystem/ticker.dm @@ -260,9 +260,9 @@ SUBSYSTEM_DEF(ticker) qdel(S) //assign crew objectives and generate miscreants - if(config.allow_extended_miscreants && GLOB.master_mode == "extended") + if(CONFIG_GET(flag/allow_extended_miscreants) && GLOB.master_mode == "extended") GLOB.miscreants_allowed = TRUE - if(config.allow_miscreants && GLOB.master_mode != "extended") + if(CONFIG_GET(flag/allow_miscreants) && GLOB.master_mode != "extended") GLOB.miscreants_allowed = TRUE generate_crew_objectives() @@ -484,7 +484,7 @@ SUBSYSTEM_DEF(ticker) completedObjectives += "[i]
" to_chat(world, "[completedObjectives]
") else - if(config.allow_crew_objectives) + if(CONFIG_GET(flag/allow_crew_objectives)) to_chat(world, "Nobody completed their Crew Objectives!
") CHECK_TICK diff --git a/code/modules/mob/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm index 5fe72f1938..167f1037c3 100644 --- a/code/modules/mob/dead/new_player/new_player.dm +++ b/code/modules/mob/dead/new_player/new_player.dm @@ -376,7 +376,7 @@ if(prob(2) && !issilicon(humanc) && !jobban_isbanned(humanc.mind, "Syndicate") && GLOB.miscreants_allowed) SSticker.generate_miscreant_objectives(humanc.mind) else - if(config.allow_crew_objectives) + if(CONFIG_GET(flag/allow_crew_objectives)) SSticker.generate_individual_objectives(humanc.mind) GLOB.joined_player_list += character.ckey