From 40344ab093f0615a32276d3a0e072c9948dbeadc Mon Sep 17 00:00:00 2001 From: coiax Date: Sun, 9 Dec 2018 10:03:34 +0000 Subject: [PATCH] Heirlooms have additional examine text, rather than being renamed (#41676) cl coiax add: Heirlooms are no longer named "Cherry family bag of dice", but rather their heirloom status can be determined by the owner on examine. /cl Because names are inherent to an object when anyone looks at it, I feel it can be somewhat confusing that you can tell that this screwdriver is a precious family heirloom just because of its name, rather than because of the significance that someone holds it. Only the owner of the heirloom receives the special examine text; so I'm sure this could probably be used to bluff ownership of something non-standard, if and when heirlooms become more exotic. Heirlooms still work in the same way though, mood bonus from holding, mood penalty if you don't have it. --- code/datums/components/heirloom.dm | 16 ++++++++++++++++ code/datums/traits/negative.dm | 7 +++++-- tgstation.dme | 1 + 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 code/datums/components/heirloom.dm diff --git a/code/datums/components/heirloom.dm b/code/datums/components/heirloom.dm new file mode 100644 index 00000000000..e7e62187d06 --- /dev/null +++ b/code/datums/components/heirloom.dm @@ -0,0 +1,16 @@ +/datum/component/heirloom + var/datum/mind/owner + var/family_name + +/datum/component/heirloom/Initialize(new_owner, new_family_name) + if(!isitem(parent)) + return COMPONENT_INCOMPATIBLE + + owner = new_owner + family_name = new_family_name + + RegisterSignal(parent, COMSIG_PARENT_EXAMINE, .proc/examine) + +/datum/component/heirloom/proc/examine(datum/source, mob/user) + if(user.mind == owner) + to_chat(user, "It is your precious [family_name] family heirloom. Keep it safe!") diff --git a/code/datums/traits/negative.dm b/code/datums/traits/negative.dm index 2f8b425d259..ba9a69fb64c 100644 --- a/code/datums/traits/negative.dm +++ b/code/datums/traits/negative.dm @@ -159,8 +159,11 @@ SEND_SIGNAL(H.back, COMSIG_TRY_STORAGE_SHOW, H) to_chat(quirk_holder, "There is a precious family [heirloom.name] [where], passed down from generation to generation. Keep it safe!") - var/list/family_name = splittext(quirk_holder.real_name, " ") - heirloom.name = "\improper [family_name[family_name.len]] family [heirloom.name]" + + var/list/names = splittext(quirk_holder.real_name, " ") + var/family_name = names[names.len] + + heirloom.AddComponent(/datum/component/heirloom, quirk_holder.mind, family_name) /datum/quirk/family_heirloom/on_process() if(heirloom in quirk_holder.GetAllContents()) diff --git a/tgstation.dme b/tgstation.dme index 23efe4fa672..903e18e4af3 100755 --- a/tgstation.dme +++ b/tgstation.dme @@ -340,6 +340,7 @@ #include "code\datums\components\footstep.dm" #include "code\datums\components\forced_gravity.dm" #include "code\datums\components\forensics.dm" +#include "code\datums\components\heirloom.dm" #include "code\datums\components\infective.dm" #include "code\datums\components\jousting.dm" #include "code\datums\components\knockoff.dm"