[Ready Again]Refactors disabilities into lists, allowing for independent disability sources
This commit is contained in:
@@ -223,7 +223,7 @@
|
||||
if(verbose)
|
||||
to_chat(user, "<span class='warning'>[target] is not compatible with our biology.</span>")
|
||||
return
|
||||
if((target.disabilities & NOCLONE) || (target.disabilities & HUSK))
|
||||
if((target.has_disability(NOCLONE)) || (target.has_disability(NOCLONE)))
|
||||
if(verbose)
|
||||
to_chat(user, "<span class='warning'>DNA of [target] is ruined beyond usability!</span>")
|
||||
return
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
lose_text = "<span class='notice'>You feel smart again.</span>"
|
||||
|
||||
/datum/brain_trauma/mild/dumbness/on_gain()
|
||||
owner.disabilities |= DUMB
|
||||
owner.add_disability(DUMB, TRAUMA_DISABILITY)
|
||||
..()
|
||||
|
||||
/datum/brain_trauma/mild/dumbness/on_life()
|
||||
@@ -54,7 +54,7 @@
|
||||
..()
|
||||
|
||||
/datum/brain_trauma/mild/dumbness/on_lose()
|
||||
owner.disabilities &= ~DUMB
|
||||
owner.remove_disability(DUMB, TRAUMA_DISABILITY)
|
||||
owner.derpspeech = 0
|
||||
..()
|
||||
|
||||
|
||||
@@ -12,17 +12,11 @@
|
||||
lose_text = "<span class='notice'>You suddenly remember how to speak.</span>"
|
||||
|
||||
/datum/brain_trauma/severe/mute/on_gain()
|
||||
owner.disabilities |= MUTE
|
||||
..()
|
||||
|
||||
//no fiddling with genetics to get out of this one
|
||||
/datum/brain_trauma/severe/mute/on_life()
|
||||
if(!(owner.disabilities & MUTE))
|
||||
on_gain()
|
||||
owner.add_disability(MUTE, TRAUMA_DISABILITY)
|
||||
..()
|
||||
|
||||
/datum/brain_trauma/severe/mute/on_lose()
|
||||
owner.disabilities &= ~MUTE
|
||||
owner.remove_disability(MUTE, TRAUMA_DISABILITY)
|
||||
..()
|
||||
|
||||
/datum/brain_trauma/severe/blindness
|
||||
@@ -33,17 +27,11 @@
|
||||
lose_text = "<span class='notice'>Your vision returns.</span>"
|
||||
|
||||
/datum/brain_trauma/severe/blindness/on_gain()
|
||||
owner.become_blind()
|
||||
..()
|
||||
|
||||
//no fiddling with genetics to get out of this one
|
||||
/datum/brain_trauma/severe/blindness/on_life()
|
||||
if(!(owner.disabilities & BLIND))
|
||||
on_gain()
|
||||
owner.become_blind(TRAUMA_DISABILITY)
|
||||
..()
|
||||
|
||||
/datum/brain_trauma/severe/blindness/on_lose()
|
||||
owner.cure_blind()
|
||||
owner.cure_blind(TRAUMA_DISABILITY)
|
||||
..()
|
||||
|
||||
/datum/brain_trauma/severe/paralysis
|
||||
@@ -109,7 +97,7 @@
|
||||
stress -= 4
|
||||
|
||||
/datum/brain_trauma/severe/monophobia/proc/check_alone()
|
||||
if(owner.disabilities & BLIND)
|
||||
if(owner.has_disability(BLIND))
|
||||
return TRUE
|
||||
for(var/mob/M in oview(owner, 7))
|
||||
if(!isliving(M)) //ghosts ain't people
|
||||
@@ -171,9 +159,27 @@
|
||||
lose_text = "<span class='notice'>You feel in control of your hands again.</span>"
|
||||
|
||||
/datum/brain_trauma/severe/discoordination/on_gain()
|
||||
owner.disabilities |= MONKEYLIKE
|
||||
owner.add_disability(MONKEYLIKE, TRAUMA_DISABILITY)
|
||||
..()
|
||||
|
||||
/datum/brain_trauma/severe/discoordination/on_lose()
|
||||
owner.disabilities &= ~MONKEYLIKE
|
||||
owner.remove_disability(MONKEYLIKE, TRAUMA_DISABILITY)
|
||||
..()
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
/datum/brain_trauma/severe/pacifism
|
||||
name = "Traumatic Non-Violence"
|
||||
desc = "Patient is extremely unwilling to harm others in violent ways."
|
||||
scan_desc = "pacific syndrome"
|
||||
gain_text = "<span class='notice'>You feel oddly peaceful.</span>"
|
||||
lose_text = "<span class='notice'>You no longer feel compelled to not harm.</span>"
|
||||
|
||||
/datum/brain_trauma/severe/pacifism/on_gain()
|
||||
owner.add_disability(PACIFISM, TRAUMA_DISABILITY)
|
||||
..()
|
||||
|
||||
/datum/brain_trauma/severe/pacifism/on_lose()
|
||||
owner.remove_disability(PACIFISM, TRAUMA_DISABILITY)
|
||||
..()
|
||||
>>>>>>> 146d167... [Ready Again]Refactors disabilities into lists, allowing for independent disability sources (#33055)
|
||||
|
||||
@@ -58,11 +58,12 @@ Bonus
|
||||
M.blur_eyes(20)
|
||||
M.adjust_eye_damage(5)
|
||||
if(eyes.eye_damage >= 10)
|
||||
M.become_nearsighted()
|
||||
M.become_nearsighted(EYE_DAMAGE)
|
||||
if(prob(eyes.eye_damage - 10 + 1))
|
||||
if(!remove_eyes)
|
||||
if(M.become_blind())
|
||||
if(!M.has_disability(BLIND))
|
||||
to_chat(M, "<span class='userdanger'>You go blind!</span>")
|
||||
M.become_blind(EYE_DAMAGE)
|
||||
else
|
||||
M.visible_message("<span class='warning'>[M]'s eyes fall off their sockets!</span>", "<span class='userdanger'>Your eyes fall off their sockets!</span>")
|
||||
eyes.Remove(M)
|
||||
@@ -111,16 +112,16 @@ Bonus
|
||||
return
|
||||
switch(A.stage)
|
||||
if(4, 5) //basically oculine
|
||||
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)
|
||||
|
||||
@@ -197,7 +197,7 @@
|
||||
|
||||
/obj/item/twohanded/bostaff/attack(mob/target, mob/living/user)
|
||||
add_fingerprint(user)
|
||||
if((CLUMSY in user.disabilities) && prob(50))
|
||||
if((user.has_disability(CLUMSY)) && prob(50))
|
||||
to_chat(user, "<span class ='warning'>You club yourself over the head with [src].</span>")
|
||||
user.Knockdown(60)
|
||||
if(ishuman(user))
|
||||
|
||||
@@ -8,7 +8,6 @@ GLOBAL_LIST_EMPTY(mutations_list)
|
||||
GLOB.mutations_list[name] = src
|
||||
|
||||
/datum/mutation/human
|
||||
|
||||
var/dna_block
|
||||
var/quality
|
||||
var/get_chance = 100
|
||||
|
||||
@@ -85,12 +85,12 @@
|
||||
/datum/mutation/human/clumsy/on_acquiring(mob/living/carbon/human/owner)
|
||||
if(..())
|
||||
return
|
||||
owner.disabilities |= CLUMSY
|
||||
owner.add_disability(CLUMSY, GENETIC_MUTATION)
|
||||
|
||||
/datum/mutation/human/clumsy/on_losing(mob/living/carbon/human/owner)
|
||||
if(..())
|
||||
return
|
||||
owner.disabilities &= ~CLUMSY
|
||||
owner.remove_disability(CLUMSY, GENETIC_MUTATION)
|
||||
|
||||
|
||||
//Tourettes causes you to randomly stand in place and shout.
|
||||
@@ -124,12 +124,12 @@
|
||||
/datum/mutation/human/deaf/on_acquiring(mob/living/carbon/human/owner)
|
||||
if(..())
|
||||
return
|
||||
owner.disabilities |= DEAF
|
||||
owner.add_disability(DEAF, GENETIC_MUTATION)
|
||||
|
||||
/datum/mutation/human/deaf/on_losing(mob/living/carbon/human/owner)
|
||||
if(..())
|
||||
return
|
||||
owner.disabilities &= ~DEAF
|
||||
owner.remove_disability(DEAF, GENETIC_MUTATION)
|
||||
|
||||
|
||||
//Monified turns you into a monkey.
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
/datum/mutation/human/nearsight/on_acquiring(mob/living/carbon/human/owner)
|
||||
if(..())
|
||||
return
|
||||
owner.become_nearsighted()
|
||||
owner.become_nearsighted(GENETIC_MUTATION)
|
||||
|
||||
/datum/mutation/human/nearsight/on_losing(mob/living/carbon/human/owner)
|
||||
if(..())
|
||||
return
|
||||
owner.cure_nearsighted()
|
||||
owner.cure_nearsighted(GENETIC_MUTATION)
|
||||
|
||||
|
||||
//Blind makes you blind. Who knew?
|
||||
@@ -24,12 +24,12 @@
|
||||
/datum/mutation/human/blind/on_acquiring(mob/living/carbon/human/owner)
|
||||
if(..())
|
||||
return
|
||||
owner.become_blind()
|
||||
owner.become_blind(GENETIC_MUTATION)
|
||||
|
||||
/datum/mutation/human/blind/on_losing(mob/living/carbon/human/owner)
|
||||
if(..())
|
||||
return
|
||||
owner.cure_blind()
|
||||
owner.cure_blind(GENETIC_MUTATION)
|
||||
|
||||
|
||||
//X-Ray Vision lets you see through walls.
|
||||
|
||||
@@ -30,12 +30,12 @@
|
||||
/datum/mutation/human/mute/on_acquiring(mob/living/carbon/human/owner)
|
||||
if(..())
|
||||
return
|
||||
owner.disabilities |= MUTE
|
||||
owner.add_disability(MUTE, GENETIC_MUTATION)
|
||||
|
||||
/datum/mutation/human/mute/on_losing(mob/living/carbon/human/owner)
|
||||
if(..())
|
||||
return
|
||||
owner.disabilities &= ~MUTE
|
||||
owner.remove_disability(MUTE, GENETIC_MUTATION)
|
||||
|
||||
|
||||
/datum/mutation/human/smile
|
||||
|
||||
Reference in New Issue
Block a user