[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
@@ -264,6 +264,7 @@
overdose_threshold = 20
addiction_threshold = 10
taste_description = "salt" // because they're bathsalts?
var/datum/brain_trauma/special/psychotic_brawling/bath_salts/rage
/datum/reagent/drug/bath_salts/on_mob_add(mob/M)
..()
@@ -273,17 +274,16 @@
L.add_trait(TRAIT_SLEEPIMMUNE, id)
if(iscarbon(L))
var/mob/living/carbon/C = L
C.gain_trauma(/datum/brain_trauma/special/psychotic_brawling/bath_salts, TRAUMA_RESILIENCE_ABSOLUTE)
rage = new()
C.gain_trauma(rage, TRAUMA_RESILIENCE_ABSOLUTE)
/datum/reagent/drug/bath_salts/on_mob_delete(mob/M)
if(isliving(M))
var/mob/living/L = M
L.remove_trait(TRAIT_STUNIMMUNE, id)
L.remove_trait(TRAIT_SLEEPIMMUNE, id)
if(iscarbon(L))
var/mob/living/carbon/C = L
for(var/datum/brain_trauma/special/psychotic_brawling/bath_salts/T in C.get_traumas())
qdel(T)
if(rage)
QDEL_NULL(rage)
..()
/datum/reagent/drug/bath_salts/on_mob_life(mob/living/M)
@@ -59,7 +59,7 @@
M.confused = 0
M.SetSleeping(0, 0)
M.jitteriness = 0
M.cure_all_traumas(TRUE, TRAUMA_RESILIENCE_MAGIC)
M.cure_all_traumas(TRAUMA_RESILIENCE_MAGIC)
for(var/thing in M.diseases)
var/datum/disease/D = thing
if(D.severity == DISEASE_SEVERITY_POSITIVE)