[Ready Again]Refactors disabilities into lists, allowing for independent disability sources

This commit is contained in:
XDTM
2017-12-18 22:20:07 +01:00
committed by CitadelStationBot
parent 3df26e3be6
commit 3af0aa2489
81 changed files with 711 additions and 221 deletions
@@ -70,7 +70,7 @@
//nothing
if(21 to INFINITY)
if(prob(current_cycle-10))
M.cure_nearsighted()
M.cure_nearsighted(list(EYE_DAMAGE))
..()
return
@@ -44,7 +44,7 @@
M.adjustToxLoss(-5, 0)
M.hallucination = 0
M.setBrainLoss(0)
M.disabilities = 0
M.remove_all_disabilities()
M.set_blurriness(0)
M.set_blindness(0)
M.SetKnockdown(0, 0)
@@ -667,16 +667,16 @@
var/obj/item/organ/eyes/eyes = M.getorganslot(ORGAN_SLOT_EYES)
if (!eyes)
return
if(M.disabilities & BLIND)
if(M.has_disability(BLIND, EYE_DAMAGE))
if(prob(20))
to_chat(M, "<span class='warning'>Your vision slowly returns...</span>")
M.cure_blind()
M.cure_nearsighted()
M.cure_blind(EYE_DAMAGE)
M.cure_nearsighted(EYE_DAMAGE)
M.blur_eyes(35)
else if(M.disabilities & NEARSIGHT)
else if(M.has_disability(NEARSIGHT, EYE_DAMAGE))
to_chat(M, "<span class='warning'>The blackness in your peripheral vision fades.</span>")
M.cure_nearsighted()
M.cure_nearsighted(EYE_DAMAGE)
M.blur_eyes(10)
else if(M.eye_blind || M.eye_blurry)
M.set_blindness(0)
@@ -765,7 +765,7 @@
M.visible_message("<span class='warning'>[M]'s body convulses a bit, and then falls still once more.</span>")
return
M.visible_message("<span class='warning'>[M]'s body convulses a bit.</span>")
if(!M.suiciding && !(M.disabilities & NOCLONE) && !M.hellbound)
if(!M.suiciding && !(M.has_disability(NOCLONE)) && !M.hellbound)
if(!M)
return
if(M.notify_ghost_cloning(source = M))
@@ -141,7 +141,7 @@
taste_description = "mint"
/datum/reagent/toxin/minttoxin/on_mob_life(mob/living/M)
if(M.disabilities & FAT)
if(M.has_disability(FAT))
M.gib()
return ..()