From 6c6ca28ed278448ed8767f878af210765f00e28a Mon Sep 17 00:00:00 2001 From: Xhuis Date: Thu, 3 May 2018 12:29:10 -0400 Subject: [PATCH] not allowed to use quirks unless you code them --- code/__DEFINES/mobs.dm | 2 +- code/__DEFINES/subsystems.dm | 2 +- code/controllers/subsystem/processing/quirks.dm | 9 ++++----- code/datums/traits/_quirk.dm | 4 ++-- code/game/machinery/computer/cloning.dm | 8 ++++---- code/modules/client/preferences.dm | 14 +++++++------- code/modules/hydroponics/grown/replicapod.dm | 6 +++--- 7 files changed, 22 insertions(+), 23 deletions(-) diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm index 15033fcf480..64a4089543f 100644 --- a/code/__DEFINES/mobs.dm +++ b/code/__DEFINES/mobs.dm @@ -258,7 +258,7 @@ // Roundstart trait system -#define MAX_TRAITS 6 //The maximum amount of traits one character can have at roundstart +#define MAX_QUIRKS 6 //The maximum amount of quirks one character can have at roundstart // AI Toggles #define AI_CAMERA_LUMINOSITY 5 diff --git a/code/__DEFINES/subsystems.dm b/code/__DEFINES/subsystems.dm index 61c12ed7c2e..3313754324d 100644 --- a/code/__DEFINES/subsystems.dm +++ b/code/__DEFINES/subsystems.dm @@ -56,7 +56,7 @@ #define INIT_ORDER_RESEARCH 14 #define INIT_ORDER_EVENTS 13 #define INIT_ORDER_JOBS 12 -#define INIT_ORDER_TRAITS 11 +#define INIT_ORDER_QUIRKS 11 #define INIT_ORDER_TICKER 10 #define INIT_ORDER_MAPPING 9 #define INIT_ORDER_NETWORKS 8 diff --git a/code/controllers/subsystem/processing/quirks.dm b/code/controllers/subsystem/processing/quirks.dm index 5b6facba234..cec8b2832b2 100644 --- a/code/controllers/subsystem/processing/quirks.dm +++ b/code/controllers/subsystem/processing/quirks.dm @@ -1,10 +1,9 @@ -//Used to process and handle roundstart trait datums -//Trait datums are separate from trait strings: -// - Trait strings are used for faster checking in code -// - Trait datums are stored and hold different effects, as well as being a vector for applying trait string +//Used to process and handle roundstart quirks +// - Quirk strings are used for faster checking in code +// - Quirk datums are stored and hold different effects, as well as being a vector for applying trait string PROCESSING_SUBSYSTEM_DEF(quirks) name = "Quirks" - init_order = INIT_ORDER_TRAITS + init_order = INIT_ORDER_QUIRKS flags = SS_BACKGROUND wait = 10 runlevels = RUNLEVEL_GAME diff --git a/code/datums/traits/_quirk.dm b/code/datums/traits/_quirk.dm index cb263fba39b..d85f79f84a5 100644 --- a/code/datums/traits/_quirk.dm +++ b/code/datums/traits/_quirk.dm @@ -1,5 +1,5 @@ -//every trait in this folder should be coded around being applied on spawn -//these are NOT "mob traits" like GOTTAGOFAST, but exist as a medium to apply them and other different effects +//every quirk in this folder should be coded around being applied on spawn +//these are NOT "mob quirks" like GOTTAGOFAST, but exist as a medium to apply them and other different effects /datum/quirk var/name = "Test Quirk" var/desc = "This is a test quirk." diff --git a/code/game/machinery/computer/cloning.dm b/code/game/machinery/computer/cloning.dm index cb0ee2c42a5..95b4ea9f803 100644 --- a/code/game/machinery/computer/cloning.dm +++ b/code/game/machinery/computer/cloning.dm @@ -71,7 +71,7 @@ if(pod.occupant) continue //how though? - if(pod.growclone(R.fields["ckey"], R.fields["name"], R.fields["UI"], R.fields["SE"], R.fields["mind"], R.fields["mrace"], R.fields["features"], R.fields["factions"], R.fields["traits"])) + if(pod.growclone(R.fields["ckey"], R.fields["name"], R.fields["UI"], R.fields["SE"], R.fields["mind"], R.fields["mrace"], R.fields["features"], R.fields["factions"], R.fields["quirks"])) temp = "[R.fields["name"]] => Cloning cycle in progress..." records -= R @@ -400,7 +400,7 @@ else if(pod.occupant) temp = "Cloning cycle already in progress." playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0) - else if(pod.growclone(C.fields["ckey"], C.fields["name"], C.fields["UI"], C.fields["SE"], C.fields["mind"], C.fields["mrace"], C.fields["features"], C.fields["factions"], C.fields["traits"])) + else if(pod.growclone(C.fields["ckey"], C.fields["name"], C.fields["UI"], C.fields["SE"], C.fields["mind"], C.fields["mrace"], C.fields["features"], C.fields["factions"], C.fields["quirks"])) temp = "[C.fields["name"]] => Cloning cycle in progress..." playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0) records.Remove(C) @@ -473,10 +473,10 @@ R.fields["blood_type"] = dna.blood_type R.fields["features"] = dna.features R.fields["factions"] = mob_occupant.faction - R.fields["traits"] = list() + R.fields["quirks"] = list() for(var/V in mob_occupant.roundstart_quirks) var/datum/quirk/T = V - R.fields["traits"] += T.type + R.fields["quirks"] += T.type if (!isnull(mob_occupant.mind)) //Save that mind so traitors can continue traitoring after cloning. R.fields["mind"] = "[REF(mob_occupant.mind)]" diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 29b80ebdefc..2435c5b4cfd 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -881,7 +881,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) dat += "
Done
" dat += "
" dat += "
Current quirks: [all_quirks.len ? all_quirks.Join(", ") : "None"]
" - dat += "
[all_quirks.len] / [MAX_TRAITS] max quirks
\ + dat += "
[all_quirks.len] / [MAX_QUIRKS] max quirks
\ Quirk balance remaining: [GetQuirkBalance()]

" for(var/V in SSquirks.quirks) var/datum/quirk/T = SSquirks.quirks[V] @@ -995,8 +995,8 @@ GLOBAL_LIST_EMPTY(preferences_datums) neutral_quirks -= quirk all_quirks -= quirk else - if(all_quirks.len >= MAX_TRAITS) - to_chat(user, "You can't have more than [MAX_TRAITS] quirks!") + if(all_quirks.len >= MAX_QUIRKS) + to_chat(user, "You can't have more than [MAX_QUIRKS] quirks!") return neutral_quirks += quirk all_quirks += quirk @@ -1012,8 +1012,8 @@ GLOBAL_LIST_EMPTY(preferences_datums) negative_quirks -= quirk all_quirks -= quirk else if(value > 0) - if(all_quirks.len >= MAX_TRAITS) - to_chat(user, "You can't have more than [MAX_TRAITS] quirks!") + if(all_quirks.len >= MAX_QUIRKS) + to_chat(user, "You can't have more than [MAX_QUIRKS] quirks!") return if(balance - value < 0) to_chat(user, "You don't have enough balance to gain this quirk!") @@ -1021,8 +1021,8 @@ GLOBAL_LIST_EMPTY(preferences_datums) positive_quirks += quirk all_quirks += quirk else - if(all_quirks.len >= MAX_TRAITS) - to_chat(user, "You can't have more than [MAX_TRAITS] quirks!") + if(all_quirks.len >= MAX_QUIRKS) + to_chat(user, "You can't have more than [MAX_QUIRKS] quirks!") return negative_quirks += quirk all_quirks += quirk diff --git a/code/modules/hydroponics/grown/replicapod.dm b/code/modules/hydroponics/grown/replicapod.dm index 9eaa8747b91..55c0da91f27 100644 --- a/code/modules/hydroponics/grown/replicapod.dm +++ b/code/modules/hydroponics/grown/replicapod.dm @@ -22,7 +22,7 @@ var/blood_type = null var/list/features = null var/factions = null - var/list/traits = null + var/list/quirks = null var/contains_sample = 0 /obj/item/seeds/replicapod/Initialize() @@ -42,7 +42,7 @@ blood_type = B.data["blood_type"] features = B.data["features"] factions = B.data["factions"] - factions = B.data["traits"] + factions = B.data["quirks"] contains_sample = TRUE visible_message("The [src] is injected with a fresh blood sample.") else @@ -114,7 +114,7 @@ podman.faction |= factions if(!features["mcolor"]) features["mcolor"] = "#59CE00" - for(var/V in traits) + for(var/V in quirks) new V(podman) podman.hardset_dna(null,null,podman.real_name,blood_type, new /datum/species/pod,features)//Discard SE's and UI's, podman cloning is inaccurate, and always make them a podman podman.set_cloned_appearance()