diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 0aecce2a5a0..8958b9995f8 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -496,9 +496,28 @@ This function completely restores a damaged organ to perfect condition. //Infections update_germs() + + //check if an online RIG can splint the broken bone + check_rigsplints() else ..() +/obj/item/organ/external/proc/check_rigsplints() + if((status & ORGAN_BROKEN) && !(status & ORGAN_SPLINTED)) + if(istype(owner,/mob/living/carbon/human)) + var/mob/living/carbon/human/H = owner + if(H.back && istype(H.back, /obj/item/weapon/rig)) + var/obj/item/weapon/rig/R = H.back + if(R.offline) + return + if(H.wear_suit && istype(H.wear_suit,/obj/item/clothing/suit/space)) + var/obj/item/clothing/suit/space/suit = H.wear_suit + if(isnull(suit.supporting_limbs)) + return + to_chat(owner, "You feel \the [suit] constrict about your [name], supporting it.") + status |= ORGAN_SPLINTED + suit.supporting_limbs |= src + //Updating germ levels. Handles organ germ levels and necrosis. /* The INFECTION_LEVEL values defined in setup.dm control the time it takes to reach the different @@ -931,22 +950,7 @@ Note that amputating the affected organ does in fact remove the infection from t release_restraints() // This is mostly for the ninja suit to stop ninja being so crippled by breaks. - // TODO: consider moving this to a suit proc or process() or something during - // hardsuit rewrite. - if(owner && !(status & ORGAN_SPLINTED) && istype(owner,/mob/living/carbon/human)) - - var/mob/living/carbon/human/H = owner - - if(H.wear_suit && istype(H.wear_suit,/obj/item/clothing/suit/space)) - - var/obj/item/clothing/suit/space/suit = H.wear_suit - - if(isnull(suit.supporting_limbs)) - return - - to_chat(owner, "You feel \the [suit] constrict about your [name], supporting it.") - status |= ORGAN_SPLINTED - suit.supporting_limbs |= src + check_rigsplints() return /obj/item/organ/external/proc/mend_fracture() @@ -956,6 +960,7 @@ Note that amputating the affected organ does in fact remove the infection from t return 0 //will just immediately fracture again status &= ~ORGAN_BROKEN + return 1 /obj/item/organ/external/robotize(var/company) diff --git a/html/changelogs/geeves-organDablage.yml b/html/changelogs/geeves-organDablage.yml new file mode 100644 index 00000000000..010c99f219c --- /dev/null +++ b/html/changelogs/geeves-organDablage.yml @@ -0,0 +1,41 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: Geeves + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - rscdel: "Allows RIGs to splint fractured limbs whenever."