mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-01-03 05:52:17 +00:00
Having a vital internal organ die now kills you
Internal organs now die once they hit max_health. Also adjusts final brain damage effect. Conflicts: code/modules/organs/organ.dm
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/obj/item/organ/brain
|
||||
name = "brain"
|
||||
health = 400 //They need to live awhile longer than other organs.
|
||||
health = 400 //They need to live awhile longer than other organs. Is this even used by organ code anymore?
|
||||
desc = "A piece of juicy meat found in a person's head."
|
||||
organ_tag = "brain"
|
||||
parent_organ = "head"
|
||||
|
||||
@@ -235,16 +235,21 @@
|
||||
custom_pain("Your head feels numb and painful.")
|
||||
if(getBrainLoss() >= 15)
|
||||
if(4 <= rn && rn <= 6) if(eye_blurry <= 0)
|
||||
src << "\red It becomes hard to see for some reason."
|
||||
src << "<span class='warning'>It becomes hard to see for some reason.</span>"
|
||||
eye_blurry = 10
|
||||
if(getBrainLoss() >= 35)
|
||||
if(7 <= rn && rn <= 9) if(get_active_hand())
|
||||
src << "\red Your hand won't respond properly, you drop what you're holding."
|
||||
src << "<span class='danger'>Your hand won't respond properly, you drop what you're holding!</span>"
|
||||
drop_item()
|
||||
if(getBrainLoss() >= 50)
|
||||
if(10 <= rn && rn <= 12) if(!lying)
|
||||
src << "\red Your legs won't respond properly, you fall down."
|
||||
resting = 1
|
||||
if(getBrainLoss() >= 45)
|
||||
if(10 <= rn && rn <= 12)
|
||||
if(prob(50))
|
||||
src << "<span class='danger'>You suddenly black out!</span>"
|
||||
Paralyse(10)
|
||||
else if(!lying)
|
||||
src << "<span class='danger'>Your legs won't respond properly, you fall down!</span>"
|
||||
Weaken(10)
|
||||
|
||||
|
||||
proc/handle_stasis_bag()
|
||||
// Handle side effects from stasis bag
|
||||
|
||||
@@ -65,22 +65,27 @@ var/list/organ_cache = list()
|
||||
processing_objects -= src
|
||||
if(dead_icon)
|
||||
icon_state = dead_icon
|
||||
if(owner && vital)
|
||||
owner.death()
|
||||
|
||||
/obj/item/organ/process()
|
||||
|
||||
if(loc != owner)
|
||||
owner = null
|
||||
|
||||
//dead already, no need for more processing
|
||||
if(status & ORGAN_DEAD)
|
||||
return
|
||||
// Don't process if we're in a freezer, an MMI or a stasis bag.or a freezer or something I dunno
|
||||
if(istype(loc,/obj/item/device/mmi))
|
||||
return
|
||||
if(istype(loc,/obj/structure/closet/body_bag/cryobag) || istype(loc,/obj/structure/closet/crate/freezer) || istype(loc,/obj/item/weapon/storage/box/freezer))
|
||||
return
|
||||
//Process infections
|
||||
if (robotic >= 2 || (owner && owner.species && (owner.species.flags & IS_PLANT)))
|
||||
if ((status & ORGAN_ROBOT) || (owner && owner.species && (owner.species.flags & IS_PLANT)))
|
||||
germ_level = 0
|
||||
return
|
||||
|
||||
if(loc != owner)
|
||||
owner = null
|
||||
|
||||
if(!owner)
|
||||
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in reagents.reagent_list
|
||||
if(B && prob(40))
|
||||
@@ -98,6 +103,10 @@ var/list/organ_cache = list()
|
||||
handle_rejection()
|
||||
handle_germ_effects()
|
||||
|
||||
//check if we've hit max_damage
|
||||
if(damage >= max_damage)
|
||||
die()
|
||||
|
||||
/obj/item/organ/examine(mob/user)
|
||||
..(user)
|
||||
if(status & ORGAN_DEAD)
|
||||
|
||||
Reference in New Issue
Block a user