mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-26 14:31:59 +01:00
Changes how pain checks works in game (#5978)
This pr creates a new check, can_feel_pain, it checks for the NO_PAIN flag, if the target is under influence of mind altering drugs or strong painkillers. This check replaces all the species procs and fixes somethings, like people under the influence of pain killers still getting knocked out from pain and etc.
This commit is contained in:
@@ -237,7 +237,7 @@
|
||||
brute -= brute / 2
|
||||
|
||||
if(status & ORGAN_BROKEN && prob(40) && brute)
|
||||
if (owner && !(owner.species && (owner.species.flags & NO_PAIN)))
|
||||
if (owner && (owner.can_feel_pain()))
|
||||
owner.emote("scream") //getting hit on broken hand hurts
|
||||
if(used_weapon)
|
||||
add_autopsy_data("[used_weapon]", brute + burn)
|
||||
@@ -916,7 +916,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
"<span class='warning'>You hear a loud cracking sound coming from \the [owner].</span>",\
|
||||
"<span class='danger'>Something feels like it shattered in your [name]!</span>",\
|
||||
"You hear a sickening crack.")
|
||||
if(owner.species && !(owner.species.flags & NO_PAIN))
|
||||
if(owner.species && (owner.can_feel_pain()))
|
||||
owner.emote("scream")
|
||||
|
||||
playsound(src.loc, "fracture", 100, 1, -2)
|
||||
|
||||
@@ -10,7 +10,7 @@ mob/var/next_pain_time = 0
|
||||
mob/living/carbon/proc/pain(var/partname, var/amount, var/force, var/burning = 0)
|
||||
if(stat >= 1)
|
||||
return
|
||||
if(species && (species.flags & NO_PAIN))
|
||||
if(!can_feel_pain())
|
||||
return
|
||||
if(analgesic > 40)
|
||||
return
|
||||
@@ -53,7 +53,7 @@ mob/living/carbon/proc/pain(var/partname, var/amount, var/force, var/burning = 0
|
||||
mob/living/carbon/human/proc/custom_pain(var/message, var/flash_strength)
|
||||
if(stat >= 1)
|
||||
return
|
||||
if(species.flags & NO_PAIN)
|
||||
if(!can_feel_pain())
|
||||
return
|
||||
if(reagents.has_reagent("tramadol"))
|
||||
return
|
||||
@@ -74,7 +74,7 @@ mob/living/carbon/human/proc/custom_pain(var/message, var/flash_strength)
|
||||
mob/living/carbon/human/proc/handle_pain()
|
||||
// not when sleeping
|
||||
|
||||
if(species.flags & NO_PAIN) return
|
||||
if(!can_feel_pain()) return
|
||||
|
||||
if(stat >= 2) return
|
||||
if(analgesic > 70)
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
if (!owner)
|
||||
return
|
||||
|
||||
if(prob(10) && !(owner.species.flags & NO_PAIN))
|
||||
if(prob(10) && (owner.can_feel_pain()))
|
||||
owner << "<span class='warning'>You feel a stinging pain in your abdomen!</span>"
|
||||
owner.emote("me",1,"winces slightly.")
|
||||
owner.adjustHalLoss(5)
|
||||
@@ -96,7 +96,7 @@
|
||||
S.set_up(R, 20, 0, T, 40)
|
||||
S.start()
|
||||
|
||||
if(!(owner.species.flags & NO_PAIN))
|
||||
if(owner.can_feel_pain())
|
||||
owner.emote("scream")
|
||||
owner.adjustHalLoss(15)
|
||||
owner.drip(15)
|
||||
@@ -122,7 +122,7 @@
|
||||
/obj/item/organ/parasite/blackkois/process()
|
||||
..()
|
||||
|
||||
if(prob(10) && !(owner.species.flags & NO_PAIN))
|
||||
if(prob(10) && (owner.can_feel_pain()))
|
||||
if(stage < 3)
|
||||
owner << "<span class='warning'>You feel a stinging pain in your abdomen!</span>"
|
||||
else
|
||||
@@ -174,7 +174,7 @@
|
||||
removed_langs = 1
|
||||
|
||||
if(prob(10))
|
||||
if(!(owner.species.flags & NO_PAIN))
|
||||
if(owner.can_feel_pain())
|
||||
owner << "<span class='warning'>You feel an unbearable pain in your mind!</span>"
|
||||
owner.emote("scream")
|
||||
owner.adjustBrainLoss(1)
|
||||
@@ -193,7 +193,7 @@
|
||||
S.set_up(R, 20, 0, T, 40)
|
||||
S.start()
|
||||
|
||||
if(!(owner.species.flags & NO_PAIN))
|
||||
if(owner.can_feel_pain())
|
||||
owner.emote("scream")
|
||||
owner.adjustHalLoss(15)
|
||||
owner.drip(15)
|
||||
@@ -223,7 +223,7 @@
|
||||
if (!owner)
|
||||
return
|
||||
|
||||
if(prob(10) && !(owner.species.flags & NO_PAIN))
|
||||
if(prob(10) && (owner.can_feel_pain()))
|
||||
owner << "<span class='warning'>You feel a burning sensation on your skin!</span>"
|
||||
owner.make_jittery(10)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user