diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 95783d115b0..e483b1cc2da 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -1425,6 +1425,8 @@ Note that amputating the affected organ does in fact remove the infection from t else return FALSE +#define EMBED_BASE_DAMAGE 5 + /obj/item/organ/external/proc/embed(obj/item/W, silent = FALSE, supplied_message, datum/wound/supplied_wound) if(!owner || loc != owner) return @@ -1439,11 +1441,15 @@ Note that amputating the affected organ does in fact remove the infection from t owner.visible_message(SPAN_DANGER("\The [W] sticks in [owner]'s wound!"), SPAN_DANGER("\The [W] sticks in your wound!")) - if(supplied_wound) + //Did we not get a supplied wound? Start by finding an existing wound that fits. + if(!supplied_wound) for(var/datum/wound/wound as anything in wounds) - if ((wound.damage_type == INJURY_TYPE_CUT || wound.damage_type == INJURY_TYPE_PIERCE) && wound.damage >= W.w_class * 5) + if ((wound.damage_type == INJURY_TYPE_CUT || wound.damage_type == INJURY_TYPE_PIERCE) && wound.damage >= W.w_class * EMBED_BASE_DAMAGE) supplied_wound = wound break + //Nothing still? Make a new wound for this object to embed in. + if(!supplied_wound) + supplied_wound = createwound(INJURY_TYPE_PIERCE, W.w_class * EMBED_BASE_DAMAGE) if(!supplied_wound || (W in supplied_wound.embedded_objects)) // Just in case. return @@ -1458,6 +1464,8 @@ Note that amputating the affected organ does in fact remove the infection from t H.drop_from_inventory(W,owner) W.forceMove(owner) +#undef EMBED_BASE_DAMAGE + /obj/item/organ/external/removed(var/mob/living/user, var/ignore_children = 0) if(!owner) diff --git a/html/changelogs/GeneralCamo - Wound fix.yml b/html/changelogs/GeneralCamo - Wound fix.yml new file mode 100644 index 00000000000..2e72c0daef7 --- /dev/null +++ b/html/changelogs/GeneralCamo - Wound fix.yml @@ -0,0 +1,58 @@ +################################ +# 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 +# - (fixes bugs) +# wip +# - (work in progress) +# qol +# - (quality of life) +# soundadd +# - (adds a sound) +# sounddel +# - (removes a sound) +# rscadd +# - (adds a feature) +# rscdel +# - (removes a feature) +# imageadd +# - (adds an image or sprite) +# imagedel +# - (removes an image or sprite) +# spellcheck +# - (fixes spelling or grammar) +# experiment +# - (experimental change) +# balance +# - (balance changes) +# code_imp +# - (misc internal code change) +# refactor +# - (refactors code) +# config +# - (makes a change to the config files) +# admin +# - (makes changes to administrator tools) +# server +# - (miscellaneous changes to server) +################################# + +# Your name. +author: GeneralCamo + +# 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, this gets changed to [] after reading. Just remove the brackets when you add new shit. +# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog. +changes: + - bugfix: "Fixed shrapnel not correctly creating new wounds, causing them to disappear."