mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-15 17:15:25 +01:00
Add a new process option: Break Bone (#17855)
* Add a new process option: Break Bone * Partial refactor of belly actions
This commit is contained in:
@@ -289,6 +289,13 @@
|
||||
//Continued damage to vital organs can kill you, and robot organs don't count towards total damage so no need to cap them.
|
||||
return (vital || (robotic >= ORGAN_ROBOT) || brute_dam + burn_dam + additional_damage < max_damage)
|
||||
|
||||
/obj/item/organ/external/proc/is_fracturable()
|
||||
if(robotic >= ORGAN_ROBOT)
|
||||
return FALSE //ORGAN_BROKEN doesn't have the same meaning for robot limbs
|
||||
if((status & ORGAN_BROKEN) || cannot_break)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/item/organ/external/take_damage(brute, burn, sharp, edge, used_weapon = null, list/forbidden_limbs = list(), permutation = FALSE, projectile)
|
||||
brute = round(brute * brute_mod, 0.1)
|
||||
burn = round(burn * burn_mod, 0.1)
|
||||
@@ -1138,12 +1145,23 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
status |= ORGAN_BROKEN
|
||||
broken_description = pick("broken","fracture","hairline fracture")
|
||||
if(owner)
|
||||
if(organ_can_feel_pain() && !isbelly(owner.loc) && !isliving(owner.loc) && !owner.transforming)
|
||||
var/show_message = TRUE
|
||||
var/scream = TRUE
|
||||
if(!organ_can_feel_pain() || owner.transforming)
|
||||
show_message = FALSE
|
||||
scream = FALSE
|
||||
if(isbelly(owner.loc) || isliving(owner.loc))
|
||||
scream = FALSE
|
||||
if(!owner.digest_pain)
|
||||
show_message = FALSE
|
||||
|
||||
if(show_message)
|
||||
owner.visible_message(\
|
||||
span_danger("You hear a loud cracking sound coming from \the [owner]."),\
|
||||
span_danger("Something feels like it shattered in your [name]!"),\
|
||||
span_danger("You hear a sickening crack."))
|
||||
owner.emote("scream")
|
||||
if(scream)
|
||||
owner.emote("scream")
|
||||
jostle_bone()
|
||||
|
||||
// Fractures have a chance of getting you out of restraints
|
||||
|
||||
Reference in New Issue
Block a user