mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 11:43:31 +00:00
Fixing bugs.
This commit is contained in:
@@ -214,26 +214,25 @@
|
|||||||
// sync the organ's damage with its wounds
|
// sync the organ's damage with its wounds
|
||||||
src.update_damages()
|
src.update_damages()
|
||||||
|
|
||||||
owner.updatehealth()
|
|
||||||
var/result = update_icon()
|
|
||||||
|
|
||||||
//If limb took enough damage, try to cut or tear it off
|
//If limb took enough damage, try to cut or tear it off
|
||||||
if(owner && loc == owner)
|
if(owner && loc == owner)
|
||||||
if(!cannot_amputate && config.limbs_can_break && (brute_dam + burn_dam) >= (max_damage * config.organ_health_multiplier))
|
if(!cannot_amputate && config.limbs_can_break && (brute_dam + burn_dam) >= (max_damage * config.organ_health_multiplier))
|
||||||
var/threshold = max_damage/3
|
var/threshold = max_damage/3
|
||||||
|
var/dropped
|
||||||
if((burn >= threshold) && prob(burn))
|
if((burn >= threshold) && prob(burn))
|
||||||
|
dropped = 1
|
||||||
droplimb(0,1)
|
droplimb(0,1)
|
||||||
return result
|
if(!dropped && prob(brute))
|
||||||
if(prob(brute))
|
|
||||||
if(brute >= threshold)
|
if(brute >= threshold)
|
||||||
if((sharp || edge) && used_weapon)
|
if((sharp || edge) && istype(used_weapon,/obj/item))
|
||||||
if(istype(used_weapon,/obj/item))
|
var/obj/item/W = used_weapon
|
||||||
var/obj/item/W = used_weapon
|
if(W.w_class >= 3)
|
||||||
if(W.w_class >= 3)
|
droplimb()
|
||||||
droplimb()
|
else
|
||||||
return result
|
droplimb(0,2)
|
||||||
droplimb(0,2)
|
|
||||||
return result
|
owner.updatehealth()
|
||||||
|
return update_icon()
|
||||||
|
|
||||||
/obj/item/organ/external/proc/heal_damage(brute, burn, internal = 0, robo_repair = 0)
|
/obj/item/organ/external/proc/heal_damage(brute, burn, internal = 0, robo_repair = 0)
|
||||||
if(status & ORGAN_ROBOT && !robo_repair)
|
if(status & ORGAN_ROBOT && !robo_repair)
|
||||||
@@ -896,7 +895,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
|||||||
owner.organs_by_name[limb_name] = null // Remove from owner's vars.
|
owner.organs_by_name[limb_name] = null // Remove from owner's vars.
|
||||||
|
|
||||||
//Robotic limbs explode if sabotaged.
|
//Robotic limbs explode if sabotaged.
|
||||||
if(is_robotic)
|
if(is_robotic && sabotaged)
|
||||||
owner.visible_message(
|
owner.visible_message(
|
||||||
"<span class='danger'>\The [owner]'s [src.name] explodes violently!</span>",\
|
"<span class='danger'>\The [owner]'s [src.name] explodes violently!</span>",\
|
||||||
"<span class='danger'>Your [src.name] explodes!</span>",\
|
"<span class='danger'>Your [src.name] explodes!</span>",\
|
||||||
|
|||||||
Reference in New Issue
Block a user