From 70d6dee73d9ca102b763dbec43f01d6632444d37 Mon Sep 17 00:00:00 2001 From: Shadowlight213 Date: Sat, 27 Feb 2016 22:09:16 -0800 Subject: [PATCH 1/3] Adds a config option to disable the security cyborg module. --- code/controllers/configuration.dm | 3 +++ code/modules/mob/living/silicon/robot/robot.dm | 9 ++++++++- config/game_options.txt | 3 +++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index 1dff0ee6ceb..9bd36ba1e1a 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -92,6 +92,7 @@ var/humans_need_surnames = 0 var/allow_random_events = 0 // enables random events mid-round when set to 1 var/allow_ai = 0 // allow ai job + var/allow_secborg = 1 // allow secborg module to be chosen. var/panic_bunker = 0 // prevents new people it hasn't seen before from connecting var/notify_new_player_age = 0 // how long do we notify admins of a new player var/irc_first_connection_alert = 0 // do we notify the irc channel when somebody is connecting for the first time? @@ -517,6 +518,8 @@ config.force_random_names = 1 if("allow_ai") config.allow_ai = 1 + if("disable_secborg") + config.allow_secborg = 0 if("silent_ai") config.silent_ai = 1 if("silent_borg") diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index fb2e6646e18..5c4c9cb407b 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -166,7 +166,11 @@ if(module) return - designation = input("Please, select a module!", "Robot", null, null) in list("Standard", "Engineering", "Medical", "Miner", "Janitor","Service", "Security") + var/list/modulelist = list("Standard", "Engineering", "Medical", "Miner", "Janitor","Service") + if(config.allow_secborg) + modulelist += "Security" + + designation = input("Please, select a module!", "Robot", null, null) in modulelist var/animation_length = 0 if(module) @@ -222,6 +226,9 @@ feedback_inc("cyborg_medical",1) if("Security") + if(!config.allow_secborg) + src << "spam class = 'warning'>ERROR: NANOTRASEN HAS DISABLED THIS MODULE. PLEASE SELECT A DIFFERENT ONE!" + return module = new /obj/item/weapon/robot_module/security(src) hands.icon_state = "security" icon_state = "secborg" diff --git a/config/game_options.txt b/config/game_options.txt index 94cded7029c..1448674dcd1 100644 --- a/config/game_options.txt +++ b/config/game_options.txt @@ -189,6 +189,9 @@ ALLOW_RANDOM_EVENTS ## Allow the AI job to be picked. ALLOW_AI +### Secborg ### +## Uncomment to prevent the secborg module from being chosen +#DISABLE_SECBORG ### AWAY MISSIONS ### From 51c414e808cdb07e556233c19dfeaf5fa38d934a Mon Sep 17 00:00:00 2001 From: Shadowlight213 Date: Thu, 3 Mar 2016 10:48:13 -0800 Subject: [PATCH 2/3] Removes the backup check. --- code/modules/mob/living/silicon/robot/robot.dm | 3 --- 1 file changed, 3 deletions(-) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 99d81c59a05..a6b735362b1 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -226,9 +226,6 @@ feedback_inc("cyborg_medical",1) if("Security") - if(!config.allow_secborg) - src << "spam class = 'warning'>ERROR: NANOTRASEN HAS DISABLED THIS MODULE. PLEASE SELECT A DIFFERENT ONE!" - return module = new /obj/item/weapon/robot_module/security(src) hands.icon_state = "security" icon_state = "secborg" From ebcbbec8e2ce43569b9bbbbc3a75d5c63c4a0ce9 Mon Sep 17 00:00:00 2001 From: Shadowlight213 Date: Fri, 4 Mar 2016 10:49:00 -0800 Subject: [PATCH 3/3] Reverses the config var so it forbids instead of allows --- code/controllers/configuration.dm | 4 ++-- code/modules/mob/living/silicon/robot/robot.dm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index 9bd36ba1e1a..8a12fd17630 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -92,7 +92,7 @@ var/humans_need_surnames = 0 var/allow_random_events = 0 // enables random events mid-round when set to 1 var/allow_ai = 0 // allow ai job - var/allow_secborg = 1 // allow secborg module to be chosen. + var/forbid_secborg = 0 // disallow secborg module to be chosen. var/panic_bunker = 0 // prevents new people it hasn't seen before from connecting var/notify_new_player_age = 0 // how long do we notify admins of a new player var/irc_first_connection_alert = 0 // do we notify the irc channel when somebody is connecting for the first time? @@ -519,7 +519,7 @@ if("allow_ai") config.allow_ai = 1 if("disable_secborg") - config.allow_secborg = 0 + config.forbid_secborg = 1 if("silent_ai") config.silent_ai = 1 if("silent_borg") diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index a6b735362b1..b65a63b1869 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -167,7 +167,7 @@ return var/list/modulelist = list("Standard", "Engineering", "Medical", "Miner", "Janitor","Service") - if(config.allow_secborg) + if(!config.forbid_secborg) modulelist += "Security" designation = input("Please, select a module!", "Robot", null, null) in modulelist