Merge pull request #14940 from timothyteakettle/trash-eating

adds a neutral trash eating quirk
This commit is contained in:
silicons
2021-07-18 15:07:29 -07:00
committed by GitHub
9 changed files with 43 additions and 3 deletions
+19
View File
@@ -0,0 +1,19 @@
/datum/element/trash
element_flags = ELEMENT_BESPOKE|ELEMENT_DETACH
/datum/element/trash/Attach(datum/target)
. = ..()
RegisterSignal(target, COMSIG_ITEM_ATTACK, .proc/UseFromHand)
/datum/element/trash/proc/UseFromHand(obj/item/source, mob/living/M, mob/living/user)
if((M == user || user.vore_flags & TRASH_FORCEFEED) && ishuman(user))
var/mob/living/carbon/human/H = user
if(HAS_TRAIT(H, TRAIT_TRASHCAN))
playsound(H.loc,'sound/items/eatfood.ogg', rand(10,50), 1)
if(H.vore_selected)
H.visible_message("<span class='notice'>[H] [H.vore_selected.vore_verb]s the [source] into their [H.vore_selected]</span>",
"<span class='notice'>You [H.vore_selected.vore_verb]s the [source] into your [H.vore_selected]</span>")
source.forceMove(H.vore_selected)
else
H.visible_message("<span class='notice'>[H] consumes the [source].")
qdel(source)
+8
View File
@@ -154,3 +154,11 @@
/datum/quirk/longtimer/on_spawn()
var/mob/living/carbon/C = quirk_holder
C.generate_fake_scars(rand(min_scars, max_scars))
/datum/quirk/trashcan
name = "Trashcan"
desc = "You are able to consume and digest trash."
value = 0
gain_text = "<span class='notice'>You feel like munching on a can of soda.</span>"
lose_text = "<span class='notice'>You no longer feel like you should be eating trash.</span>"
mob_trait = TRAIT_TRASHCAN