mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-30 19:41:56 +00:00
* afterattack now returns a flag if it's reasonable to suspect the user intends to act on an item * Update _neck.dm Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com> Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com>
25 lines
797 B
Plaintext
25 lines
797 B
Plaintext
/obj/item/taster
|
|
name = "taster"
|
|
desc = "Tastes things, so you don't have to!"
|
|
icon = 'icons/obj/medical/organs/organs.dmi'
|
|
icon_state = "tongue"
|
|
|
|
w_class = WEIGHT_CLASS_TINY
|
|
|
|
var/taste_sensitivity = 15
|
|
|
|
/obj/item/taster/afterattack(atom/O, mob/user, proximity)
|
|
. = ..()
|
|
if(!proximity)
|
|
return
|
|
|
|
. |= AFTERATTACK_PROCESSED_ITEM
|
|
|
|
if(!O.reagents)
|
|
to_chat(user, span_notice("[src] cannot taste [O], since [O.p_they()] [O.p_have()] have no reagents."))
|
|
else if(O.reagents.total_volume == 0)
|
|
to_chat(user, "<span class='notice'>[src] cannot taste [O], since [O.p_they()] [O.p_are()] empty.</span>")
|
|
else
|
|
var/message = O.reagents.generate_taste_message(user, taste_sensitivity)
|
|
to_chat(user, "<span class='notice'>[src] tastes <span class='italics'>[message]</span> in [O].</span>")
|