Files
GS13NG/code/modules/mob/living/taste.dm
Poojawa 7e9b96a00f April sync (#360)
* Maps and things no code/icons

* helpers defines globalvars

* Onclick world.dm orphaned_procs

* subsystems

Round vote and shuttle autocall done here too

* datums

* Game folder

* Admin - chatter modules

* clothing - mining

* modular computers - zambies

* client

* mob level 1

* mob stage 2 + simple_animal

* silicons n brains

* mob stage 3 + Alien/Monkey

* human mobs

* icons updated

* some sounds

* emitter y u no commit

* update tgstation.dme

* compile fixes

* travis fixes

Also removes Fast digest mode, because reasons.

* tweaks for travis Mentors are broke again

Also fixes Sizeray guns

* oxygen loss fix for vore code.

* removes unused code

* some code updates

* bulk fixes

* further fixes

* outside things

* whoops.

* Maint bar ported

* GLOBs.
2017-04-13 23:37:00 -05:00

36 lines
1.4 KiB
Plaintext

#define DEFAULT_TASTE_SENSITIVITY 15
/mob/living
var/last_taste_time
var/last_taste_text
/mob/living/proc/get_taste_sensitivity()
return DEFAULT_TASTE_SENSITIVITY
/mob/living/carbon/get_taste_sensitivity()
var/obj/item/organ/tongue/tongue = getorganslot("tongue")
if(istype(tongue))
. = tongue.taste_sensitivity
else
. = 101 // can't taste anything without a tongue
// non destructively tastes a reagent container
/mob/living/proc/taste(datum/reagents/from)
if(last_taste_time + 50 < world.time)
var/taste_sensitivity = get_taste_sensitivity()
var/text_output = from.generate_taste_message(taste_sensitivity)
// We dont want to spam the same message over and over again at the
// person. Give it a bit of a buffer.
if(hallucination > 50 && prob(25))
text_output = pick("spiders","dreams","nightmares","the future","the past","victory",\
"defeat","pain","bliss","revenge","poison","time","space","death","life","truth","lies","justice","memory",\
"regrets","your soul","suffering","music","noise","blood","hunger","the american way")
if(text_output != last_taste_text || last_taste_time + 100 < world.time)
to_chat(src, "<span class='notice'>You can taste [text_output].</span>")
// "somthing indescribable" -> too many tastes, not enough flavor.
last_taste_time = world.time
last_taste_text = text_output
#undef DEFAULT_TASTE_SENSITIVITY