From ff21e5d786fd6e92da8fbd51b91c4c18a67ba742 Mon Sep 17 00:00:00 2001 From: Anewbe Date: Mon, 27 Mar 2017 17:50:42 -0500 Subject: [PATCH 1/2] FBPs should no longer scream when they collapse --- code/modules/organs/organ.dm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/code/modules/organs/organ.dm b/code/modules/organs/organ.dm index 30a80b6599b..6250bcae6cb 100644 --- a/code/modules/organs/organ.dm +++ b/code/modules/organs/organ.dm @@ -373,4 +373,10 @@ var/list/organ_cache = list() return /obj/item/organ/proc/can_feel_pain() - return !(robotic >= (ORGAN_ROBOT|ORGAN_DESTROYED)) && !(species.flags & NO_PAIN) + if(species.flags & NO_PAIN) + return 0 + if(status & ORGAN_DESTROYED) + return 0 + if(robotic && robotic < ORGAN_LIFELIKE) //Super fancy humanlike robotics probably have sensors, or something? + return 0 + return 1 \ No newline at end of file From 73ab115295a9312ed9d131b91eb8d1984d8baf73 Mon Sep 17 00:00:00 2001 From: Anewbe Date: Mon, 27 Mar 2017 22:32:02 -0500 Subject: [PATCH 2/2] Fixes a thing. --- code/game/objects/items/weapons/material/shards.dm | 2 +- code/modules/mob/living/carbon/human/human.dm | 2 +- code/modules/mob/living/carbon/human/human_damage.dm | 2 +- code/modules/mob/living/carbon/human/human_defense.dm | 2 +- code/modules/mob/living/carbon/human/human_organs.dm | 4 ++-- code/modules/mob/living/carbon/human/unarmed_attack.dm | 2 +- code/modules/organs/organ.dm | 2 +- code/modules/organs/organ_external.dm | 4 ++-- .../Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/code/game/objects/items/weapons/material/shards.dm b/code/game/objects/items/weapons/material/shards.dm index 78ee869604a..92cb782e8a2 100644 --- a/code/game/objects/items/weapons/material/shards.dm +++ b/code/game/objects/items/weapons/material/shards.dm @@ -90,7 +90,7 @@ if(affecting.take_damage(force, 0)) H.UpdateDamageIcon() H.updatehealth() - if(affecting.can_feel_pain()) + if(affecting.organ_can_feel_pain()) H.Weaken(3) return check -= picked diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index fb18cd2df2d..bbed1419251 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1489,7 +1489,7 @@ if(check_organ) if(!istype(check_organ)) return 0 - return check_organ.can_feel_pain() + return check_organ.organ_can_feel_pain() return !(species.flags & NO_PAIN) /mob/living/carbon/human/is_muzzled() diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index 50b2732eeb5..fa3d19ebabe 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -376,7 +376,7 @@ This function restores all organs. if((damagetype != BRUTE) && (damagetype != BURN)) if(damagetype == HALLOSS) if((damage > 25 && prob(20)) || (damage > 50 && prob(60))) - if(organ && organ.can_feel_pain()) + if(organ && organ.organ_can_feel_pain()) emote("scream") ..(damage, damagetype, def_zone, blocked) return 1 diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index a6471c4aeb4..d430780bb42 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -67,7 +67,7 @@ emp_act emote("me", 1, "drops what they were holding, their [affected.name] malfunctioning!") else var/emote_scream = pick("screams in pain and ", "lets out a sharp cry and ", "cries out and ") - emote("me", 1, "[affected.can_feel_pain() ? "" : emote_scream]drops what they were holding in their [affected.name]!") + emote("me", 1, "[affected.organ_can_feel_pain() ? "" : emote_scream] drops what they were holding in their [affected.name]!") ..(stun_amount, agony_amount, def_zone) diff --git a/code/modules/mob/living/carbon/human/human_organs.dm b/code/modules/mob/living/carbon/human/human_organs.dm index 0338876627b..a4ec05dbf87 100644 --- a/code/modules/mob/living/carbon/human/human_organs.dm +++ b/code/modules/mob/living/carbon/human/human_organs.dm @@ -100,7 +100,7 @@ else if (E.is_dislocated()) stance_damage += 0.5 - if(E) limb_pain = E.can_feel_pain() + if(E) limb_pain = E.organ_can_feel_pain() // Canes and crutches help you stand (if the latter is ever added) // One cane mitigates a broken leg+foot, or a missing foot. @@ -159,7 +159,7 @@ drop_from_inventory(r_hand) var/emote_scream = pick("screams in pain and ", "lets out a sharp cry and ", "cries out and ") - emote("me", 1, "[(E.can_feel_pain()) ? "" : emote_scream ]drops what they were holding in their [E.name]!") + emote("me", 1, "[(can_feel_pain()) ? "" : emote_scream ]drops what they were holding in their [E.name]!") else if(E.is_malfunctioning()) switch(E.body_part) diff --git a/code/modules/mob/living/carbon/human/unarmed_attack.dm b/code/modules/mob/living/carbon/human/unarmed_attack.dm index af3e65b0913..2de060887f0 100644 --- a/code/modules/mob/living/carbon/human/unarmed_attack.dm +++ b/code/modules/mob/living/carbon/human/unarmed_attack.dm @@ -97,7 +97,7 @@ var/global/list/sparring_attack_cache = list() if(eyes) eyes.take_damage(rand(3,4), 1) user.visible_message("[user] presses \his [eye_attack_text] into [target]'s [eyes.name]!") - var/eye_pain = eyes.can_feel_pain() + var/eye_pain = eyes.organ_can_feel_pain() target << "You experience[(eye_pain) ? "" : " immense pain as you feel" ] [eye_attack_text_victim] being pressed into your [eyes.name][(eye_pain)? "." : "!"]" return user.visible_message("[user] attempts to press \his [eye_attack_text] into [target]'s eyes, but they don't have any!") diff --git a/code/modules/organs/organ.dm b/code/modules/organs/organ.dm index 6250bcae6cb..6f639c3bade 100644 --- a/code/modules/organs/organ.dm +++ b/code/modules/organs/organ.dm @@ -372,7 +372,7 @@ var/list/organ_cache = list() bitten(user) return -/obj/item/organ/proc/can_feel_pain() +/obj/item/organ/proc/organ_can_feel_pain() if(species.flags & NO_PAIN) return 0 if(status & ORGAN_DESTROYED) diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index b746f1be6f4..82fb96c926b 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -267,7 +267,7 @@ if(status & ORGAN_BROKEN && brute) jostle_bone(brute) - if(can_feel_pain() && prob(40)) + if(organ_can_feel_pain() && prob(40)) owner.emote("scream") //getting hit on broken hand hurts if(used_weapon) add_autopsy_data("[used_weapon]", brute + burn) @@ -1010,7 +1010,7 @@ Note that amputating the affected organ does in fact remove the infection from t "Something feels like it shattered in your [name]!",\ "You hear a sickening crack.") jostle_bone() - if(can_feel_pain()) + if(organ_can_feel_pain()) owner.emote("scream") playsound(src.loc, "fracture", 10, 1, -2) diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm index 44ad6f24a2b..091842663d2 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm @@ -349,7 +349,7 @@ if(affecting.take_damage(0, removed * power * 0.1)) H.UpdateDamageIcon() if(prob(100 * removed / meltdose)) // Applies disfigurement - if (affecting.can_feel_pain()) + if (affecting.organ_can_feel_pain()) H.emote("scream") H.status_flags |= DISFIGURED else