Files
kiwistation/code/datums/components/heirloom.dm
T
Jack Edge 8a4f1e9081 Observers can tell if an object is a family heirloom on examine()
🆑 coiax
tweak: Observers are able to see family heirloom messages when examining
objects.
/🆑

I mean, it bugged me the once time that I suspected a random object was
an heirloom, but had to use VV to check.
2019-01-16 07:48:28 +00:00

24 lines
902 B
Plaintext

/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, "<span class='notice'>It is your precious [family_name] family heirloom. Keep it safe!</span>")
else if(isobserver(user))
to_chat(user, "<span class='notice'>It is the [family_name] family heirloom, belonging to [owner].</span>")
else
var/datum/antagonist/creep/creeper = user.mind.has_antag_datum(/datum/antagonist/creep)
if(creeper && creeper.trauma.obsession == owner)
to_chat(user, "<span class='nicegreen'>This must be [owner]'s family heirloom! It smells just like them...</span>")