Files
Bubberstation/code/game/objects/items/taster.dm
vuonojenmustaturska 2d74a86353 [READY] Cleans up saycode by removing random hook stubs and using a signal where relevant (#44320)
About The Pull Request

This PR removes speech message and span hooks from dna, mutations, pierrot throat disease, species, tongues, masks, hats, held items, brain traumas and a carbon proc overload handling tonguelessness.

Tonguelessness is now handled by tongue removal registering for the speech signal and the hook being deregistered by having a tongue put in.

Also cleans up some /atom/movable/proc/get_spans() overloads that called the empty parent or overloaded the parent to do the exact same thing as the parent proc did.

Also cleans up calls to radio.talk_into() where the caller would often, as a result of copypasta, provide the proc with fresh copies of the proc's default values for proc args, and makes say_quote() better by giving it a default spans value so that none of the callers have to provide the same default one.
Why It's Good For The Game
Changelog

cl Naksu
code: Cleaned up saycode
/cl

* start with this

* oh man this looks so good

* hats are dead

* /obj/item/proc/speechModification is dead

* brain traumas and get_held_item_speechspans() are dead

* these should be static

* unfortunately we still need this

* /mob/living/carbon/treat_message(message) is kill

* clean up get_spans()

* dunk get_spans, modifies_speech for brain traumas, some superfluous static stuff

* move stuff around

* return values
2019-06-06 18:35:06 +12:00

21 lines
509 B
Plaintext

/obj/item/taster
name = "taster"
desc = "Tastes things, so you don't have to!"
icon = 'icons/obj/surgery.dmi'
icon_state = "tonguenormal"
w_class = WEIGHT_CLASS_TINY
speech_span = null
var/taste_sensitivity = 15
/obj/item/taster/afterattack(atom/O, mob/user, proximity)
. = ..()
if(!proximity)
return
if(O.reagents)
var/message = O.reagents.generate_taste_message(taste_sensitivity)
to_chat(user, "<span class='notice'>[src] tastes <span class='italics'>[message]</span> in [O].</span>")