save point - a lot of shit to fix

This commit is contained in:
LetterJay
2017-12-27 07:03:40 -06:00
39 changed files with 11 additions and 588 deletions
-14
View File
@@ -10,19 +10,6 @@
//mob disabilities stat
<<<<<<< HEAD
#define BLIND 1
#define MUTE 2
#define DEAF 4
#define NEARSIGHT 8
#define FAT 32
#define HUSK 64
#define NOCLONE 128
#define CLUMSY 256
#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"
@@ -45,7 +32,6 @@
#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
+1 -4
View File
@@ -58,11 +58,8 @@
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)
+1 -4
View File
@@ -223,11 +223,8 @@
if(verbose)
to_chat(user, "<span class='warning'>[target] is not compatible with our biology.</span>")
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, "<span class='warning'>DNA of [target] is ruined beyond usability!</span>")
return
-8
View File
@@ -42,11 +42,7 @@
lose_text = "<span class='notice'>You feel smart again.</span>"
/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()
@@ -58,11 +54,7 @@
..()
/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
..()
-4
View File
@@ -68,11 +68,7 @@
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))
-34
View File
@@ -12,25 +12,11 @@
lose_text = "<span class='notice'>You suddenly remember how to speak.</span>"
/datum/brain_trauma/severe/mute/on_gain()
<<<<<<< HEAD
owner.disabilities |= MUTE
..()
//no fiddling with genetics to get out of this one
/datum/brain_trauma/severe/mute/on_life()
if(!(owner.disabilities & MUTE))
on_gain()
..()
/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
@@ -140,11 +126,7 @@
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
@@ -206,19 +188,11 @@
lose_text = "<span class='notice'>You feel in control of your hands again.</span>"
/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
@@ -229,17 +203,9 @@
lose_text = "<span class='notice'>You no longer feel compelled to not harm.</span>"
/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
..()
@@ -192,11 +192,7 @@
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, "<span class='warning'>[codeword]</span>")
@@ -61,11 +61,7 @@ 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, "<span class='userdanger'>You go blind!</span>")
else
M.visible_message("<span class='warning'>[M]'s eyes fall off their sockets!</span>", "<span class='userdanger'>Your eyes fall off their sockets!</span>")
@@ -115,26 +111,16 @@ 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, "<span class='warning'>Your vision slowly returns...</span>")
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, "<span class='warning'>The blackness in your peripheral vision fades.</span>")
M.cure_nearsighted()
M.blur_eyes(10)
else if(M.eye_blind || M.eye_blurry)
M.set_blindness(0)
M.set_blurriness(0)
-4
View File
@@ -197,11 +197,7 @@
/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, "<span class ='warning'>You club yourself over the head with [src].</span>")
user.Knockdown(60)
if(ishuman(user))
-16
View File
@@ -85,20 +85,12 @@
/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.
@@ -132,20 +124,12 @@
/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.
-8
View File
@@ -30,20 +30,12 @@
/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
@@ -20,7 +20,7 @@
to_chat(user, "<span class='notice'>We prepare our sting, use alt+click or middle mouse button on target to sting them.</span>")
var/datum/antagonist/changeling/changeling = user.mind.has_antag_datum(/datum/antagonist/changeling)
changeling.chosen_sting = src
user.hud_used.lingstingdisplay.icon_state = sting_icon
user.hud_used.lingstingdisplay.invisibility = 0
@@ -28,7 +28,7 @@
to_chat(user, "<span class='warning'>We retract our sting, we can't sting anyone for now.</span>")
var/datum/antagonist/changeling/changeling = user.mind.has_antag_datum(/datum/antagonist/changeling)
changeling.chosen_sting = null
user.hud_used.lingstingdisplay.icon_state = null
user.hud_used.lingstingdisplay.invisibility = INVISIBILITY_ABSTRACT
@@ -90,11 +90,7 @@
/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, "<span class='warning'>Our sting appears ineffective against its DNA.</span>")
return 0
return 1
@@ -133,17 +129,11 @@
/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, "<span class='warning'>Our sting appears ineffective against its DNA.</span>")
return 0
=======
if(isliving(target))
var/mob/living/L = target
if((L.has_disability(DISABILITY_HUSK)) || !L.has_dna())
to_chat(user, "<span class='warning'>Our sting appears ineffective against its DNA.</span>")
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)
@@ -32,11 +32,7 @@
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, "<span class='heavy_brass'>\"You're blind, idiot. Stop embarrassing yourself.\"</span>")
return
if(blind_cultist(H))
@@ -80,11 +76,7 @@
..()
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, "<span class='heavy_brass'>\"You're blind, idiot. Stop embarrassing yourself.\"</span>" )
return
if(blind_cultist(user)) //Cultists instantly go blind
@@ -123,19 +115,11 @@
var/obj/item/clothing/glasses/wraith_spectacles/WS = L.glasses
desc = "[glasses_right && !WS.up ? "<font color=#DAAA18><b>":""]You are [glasses_right ? "":"not "]wearing wraith spectacles[glasses_right && !WS.up ? "!</b></font>":"."]<br>\
You have taken <font color=#DAAA18><b>[W.eye_damage_done]</b></font> eye damage from them.<br>"
<<<<<<< HEAD
if(L.disabilities & NEARSIGHT)
desc += "<font color=#DAAA18><b>You are nearsighted!</b></font><br>"
else if(glasses_right && !WS.up)
desc += "You will become nearsighted at <font color=#DAAA18><b>[W.nearsight_breakpoint]</b></font> eye damage.<br>"
if(L.disabilities & BLIND)
=======
if(L.has_disability(DISABILITY_NEARSIGHT))
desc += "<font color=#DAAA18><b>You are nearsighted!</b></font><br>"
else if(glasses_right && !WS.up)
desc += "You will become nearsighted at <font color=#DAAA18><b>[W.nearsight_breakpoint]</b></font> eye damage.<br>"
if(L.has_disability(DISABILITY_BLIND))
>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind
desc += "<font color=#DAAA18><b>You are blind!</b></font>"
else if(glasses_right && !WS.up)
desc += "You will become blind at <font color=#DAAA18><b>[W.blind_breakpoint]</b></font> eye damage."
@@ -169,29 +153,18 @@
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, "<span class='nzcrentr'>Your vision doubles, then trebles. Darkness begins to close in. You can't keep this up!</span>")
if(eye_damage_done >= blind_breakpoint)
if(H.become_blind())
=======
if(!H.has_disability(DISABILITY_NEARSIGHT))
to_chat(H, "<span class='nzcrentr'>Your vision doubles, then trembles. Darkness begins to close in. You can't keep this up!</span>")
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, "<span class='nzcrentr_large'>A piercing white light floods your vision. Suddenly, all goes dark!</span>")
if(prob(min(20, 5 + eye_damage_done)))
to_chat(H, "<span class='nzcrentr_small'><i>Your eyes continue to burn.</i></span>")
@@ -110,11 +110,7 @@
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
-4
View File
@@ -115,11 +115,7 @@ 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
-4
View File
@@ -449,11 +449,7 @@
scantemp = "<font class='bad'>Subject's brain is not responding to scanning stimuli.</font>"
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 = "<font class='bad'>Subject no longer contains the fundamental materials required to create a living clone.</font>"
playsound(src, 'sound/machines/terminal_alert.ogg', 50, 0)
return
@@ -81,11 +81,7 @@
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)
@@ -532,11 +528,7 @@
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
-4
View File
@@ -100,11 +100,7 @@
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
-4
View File
@@ -680,11 +680,7 @@
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("<span class='danger'>[user] headbutts the airlock.</span>", \
-6
View File
@@ -539,15 +539,9 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
M.adjust_blurriness(15)
if(M.stat != DEAD)
to_chat(M, "<span class='danger'>Your eyes start to bleed profusely!</span>")
<<<<<<< HEAD
if(!(M.disabilities & (NEARSIGHT | BLIND)))
if(M.become_nearsighted())
to_chat(M, "<span class='danger'>You become nearsighted!</span>")
=======
if(!(M.has_disability(DISABILITY_BLIND) || M.has_disability(DISABILITY_NEARSIGHT)))
to_chat(M, "<span class='danger'>You become nearsighted!</span>")
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())
-8
View File
@@ -393,11 +393,7 @@
/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!
@@ -518,11 +514,7 @@
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 = "<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Recovery of patient impossible. Further attempts futile.</span>"
else if (H.hellbound)
failed = "<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Patient's soul appears to be on another plane of existence. Further attempts futile.</span>"
@@ -48,11 +48,7 @@
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())
@@ -86,11 +82,7 @@
else
user.visible_message("<span class='warning'>[user] directs [src] to [M]'s eyes.</span>", \
"<span class='danger'>You direct [src] to [M]'s eyes.</span>")
<<<<<<< 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, "<span class='warning'>[M]'s pupils don't react to the light!</span>")
else if(M.dna && M.dna.check_mutation(XRAY)) //mob has X-RAY vision
to_chat(user, "<span class='danger'>[M]'s pupils give an eerie glow!</span>")
@@ -85,11 +85,7 @@ 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, "<span class='notice'>You stupidly try to analyze the floor's vitals!</span>")
user.visible_message("<span class='warning'>[user] has analyzed the floor's vitals!</span>")
to_chat(user, "<span class='info'>Analyzing results for The floor:\n\tOverall status: <b>Healthy</b>")
@@ -185,18 +181,12 @@ GAS ANALYZER
to_chat(user, "\t<span class='info'><b>==EAR STATUS==</b></span>")
if(istype(ears))
var/healthy = TRUE
<<<<<<< HEAD
if(C.disabilities & DEAF)
healthy = FALSE
to_chat(user, "\t<span class='alert'>Subject is genetically deaf.</span>")
=======
if(C.has_disability(DISABILITY_DEAF, GENETIC_MUTATION))
healthy = FALSE
to_chat(user, "\t<span class='alert'>Subject is genetically deaf.</span>")
else if(C.has_disability(DISABILITY_DEAF))
healthy = FALSE
to_chat(user, "\t<span class='alert'>Subject is deaf.</span>")
>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind
else
if(ears.ear_damage)
to_chat(user, "\t<span class='alert'>Subject has [ears.ear_damage > UNHEALING_EAR_DAMAGE? "permanent ": "temporary "]hearing damage.</span>")
@@ -212,17 +202,10 @@ GAS ANALYZER
to_chat(user, "\t<span class='info'><b>==EYE STATUS==</b></span>")
if(istype(eyes))
var/healthy = TRUE
<<<<<<< HEAD
if(C.disabilities & BLIND)
to_chat(user, "\t<span class='alert'>Subject is blind.</span>")
healthy = FALSE
if(C.disabilities & NEARSIGHT)
=======
if(C.has_disability(DISABILITY_BLIND))
to_chat(user, "\t<span class='alert'>Subject is blind.</span>")
healthy = FALSE
if(C.has_disability(DISABILITY_NEARSIGHT))
>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind
to_chat(user, "\t<span class='alert'>Subject is nearsighted.</span>")
healthy = FALSE
if(eyes.eye_damage > 30)
-8
View File
@@ -31,11 +31,7 @@
/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)
@@ -317,11 +313,7 @@
to_chat(user, "<span class='notice'>You can't modify [M]'s DNA while [M.p_theyre()] dead.</span>")
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
@@ -24,11 +24,7 @@
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, "<span class='warning'>Huh? How does this thing work?</span>")
preprime(user, 5, FALSE)
return FALSE
+1 -5
View File
@@ -26,11 +26,7 @@
/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, "<span class='warning'>Uh... how do those things work?!</span>")
apply_cuffs(user,user)
return
@@ -383,4 +379,4 @@
B.Crossed(hit_atom)
qdel(src)
..()
-8
View File
@@ -44,11 +44,7 @@
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
@@ -74,11 +70,7 @@
/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
-4
View File
@@ -99,11 +99,7 @@
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, "<span class ='danger'>You club yourself over the head.</span>")
user.Knockdown(60 * force)
if(ishuman(user))
@@ -72,10 +72,6 @@
to_chat(user, "<span class='notice'>[src] [active ? "is now active":"can now be concealed"].</span>")
/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, "<span class='warning'>You accidentally cut yourself with [src], like a doofus!</span>")
user.take_bodypart_damage(5,5)
@@ -147,16 +147,10 @@
if(tank && !tank.air_contents.remove(gasPerThrow * pressureSetting))
to_chat(user, "<span class='warning'>\The [src] lets out a weak hiss and doesn't react!</span>")
return
<<<<<<< HEAD
if(user.disabilities & CLUMSY && prob(75) && clumsyCheck)
user.visible_message("<span class='warning'>[user] loses their grip on [src], causing it to go off!</span>", "<span class='userdanger'>[src] slips out of your hands and goes off!</span>")
user.dropItemToGround(src, TRUE)
=======
if(user.has_disability(DISABILITY_CLUMSY) && prob(75) && clumsyCheck && iscarbon(user))
var/mob/living/carbon/C = user
C.visible_message("<span class='warning'>[C] loses their grip on [src], causing it to go off!</span>", "<span class='userdanger'>[src] slips out of your hands and goes off!</span>")
C.dropItemToGround(src, TRUE)
>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind
if(prob(10))
target = get_turf(user)
else
+1 -146
View File
@@ -1,4 +1,3 @@
<<<<<<< HEAD
/obj/item/shield
name = "shield"
block_chance = 50
@@ -79,7 +78,7 @@
return (active)
/obj/item/shield/energy/attack_self(mob/living/carbon/human/user)
if(user.disabilities & CLUMSY && prob(50))
if(user.has_disability(DISABILITY_CLUMSY) && prob(50))
to_chat(user, "<span class='warning'>You beat yourself in the head with [src].</span>")
user.take_bodypart_damage(5)
active = !active
@@ -141,147 +140,3 @@
slot_flags = null
to_chat(user, "<span class='notice'>[src] can now be concealed.</span>")
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("<span class='warning'>[user] bashes [src] with [W]!</span>")
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: <i>\"Romanes venio domus\"</i>."
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, "<span class='warning'>You beat yourself in the head with [src].</span>")
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, "<span class='notice'>[src] is now active.</span>")
else
force = 3
throwforce = 3
throw_speed = 3
w_class = WEIGHT_CLASS_TINY
playsound(user, 'sound/weapons/saberoff.ogg', 35, 1)
to_chat(user, "<span class='notice'>[src] can now be concealed.</span>")
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, "<span class='notice'>You extend \the [src].</span>")
else
force = 3
throwforce = 3
throw_speed = 3
w_class = WEIGHT_CLASS_NORMAL
slot_flags = null
to_chat(user, "<span class='notice'>[src] can now be concealed.</span>")
add_fingerprint(user)
>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind
-5
View File
@@ -93,12 +93,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "bible",
if (!user.IsAdvancedToolUser())
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
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, "<span class='danger'>[src] slips out of your hand and hits your head.</span>")
user.take_bodypart_damage(10)
user.Unconscious(400)
-4
View File
@@ -108,11 +108,7 @@
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("<span class='danger'>[user] accidentally hits themself with [src]!</span>", \
"<span class='userdanger'>You accidentally hit yourself with [src]!</span>")
user.Knockdown(stunforce*3)
-4
View File
@@ -8,11 +8,7 @@
/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("<span class='danger'>[user] accidentally hits themself with [src]!</span>", \
"<span class='userdanger'>You accidentally hit yourself with [src]!</span>")
if(do_teleport(user, get_turf(user), 50))//honk honk
+1 -5
View File
@@ -75,11 +75,7 @@
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)
@@ -109,7 +105,7 @@
item_state = "drill"
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25)
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25) //done for balance reasons, making them high value for research, but harder to get
force = 8 //might or might not be too high, subject to change
w_class = WEIGHT_CLASS_SMALL
throwforce = 8
-4
View File
@@ -302,11 +302,7 @@
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))
@@ -17,11 +17,7 @@
L.buckled.unbuckle_mob(L,force=1)
L.visible_message("<span class='warning'>[L]'s skin rapidly turns to marble!</span>", "<span class='userdanger'>Your body freezes up! Can't... move... can't... think...</span>")
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
@@ -63,11 +59,7 @@
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
-4
View File
@@ -30,11 +30,7 @@
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
+4 -149
View File
@@ -1,4 +1,3 @@
<<<<<<< HEAD
/obj/item/device/assembly/mousetrap
name = "mousetrap"
desc = "A handy little spring-loaded trap for catching pesty rodents."
@@ -21,7 +20,7 @@
if(!armed)
if(ishuman(usr))
var/mob/living/carbon/human/user = usr
if((user.getBrainLoss() >= 60) || user.disabilities & CLUMSY && prob(50))
if((user.has_disability(DISABILITY_DUMB) || user.has_disability(DISABILITY_CLUMSY)) && prob(50))
to_chat(user, "<span class='warning'>Your hand slips, setting off the trigger!</span>")
pulse(0)
update_icon()
@@ -77,7 +76,7 @@
if(!armed)
to_chat(user, "<span class='notice'>You arm [src].</span>")
else
if(((user.getBrainLoss() >= 60) || user.disabilities & CLUMSY) && prob(50))
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"
@@ -93,7 +92,7 @@
/obj/item/device/assembly/mousetrap/attack_hand(mob/living/carbon/human/user)
if(armed)
if(((user.getBrainLoss() >= 60) || user.disabilities & CLUMSY) && prob(50))
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"
@@ -140,148 +139,4 @@
/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, "<span class='warning'>Your hand slips, setting off the trigger!</span>")
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("<span class='boldannounce'>SPLAT!</span>")
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, "<span class='notice'>You arm [src].</span>")
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("<span class='warning'>[user] accidentally sets off [src], breaking their fingers.</span>", \
"<span class='warning'>You accidentally trigger [src]!</span>")
return
to_chat(user, "<span class='notice'>You disarm [src].</span>")
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("<span class='warning'>[user] accidentally sets off [src], breaking their fingers.</span>", \
"<span class='warning'>You accidentally trigger [src]!</span>")
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("<span class='warning'>[H] accidentally steps on [src].</span>", \
"<span class='warning'>You accidentally step on [src]</span>")
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("<span class='warning'>[finder] accidentally sets off [src], breaking their fingers.</span>", \
"<span class='warning'>You accidentally trigger [src]!</span>")
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("<span class='warning'>[src] is triggered by [A].</span>")
triggered(null)
/obj/item/device/assembly/mousetrap/armed
icon_state = "mousetraparmed"
armed = 1
>>>>>>> bc20a75... Merge pull request #33783 from Cruix/fix_blind
armed = 1