Hallucinations Overhaul (#8259)

This commit is contained in:
Doxxmedearly
2020-03-20 22:24:06 +02:00
committed by GitHub
parent 4ebdbdafdc
commit 938deeb66a
20 changed files with 1353 additions and 421 deletions
@@ -1116,6 +1116,12 @@ var/global/list/obj/item/device/pda/PDAs = list()
t = sanitize(t)
//t = readd_quotes(t)
t = replace_characters(t, list(""" = "\""))
if(iscarbon(U) && t)
var/mob/living/carbon/C = U
if(C.hallucination >= 50 && prob(C.hallucination / 10)) //If you're really hallucinating, you might not be typing what you think you are
var/t_orig = t
t = pick(SShallucinations.hallucinated_phrases) //see carbon/hallucination.dm
log_pda("[usr] (PDA: [C.name]) typed \"[t_orig]\" then hallucination changed it to \"[t]\". Recipient was [P.owner]",ckey=key_name(C),ckey_target=key_name(P.owner))
if (!t || !istype(P))
return
if (!in_range(src, U) && loc != U)