From 164db7ae9bc69327e19cf49912d99ffe1ae60d6d Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Sun, 24 Dec 2017 11:45:45 -0500 Subject: [PATCH] Prefixed all disability defines with DISABILITY_ to fix a name collision --- code/__DEFINES/stat.dm | 25 +++ code/_onclick/item_attack.dm | 4 + code/datums/antagonists/changeling.dm | 4 + code/datums/brain_damage/mild.dm | 8 + code/datums/brain_damage/phobia.dm | 4 + code/datums/brain_damage/severe.dm | 28 ++++ code/datums/brain_damage/split_personality.dm | 4 + .../diseases/advance/symptoms/vision.dm | 12 ++ code/datums/martial/sleeping_carp.dm | 4 + code/datums/mutations/body.dm | 16 ++ code/datums/mutations/speech.dm | 8 + .../gamemodes/changeling/powers/tiny_prick.dm | 12 ++ .../clock_items/wraith_spectacles.dm | 28 ++++ .../clock_structures/ocular_warden.dm | 4 + code/game/gamemodes/cult/runes.dm | 4 + code/game/machinery/computer/cloning.dm | 4 + code/game/machinery/computer/dna_console.dm | 8 + code/game/machinery/dna_scanner.dm | 4 + code/game/machinery/doors/airlock.dm | 4 + code/game/objects/items.dm | 6 + code/game/objects/items/defib.dm | 8 + code/game/objects/items/devices/flashlight.dm | 8 + code/game/objects/items/devices/scanners.dm | 20 +++ code/game/objects/items/dna_injector.dm | 8 + code/game/objects/items/grenades/grenade.dm | 4 + code/game/objects/items/handcuffs.dm | 4 + code/game/objects/items/kitchen.dm | 8 + code/game/objects/items/melee/misc.dm | 4 + code/game/objects/items/melee/transforming.dm | 4 + code/game/objects/items/pneumaticCannon.dm | 7 + code/game/objects/items/shields.dm | 145 ++++++++++++++++++ code/game/objects/items/storage/book.dm | 4 + code/game/objects/items/stunbaton.dm | 4 + code/game/objects/items/teleprod.dm | 4 + code/game/objects/items/tools/screwdriver.dm | 4 + code/game/objects/items/twohanded.dm | 4 + .../objects/structures/petrified_statue.dm | 8 + code/modules/assembly/flash.dm | 4 + code/modules/assembly/mousetrap.dm | 145 ++++++++++++++++++ code/modules/clothing/glasses/_glasses.dm | 4 + code/modules/events/disease_outbreak.dm | 4 + code/modules/hydroponics/gene_modder.dm | 2 +- .../mining/lavaland/necropolis_chests.dm | 4 + code/modules/mob/living/blood.dm | 16 ++ code/modules/mob/living/brain/brain_item.dm | 5 + code/modules/mob/living/brain/status_procs.dm | 2 +- .../mob/living/carbon/alien/status_procs.dm | 2 +- code/modules/mob/living/carbon/carbon.dm | 14 +- .../mob/living/carbon/carbon_defense.dm | 8 + code/modules/mob/living/carbon/examine.dm | 4 + code/modules/mob/living/carbon/human/death.dm | 5 + .../mob/living/carbon/human/examine.dm | 4 + .../mob/living/carbon/human/human_defense.dm | 5 + .../mob/living/carbon/human/human_helpers.dm | 4 + .../mob/living/carbon/human/interactive.dm | 4 + .../mob/living/carbon/human/inventory.dm | 4 + .../mob/living/carbon/human/species.dm | 34 +++- .../carbon/human/species_types/golems.dm | 4 + .../mob/living/carbon/human/update_icons.dm | 4 + .../mob/living/carbon/monkey/combat.dm | 4 + .../mob/living/carbon/monkey/update_icons.dm | 4 + .../modules/mob/living/carbon/status_procs.dm | 2 +- .../modules/mob/living/carbon/update_icons.dm | 4 + code/modules/mob/living/life.dm | 8 + code/modules/mob/living/living.dm | 4 + code/modules/mob/living/living_defense.dm | 28 ++++ code/modules/mob/living/say.dm | 10 ++ .../hostile/megafauna/colossus.dm | 12 ++ code/modules/mob/living/status_procs.dm | 81 +++++++++- code/modules/mob/status_procs.dm | 16 +- code/modules/paperwork/contract.dm | 4 + code/modules/paperwork/paper.dm | 8 + code/modules/paperwork/paperplane.dm | 4 + code/modules/projectiles/gun.dm | 6 +- .../projectiles/guns/ballistic/revolver.dm | 4 + code/modules/projectiles/pins.dm | 4 + .../chemistry/reagents/medicine_reagents.dm | 12 ++ .../chemistry/reagents/toxin_reagents.dm | 4 + .../spells/spell_types/construct_spells.dm | 6 + code/modules/surgery/bodyparts/bodyparts.dm | 4 + code/modules/surgery/bodyparts/head.dm | 4 + code/modules/surgery/lipoplasty.dm | 4 + code/modules/surgery/organs/ears.dm | 8 + 83 files changed, 957 insertions(+), 9 deletions(-) diff --git a/code/__DEFINES/stat.dm b/code/__DEFINES/stat.dm index a23f050c13..d9ebf89091 100644 --- a/code/__DEFINES/stat.dm +++ b/code/__DEFINES/stat.dm @@ -10,6 +10,7 @@ //mob disabilities stat +<<<<<<< HEAD #define BLIND 1 #define MUTE 2 #define DEAF 4 @@ -21,6 +22,30 @@ #define DUMB 512 #define MONKEYLIKE 1024 //sets IsAdvancedToolUser to FALSE #define PACIFISM 2048 +======= +#define DISABILITY_BLIND "blind" +#define DISABILITY_MUTE "mute" +#define DISABILITY_DEAF "deaf" +#define DISABILITY_NEARSIGHT "nearsighted" +#define DISABILITY_FAT "fat" +#define DISABILITY_HUSK "husk" +#define DISABILITY_NOCLONE "noclone" +#define DISABILITY_CLUMSY "clumsy" +#define DISABILITY_DUMB "dumb" +#define DISABILITY_MONKEYLIKE "monkeylike" //sets IsAdvancedToolUser to FALSE +#define DISABILITY_PACIFISM "pacifism" + +// common disability sources +#define EYE_DAMAGE "eye_damage" +#define GENETIC_MUTATION "genetic" +#define STATUE_MUTE "statue" +#define CHANGELING_DRAIN "drain" +#define OBESITY "obesity" +#define MAGIC_DISABILITY "magic" +#define STASIS_MUTE "stasis" +#define GENETICS_SPELL "genetics_spell" +#define TRAUMA_DISABILITY "trauma" +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind // bitflags for machine stat variable #define BROKEN 1 diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index 2dddce8542..22ece9ecdd 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -58,7 +58,11 @@ SendSignal(COMSIG_ITEM_ATTACK, M, user) if(flags_1 & NOBLUDGEON_1) return +<<<<<<< HEAD if(user.disabilities & PACIFISM) +======= + if(user.has_disability(DISABILITY_PACIFISM)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind return if(!force) playsound(loc, 'sound/weapons/tap.ogg', get_clamped_volume(), 1, -1) diff --git a/code/datums/antagonists/changeling.dm b/code/datums/antagonists/changeling.dm index 4f8af2dc8a..091ca675fe 100644 --- a/code/datums/antagonists/changeling.dm +++ b/code/datums/antagonists/changeling.dm @@ -223,7 +223,11 @@ if(verbose) to_chat(user, "[target] is not compatible with our biology.") return +<<<<<<< HEAD if((target.disabilities & NOCLONE) || (target.disabilities & HUSK)) +======= + if((target.has_disability(DISABILITY_NOCLONE)) || (target.has_disability(DISABILITY_NOCLONE))) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind if(verbose) to_chat(user, "DNA of [target] is ruined beyond usability!") return diff --git a/code/datums/brain_damage/mild.dm b/code/datums/brain_damage/mild.dm index 7c2ba20a62..fc0104e040 100644 --- a/code/datums/brain_damage/mild.dm +++ b/code/datums/brain_damage/mild.dm @@ -42,7 +42,11 @@ lose_text = "You feel smart again." /datum/brain_trauma/mild/dumbness/on_gain() +<<<<<<< HEAD owner.disabilities |= DUMB +======= + owner.add_disability(DISABILITY_DUMB, TRAUMA_DISABILITY) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind ..() /datum/brain_trauma/mild/dumbness/on_life() @@ -54,7 +58,11 @@ ..() /datum/brain_trauma/mild/dumbness/on_lose() +<<<<<<< HEAD owner.disabilities &= ~DUMB +======= + owner.remove_disability(DISABILITY_DUMB, TRAUMA_DISABILITY) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind owner.derpspeech = 0 ..() diff --git a/code/datums/brain_damage/phobia.dm b/code/datums/brain_damage/phobia.dm index 313b693436..08de389360 100644 --- a/code/datums/brain_damage/phobia.dm +++ b/code/datums/brain_damage/phobia.dm @@ -68,7 +68,11 @@ return /datum/brain_trauma/mild/phobia/on_hear(message, speaker, message_language, raw_message, radio_freq) +<<<<<<< HEAD if(owner.disabilities & DEAF || world.time < next_scare) //words can't trigger you if you can't hear them *taps head* +======= + if(owner.has_disability(DISABILITY_DEAF) || world.time < next_scare) //words can't trigger you if you can't hear them *taps head* +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind return message for(var/word in trigger_words) if(findtext(message, word)) diff --git a/code/datums/brain_damage/severe.dm b/code/datums/brain_damage/severe.dm index ceda917713..513b508924 100644 --- a/code/datums/brain_damage/severe.dm +++ b/code/datums/brain_damage/severe.dm @@ -12,6 +12,7 @@ lose_text = "You suddenly remember how to speak." /datum/brain_trauma/severe/mute/on_gain() +<<<<<<< HEAD owner.disabilities |= MUTE ..() @@ -23,6 +24,13 @@ /datum/brain_trauma/severe/mute/on_lose() owner.disabilities &= ~MUTE +======= + owner.add_disability(DISABILITY_MUTE, TRAUMA_DISABILITY) + ..() + +/datum/brain_trauma/severe/mute/on_lose() + owner.remove_disability(DISABILITY_MUTE, TRAUMA_DISABILITY) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind ..() /datum/brain_trauma/severe/aphasia @@ -132,7 +140,11 @@ stress -= 4 /datum/brain_trauma/severe/monophobia/proc/check_alone() +<<<<<<< HEAD if(owner.disabilities & BLIND) +======= + if(owner.has_disability(DISABILITY_BLIND)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind return TRUE for(var/mob/M in oview(owner, 7)) if(!isliving(M)) //ghosts ain't people @@ -194,11 +206,19 @@ lose_text = "You feel in control of your hands again." /datum/brain_trauma/severe/discoordination/on_gain() +<<<<<<< HEAD owner.disabilities |= MONKEYLIKE ..() /datum/brain_trauma/severe/discoordination/on_lose() owner.disabilities &= ~MONKEYLIKE +======= + owner.add_disability(DISABILITY_MONKEYLIKE, TRAUMA_DISABILITY) + ..() + +/datum/brain_trauma/severe/discoordination/on_lose() + owner.remove_disability(DISABILITY_MONKEYLIKE, TRAUMA_DISABILITY) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind ..() /datum/brain_trauma/severe/pacifism @@ -209,9 +229,17 @@ lose_text = "You no longer feel compelled to not harm." /datum/brain_trauma/severe/pacifism/on_gain() +<<<<<<< HEAD owner.disabilities |= PACIFISM ..() /datum/brain_trauma/severe/pacifism/on_lose() owner.disabilities &= ~PACIFISM +======= + owner.add_disability(DISABILITY_PACIFISM, TRAUMA_DISABILITY) + ..() + +/datum/brain_trauma/severe/pacifism/on_lose() + owner.remove_disability(DISABILITY_PACIFISM, TRAUMA_DISABILITY) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind ..() \ No newline at end of file diff --git a/code/datums/brain_damage/split_personality.dm b/code/datums/brain_damage/split_personality.dm index deed1c8406..adf10a3487 100644 --- a/code/datums/brain_damage/split_personality.dm +++ b/code/datums/brain_damage/split_personality.dm @@ -192,7 +192,11 @@ return //no random switching /datum/brain_trauma/severe/split_personality/brainwashing/on_hear(message, speaker, message_language, raw_message, radio_freq) +<<<<<<< HEAD if(owner.disabilities & DEAF || owner == speaker) +======= + if(owner.has_disability(DISABILITY_DEAF) || owner == speaker) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind return message if(findtext(message, codeword)) message = replacetext(message, codeword, "[codeword]") diff --git a/code/datums/diseases/advance/symptoms/vision.dm b/code/datums/diseases/advance/symptoms/vision.dm index 728dfa01d0..5a7b621556 100644 --- a/code/datums/diseases/advance/symptoms/vision.dm +++ b/code/datums/diseases/advance/symptoms/vision.dm @@ -61,7 +61,11 @@ Bonus M.become_nearsighted() if(prob(eyes.eye_damage - 10 + 1)) if(!remove_eyes) +<<<<<<< HEAD if(M.become_blind()) +======= + if(!M.has_disability(DISABILITY_BLIND)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind to_chat(M, "You go blind!") else M.visible_message("[M]'s eyes fall off their sockets!", "Your eyes fall off their sockets!") @@ -111,14 +115,22 @@ Bonus return switch(A.stage) if(4, 5) //basically oculine +<<<<<<< HEAD if(M.disabilities & BLIND) +======= + if(M.has_disability(DISABILITY_BLIND, EYE_DAMAGE)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind if(prob(20)) to_chat(M, "Your vision slowly returns...") M.cure_blind() M.cure_nearsighted() M.blur_eyes(35) +<<<<<<< HEAD else if(M.disabilities & NEARSIGHT) +======= + else if(M.has_disability(DISABILITY_NEARSIGHT, EYE_DAMAGE)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind to_chat(M, "The blackness in your peripheral vision fades.") M.cure_nearsighted() M.blur_eyes(10) diff --git a/code/datums/martial/sleeping_carp.dm b/code/datums/martial/sleeping_carp.dm index f3a1f53dd2..c636c4c495 100644 --- a/code/datums/martial/sleeping_carp.dm +++ b/code/datums/martial/sleeping_carp.dm @@ -197,7 +197,11 @@ /obj/item/twohanded/bostaff/attack(mob/target, mob/living/user) add_fingerprint(user) +<<<<<<< HEAD if((CLUMSY in user.disabilities) && prob(50)) +======= + if((user.has_disability(DISABILITY_CLUMSY)) && prob(50)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind to_chat(user, "You club yourself over the head with [src].") user.Knockdown(60) if(ishuman(user)) diff --git a/code/datums/mutations/body.dm b/code/datums/mutations/body.dm index 23b91add58..eb8d0b599d 100644 --- a/code/datums/mutations/body.dm +++ b/code/datums/mutations/body.dm @@ -85,12 +85,20 @@ /datum/mutation/human/clumsy/on_acquiring(mob/living/carbon/human/owner) if(..()) return +<<<<<<< HEAD owner.disabilities |= CLUMSY +======= + owner.add_disability(DISABILITY_CLUMSY, GENETIC_MUTATION) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind /datum/mutation/human/clumsy/on_losing(mob/living/carbon/human/owner) if(..()) return +<<<<<<< HEAD owner.disabilities &= ~CLUMSY +======= + owner.remove_disability(DISABILITY_CLUMSY, GENETIC_MUTATION) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind //Tourettes causes you to randomly stand in place and shout. @@ -124,12 +132,20 @@ /datum/mutation/human/deaf/on_acquiring(mob/living/carbon/human/owner) if(..()) return +<<<<<<< HEAD owner.disabilities |= DEAF +======= + owner.add_disability(DISABILITY_DEAF, GENETIC_MUTATION) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind /datum/mutation/human/deaf/on_losing(mob/living/carbon/human/owner) if(..()) return +<<<<<<< HEAD owner.disabilities &= ~DEAF +======= + owner.remove_disability(DISABILITY_DEAF, GENETIC_MUTATION) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind //Monified turns you into a monkey. diff --git a/code/datums/mutations/speech.dm b/code/datums/mutations/speech.dm index 3b4b38bbcc..a9110aa963 100644 --- a/code/datums/mutations/speech.dm +++ b/code/datums/mutations/speech.dm @@ -30,12 +30,20 @@ /datum/mutation/human/mute/on_acquiring(mob/living/carbon/human/owner) if(..()) return +<<<<<<< HEAD owner.disabilities |= MUTE +======= + owner.add_disability(DISABILITY_MUTE, GENETIC_MUTATION) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind /datum/mutation/human/mute/on_losing(mob/living/carbon/human/owner) if(..()) return +<<<<<<< HEAD owner.disabilities &= ~MUTE +======= + owner.remove_disability(DISABILITY_MUTE, GENETIC_MUTATION) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind /datum/mutation/human/smile diff --git a/code/game/gamemodes/changeling/powers/tiny_prick.dm b/code/game/gamemodes/changeling/powers/tiny_prick.dm index 4fdd84040e..4e3a9a1fb6 100644 --- a/code/game/gamemodes/changeling/powers/tiny_prick.dm +++ b/code/game/gamemodes/changeling/powers/tiny_prick.dm @@ -90,7 +90,11 @@ /obj/effect/proc_holder/changeling/sting/transformation/can_sting(mob/user, mob/living/carbon/target) if(!..()) return +<<<<<<< HEAD if((target.disabilities & HUSK) || !iscarbon(target) || (NOTRANSSTING in target.dna.species.species_traits)) +======= + if((target.has_disability(DISABILITY_HUSK)) || !iscarbon(target) || (NOTRANSSTING in target.dna.species.species_traits)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind to_chat(user, "Our sting appears ineffective against its DNA.") return 0 return 1 @@ -129,9 +133,17 @@ /obj/effect/proc_holder/changeling/sting/false_armblade/can_sting(mob/user, mob/target) if(!..()) return +<<<<<<< HEAD if((target.disabilities & HUSK) || !target.has_dna()) to_chat(user, "Our sting appears ineffective against its DNA.") return 0 +======= + if(isliving(target)) + var/mob/living/L = target + if((L.has_disability(DISABILITY_HUSK)) || !L.has_dna()) + to_chat(user, "Our sting appears ineffective against its DNA.") + return 0 +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind return 1 /obj/effect/proc_holder/changeling/sting/false_armblade/sting_action(mob/user, mob/target) diff --git a/code/game/gamemodes/clock_cult/clock_items/wraith_spectacles.dm b/code/game/gamemodes/clock_cult/clock_items/wraith_spectacles.dm index fc734ac426..ae1161be50 100644 --- a/code/game/gamemodes/clock_cult/clock_items/wraith_spectacles.dm +++ b/code/game/gamemodes/clock_cult/clock_items/wraith_spectacles.dm @@ -32,7 +32,11 @@ if(ishuman(loc)) var/mob/living/carbon/human/H = loc if(src == H.glasses && !up) +<<<<<<< HEAD if(H.disabilities & BLIND) +======= + if(H.has_disability(DISABILITY_BLIND)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind to_chat(H, "\"You're blind, idiot. Stop embarrassing yourself.\"") return if(blind_cultist(H)) @@ -76,7 +80,11 @@ ..() if(slot != slot_glasses || up) return +<<<<<<< HEAD if(user.disabilities & BLIND) +======= + if(user.has_disability(DISABILITY_BLIND)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind to_chat(user, "\"You're blind, idiot. Stop embarrassing yourself.\"" ) return if(blind_cultist(user)) //Cultists instantly go blind @@ -115,11 +123,19 @@ var/obj/item/clothing/glasses/wraith_spectacles/WS = L.glasses desc = "[glasses_right && !WS.up ? "":""]You are [glasses_right ? "":"not "]wearing wraith spectacles[glasses_right && !WS.up ? "!":"."]
\ You have taken [W.eye_damage_done] eye damage from them.
" +<<<<<<< HEAD if(L.disabilities & NEARSIGHT) desc += "You are nearsighted!
" else if(glasses_right && !WS.up) desc += "You will become nearsighted at [W.nearsight_breakpoint] eye damage.
" if(L.disabilities & BLIND) +======= + if(L.has_disability(DISABILITY_NEARSIGHT)) + desc += "You are nearsighted!
" + else if(glasses_right && !WS.up) + desc += "You will become nearsighted at [W.nearsight_breakpoint] eye damage.
" + if(L.has_disability(DISABILITY_BLIND)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind desc += "You are blind!" else if(glasses_right && !WS.up) desc += "You will become blind at [W.blind_breakpoint] eye damage." @@ -153,17 +169,29 @@ qdel(src) /datum/status_effect/wraith_spectacles/proc/apply_eye_damage(mob/living/carbon/human/H) +<<<<<<< HEAD if(H.disabilities & BLIND) +======= + if(H.has_disability(DISABILITY_BLIND)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind return H.adjust_eye_damage(0.5) eye_damage_done += 0.5 if(eye_damage_done >= 20) H.adjust_blurriness(2) if(eye_damage_done >= nearsight_breakpoint) +<<<<<<< HEAD if(H.become_nearsighted()) to_chat(H, "Your vision doubles, then trebles. Darkness begins to close in. You can't keep this up!") if(eye_damage_done >= blind_breakpoint) if(H.become_blind()) +======= + if(!H.has_disability(DISABILITY_NEARSIGHT)) + to_chat(H, "Your vision doubles, then trembles. Darkness begins to close in. You can't keep this up!") + H.become_nearsighted(EYE_DAMAGE) + if(eye_damage_done >= blind_breakpoint) + if(!H.has_disability(DISABILITY_BLIND)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind to_chat(H, "A piercing white light floods your vision. Suddenly, all goes dark!") if(prob(min(20, 5 + eye_damage_done))) to_chat(H, "Your eyes continue to burn.") diff --git a/code/game/gamemodes/clock_cult/clock_structures/ocular_warden.dm b/code/game/gamemodes/clock_cult/clock_structures/ocular_warden.dm index c7aea3df7e..07a8aac8ed 100644 --- a/code/game/gamemodes/clock_cult/clock_structures/ocular_warden.dm +++ b/code/game/gamemodes/clock_cult/clock_structures/ocular_warden.dm @@ -110,7 +110,11 @@ if(!(BI.resistance_flags & ON_FIRE)) BI.fire_act() continue +<<<<<<< HEAD if(is_servant_of_ratvar(L) || (L.disabilities & BLIND) || L.null_rod_check()) +======= + if(is_servant_of_ratvar(L) || (L.has_disability(DISABILITY_BLIND)) || L.null_rod_check()) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind continue if(L.stat || L.restrained() || L.buckled || L.lying) continue diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index ff85499029..32bbd06d33 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -115,7 +115,11 @@ structure_check() searches for nearby cultist structures required for the invoca continue if(ishuman(L)) var/mob/living/carbon/human/H = L +<<<<<<< HEAD if((H.disabilities & MUTE) || H.silent) +======= + if((H.has_disability(DISABILITY_MUTE)) || H.silent) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind continue if(L.stat) continue diff --git a/code/game/machinery/computer/cloning.dm b/code/game/machinery/computer/cloning.dm index 7814e05138..8f5afacd91 100644 --- a/code/game/machinery/computer/cloning.dm +++ b/code/game/machinery/computer/cloning.dm @@ -449,7 +449,11 @@ scantemp = "Subject's brain is not responding to scanning stimuli." playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0) return +<<<<<<< HEAD if((mob_occupant.disabilities & NOCLONE) && (src.scanner.scan_level < 2)) +======= + if((mob_occupant.has_disability(DISABILITY_NOCLONE)) && (src.scanner.scan_level < 2)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind scantemp = "Subject no longer contains the fundamental materials required to create a living clone." playsound(src, 'sound/machines/terminal_alert.ogg', 50, 0) return diff --git a/code/game/machinery/computer/dna_console.dm b/code/game/machinery/computer/dna_console.dm index 7bbd545981..189e5c65ad 100644 --- a/code/game/machinery/computer/dna_console.dm +++ b/code/game/machinery/computer/dna_console.dm @@ -81,7 +81,11 @@ if(connected && connected.is_operational()) if(connected.occupant) //set occupant_status message viable_occupant = connected.occupant +<<<<<<< HEAD if(viable_occupant.has_dna() && (!(RADIMMUNE in viable_occupant.dna.species.species_traits)) && (!(viable_occupant.disabilities & NOCLONE) || (connected.scan_level == 3))) //occupant is viable for dna modification +======= + if(viable_occupant.has_dna() && (!(RADIMMUNE in viable_occupant.dna.species.species_traits)) && (!(viable_occupant.has_disability(DISABILITY_NOCLONE)) || (connected.scan_level == 3))) //occupant is viable for dna modification +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind occupant_status += "[viable_occupant.name] => " switch(viable_occupant.stat) if(CONSCIOUS) @@ -528,7 +532,11 @@ var/mob/living/carbon/viable_occupant = null if(connected) viable_occupant = connected.occupant +<<<<<<< HEAD if(!istype(viable_occupant) || !viable_occupant.dna || (viable_occupant.disabilities & NOCLONE)) +======= + if(!istype(viable_occupant) || !viable_occupant.dna || (viable_occupant.has_disability(DISABILITY_NOCLONE))) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind viable_occupant = null return viable_occupant diff --git a/code/game/machinery/dna_scanner.dm b/code/game/machinery/dna_scanner.dm index d1189ff8b8..0fc1293a01 100644 --- a/code/game/machinery/dna_scanner.dm +++ b/code/game/machinery/dna_scanner.dm @@ -100,7 +100,11 @@ var/mob/living/mob_occupant = get_mob_or_brainmob(occupant) if(istype(mob_occupant)) if(locate_computer(/obj/machinery/computer/cloning)) +<<<<<<< HEAD if(!mob_occupant.suiciding && !(mob_occupant.disabilities & NOCLONE) && !mob_occupant.hellbound) +======= + if(!mob_occupant.suiciding && !(mob_occupant.has_disability(DISABILITY_NOCLONE)) && !mob_occupant.hellbound) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind mob_occupant.notify_ghost_cloning("Your corpse has been placed into a cloning scanner. Re-enter your corpse if you want to be cloned!", source = src) // DNA manipulators cannot operate on severed heads or brains diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 775c9dd894..42c5a13cbb 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -680,7 +680,11 @@ if(ishuman(user) && prob(40) && src.density) var/mob/living/carbon/human/H = user +<<<<<<< HEAD if((H.disabilities & DUMB) && Adjacent(user)) +======= + if((H.has_disability(DISABILITY_DUMB)) && Adjacent(user)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind playsound(src.loc, 'sound/effects/bang.ogg', 25, 1) if(!istype(H.head, /obj/item/clothing/head/helmet)) H.visible_message("[user] headbutts the airlock.", \ diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 823a91cead..623501ca8b 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -539,9 +539,15 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) M.adjust_blurriness(15) if(M.stat != DEAD) to_chat(M, "Your eyes start to bleed profusely!") +<<<<<<< HEAD if(!(M.disabilities & (NEARSIGHT | BLIND))) if(M.become_nearsighted()) to_chat(M, "You become nearsighted!") +======= + if(!(M.has_disability(DISABILITY_BLIND) || M.has_disability(DISABILITY_NEARSIGHT))) + to_chat(M, "You become nearsighted!") + M.become_nearsighted(EYE_DAMAGE) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind if(prob(50)) if(M.stat != DEAD) if(M.drop_all_held_items()) diff --git a/code/game/objects/items/defib.dm b/code/game/objects/items/defib.dm index 25fbb49c9b..3ad8d89606 100644 --- a/code/game/objects/items/defib.dm +++ b/code/game/objects/items/defib.dm @@ -393,7 +393,11 @@ /obj/item/twohanded/shockpaddles/proc/can_defib(mob/living/carbon/human/H) var/obj/item/organ/brain/BR = H.getorgan(/obj/item/organ/brain) +<<<<<<< HEAD return (!H.suiciding && !(H.disabilities & NOCLONE) && !H.hellbound && ((world.time - H.timeofdeath) < tlimit) && (H.getBruteLoss() < 180) && (H.getFireLoss() < 180) && H.getorgan(/obj/item/organ/heart) && BR && !BR.damaged_brain) +======= + return (!H.suiciding && !(H.has_disability(DISABILITY_NOCLONE)) && !H.hellbound && ((world.time - H.timeofdeath) < tlimit) && (H.getBruteLoss() < 180) && (H.getFireLoss() < 180) && H.getorgan(/obj/item/organ/heart) && BR && !BR.damaged_brain) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind /obj/item/twohanded/shockpaddles/proc/shock_touching(dmg, mob/H) if(isliving(H.pulledby)) //CLEAR! @@ -514,7 +518,11 @@ shock_touching(30, H) var/failed +<<<<<<< HEAD if (H.suiciding || (H.disabilities & NOCLONE)) +======= + if (H.suiciding || (H.has_disability(DISABILITY_NOCLONE))) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind failed = "[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Recovery of patient impossible. Further attempts futile." else if (H.hellbound) failed = "[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Patient's soul appears to be on another plane of existence. Further attempts futile." diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index f656d55afd..6f16b8b15b 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -48,7 +48,11 @@ add_fingerprint(user) if(istype(M) && on && user.zone_selected in list("eyes", "mouth")) +<<<<<<< HEAD if((user.disabilities & (CLUMSY | DUMB)) && prob(50)) //too dumb to use flashlight properly +======= + if((user.has_disability(DISABILITY_CLUMSY) || user.has_disability(DISABILITY_DUMB)) && prob(50)) //too dumb to use flashlight properly +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind return ..() //just hit them in the head if(!user.IsAdvancedToolUser()) @@ -82,7 +86,11 @@ else user.visible_message("[user] directs [src] to [M]'s eyes.", \ "You direct [src] to [M]'s eyes.") +<<<<<<< HEAD if(M.stat == DEAD || (M.disabilities & BLIND) || !M.flash_act(visual = 1)) //mob is dead or fully blind +======= + if(M.stat == DEAD || (M.has_disability(DISABILITY_BLIND)) || !M.flash_act(visual = 1)) //mob is dead or fully blind +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind to_chat(user, "[M]'s pupils don't react to the light!") else if(M.dna && M.dna.check_mutation(XRAY)) //mob has X-RAY vision to_chat(user, "[M]'s pupils give an eerie glow!") diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 9a60bb0edb..e9808b56b2 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -85,7 +85,11 @@ GAS ANALYZER /obj/item/device/healthanalyzer/attack(mob/living/M, mob/living/carbon/human/user) // Clumsiness/brain damage check +<<<<<<< HEAD if ((user.disabilities & (CLUMSY | DUMB)) && prob(50)) +======= + if ((user.has_disability(DISABILITY_CLUMSY) || user.has_disability(DISABILITY_DUMB)) && prob(50)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind to_chat(user, "You stupidly try to analyze the floor's vitals!") user.visible_message("[user] has analyzed the floor's vitals!") to_chat(user, "Analyzing results for The floor:\n\tOverall status: Healthy") @@ -181,9 +185,18 @@ GAS ANALYZER to_chat(user, "\t==EAR STATUS==") if(istype(ears)) var/healthy = TRUE +<<<<<<< HEAD if(C.disabilities & DEAF) healthy = FALSE to_chat(user, "\tSubject is genetically deaf.") +======= + if(C.has_disability(DISABILITY_DEAF, GENETIC_MUTATION)) + healthy = FALSE + to_chat(user, "\tSubject is genetically deaf.") + else if(C.has_disability(DISABILITY_DEAF)) + healthy = FALSE + to_chat(user, "\tSubject is deaf.") +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind else if(ears.ear_damage) to_chat(user, "\tSubject has [ears.ear_damage > UNHEALING_EAR_DAMAGE? "permanent ": "temporary "]hearing damage.") @@ -199,10 +212,17 @@ GAS ANALYZER to_chat(user, "\t==EYE STATUS==") if(istype(eyes)) var/healthy = TRUE +<<<<<<< HEAD if(C.disabilities & BLIND) to_chat(user, "\tSubject is blind.") healthy = FALSE if(C.disabilities & NEARSIGHT) +======= + if(C.has_disability(DISABILITY_BLIND)) + to_chat(user, "\tSubject is blind.") + healthy = FALSE + if(C.has_disability(DISABILITY_NEARSIGHT)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind to_chat(user, "\tSubject is nearsighted.") healthy = FALSE if(eyes.eye_damage > 30) diff --git a/code/game/objects/items/dna_injector.dm b/code/game/objects/items/dna_injector.dm index 9644d827ea..f23463e1b4 100644 --- a/code/game/objects/items/dna_injector.dm +++ b/code/game/objects/items/dna_injector.dm @@ -31,7 +31,11 @@ /obj/item/dnainjector/proc/inject(mob/living/carbon/M, mob/user) prepare() +<<<<<<< HEAD if(M.has_dna() && !(RADIMMUNE in M.dna.species.species_traits) && !(M.disabilities & NOCLONE)) +======= + if(M.has_dna() && !(RADIMMUNE in M.dna.species.species_traits) && !(M.has_disability(DISABILITY_NOCLONE))) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind M.radiation += rand(20/(damage_coeff ** 2),50/(damage_coeff ** 2)) var/log_msg = "[key_name(user)] injected [key_name(M)] with the [name]" for(var/datum/mutation/human/HM in remove_mutations) @@ -313,7 +317,11 @@ to_chat(user, "You can't modify [M]'s DNA while [M.p_theyre()] dead.") return FALSE +<<<<<<< HEAD if(M.has_dna() && !(M.disabilities & NOCLONE)) +======= + if(M.has_dna() && !(M.has_disability(DISABILITY_NOCLONE))) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind M.radiation += rand(20/(damage_coeff ** 2),50/(damage_coeff ** 2)) var/log_msg = "[key_name(user)] injected [key_name(M)] with the [name]" var/endtime = world.time+duration diff --git a/code/game/objects/items/grenades/grenade.dm b/code/game/objects/items/grenades/grenade.dm index e444ecce25..2af3f067da 100644 --- a/code/game/objects/items/grenades/grenade.dm +++ b/code/game/objects/items/grenades/grenade.dm @@ -24,7 +24,11 @@ qdel(src) /obj/item/grenade/proc/clown_check(mob/living/carbon/human/user) +<<<<<<< HEAD if(user.disabilities & CLUMSY && prob(50)) +======= + if(user.has_disability(DISABILITY_CLUMSY) && prob(50)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind to_chat(user, "Huh? How does this thing work?") preprime(user, 5, FALSE) return FALSE diff --git a/code/game/objects/items/handcuffs.dm b/code/game/objects/items/handcuffs.dm index 886a248c8c..ee129b308a 100644 --- a/code/game/objects/items/handcuffs.dm +++ b/code/game/objects/items/handcuffs.dm @@ -26,7 +26,11 @@ /obj/item/restraints/handcuffs/attack(mob/living/carbon/C, mob/living/carbon/human/user) if(!istype(C)) return +<<<<<<< HEAD if(user.disabilities & CLUMSY && prob(50)) +======= + if(user.has_disability(DISABILITY_CLUMSY) && prob(50)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind to_chat(user, "Uh... how do those things work?!") apply_cuffs(user,user) return diff --git a/code/game/objects/items/kitchen.dm b/code/game/objects/items/kitchen.dm index 5a8fcda09b..ec25bcbd5e 100644 --- a/code/game/objects/items/kitchen.dm +++ b/code/game/objects/items/kitchen.dm @@ -44,7 +44,11 @@ forkload = null else if(user.zone_selected == "eyes") +<<<<<<< HEAD if(user.disabilities & CLUMSY && prob(50)) +======= + if(user.has_disability(DISABILITY_CLUMSY) && prob(50)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind M = user return eyestab(M,user) else @@ -70,7 +74,11 @@ /obj/item/kitchen/knife/attack(mob/living/carbon/M, mob/living/carbon/user) if(user.zone_selected == "eyes") +<<<<<<< HEAD if(user.disabilities & CLUMSY && prob(50)) +======= + if(user.has_disability(DISABILITY_CLUMSY) && prob(50)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind M = user return eyestab(M,user) else diff --git a/code/game/objects/items/melee/misc.dm b/code/game/objects/items/melee/misc.dm index 6e21251b6e..f389624a10 100644 --- a/code/game/objects/items/melee/misc.dm +++ b/code/game/objects/items/melee/misc.dm @@ -99,7 +99,11 @@ return ..() add_fingerprint(user) +<<<<<<< HEAD if((CLUMSY in user.disabilities) && prob(50)) +======= + if((user.has_disability(DISABILITY_CLUMSY)) && prob(50)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind to_chat(user, "You club yourself over the head.") user.Knockdown(60 * force) if(ishuman(user)) diff --git a/code/game/objects/items/melee/transforming.dm b/code/game/objects/items/melee/transforming.dm index b63c5bcefa..34214f9ea1 100644 --- a/code/game/objects/items/melee/transforming.dm +++ b/code/game/objects/items/melee/transforming.dm @@ -72,6 +72,10 @@ to_chat(user, "[src] [active ? "is now active":"can now be concealed"].") /obj/item/melee/transforming/proc/clumsy_transform_effect(mob/living/user) +<<<<<<< HEAD if(user.disabilities & CLUMSY && prob(50)) +======= + if(user.has_disability(DISABILITY_CLUMSY) && prob(50)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind to_chat(user, "You accidentally cut yourself with [src], like a doofus!") user.take_bodypart_damage(5,5) diff --git a/code/game/objects/items/pneumaticCannon.dm b/code/game/objects/items/pneumaticCannon.dm index 8baeee3550..33184f22ca 100644 --- a/code/game/objects/items/pneumaticCannon.dm +++ b/code/game/objects/items/pneumaticCannon.dm @@ -147,9 +147,16 @@ if(tank && !tank.air_contents.remove(gasPerThrow * pressureSetting)) to_chat(user, "\The [src] lets out a weak hiss and doesn't react!") return +<<<<<<< HEAD if(user.disabilities & CLUMSY && prob(75) && clumsyCheck) user.visible_message("[user] loses their grip on [src], causing it to go off!", "[src] slips out of your hands and goes off!") user.dropItemToGround(src, TRUE) +======= + if(user.has_disability(DISABILITY_CLUMSY) && prob(75) && clumsyCheck && iscarbon(user)) + var/mob/living/carbon/C = user + C.visible_message("[C] loses their grip on [src], causing it to go off!", "[src] slips out of your hands and goes off!") + C.dropItemToGround(src, TRUE) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind if(prob(10)) target = get_turf(user) else diff --git a/code/game/objects/items/shields.dm b/code/game/objects/items/shields.dm index 57306f498c..1f23812098 100644 --- a/code/game/objects/items/shields.dm +++ b/code/game/objects/items/shields.dm @@ -1,3 +1,4 @@ +<<<<<<< HEAD /obj/item/shield name = "shield" block_chance = 50 @@ -140,3 +141,147 @@ slot_flags = null to_chat(user, "[src] can now be concealed.") add_fingerprint(user) +======= +/obj/item/shield + name = "shield" + block_chance = 50 + armor = list(melee = 50, bullet = 50, laser = 50, energy = 0, bomb = 30, bio = 0, rad = 0, fire = 80, acid = 70) + +/obj/item/shield/riot + name = "riot shield" + desc = "A shield adept at blocking blunt objects from connecting with the torso of the shield wielder." + icon = 'icons/obj/items_and_weapons.dmi' + icon_state = "riot" + lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi' + slot_flags = SLOT_BACK + force = 10 + throwforce = 5 + throw_speed = 2 + throw_range = 3 + w_class = WEIGHT_CLASS_BULKY + materials = list(MAT_GLASS=7500, MAT_METAL=1000) + attack_verb = list("shoved", "bashed") + var/cooldown = 0 //shield bash cooldown. based on world.time + + +/obj/item/shield/riot/attackby(obj/item/W, mob/user, params) + if(istype(W, /obj/item/melee/baton)) + if(cooldown < world.time - 25) + user.visible_message("[user] bashes [src] with [W]!") + playsound(user.loc, 'sound/effects/shieldbash.ogg', 50, 1) + cooldown = world.time + else + return ..() + +/obj/item/shield/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK) + if(attack_type == THROWN_PROJECTILE_ATTACK) + final_block_chance += 30 + if(attack_type == LEAP_ATTACK) + final_block_chance = 100 + return ..() + +/obj/item/shield/riot/roman + name = "roman shield" + desc = "Bears an inscription on the inside: \"Romanes venio domus\"." + icon_state = "roman_shield" + item_state = "roman_shield" + lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi' + +/obj/item/shield/riot/buckler + name = "wooden buckler" + desc = "A medieval wooden buckler." + icon_state = "buckler" + item_state = "buckler" + lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi' + materials = list() + resistance_flags = FLAMMABLE + block_chance = 30 + +/obj/item/shield/energy + name = "energy combat shield" + desc = "A shield capable of stopping most melee attacks. Protects user from almost all energy projectiles. It can be retracted, expanded, and stored anywhere." + icon = 'icons/obj/items_and_weapons.dmi' + icon_state = "eshield0" // eshield1 for expanded + lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi' + force = 3 + throwforce = 3 + throw_speed = 3 + throw_range = 5 + w_class = WEIGHT_CLASS_TINY + attack_verb = list("shoved", "bashed") + var/active = 0 + +/obj/item/shield/energy/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK) + return 0 + +/obj/item/shield/energy/IsReflect() + return (active) + +/obj/item/shield/energy/attack_self(mob/living/carbon/human/user) + if(user.has_disability(DISABILITY_CLUMSY) && prob(50)) + to_chat(user, "You beat yourself in the head with [src].") + user.take_bodypart_damage(5) + active = !active + icon_state = "eshield[active]" + + if(active) + force = 10 + throwforce = 8 + throw_speed = 2 + w_class = WEIGHT_CLASS_BULKY + playsound(user, 'sound/weapons/saberon.ogg', 35, 1) + to_chat(user, "[src] is now active.") + else + force = 3 + throwforce = 3 + throw_speed = 3 + w_class = WEIGHT_CLASS_TINY + playsound(user, 'sound/weapons/saberoff.ogg', 35, 1) + to_chat(user, "[src] can now be concealed.") + add_fingerprint(user) + +/obj/item/shield/riot/tele + name = "telescopic shield" + desc = "An advanced riot shield made of lightweight materials that collapses for easy storage." + icon = 'icons/obj/items_and_weapons.dmi' + icon_state = "teleriot0" + lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi' + slot_flags = null + force = 3 + throwforce = 3 + throw_speed = 3 + throw_range = 4 + w_class = WEIGHT_CLASS_NORMAL + var/active = 0 + +/obj/item/shield/riot/tele/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK) + if(active) + return ..() + return 0 + +/obj/item/shield/riot/tele/attack_self(mob/living/user) + active = !active + icon_state = "teleriot[active]" + playsound(src.loc, 'sound/weapons/batonextend.ogg', 50, 1) + + if(active) + force = 8 + throwforce = 5 + throw_speed = 2 + w_class = WEIGHT_CLASS_BULKY + slot_flags = SLOT_BACK + to_chat(user, "You extend \the [src].") + else + force = 3 + throwforce = 3 + throw_speed = 3 + w_class = WEIGHT_CLASS_NORMAL + slot_flags = null + to_chat(user, "[src] can now be concealed.") + add_fingerprint(user) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind diff --git a/code/game/objects/items/storage/book.dm b/code/game/objects/items/storage/book.dm index ef04fc48f5..a56442032e 100644 --- a/code/game/objects/items/storage/book.dm +++ b/code/game/objects/items/storage/book.dm @@ -94,7 +94,11 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "bible", to_chat(user, "You don't have the dexterity to do this!") return +<<<<<<< HEAD if (user.disabilities & CLUMSY && prob(50)) +======= + if (user.has_disability(DISABILITY_CLUMSY) && prob(50)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind to_chat(user, "[src] slips out of your hand and hits your head.") user.take_bodypart_damage(10) user.Unconscious(400) diff --git a/code/game/objects/items/stunbaton.dm b/code/game/objects/items/stunbaton.dm index ab82f92c2d..66f3e39c0a 100644 --- a/code/game/objects/items/stunbaton.dm +++ b/code/game/objects/items/stunbaton.dm @@ -108,7 +108,11 @@ add_fingerprint(user) /obj/item/melee/baton/attack(mob/M, mob/living/carbon/human/user) +<<<<<<< HEAD if(status && user.disabilities & CLUMSY && prob(50)) +======= + if(status && user.has_disability(DISABILITY_CLUMSY) && prob(50)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind user.visible_message("[user] accidentally hits themself with [src]!", \ "You accidentally hit yourself with [src]!") user.Knockdown(stunforce*3) diff --git a/code/game/objects/items/teleprod.dm b/code/game/objects/items/teleprod.dm index 92e7a8e9ba..b69ed980eb 100644 --- a/code/game/objects/items/teleprod.dm +++ b/code/game/objects/items/teleprod.dm @@ -8,7 +8,11 @@ /obj/item/melee/baton/cattleprod/teleprod/attack(mob/living/carbon/M, mob/living/carbon/user)//handles making things teleport when hit ..() +<<<<<<< HEAD if(status && user.disabilities & CLUMSY && prob(50)) +======= + if(status && user.has_disability(DISABILITY_CLUMSY) && prob(50)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind user.visible_message("[user] accidentally hits themself with [src]!", \ "You accidentally hit yourself with [src]!") if(do_teleport(user, get_turf(user), 50))//honk honk diff --git a/code/game/objects/items/tools/screwdriver.dm b/code/game/objects/items/tools/screwdriver.dm index 08f22b7e46..06a6a2ea76 100644 --- a/code/game/objects/items/tools/screwdriver.dm +++ b/code/game/objects/items/tools/screwdriver.dm @@ -75,7 +75,11 @@ return ..() if(user.zone_selected != "eyes" && user.zone_selected != "head") return ..() +<<<<<<< HEAD if(user.disabilities & CLUMSY && prob(50)) +======= + if(user.has_disability(DISABILITY_CLUMSY) && prob(50)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind M = user return eyestab(M,user) diff --git a/code/game/objects/items/twohanded.dm b/code/game/objects/items/twohanded.dm index 58758668c3..35f25739ca 100644 --- a/code/game/objects/items/twohanded.dm +++ b/code/game/objects/items/twohanded.dm @@ -302,7 +302,11 @@ unwield() return ..() +<<<<<<< HEAD if(user.disabilities & CLUMSY && (wielded) && prob(40)) +======= + if(user.has_disability(DISABILITY_CLUMSY) && (wielded) && prob(40)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind impale(user) return if((wielded) && prob(50)) diff --git a/code/game/objects/structures/petrified_statue.dm b/code/game/objects/structures/petrified_statue.dm index 36233bc155..2368836dec 100644 --- a/code/game/objects/structures/petrified_statue.dm +++ b/code/game/objects/structures/petrified_statue.dm @@ -17,7 +17,11 @@ L.buckled.unbuckle_mob(L,force=1) L.visible_message("[L]'s skin rapidly turns to marble!", "Your body freezes up! Can't... move... can't... think...") L.forceMove(src) +<<<<<<< HEAD L.disabilities |= MUTE +======= + L.add_disability(DISABILITY_MUTE, STATUE_MUTE) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind L.faction += "mimic" //Stops mimics from instaqdeling people in statues L.status_flags |= GODMODE obj_integrity = L.health + 100 //stoning damaged mobs will result in easier to shatter statues @@ -59,7 +63,11 @@ if(petrified_mob) petrified_mob.status_flags &= ~GODMODE petrified_mob.forceMove(loc) +<<<<<<< HEAD petrified_mob.disabilities &= ~MUTE +======= + petrified_mob.remove_disability(DISABILITY_MUTE, STATUE_MUTE) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind petrified_mob.take_overall_damage((petrified_mob.health - obj_integrity + 100)) //any new damage the statue incurred is transfered to the mob petrified_mob.faction -= "mimic" petrified_mob = null diff --git a/code/modules/assembly/flash.dm b/code/modules/assembly/flash.dm index 81f2c75660..fd41569047 100644 --- a/code/modules/assembly/flash.dm +++ b/code/modules/assembly/flash.dm @@ -30,7 +30,11 @@ holder.update_icon() /obj/item/device/assembly/flash/proc/clown_check(mob/living/carbon/human/user) +<<<<<<< HEAD if(user.disabilities & CLUMSY && prob(50)) +======= + if(user.has_disability(DISABILITY_CLUMSY) && prob(50)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind flash_carbon(user, user, 15, 0) return 0 return 1 diff --git a/code/modules/assembly/mousetrap.dm b/code/modules/assembly/mousetrap.dm index e8ee742e56..fd9b71710d 100644 --- a/code/modules/assembly/mousetrap.dm +++ b/code/modules/assembly/mousetrap.dm @@ -1,3 +1,4 @@ +<<<<<<< HEAD /obj/item/device/assembly/mousetrap name = "mousetrap" desc = "A handy little spring-loaded trap for catching pesty rodents." @@ -140,3 +141,147 @@ /obj/item/device/assembly/mousetrap/armed icon_state = "mousetraparmed" armed = TRUE +======= +/obj/item/device/assembly/mousetrap + name = "mousetrap" + desc = "A handy little spring-loaded trap for catching pesty rodents." + icon_state = "mousetrap" + materials = list(MAT_METAL=100) + attachable = 1 + var/armed = 0 + + +/obj/item/device/assembly/mousetrap/examine(mob/user) + ..() + if(armed) + to_chat(user, "The mousetrap is armed!") + else + to_chat(user, "The mousetrap is not armed.") + +/obj/item/device/assembly/mousetrap/activate() + if(..()) + armed = !armed + if(!armed) + if(ishuman(usr)) + var/mob/living/carbon/human/user = usr + if((user.has_disability(DISABILITY_DUMB) || user.has_disability(DISABILITY_CLUMSY)) && prob(50)) + to_chat(user, "Your hand slips, setting off the trigger!") + pulse(0) + update_icon() + if(usr) + playsound(usr.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -3) + +/obj/item/device/assembly/mousetrap/describe() + return "The pressure switch is [armed?"primed":"safe"]." + +/obj/item/device/assembly/mousetrap/update_icon() + if(armed) + icon_state = "mousetraparmed" + else + icon_state = "mousetrap" + if(holder) + holder.update_icon() + +/obj/item/device/assembly/mousetrap/proc/triggered(mob/target, type = "feet") + if(!armed) + return + var/obj/item/bodypart/affecting = null + if(ishuman(target)) + var/mob/living/carbon/human/H = target + if(PIERCEIMMUNE in H.dna.species.species_traits) + playsound(src.loc, 'sound/effects/snap.ogg', 50, 1) + armed = 0 + update_icon() + pulse(0) + return 0 + switch(type) + if("feet") + if(!H.shoes) + affecting = H.get_bodypart(pick("l_leg", "r_leg")) + H.Knockdown(60) + if("l_hand", "r_hand") + if(!H.gloves) + affecting = H.get_bodypart(type) + H.Stun(60) + if(affecting) + if(affecting.receive_damage(1, 0)) + H.update_damage_overlays() + else if(ismouse(target)) + var/mob/living/simple_animal/mouse/M = target + visible_message("SPLAT!") + M.splat() + playsound(src.loc, 'sound/effects/snap.ogg', 50, 1) + armed = 0 + update_icon() + pulse(0) + + +/obj/item/device/assembly/mousetrap/attack_self(mob/living/carbon/human/user) + if(!armed) + to_chat(user, "You arm [src].") + else + if((user.has_disability(DISABILITY_DUMB) || user.has_disability(DISABILITY_CLUMSY)) && prob(50)) + var/which_hand = "l_hand" + if(!(user.active_hand_index % 2)) + which_hand = "r_hand" + triggered(user, which_hand) + user.visible_message("[user] accidentally sets off [src], breaking their fingers.", \ + "You accidentally trigger [src]!") + return + to_chat(user, "You disarm [src].") + armed = !armed + update_icon() + playsound(user.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -3) + + +/obj/item/device/assembly/mousetrap/attack_hand(mob/living/carbon/human/user) + if(armed) + if((user.has_disability(DISABILITY_DUMB) || user.has_disability(DISABILITY_CLUMSY)) && prob(50)) + var/which_hand = "l_hand" + if(!(user.active_hand_index % 2)) + which_hand = "r_hand" + triggered(user, which_hand) + user.visible_message("[user] accidentally sets off [src], breaking their fingers.", \ + "You accidentally trigger [src]!") + return + ..() + + +/obj/item/device/assembly/mousetrap/Crossed(atom/movable/AM as mob|obj) + if(armed) + if(ismob(AM)) + var/mob/MM = AM + if(!(MM.movement_type & FLYING)) + if(ishuman(AM)) + var/mob/living/carbon/H = AM + if(H.m_intent == MOVE_INTENT_RUN) + triggered(H) + H.visible_message("[H] accidentally steps on [src].", \ + "You accidentally step on [src]") + else if(ismouse(MM)) + triggered(MM) + else if(AM.density) // For mousetrap grenades, set off by anything heavy + triggered(AM) + ..() + + +/obj/item/device/assembly/mousetrap/on_found(mob/finder) + if(armed) + finder.visible_message("[finder] accidentally sets off [src], breaking their fingers.", \ + "You accidentally trigger [src]!") + triggered(finder, (finder.active_hand_index % 2 == 0) ? "r_hand" : "l_hand") + return 1 //end the search! + return 0 + + +/obj/item/device/assembly/mousetrap/hitby(A as mob|obj) + if(!armed) + return ..() + visible_message("[src] is triggered by [A].") + triggered(null) + + +/obj/item/device/assembly/mousetrap/armed + icon_state = "mousetraparmed" + armed = 1 +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind diff --git a/code/modules/clothing/glasses/_glasses.dm b/code/modules/clothing/glasses/_glasses.dm index 29990a299b..070a57c167 100644 --- a/code/modules/clothing/glasses/_glasses.dm +++ b/code/modules/clothing/glasses/_glasses.dm @@ -41,7 +41,11 @@ /obj/item/clothing/glasses/proc/thermal_overload() if(ishuman(src.loc)) var/mob/living/carbon/human/H = src.loc +<<<<<<< HEAD if(!(H.disabilities & BLIND)) +======= + if(!(H.has_disability(DISABILITY_BLIND))) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind if(H.glasses == src) to_chat(H, "[src] overloads and blinds you!") H.flash_act(visual = 1) diff --git a/code/modules/events/disease_outbreak.dm b/code/modules/events/disease_outbreak.dm index d83c966ff6..08a14e96f7 100644 --- a/code/modules/events/disease_outbreak.dm +++ b/code/modules/events/disease_outbreak.dm @@ -51,7 +51,11 @@ var/datum/disease/D if(!advanced_virus) if(virus_type == /datum/disease/dnaspread) //Dnaspread needs strain_data set to work. +<<<<<<< HEAD if(!H.dna || (H.disabilities & BLIND)) //A blindness disease would be the worst. +======= + if(!H.dna || (H.has_disability(DISABILITY_BLIND))) //A blindness disease would be the worst. +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind continue D = new virus_type() var/datum/disease/dnaspread/DS = D diff --git a/code/modules/hydroponics/gene_modder.dm b/code/modules/hydroponics/gene_modder.dm index 87c860b50e..bb349b7d19 100644 --- a/code/modules/hydroponics/gene_modder.dm +++ b/code/modules/hydroponics/gene_modder.dm @@ -45,7 +45,7 @@ min_wrate = FLOOR(10-wratemod,1) // 7,5,2,0 Clamps at 0 and 10 You want this low min_wchance = 67-(ML.rating*16) // 48,35,19,3 Clamps at 0 and 67 You want this low for(var/obj/item/circuitboard/machine/plantgenes/vaultcheck in component_parts) - if(istype(vaultcheck, /obj/item/circuitboard/machine/plantgenes/vault)) // DUMB BOTANY TUTS + if(istype(vaultcheck, /obj/item/circuitboard/machine/plantgenes/vault)) // DISABILITY_DUMB BOTANY TUTS max_potency = 100 max_yield = 10 min_production = 1 diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm index 01d6de85e2..c96302a871 100644 --- a/code/modules/mining/lavaland/necropolis_chests.dm +++ b/code/modules/mining/lavaland/necropolis_chests.dm @@ -656,7 +656,11 @@ playsound(user, 'sound/magic/clockwork/fellowship_armory.ogg', 35, TRUE, frequency = 90000 - (active * 30000)) /obj/item/melee/transforming/cleaving_saw/clumsy_transform_effect(mob/living/user) +<<<<<<< HEAD if(user.disabilities & CLUMSY && prob(50)) +======= + if(user.has_disability(DISABILITY_CLUMSY) && prob(50)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind to_chat(user, "You accidentally cut yourself with [src], like a doofus!") user.take_bodypart_damage(10) diff --git a/code/modules/mob/living/blood.dm b/code/modules/mob/living/blood.dm index 45f26d55c3..50e733a07c 100644 --- a/code/modules/mob/living/blood.dm +++ b/code/modules/mob/living/blood.dm @@ -16,7 +16,11 @@ /mob/living/carbon/monkey/handle_blood() +<<<<<<< HEAD if(bodytemperature >= 225 && !(disabilities & NOCLONE)) //cryosleep or husked people do not pump the blood. +======= + if(bodytemperature >= 225 && !(has_disability(DISABILITY_NOCLONE))) //cryosleep or husked people do not pump the blood. +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind //Blood regeneration if there is some space if(blood_volume < BLOOD_VOLUME_NORMAL) blood_volume += 0.1 // regenerate blood VERY slowly @@ -28,7 +32,11 @@ bleed_rate = 0 return +<<<<<<< HEAD if(bodytemperature >= 225 && !(disabilities & NOCLONE)) //cryosleep or husked people do not pump the blood. +======= + if(bodytemperature >= 225 && !(has_disability(DISABILITY_NOCLONE))) //cryosleep or husked people do not pump the blood. +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind //Blood regeneration if there is some space if(blood_volume < BLOOD_VOLUME_NORMAL && !(NOHUNGER in dna.species.species_traits)) @@ -201,13 +209,21 @@ return "blood" /mob/living/carbon/monkey/get_blood_id() +<<<<<<< HEAD if(!(disabilities & NOCLONE)) +======= + if(!(has_disability(DISABILITY_NOCLONE))) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind return "blood" /mob/living/carbon/human/get_blood_id() if(dna.species.exotic_blood) return dna.species.exotic_blood +<<<<<<< HEAD else if((NOBLOOD in dna.species.species_traits) || (disabilities & NOCLONE)) +======= + else if((NOBLOOD in dna.species.species_traits) || (has_disability(DISABILITY_NOCLONE))) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind return return "blood" diff --git a/code/modules/mob/living/brain/brain_item.dm b/code/modules/mob/living/brain/brain_item.dm index aef5489b04..cf3d351ab8 100644 --- a/code/modules/mob/living/brain/brain_item.dm +++ b/code/modules/mob/living/brain/brain_item.dm @@ -79,8 +79,13 @@ if(!brainmob.stored_dna) brainmob.stored_dna = new /datum/dna/stored(brainmob) C.dna.copy_dna(brainmob.stored_dna) +<<<<<<< HEAD if(L.disabilities & NOCLONE) brainmob.disabilities |= NOCLONE //This is so you can't just decapitate a husked guy and clone them without needing to get a new body +======= + if(L.has_disability(DISABILITY_NOCLONE)) + brainmob.disabilities[DISABILITY_NOCLONE] = L.disabilities[DISABILITY_NOCLONE] +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind var/obj/item/organ/zombie_infection/ZI = L.getorganslot(ORGAN_SLOT_ZOMBIE) if(ZI) brainmob.set_species(ZI.old_species) //For if the brain is cloned diff --git a/code/modules/mob/living/brain/status_procs.dm b/code/modules/mob/living/brain/status_procs.dm index 2baea2e7cd..735a0186bf 100644 --- a/code/modules/mob/living/brain/status_procs.dm +++ b/code/modules/mob/living/brain/status_procs.dm @@ -1,6 +1,6 @@ //Here are the procs used to modify status effects of a mob. //The effects include: stun, knockdown, unconscious, sleeping, resting, jitteriness, dizziness -// eye damage, eye_blind, eye_blurry, druggy, BLIND disability, and NEARSIGHT disability. +// eye damage, eye_blind, eye_blurry, druggy, DISABILITY_BLIND disability, and DISABILITY_NEARSIGHT disability. /////////////////////////////////// EYE_BLIND //////////////////////////////////// diff --git a/code/modules/mob/living/carbon/alien/status_procs.dm b/code/modules/mob/living/carbon/alien/status_procs.dm index 33ba8fea1d..86b7f3508c 100644 --- a/code/modules/mob/living/carbon/alien/status_procs.dm +++ b/code/modules/mob/living/carbon/alien/status_procs.dm @@ -1,6 +1,6 @@ //Here are the procs used to modify status effects of a mob. //The effects include: stun, knockdown, unconscious, sleeping, resting, jitteriness, dizziness, ear damage, -// eye damage, eye_blind, eye_blurry, druggy, BLIND disability, and NEARSIGHT disability. +// eye damage, eye_blind, eye_blurry, druggy, DISABILITY_BLIND disability, and DISABILITY_NEARSIGHT disability. /////////////////////////////////// STUN //////////////////////////////////// diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 819ed8072f..5e2ce2c1c9 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -157,7 +157,11 @@ if(!throwable_mob.buckled) thrown_thing = throwable_mob stop_pulling() +<<<<<<< HEAD if(disabilities & PACIFISM) +======= + if(has_disability(DISABILITY_PACIFISM)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind to_chat(src, "You gently let go of [throwable_mob].") var/turf/start_T = get_turf(loc) //Get the start and target tile for the descriptors var/turf/end_T = get_turf(target) @@ -170,7 +174,11 @@ thrown_thing = I dropItemToGround(I) +<<<<<<< HEAD if(disabilities & PACIFISM && I.throwforce) +======= + if(has_disability(DISABILITY_PACIFISM) && I.throwforce) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind to_chat(src, "You set [I] down gently on the ground.") return @@ -409,7 +417,11 @@ dropItemToGround(I) var/modifier = 0 +<<<<<<< HEAD if(disabilities & CLUMSY) +======= + if(has_disability(DISABILITY_CLUMSY)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind modifier -= 40 //Clumsy people are more likely to hit themselves -Honk! switch(rand(1,100)+modifier) //91-100=Nothing special happens @@ -774,7 +786,7 @@ reagents.addiction_list = list() cure_all_traumas(TRUE, TRUE) ..() - // heal ears after healing disabilities, since ears check DEAF disability + // heal ears after healing disabilities, since ears check DISABILITY_DEAF disability // when healing. restoreEars() diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm index 0bfa287a09..7b96428621 100644 --- a/code/modules/mob/living/carbon/carbon_defense.dm +++ b/code/modules/mob/living/carbon/carbon_defense.dm @@ -306,10 +306,18 @@ if(eyes.eye_damage > 20) if(prob(eyes.eye_damage - 20)) +<<<<<<< HEAD if(become_nearsighted()) +======= + if(!has_disability(DISABILITY_NEARSIGHT)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind to_chat(src, "Your eyes start to burn badly!") else if(prob(eyes.eye_damage - 25)) +<<<<<<< HEAD if(become_blind()) +======= + if(!has_disability(DISABILITY_BLIND)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind to_chat(src, "You can't see anything!") else to_chat(src, "Your eyes are really starting to hurt. This can't be good for you!") diff --git a/code/modules/mob/living/carbon/examine.dm b/code/modules/mob/living/carbon/examine.dm index b8d9d510fd..03285f4d57 100644 --- a/code/modules/mob/living/carbon/examine.dm +++ b/code/modules/mob/living/carbon/examine.dm @@ -70,7 +70,11 @@ else msg += "[t_He] [t_is] severely deformed!\n" +<<<<<<< HEAD if(disabilities & DUMB) +======= + if(has_disability(DISABILITY_DUMB)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind msg += "[t_He] seem[p_s()] to be clumsy and unable to think.\n" if(fire_stacks > 0) diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm index 4b1afe0780..3c6c1d076e 100644 --- a/code/modules/mob/living/carbon/human/death.dm +++ b/code/modules/mob/living/carbon/human/death.dm @@ -48,7 +48,12 @@ /mob/living/carbon/proc/Drain() +<<<<<<< HEAD become_husk() disabilities |= NOCLONE +======= + become_husk(CHANGELING_DRAIN) + add_disability(DISABILITY_NOCLONE, CHANGELING_DRAIN) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind blood_volume = 0 return 1 diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 39caec803b..fae9d41569 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -285,7 +285,11 @@ if(stat == UNCONSCIOUS) msg += "[t_He] [t_is]n't responding to anything around [t_him] and seem[p_s()] to be asleep.\n" else +<<<<<<< HEAD if(disabilities & DUMB) +======= + if(has_disability(DISABILITY_DUMB)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind msg += "[t_He] [t_has] a stupid expression on [t_his] face.\n" if(InCritical()) msg += "[t_He] [t_is] barely conscious.\n" diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index e3e1271132..1ba1995265 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -140,8 +140,13 @@ return ..() /mob/living/carbon/human/grabbedby(mob/living/carbon/user, supress_message = 0) +<<<<<<< HEAD if(user == src && pulling && !pulling.anchored && grab_state >= GRAB_AGGRESSIVE && isliving(pulling)) vore_attack(user, pulling) +======= + if(user == src && pulling && !pulling.anchored && grab_state >= GRAB_AGGRESSIVE && (has_disability(DISABILITY_FAT)) && ismonkey(pulling)) + devour_mob(pulling) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind else ..() diff --git a/code/modules/mob/living/carbon/human/human_helpers.dm b/code/modules/mob/living/carbon/human/human_helpers.dm index d1d657652b..3384dac1b6 100644 --- a/code/modules/mob/living/carbon/human/human_helpers.dm +++ b/code/modules/mob/living/carbon/human/human_helpers.dm @@ -103,7 +103,11 @@ /mob/living/carbon/human/IsAdvancedToolUser() +<<<<<<< HEAD if(disabilities & MONKEYLIKE) +======= + if(has_disability(DISABILITY_MONKEYLIKE)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind return FALSE return TRUE//Humans can use guns and such diff --git a/code/modules/mob/living/carbon/human/interactive.dm b/code/modules/mob/living/carbon/human/interactive.dm index 38dfad5787..7f42e1dcb9 100644 --- a/code/modules/mob/living/carbon/human/interactive.dm +++ b/code/modules/mob/living/carbon/human/interactive.dm @@ -339,7 +339,11 @@ if(TRAITS & TRAIT_SMART) smartness = 75 else if(TRAITS & TRAIT_DUMB) +<<<<<<< HEAD disabilities |= CLUMSY +======= + add_disability(DISABILITY_CLUMSY, GENETIC_MUTATION) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind smartness = 25 if(TRAITS & TRAIT_MEAN) diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index 4f41c2d40c..e44303b937 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -187,7 +187,11 @@ if(G.tint) update_tint() if(G.vision_correction) +<<<<<<< HEAD if(disabilities & NEARSIGHT) +======= + if(has_disability(DISABILITY_NEARSIGHT)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind overlay_fullscreen("nearsighted", /obj/screen/fullscreen/impaired, 1) adjust_eye_damage(0) if(G.vision_flags || G.darkness_view || G.invis_override || G.invis_view || !isnull(G.lighting_alpha)) diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 866c14242f..5e8402f1fa 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -312,7 +312,11 @@ GLOBAL_LIST_EMPTY(roundstart_races) if(!HD) //Decapitated return +<<<<<<< HEAD if(H.disabilities & HUSK) +======= + if(H.has_disability(DISABILITY_HUSK)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind return var/datum/sprite_accessory/S var/list/standing = list() @@ -453,7 +457,11 @@ GLOBAL_LIST_EMPTY(roundstart_races) var/obj/item/bodypart/head/HD = H.get_bodypart("head") +<<<<<<< HEAD if(HD && !(H.disabilities & HUSK)) +======= + if(HD && !(H.has_disability(DISABILITY_HUSK))) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind // lipstick if(H.lip_style && (LIPS in species_traits)) var/mutable_appearance/lip_overlay = mutable_appearance('icons/mob/human_face.dmi', "lips_[H.lip_style]", -BODY_LAYER) @@ -724,7 +732,11 @@ GLOBAL_LIST_EMPTY(roundstart_races) if(S.center) accessory_overlay = center_image(accessory_overlay, S.dimension_x, S.dimension_y) +<<<<<<< HEAD if(!(H.disabilities & HUSK)) +======= + if(!(H.has_disability(DISABILITY_HUSK))) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind if(!forced_colour) switch(S.color_src) if(MUTCOLORS) @@ -1102,17 +1114,29 @@ GLOBAL_LIST_EMPTY(roundstart_races) /datum/species/proc/handle_digestion(mob/living/carbon/human/H) +<<<<<<< HEAD //The fucking FAT mutation is the dumbest shit ever. It makes the code so difficult to work with if(H.disabilities & FAT)//I share your pain, past coder. if(H.overeatduration < 100) to_chat(H, "You feel fit again!") H.disabilities &= ~FAT +======= + //The fucking DISABILITY_FAT mutation is the dumbest shit ever. It makes the code so difficult to work with + if(H.has_disability(DISABILITY_FAT))//I share your pain, past coder. + if(H.overeatduration < 100) + to_chat(H, "You feel fit again!") + H.remove_disability(DISABILITY_FAT, OBESITY) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind H.update_inv_w_uniform() H.update_inv_wear_suit() else if(H.overeatduration > 500) to_chat(H, "You suddenly feel blubbery!") +<<<<<<< HEAD H.disabilities |= FAT +======= + H.add_disability(DISABILITY_FAT, OBESITY) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind H.update_inv_w_uniform() H.update_inv_wear_suit() @@ -1269,7 +1293,11 @@ GLOBAL_LIST_EMPTY(roundstart_races) . += (health_deficiency / 25) if((hungry >= 70) && !flight) //Being hungry won't stop you from using flightpack controls/flapping your wings although it probably will in the wing case but who cares. . += hungry / 50 +<<<<<<< HEAD if(H.disabilities & FAT) +======= + if(H.has_disability(DISABILITY_FAT)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind . += (1.5 - flight) if(H.bodytemperature < BODYTEMP_COLD_DAMAGE_LIMIT) . += (BODYTEMP_COLD_DAMAGE_LIMIT - H.bodytemperature) / COLD_SLOWDOWN_FACTOR @@ -1315,7 +1343,11 @@ GLOBAL_LIST_EMPTY(roundstart_races) /datum/species/proc/harm(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style) +<<<<<<< HEAD if(user.disabilities & PACIFISM) +======= + if(user.has_disability(DISABILITY_PACIFISM)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind to_chat(user, "You don't want to harm [target]!") return FALSE if(target.check_block()) @@ -1388,7 +1420,7 @@ GLOBAL_LIST_EMPTY(roundstart_races) return 1 else user.do_attack_animation(target, ATTACK_EFFECT_DISARM) - + if(target.w_uniform) target.w_uniform.add_fingerprint(user) var/randomized_zone = ran_zone(user.zone_selected) diff --git a/code/modules/mob/living/carbon/human/species_types/golems.dm b/code/modules/mob/living/carbon/human/species_types/golems.dm index 2b86d2945d..cd343953eb 100644 --- a/code/modules/mob/living/carbon/human/species_types/golems.dm +++ b/code/modules/mob/living/carbon/human/species_types/golems.dm @@ -725,7 +725,11 @@ /obj/structure/cloth_pile/proc/revive() if(QDELETED(src) || QDELETED(cloth_golem)) //QDELETED also checks for null, so if no cloth golem is set this won't runtime return +<<<<<<< HEAD if(cloth_golem.suiciding || cloth_golem.disabilities & NOCLONE) +======= + if(cloth_golem.suiciding || cloth_golem.has_disability(DISABILITY_NOCLONE)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind QDEL_NULL(cloth_golem) return diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 7264e9ad95..5c4e92dd9d 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -609,7 +609,11 @@ generate/load female uniform sprites matching all previously decided variables if(BP.dmg_overlay_type) . += "-[BP.dmg_overlay_type]" +<<<<<<< HEAD if(disabilities & HUSK) +======= + if(has_disability(DISABILITY_HUSK)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind . += "-husk" /mob/living/carbon/human/load_limb_from_cache() diff --git a/code/modules/mob/living/carbon/monkey/combat.dm b/code/modules/mob/living/carbon/monkey/combat.dm index 09d00465ee..db60922f13 100644 --- a/code/modules/mob/living/carbon/monkey/combat.dm +++ b/code/modules/mob/living/carbon/monkey/combat.dm @@ -122,7 +122,11 @@ if(L == src) return FALSE +<<<<<<< HEAD if(disabilities & PACIFISM) +======= + if(has_disability(DISABILITY_PACIFISM)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind return FALSE if(enemies[L]) diff --git a/code/modules/mob/living/carbon/monkey/update_icons.dm b/code/modules/mob/living/carbon/monkey/update_icons.dm index 5a4ba686b2..9cd99fde8a 100644 --- a/code/modules/mob/living/carbon/monkey/update_icons.dm +++ b/code/modules/mob/living/carbon/monkey/update_icons.dm @@ -19,7 +19,11 @@ if(!HD) //Decapitated return +<<<<<<< HEAD if(disabilities & HUSK) +======= + if(has_disability(DISABILITY_HUSK)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind return var/hair_hidden = 0 diff --git a/code/modules/mob/living/carbon/status_procs.dm b/code/modules/mob/living/carbon/status_procs.dm index 7c40b6f144..e0743e2815 100644 --- a/code/modules/mob/living/carbon/status_procs.dm +++ b/code/modules/mob/living/carbon/status_procs.dm @@ -1,6 +1,6 @@ //Here are the procs used to modify status effects of a mob. //The effects include: stun, knockdown, unconscious, sleeping, resting, jitteriness, dizziness, ear damage, -// eye damage, eye_blind, eye_blurry, druggy, BLIND disability, NEARSIGHT disability, and HUSK disability. +// eye damage, eye_blind, eye_blurry, druggy, DISABILITY_BLIND disability, DISABILITY_NEARSIGHT disability, and DISABILITY_HUSK disability. /mob/living/carbon/damage_eyes(amount) var/obj/item/organ/eyes/eyes = getorganslot(ORGAN_SLOT_EYES) diff --git a/code/modules/mob/living/carbon/update_icons.dm b/code/modules/mob/living/carbon/update_icons.dm index 701fa0c7bc..2e65814d56 100644 --- a/code/modules/mob/living/carbon/update_icons.dm +++ b/code/modules/mob/living/carbon/update_icons.dm @@ -290,7 +290,11 @@ else . += "-robotic" +<<<<<<< HEAD if(disabilities & HUSK) +======= + if(has_disability(DISABILITY_HUSK)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind . += "-husk" diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm index 3ae022cdcc..1450d05e2b 100644 --- a/code/modules/mob/living/life.dm +++ b/code/modules/mob/living/life.dm @@ -126,7 +126,11 @@ /mob/living/proc/handle_disabilities() //Eyes if(eye_blind) //blindness, heals slowly over time +<<<<<<< HEAD if(!stat && !(disabilities & BLIND)) +======= + if(!stat && !(has_disability(DISABILITY_BLIND))) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind eye_blind = max(eye_blind-1,0) if(client && !eye_blind) clear_alert("blind") @@ -137,7 +141,11 @@ eye_blurry = max(eye_blurry-1, 0) if(client && !eye_blurry) clear_fullscreen("blurry") +<<<<<<< HEAD if(disabilities & PACIFISM && a_intent == INTENT_HARM) +======= + if(has_disability(DISABILITY_PACIFISM) && a_intent == INTENT_HARM) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind to_chat(src, "You don't feel like harming anybody.") a_intent_change(INTENT_HELP) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index fbc8e85eb4..9bdd419bca 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -819,7 +819,11 @@ if(G.trigger_guard != TRIGGER_GUARD_ALLOW_ALL && !IsAdvancedToolUser()) to_chat(src, "You don't have the dexterity to do this!") return FALSE +<<<<<<< HEAD if(disabilities & PACIFISM) +======= + if(has_disability(DISABILITY_PACIFISM)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind to_chat(src, "You don't want to risk harming anyone!") return FALSE return TRUE diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index ed07313862..f096f3b6fd 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -136,7 +136,11 @@ to_chat(user, "[src] can't be grabbed more aggressively!") return FALSE +<<<<<<< HEAD if(user.disabilities & PACIFISM) +======= + if(user.has_disability(DISABILITY_PACIFISM)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind to_chat(user, "You don't want to risk hurting [src]!") return FALSE @@ -193,7 +197,11 @@ M.Feedstop() return // can't attack while eating! +<<<<<<< HEAD if(disabilities & PACIFISM) +======= + if(has_disability(DISABILITY_PACIFISM)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind to_chat(M, "You don't want to hurt anyone!") return FALSE @@ -210,7 +218,11 @@ M.visible_message("\The [M] [M.friendly] [src]!") return FALSE else +<<<<<<< HEAD if(M.disabilities & PACIFISM) +======= + if(M.has_disability(DISABILITY_PACIFISM)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind to_chat(M, "You don't want to hurt anyone!") return FALSE @@ -229,7 +241,11 @@ return FALSE if (M.a_intent == INTENT_HARM) +<<<<<<< HEAD if(M.disabilities & PACIFISM) +======= + if(M.has_disability(DISABILITY_PACIFISM)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind to_chat(M, "You don't want to hurt anyone!") return FALSE @@ -255,7 +271,11 @@ return FALSE else +<<<<<<< HEAD if(L.disabilities & PACIFISM) +======= + if(L.has_disability(DISABILITY_PACIFISM)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind to_chat(L, "You don't want to hurt anyone!") return @@ -280,7 +300,11 @@ grabbedby(M) return FALSE if("harm") +<<<<<<< HEAD if(M.disabilities & PACIFISM) +======= + if(M.has_disability(DISABILITY_PACIFISM)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind to_chat(M, "You don't want to hurt anyone!") return FALSE M.do_attack_animation(src) @@ -370,7 +394,11 @@ //called when the mob receives a bright flash /mob/living/proc/flash_act(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, type = /obj/screen/fullscreen/flash) +<<<<<<< HEAD if(get_eye_protection() < intensity && (override_blindness_check || !(disabilities & BLIND))) +======= + if(get_eye_protection() < intensity && (override_blindness_check || !(has_disability(DISABILITY_BLIND)))) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind overlay_fullscreen("flash", type) addtimer(CALLBACK(src, .proc/clear_fullscreen, "flash", 25), 25) return 1 diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index b1d0484086..a8227c41bc 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -135,11 +135,17 @@ GLOBAL_LIST_INIT(department_radio_keys, list( // AIs use inherent channels for the holopad. Most inherent channels // ignore the language argument however. +<<<<<<< HEAD var/datum/saymode/SM = SSradio.saymodes[key] if(key && SM) if(!SM.handle_message(src, message, language) && !message_mode) return +======= + var/datum/saymode/SM = SSradio.saymodes[talk_key] + if(SM && !SM.handle_message(src, message, language)) + return +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind if(!can_speak_vocal(message)) to_chat(src, "You find yourself unable to speak!") @@ -285,7 +291,11 @@ GLOBAL_LIST_INIT(department_radio_keys, list( return 1 /mob/living/proc/can_speak_vocal(message) //Check AFTER handling of xeno and ling channels +<<<<<<< HEAD if(disabilities & MUTE) +======= + if(has_disability(DISABILITY_MUTE)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind return 0 if(is_muzzled()) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm index d47385efc3..45363c9691 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm @@ -558,7 +558,11 @@ Difficulty: Very Hard H.regenerate_limbs() H.regenerate_organs() H.revive(1,0) +<<<<<<< HEAD H.disabilities |= NOCLONE //Free revives, but significantly limits your options for reviving except via the crystal +======= + H.add_disability(DISABILITY_NOCLONE, MAGIC_DISABILITY) //Free revives, but significantly limits your options for reviving except via the crystal +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind H.grab_ghost(force = TRUE) /obj/machinery/anomalous_crystal/helpers //Lets ghost spawn as helpful creatures that can only heal people slightly. Incredibly fragile and they can't converse with humans @@ -719,7 +723,11 @@ Difficulty: Very Hard if(isliving(A) && holder_animal) var/mob/living/L = A L.notransform = 1 +<<<<<<< HEAD L.disabilities |= MUTE +======= + L.add_disability(DISABILITY_MUTE, STASIS_MUTE) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind L.status_flags |= GODMODE L.mind.transfer_to(holder_animal) var/obj/effect/proc_holder/spell/targeted/exit_possession/P = new /obj/effect/proc_holder/spell/targeted/exit_possession @@ -729,7 +737,11 @@ Difficulty: Very Hard /obj/structure/closet/stasis/dump_contents(var/kill = 1) STOP_PROCESSING(SSobj, src) for(var/mob/living/L in src) +<<<<<<< HEAD L.disabilities &= ~MUTE +======= + L.remove_disability(DISABILITY_MUTE, STASIS_MUTE) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind L.status_flags &= ~GODMODE L.notransform = 0 if(holder_animal) diff --git a/code/modules/mob/living/status_procs.dm b/code/modules/mob/living/status_procs.dm index 3d50f03e17..a109859222 100644 --- a/code/modules/mob/living/status_procs.dm +++ b/code/modules/mob/living/status_procs.dm @@ -1,6 +1,6 @@ //Here are the procs used to modify status effects of a mob. //The effects include: stun, knockdown, unconscious, sleeping, resting, jitteriness, dizziness, -// eye damage, eye_blind, eye_blurry, druggy, BLIND disability, and NEARSIGHT disability. +// eye damage, eye_blind, eye_blurry, druggy, DISABILITY_BLIND disability, and DISABILITY_NEARSIGHT disability. ////////////////////////////// STUN //////////////////////////////////// @@ -137,3 +137,82 @@ to_chat(src, "[priority_absorb_key["self_message"]]") priority_absorb_key["stuns_absorbed"] += amount return TRUE +<<<<<<< HEAD +======= + +/////////////////////////////////// DISABILITIES //////////////////////////////////// + +/mob/living/proc/add_disability(disability, source) + if(!disabilities[disability]) + disabilities[disability] = list(source) + else + disabilities[disability] |= list(source) + +/mob/living/proc/remove_disability(disability, list/sources) + if(!disabilities[disability]) + return + + if(!islist(sources)) + sources = list(sources) + + if(LAZYLEN(sources)) + for(var/S in sources) + if(S in disabilities[disability]) + disabilities[disability] -= S + else + disabilities[disability] = list() + + if(!LAZYLEN(disabilities[disability])) + disabilities -= disability + +/mob/living/proc/has_disability(disability, list/sources) + if(!disabilities[disability]) + return FALSE + + . = FALSE + + if(LAZYLEN(sources)) + for(var/S in sources) + if(S in disabilities[disability]) + return TRUE + else + if(LAZYLEN(disabilities[disability])) + return TRUE + +/mob/living/proc/remove_all_disabilities() + disabilities = list() + +/////////////////////////////////// DISABILITY PROCS //////////////////////////////////// + +/mob/living/proc/cure_blind(list/sources) + remove_disability(DISABILITY_BLIND, sources) + if(!has_disability(DISABILITY_BLIND)) + adjust_blindness(-1) + +/mob/living/proc/become_blind(source) + if(!has_disability(DISABILITY_BLIND)) + blind_eyes(1) + add_disability(DISABILITY_BLIND, source) + +/mob/living/proc/cure_nearsighted(list/sources) + remove_disability(DISABILITY_NEARSIGHT, sources) + if(!has_disability(DISABILITY_NEARSIGHT)) + clear_fullscreen("nearsighted") + +/mob/living/proc/become_nearsighted(source) + if(!has_disability(DISABILITY_NEARSIGHT)) + overlay_fullscreen("nearsighted", /obj/screen/fullscreen/impaired, 1) + add_disability(DISABILITY_NEARSIGHT, source) + +/mob/living/proc/cure_husk(list/sources) + remove_disability(DISABILITY_HUSK, sources) + if(!has_disability(DISABILITY_HUSK)) + status_flags &= ~DISFIGURED + update_body() + +/mob/living/proc/become_husk(source) + if(!has_disability(DISABILITY_HUSK)) + status_flags |= DISFIGURED //makes them unknown + update_body() + add_disability(DISABILITY_HUSK, source) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind diff --git a/code/modules/mob/status_procs.dm b/code/modules/mob/status_procs.dm index 80ab6929d5..039c5ca951 100644 --- a/code/modules/mob/status_procs.dm +++ b/code/modules/mob/status_procs.dm @@ -1,7 +1,7 @@ //Here are the procs used to modify status effects of a mob. //The effects include: stun, knockdown, unconscious, sleeping, resting, jitteriness, dizziness, ear damage, -// eye damage, eye_blind, eye_blurry, druggy, BLIND disability, and NEARSIGHT disability. +// eye damage, eye_blind, eye_blurry, druggy, DISABILITY_BLIND disability, and DISABILITY_NEARSIGHT disability. /////////////////////////////////// STUN //////////////////////////////////// @@ -162,6 +162,13 @@ var/blind_minimum = 0 if((stat != CONSCIOUS && stat != SOFT_CRIT) || (disabilities & BLIND)) blind_minimum = 1 +<<<<<<< HEAD +======= + if(isliving(src)) + var/mob/living/L = src + if(L.has_disability(DISABILITY_BLIND)) + blind_minimum = 1 +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind eye_blind = max(eye_blind+amount, blind_minimum) if(!eye_blind) clear_alert("blind") @@ -179,6 +186,13 @@ var/blind_minimum = 0 if((stat != CONSCIOUS && stat != SOFT_CRIT) || (disabilities & BLIND)) blind_minimum = 1 +<<<<<<< HEAD +======= + if(isliving(src)) + var/mob/living/L = src + if(L.has_disability(DISABILITY_BLIND)) + blind_minimum = 1 +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind eye_blind = blind_minimum if(!eye_blind) clear_alert("blind") diff --git a/code/modules/paperwork/contract.dm b/code/modules/paperwork/contract.dm index 3f23b8ba22..4d27f920db 100644 --- a/code/modules/paperwork/contract.dm +++ b/code/modules/paperwork/contract.dm @@ -202,7 +202,11 @@ if(!user.mind.hasSoul) to_chat(user, "You do not possess a soul.") return 0 +<<<<<<< HEAD if(user.disabilities & DUMB) +======= + if(user.has_disability(DISABILITY_DUMB)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind to_chat(user, "You quickly scrawl 'your name' on the contract.") signIncorrectly() return 0 diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index 1fb1846f4c..5e4e4744de 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -93,7 +93,11 @@ return if(ishuman(usr)) var/mob/living/carbon/human/H = usr +<<<<<<< HEAD if(H.disabilities & CLUMSY && prob(25)) +======= + if(H.has_disability(DISABILITY_CLUMSY) && prob(25)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind to_chat(H, "You cut yourself on the paper! Ahhhh! Ahhhhh!") H.damageoverlaytemp = 9001 H.update_damage_hud() @@ -317,7 +321,11 @@ to_chat(user, "You stamp the paper with your rubber stamp.") if(P.is_hot()) +<<<<<<< HEAD if(user.disabilities & CLUMSY && prob(10)) +======= + if(user.has_disability(DISABILITY_CLUMSY) && prob(10)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind user.visible_message("[user] accidentally ignites themselves!", \ "You miss the paper and accidentally light yourself on fire!") user.dropItemToGround(P) diff --git a/code/modules/paperwork/paperplane.dm b/code/modules/paperwork/paperplane.dm index 2d5fcc6e3a..f74643d2f1 100644 --- a/code/modules/paperwork/paperplane.dm +++ b/code/modules/paperwork/paperplane.dm @@ -65,7 +65,11 @@ update_icon() else if(P.is_hot()) +<<<<<<< HEAD if(user.disabilities & CLUMSY && prob(10)) +======= + if(user.has_disability(DISABILITY_CLUMSY) && prob(10)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind user.visible_message("[user] accidentally ignites themselves!", \ "You miss [src] and accidentally light yourself on fire!") user.dropItemToGround(P) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index ff7ed7653e..d3f915907c 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -155,10 +155,14 @@ return - //Exclude lasertag guns from the CLUMSY check. + //Exclude lasertag guns from the DISABILITY_CLUMSY check. if(clumsy_check) if(istype(user)) +<<<<<<< HEAD if (user.disabilities & CLUMSY && prob(40)) +======= + if (user.has_disability(DISABILITY_CLUMSY) && prob(40)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind to_chat(user, "You shoot yourself in the foot with [src]!") var/shot_leg = pick("l_leg", "r_leg") process_fire(user,user,0,params, zone_override = shot_leg) diff --git a/code/modules/projectiles/guns/ballistic/revolver.dm b/code/modules/projectiles/guns/ballistic/revolver.dm index 563b3d9ad5..8637928867 100644 --- a/code/modules/projectiles/guns/ballistic/revolver.dm +++ b/code/modules/projectiles/guns/ballistic/revolver.dm @@ -349,7 +349,11 @@ clumsy_check = 0 /obj/item/gun/ballistic/revolver/reverse/can_trigger_gun(mob/living/user) +<<<<<<< HEAD if((user.disabilities & CLUMSY) || (user.mind && user.mind.assigned_role == "Clown")) +======= + if((user.has_disability(DISABILITY_CLUMSY)) || (user.mind && user.mind.assigned_role == "Clown")) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind return ..() if(process_fire(user, user, 0, zone_override = "head")) user.visible_message("[user] somehow manages to shoot [user.p_them()]self in the face!", "You somehow shoot yourself in the face! How the hell?!") diff --git a/code/modules/projectiles/pins.dm b/code/modules/projectiles/pins.dm index faf7de9010..40ea23291e 100644 --- a/code/modules/projectiles/pins.dm +++ b/code/modules/projectiles/pins.dm @@ -129,7 +129,11 @@ // A gun with ultra-honk pin is useful for clown and useless for everyone else. /obj/item/device/firing_pin/clown/ultra/pin_auth(mob/living/user) playsound(src.loc, 'sound/items/bikehorn.ogg', 50, 1) +<<<<<<< HEAD if(!(user.disabilities & CLUMSY) && !(user.mind && user.mind.assigned_role == "Clown")) +======= + if(!(user.has_disability(DISABILITY_CLUMSY)) && !(user.mind && user.mind.assigned_role == "Clown")) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind return 0 return 1 diff --git a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm index ddb08db032..52a7f4cd10 100644 --- a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm @@ -667,14 +667,22 @@ var/obj/item/organ/eyes/eyes = M.getorganslot(ORGAN_SLOT_EYES) if (!eyes) return +<<<<<<< HEAD if(M.disabilities & BLIND) +======= + if(M.has_disability(DISABILITY_BLIND, EYE_DAMAGE)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind if(prob(20)) to_chat(M, "Your vision slowly returns...") M.cure_blind() M.cure_nearsighted() M.blur_eyes(35) +<<<<<<< HEAD else if(M.disabilities & NEARSIGHT) +======= + else if(M.has_disability(DISABILITY_NEARSIGHT, EYE_DAMAGE)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind to_chat(M, "The blackness in your peripheral vision fades.") M.cure_nearsighted() M.blur_eyes(10) @@ -765,7 +773,11 @@ M.visible_message("[M]'s body convulses a bit, and then falls still once more.") return M.visible_message("[M]'s body convulses a bit.") +<<<<<<< HEAD if(!M.suiciding && !(M.disabilities & NOCLONE) && !M.hellbound) +======= + if(!M.suiciding && !(M.has_disability(DISABILITY_NOCLONE)) && !M.hellbound) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind if(!M) return if(M.notify_ghost_cloning(source = M)) diff --git a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm index 7bee2ef958..e6771d7db5 100644 --- a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm @@ -141,7 +141,11 @@ taste_description = "mint" /datum/reagent/toxin/minttoxin/on_mob_life(mob/living/M) +<<<<<<< HEAD if(M.disabilities & FAT) +======= + if(M.has_disability(DISABILITY_FAT)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind M.gib() return ..() diff --git a/code/modules/spells/spell_types/construct_spells.dm b/code/modules/spells/spell_types/construct_spells.dm index ca6a534ee0..ba3104976e 100644 --- a/code/modules/spells/spell_types/construct_spells.dm +++ b/code/modules/spells/spell_types/construct_spells.dm @@ -214,7 +214,13 @@ target.bodytemperature -= 200 /obj/effect/proc_holder/spell/targeted/abyssal_gaze/proc/cure_blindness(mob/target) +<<<<<<< HEAD target.adjust_blindness(-5) +======= + if(isliving(target)) + var/mob/living/L = target + L.cure_blind(DISABILITY_BLIND, "abyssal_gaze") +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind /obj/effect/proc_holder/spell/targeted/dominate name = "Dominate" diff --git a/code/modules/surgery/bodyparts/bodyparts.dm b/code/modules/surgery/bodyparts/bodyparts.dm index 790942d897..6cffe0a939 100644 --- a/code/modules/surgery/bodyparts/bodyparts.dm +++ b/code/modules/surgery/bodyparts/bodyparts.dm @@ -217,7 +217,11 @@ C = owner no_update = 0 +<<<<<<< HEAD if(C.disabilities & HUSK) +======= + if(C.has_disability(DISABILITY_HUSK)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind species_id = "husk" //overrides species_id dmg_overlay_type = "" //no damage overlay shown when husked should_draw_gender = FALSE diff --git a/code/modules/surgery/bodyparts/head.dm b/code/modules/surgery/bodyparts/head.dm index f631400bee..8d96f03338 100644 --- a/code/modules/surgery/bodyparts/head.dm +++ b/code/modules/surgery/bodyparts/head.dm @@ -61,7 +61,11 @@ C = owner real_name = C.real_name +<<<<<<< HEAD if(C.disabilities & HUSK) +======= + if(C.has_disability(DISABILITY_HUSK)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind real_name = "Unknown" hair_style = "Bald" facial_hair_style = "Shaved" diff --git a/code/modules/surgery/lipoplasty.dm b/code/modules/surgery/lipoplasty.dm index 488f2e81b1..d156df8ea0 100644 --- a/code/modules/surgery/lipoplasty.dm +++ b/code/modules/surgery/lipoplasty.dm @@ -4,7 +4,11 @@ possible_locs = list("chest") /datum/surgery/lipoplasty/can_start(mob/user, mob/living/carbon/target) +<<<<<<< HEAD if(target.disabilities & FAT) +======= + if(target.has_disability(DISABILITY_FAT)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind return 1 return 0 diff --git a/code/modules/surgery/organs/ears.dm b/code/modules/surgery/organs/ears.dm index 98b2a84ac0..028b4ed5f1 100644 --- a/code/modules/surgery/organs/ears.dm +++ b/code/modules/surgery/organs/ears.dm @@ -25,7 +25,11 @@ return var/mob/living/carbon/C = owner // genetic deafness prevents the body from using the ears, even if healthy +<<<<<<< HEAD if(C.disabilities & DEAF) +======= + if(C.has_disability(DISABILITY_DEAF)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind deaf = max(deaf, 1) else if(C.ears && (C.ears.flags_2 & HEALS_EARS_2)) @@ -42,7 +46,11 @@ var/mob/living/carbon/C = owner +<<<<<<< HEAD if(iscarbon(owner) && C.disabilities & DEAF) +======= + if(iscarbon(owner) && C.has_disability(DISABILITY_DEAF)) +>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind deaf = 1 /obj/item/organ/ears/proc/adjustEarDamage(ddmg, ddeaf)