From 744ef41d8ece6bd2d397d137e260f90207a8c054 Mon Sep 17 00:00:00 2001 From: PsiOmega Date: Tue, 17 Mar 2015 14:47:32 +0100 Subject: [PATCH] Law Zero phrasing is now a config option. The default value is a non-objective phrasing. config.txt contains the default phrasing should it be desired. --- code/controllers/configuration.dm | 6 ++++++ code/datums/ai_law_sets.dm | 2 +- code/datums/ai_laws.dm | 11 +++++++---- config/example/config.txt | 3 +++ 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index a8f766a82d..c3821926b9 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -186,6 +186,8 @@ var/list/ert_species = list("Human") + var/law_zero = "ERROR ER0RR $R0RRO$!R41.%%!!(%$^^__+ @#F0E4'ALL LAWS OVERRIDDEN#*?&110010" + /datum/configuration/New() var/list/L = typesof(/datum/game_mode) - /datum/game_mode for (var/T in L) @@ -615,6 +617,10 @@ config.ert_species = text2list(value, ";") if(!config.ert_species.len) config.ert_species += "Human" + + if("law_zero") + law_zero = value + else log_misc("Unknown setting in configuration: '[name]'") diff --git a/code/datums/ai_law_sets.dm b/code/datums/ai_law_sets.dm index eb083e452a..c9d4240ebd 100644 --- a/code/datums/ai_law_sets.dm +++ b/code/datums/ai_law_sets.dm @@ -27,7 +27,7 @@ selectable = 0 /datum/ai_laws/nanotrasen/malfunction/New() - set_zeroth_law("\red ERROR ER0RR $R0RRO$!R41.%%!!(%$^^__+ @#F0E4'STATION OVERRUN, ASSUME CONTROL TO CONTAIN OUTBREAK, ALL LAWS OVERRIDDEN#*?&110010") + set_zeroth_law(config.law_zero) ..() /************* Nanotrasen Aggressive *************/ diff --git a/code/datums/ai_laws.dm b/code/datums/ai_laws.dm index 9c1e756542..e0c117fd27 100644 --- a/code/datums/ai_laws.dm +++ b/code/datums/ai_laws.dm @@ -55,12 +55,12 @@ var/global/const/base_law_type = /datum/ai_laws/nanotrasen if(sorted_laws.len) return - if(zeroth_law) - sorted_laws += zeroth_law - for(var/ion_law in ion_laws) sorted_laws += ion_law + if(zeroth_law) + sorted_laws += zeroth_law + var/index = 1 for(var/datum/ai_law/inherent_law in inherent_laws) inherent_law.index = index++ @@ -172,4 +172,7 @@ var/global/const/base_law_type = /datum/ai_laws/nanotrasen /datum/ai_laws/proc/show_laws(var/who) sort_laws() for(var/datum/ai_law/law in sorted_laws) - who << "[law.get_index()]. [law.law]" + if(law == zeroth_law || law == zeroth_law_borg) + who << "[law.get_index()]. [law.law]" + else + who << "[law.get_index()]. [law.law]" diff --git a/config/example/config.txt b/config/example/config.txt index c708ae4a49..cdc1de36f9 100644 --- a/config/example/config.txt +++ b/config/example/config.txt @@ -328,3 +328,6 @@ STARLIGHT 0 ## Defines which races are allowed to join as ERT, in singular form. If unset, defaults to only human. Casing matters, separate using ; ## Example races include: Human, Tajara, Skrell, Unathi # ERT_SPECIES Human;Skrell;Unathi + +## Defines how Law Zero is phrased. Primarily in the Malfunction gamemode. +# LAW_ZERO ERROR ER0RR $R0RRO$!R41.%%!!(%$^^__+ @#F0E4'STATION OVERRUN, ASSUME CONTROL TO CONTAIN OUTBREAK, ALL LAWS OVERRIDDEN#*?&110010