[MIRROR] Refactors some trauma code, fixes some trauma heals not working (#5955)

* Refactors some trauma code, fixes some trauma heals not working (#36093)

* Refactors some trauma code, fixes some trauma heals not working

* that too

* fix indent

* antur comments

* Refactors some trauma code, fixes some trauma heals not working
This commit is contained in:
CitadelStationBot
2018-03-15 20:50:10 -05:00
committed by Poojawa
parent 31d988344a
commit 0bf1f7ce14
8 changed files with 34 additions and 27 deletions
+12 -2
View File
@@ -236,16 +236,26 @@
item_state = "foilhat"
armor = list("melee" = 0, "bullet" = 0, "laser" = -5,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = -5, "fire" = 0, "acid" = 0)
equip_delay_other = 140
var/datum/brain_trauma/mild/phobia/paranoia
/obj/item/clothing/head/foilhat/equipped(mob/living/carbon/human/user, slot)
..()
if(slot == slot_head)
user.gain_trauma(/datum/brain_trauma/mild/phobia, FALSE, "conspiracies")
if(paranoia)
QDEL_NULL(paranoia)
paranoia = new()
user.gain_trauma(paranoia, TRAUMA_RESILIENCE_MAGIC, "conspiracies")
to_chat(user, "<span class='warning'>As you don the foiled hat, an entire world of conspiracy theories and seemingly insane ideas suddenly rush into your mind. What you once thought unbelievable suddenly seems.. undeniable. Everything is connected and nothing happens just by accident. You know too much and now they're out to get you. </span>")
/obj/item/clothing/head/foilhat/dropped(mob/user)
..()
if(paranoia)
QDEL_NULL(paranoia)
/obj/item/clothing/head/foilhat/attack_hand(mob/user)
if(iscarbon(user))
var/mob/living/carbon/C = user
if(src == C.head)
to_chat(user, "<span class='userdanger'>Why would you want to take this off? Do you want them to get into your mind?!</span>")
to_chat(user, "<span class='userdanger'>Why would you want to take this off? Do you want them to get into your mind?!</span>")
return
..()