mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +01:00
Merge pull request #7609 from Vivalas/splint_nerf
Makes surgery great again (nerfs splints)
This commit is contained in:
@@ -1117,4 +1117,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()
|
||||
@@ -62,6 +62,7 @@
|
||||
|
||||
/mob/living/carbon/human/Destroy()
|
||||
QDEL_LIST(bodyparts)
|
||||
splinted_limbs.Cut()
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/dummy
|
||||
|
||||
@@ -72,3 +72,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
|
||||
|
||||
@@ -36,40 +36,45 @@
|
||||
/mob/living/carbon/human/Move(NewLoc, direct)
|
||||
. = ..()
|
||||
if(.) // did we actually move?
|
||||
if(!lying && !buckled)
|
||||
var/obj/item/clothing/shoes/S = shoes
|
||||
if(!has_gravity(loc))
|
||||
return
|
||||
//Bloody footprints
|
||||
var/turf/T = get_turf(src)
|
||||
var/obj/item/organ/external/l_foot = get_organ("l_foot")
|
||||
var/obj/item/organ/external/r_foot = get_organ("r_foot")
|
||||
var/hasfeet = 1
|
||||
if(!l_foot && !r_foot)
|
||||
hasfeet = 0
|
||||
if(!lying && !buckled && !throwing)
|
||||
for(var/obj/item/organ/external/splinted in splinted_limbs)
|
||||
splinted.update_splints()
|
||||
|
||||
if(!has_gravity(loc))
|
||||
return
|
||||
|
||||
var/obj/item/clothing/shoes/S = shoes
|
||||
|
||||
//Bloody footprints
|
||||
var/turf/T = get_turf(src)
|
||||
var/obj/item/organ/external/l_foot = get_organ("l_foot")
|
||||
var/obj/item/organ/external/r_foot = get_organ("r_foot")
|
||||
var/hasfeet = TRUE
|
||||
if(!l_foot && !r_foot)
|
||||
hasfeet = FALSE
|
||||
|
||||
if(shoes)
|
||||
if(S.bloody_shoes && S.bloody_shoes[S.blood_state])
|
||||
var/obj/effect/decal/cleanable/blood/footprints/oldFP = locate(/obj/effect/decal/cleanable/blood/footprints) in T
|
||||
if(oldFP && oldFP.blood_state == S.blood_state && oldFP.basecolor == S.blood_color)
|
||||
return
|
||||
else
|
||||
//No oldFP or it's a different kind of blood
|
||||
S.bloody_shoes[S.blood_state] = max(0, S.bloody_shoes[S.blood_state] - BLOOD_LOSS_PER_STEP)
|
||||
createFootprintsFrom(shoes, dir, T)
|
||||
update_inv_shoes()
|
||||
else if(hasfeet)
|
||||
if(bloody_feet && bloody_feet[blood_state])
|
||||
var/obj/effect/decal/cleanable/blood/footprints/oldFP = locate(/obj/effect/decal/cleanable/blood/footprints) in T
|
||||
if(oldFP && oldFP.blood_state == blood_state && oldFP.basecolor == feet_blood_color)
|
||||
return
|
||||
else
|
||||
bloody_feet[blood_state] = max(0, bloody_feet[blood_state] - BLOOD_LOSS_PER_STEP)
|
||||
createFootprintsFrom(src, dir, T)
|
||||
update_inv_shoes()
|
||||
//End bloody footprints
|
||||
if(S)
|
||||
S.step_action(src)
|
||||
if(shoes)
|
||||
if(S.bloody_shoes && S.bloody_shoes[S.blood_state])
|
||||
var/obj/effect/decal/cleanable/blood/footprints/oldFP = locate(/obj/effect/decal/cleanable/blood/footprints) in T
|
||||
if(oldFP && oldFP.blood_state == S.blood_state && oldFP.basecolor == S.blood_color)
|
||||
return
|
||||
else
|
||||
//No oldFP or it's a different kind of blood
|
||||
S.bloody_shoes[S.blood_state] = max(0, S.bloody_shoes[S.blood_state] - BLOOD_LOSS_PER_STEP)
|
||||
createFootprintsFrom(shoes, dir, T)
|
||||
update_inv_shoes()
|
||||
else if(hasfeet)
|
||||
if(bloody_feet && bloody_feet[blood_state])
|
||||
var/obj/effect/decal/cleanable/blood/footprints/oldFP = locate(/obj/effect/decal/cleanable/blood/footprints) in T
|
||||
if(oldFP && oldFP.blood_state == blood_state && oldFP.basecolor == feet_blood_color)
|
||||
return
|
||||
else
|
||||
bloody_feet[blood_state] = max(0, bloody_feet[blood_state] - BLOOD_LOSS_PER_STEP)
|
||||
createFootprintsFrom(src, dir, T)
|
||||
update_inv_shoes()
|
||||
//End bloody footprints
|
||||
if(S)
|
||||
S.step_action(src)
|
||||
|
||||
/mob/living/carbon/human/handle_footstep(turf/T)
|
||||
if(..())
|
||||
|
||||
@@ -182,3 +182,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
|
||||
@@ -54,6 +54,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)
|
||||
|
||||
@@ -58,6 +58,8 @@
|
||||
var/can_grasp
|
||||
var/can_stand
|
||||
|
||||
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
|
||||
@@ -84,6 +86,7 @@
|
||||
|
||||
if(owner)
|
||||
owner.bodyparts_by_name[limb_name] = null
|
||||
owner.splinted_limbs -= src
|
||||
|
||||
QDEL_LIST(children)
|
||||
|
||||
@@ -196,6 +199,10 @@
|
||||
|
||||
if(status & ORGAN_BROKEN && prob(40) && brute)
|
||||
owner.emote("scream") //getting hit on broken hand hurts
|
||||
if(status & ORGAN_SPLINTED && prob((brute + burn)*4)) //taking damage to splinted limbs removes the splints
|
||||
status &= ~ORGAN_SPLINTED
|
||||
owner.visible_message("<span class='danger'>The splint on [owner]'s left arm unravels from their [name]!</span>","<span class='userdanger'>The splint on your [name] unravels!</span>")
|
||||
owner.handle_splints()
|
||||
if(used_weapon)
|
||||
add_autopsy_data("[used_weapon]", brute + burn)
|
||||
|
||||
@@ -458,6 +465,18 @@ 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()
|
||||
if(!(status & ORGAN_SPLINTED))
|
||||
owner.splinted_limbs -= src
|
||||
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 [name]!</span>","<span class='userdanger'>You scream in pain as your splint pops off your [name]!</span>")
|
||||
owner.emote("scream")
|
||||
owner.Stun(2)
|
||||
owner.handle_splints()
|
||||
|
||||
|
||||
/****************************************************
|
||||
DISMEMBERMENT
|
||||
****************************************************/
|
||||
@@ -648,6 +667,9 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
var/is_robotic = status & ORGAN_ROBOT
|
||||
var/mob/living/carbon/human/victim = owner
|
||||
|
||||
if(status & ORGAN_SPLINTED)
|
||||
victim.splinted_limbs -= src
|
||||
|
||||
for(var/obj/item/I in embedded_objects)
|
||||
embedded_objects -= I
|
||||
I.forceMove(src)
|
||||
@@ -754,4 +776,4 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
for(var/X in bodyparts)
|
||||
var/obj/item/organ/external/L = X
|
||||
for(var/obj/item/I in L.embedded_objects)
|
||||
return 1
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user