mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 19:44:09 +01:00
Splint nerf
This commit is contained in:
@@ -25,6 +25,8 @@
|
||||
#define LEFT 1
|
||||
#define RIGHT 2
|
||||
|
||||
#define SPLINT_LIFE 2000 //number of steps splints stay on
|
||||
|
||||
|
||||
//Pulse levels, very simplified
|
||||
#define PULSE_NONE 0 //so !M.pulse checks would be possible
|
||||
|
||||
@@ -200,6 +200,7 @@
|
||||
to_chat(user, "<span class='danger'>[H]'s [limb] is already splinted!</span>")
|
||||
if(alert(user, "Would you like to remove the splint from [H]'s [limb]?", "Removing.", "Yes", "No") == "Yes")
|
||||
affecting.status &= ~ORGAN_SPLINTED
|
||||
H.handle_splints()
|
||||
to_chat(user, "<span class='notice'>You remove the splint from [H]'s [limb].</span>")
|
||||
return
|
||||
if(M == user)
|
||||
@@ -214,4 +215,7 @@
|
||||
"<span class='green'>You hear something being wrapped.</span>")
|
||||
|
||||
affecting.status |= ORGAN_SPLINTED
|
||||
affecting.splinted_count = H.step_count
|
||||
H.handle_splints()
|
||||
|
||||
use(1)
|
||||
|
||||
@@ -1110,4 +1110,4 @@ so that different stomachs can handle things in different ways VB*/
|
||||
update_tint()
|
||||
if(I.flags_inv & HIDEMASK || forced)
|
||||
update_inv_wear_mask()
|
||||
update_inv_head()
|
||||
update_inv_head()
|
||||
@@ -73,3 +73,5 @@ var/global/default_martial_art = new/datum/martial_art
|
||||
|
||||
var/datum/body_accessory/body_accessory = null
|
||||
var/tail // Name of tail image in species effects icon file.
|
||||
|
||||
var/list/splinted_limbs = list() //limbs we know are splinted
|
||||
|
||||
@@ -12,15 +12,25 @@
|
||||
|
||||
number_wounds = 0
|
||||
var/force_process = 0
|
||||
var/splint_process = 0
|
||||
var/damage_this_tick = getBruteLoss() + getFireLoss() + getToxLoss()
|
||||
if(damage_this_tick > last_dam)
|
||||
force_process = 1
|
||||
if(splinted_limbs.len)
|
||||
splint_process = 1
|
||||
last_dam = damage_this_tick
|
||||
if(force_process)
|
||||
bad_external_organs.Cut()
|
||||
for(var/obj/item/organ/external/Ex in bodyparts)
|
||||
bad_external_organs |= Ex
|
||||
|
||||
else if(splint_process) //we don't need to process every organ if it's just one limb splinted
|
||||
for(var/obj/item/organ/external/splinted in splinted_limbs)
|
||||
if(!(splinted.status & ORGAN_SPLINTED))
|
||||
splinted_limbs -= splinted
|
||||
continue
|
||||
bad_external_organs |= splinted
|
||||
|
||||
//processing internal organs is pretty cheap, do that first.
|
||||
for(var/obj/item/organ/internal/I in internal_organs)
|
||||
I.process()
|
||||
@@ -210,3 +220,9 @@ I use this to standardize shadowling dethrall code
|
||||
odmg += O.brute_dam
|
||||
odmg += O.burn_dam
|
||||
return (health < (100 - odmg))
|
||||
|
||||
/mob/living/carbon/human/proc/handle_splints() //proc that rebuilds the list of splints on this person, for ease of processing
|
||||
splinted_limbs.Cut()
|
||||
for(var/obj/item/organ/external/limb in bodyparts)
|
||||
if(limb.status & ORGAN_SPLINTED)
|
||||
splinted_limbs += limb
|
||||
@@ -55,6 +55,7 @@
|
||||
if(L.brute_dam < L.min_broken_damage)
|
||||
L.status &= ~ORGAN_BROKEN
|
||||
L.status &= ~ORGAN_SPLINTED
|
||||
H.handle_splints()
|
||||
L.perma_injury = 0
|
||||
break // We're only checking one limb here, bucko
|
||||
if(prob(3))
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
affected.status &= ~ORGAN_BROKEN
|
||||
affected.status &= ~ORGAN_SPLINTED
|
||||
affected.perma_injury = 0
|
||||
|
||||
target.handle_splints()
|
||||
return 1
|
||||
|
||||
/datum/surgery_step/finish_bone/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
|
||||
@@ -68,6 +68,8 @@
|
||||
var/can_stand
|
||||
var/wound_cleanup_timer
|
||||
|
||||
var/splinted_count = 0 //Time when this organ was last splinted
|
||||
|
||||
/obj/item/organ/external/necrotize(update_sprite=TRUE)
|
||||
if(status & (ORGAN_ROBOT|ORGAN_DEAD))
|
||||
return
|
||||
@@ -468,6 +470,8 @@ This function completely restores a damaged organ to perfect condition.
|
||||
|
||||
//Infections
|
||||
update_germs()
|
||||
//Splints
|
||||
update_splints()
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -680,6 +684,17 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
tbrute = 3
|
||||
return "[tbrute][tburn]"
|
||||
|
||||
/obj/item/organ/external/proc/update_splints() //we're processing splints like this instead of on a per step basis for efficiency
|
||||
if(!(status & ORGAN_SPLINTED))
|
||||
return
|
||||
if(owner.step_count >= splinted_count + SPLINT_LIFE)
|
||||
status &= ~ORGAN_SPLINTED //oh no, we actually need surgery now!
|
||||
owner.visible_message("<span class=danger>[owner] screams in pain as their splint pops off their [src.name]!</span>","<span class=userdanger>You scream in pain as your splint pops off your [src.name]!")
|
||||
owner.emote("scream")
|
||||
owner.Stun(2)
|
||||
owner.handle_splints()
|
||||
|
||||
|
||||
/****************************************************
|
||||
DISMEMBERMENT
|
||||
****************************************************/
|
||||
|
||||
Reference in New Issue
Block a user