mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Merge pull request #10837 from mwerezak/brainloss-fix
Fixes adjustBrainLoss
This commit is contained in:
@@ -30,7 +30,6 @@
|
||||
var/obj/item/organ/brain/sponge = internal_organs_by_name["brain"]
|
||||
if(sponge)
|
||||
sponge.take_damage(amount)
|
||||
sponge.damage = min(max(brainloss, 0),(maxHealth*2))
|
||||
brainloss = sponge.damage
|
||||
else
|
||||
brainloss = 200
|
||||
|
||||
@@ -193,14 +193,15 @@ var/list/organ_cache = list()
|
||||
W.damage += damage
|
||||
W.time_inflicted = world.time
|
||||
|
||||
//Note: external organs have their own version of this proc
|
||||
/obj/item/organ/proc/take_damage(amount, var/silent=0)
|
||||
if(src.status & ORGAN_ROBOT)
|
||||
src.damage += (amount * 0.8)
|
||||
src.damage = between(0, src.damage + (amount * 0.8), max_damage)
|
||||
else
|
||||
src.damage += amount
|
||||
src.damage = between(0, src.damage + amount, max_damage)
|
||||
|
||||
//only show this if the organ is not robotic
|
||||
if(owner && parent_organ)
|
||||
if(owner && parent_organ && amount > 0)
|
||||
var/obj/item/organ/external/parent = owner.get_organ(parent_organ)
|
||||
if(parent && !silent)
|
||||
owner.custom_pain("Something inside your [parent.name] hurts a lot.", 1)
|
||||
|
||||
Reference in New Issue
Block a user