diff --git a/code/__DEFINES/DNA.dm b/code/__DEFINES/DNA.dm
index a077c8a47ef..6610e463163 100644
--- a/code/__DEFINES/DNA.dm
+++ b/code/__DEFINES/DNA.dm
@@ -126,6 +126,8 @@
#define AGENDER 16
/// Do not draw eyes or eyeless overlay
#define NOEYESPRITES 17
+/// If this species can be scarred (fleshy)
+#define CAN_SCAR 18
//organ slots
#define ORGAN_SLOT_BRAIN "brain"
diff --git a/code/__DEFINES/admin.dm b/code/__DEFINES/admin.dm
index fca7032074b..fb78a0dcd00 100644
--- a/code/__DEFINES/admin.dm
+++ b/code/__DEFINES/admin.dm
@@ -79,6 +79,9 @@
#define ADMIN_PUNISHMENT_FAT "Fatten up"
#define ADMIN_PUNISHMENT_FAKEBWOINK "Fake bwoink"
#define ADMIN_PUNISHMENT_NUGGET "Nugget"
+#define ADMIN_PUNISHMENT_CRACK ":B:oneless"
+#define ADMIN_PUNISHMENT_BLEED ":B:loodless"
+#define ADMIN_PUNISHMENT_SCARIFY "Scarify"
#define AHELP_ACTIVE 1
#define AHELP_CLOSED 2
diff --git a/code/__DEFINES/dcs/signals.dm b/code/__DEFINES/dcs/signals.dm
index 9609f19ceb4..6083b933145 100644
--- a/code/__DEFINES/dcs/signals.dm
+++ b/code/__DEFINES/dcs/signals.dm
@@ -65,6 +65,7 @@
#define COMSIG_PARENT_EXAMINE "atom_examine"
///from base of atom/get_examine_name(): (/mob, list/overrides)
#define COMSIG_ATOM_GET_EXAMINE_NAME "atom_examine_name"
+#define COMSIG_PARENT_EXAMINE_MORE "atom_examine_more" ///from base of atom/examine_more(): (/mob)
//Positions for overrides list
#define EXAMINE_POSITION_ARTICLE (1<<0)
#define EXAMINE_POSITION_BEFORE (1<<1)
@@ -327,8 +328,6 @@
#define COMSIG_MOB_SWAP_HANDS "mob_swap_hands"
#define COMPONENT_BLOCK_SWAP (1<<0)
-// /mob/living signals
-
///from base of mob/living/resist() (/mob/living)
#define COMSIG_LIVING_RESIST "living_resist"
///from base of mob/living/IgniteMob() (/mob/living)
@@ -345,9 +344,7 @@
#define COMSIG_LIVING_REVIVE "living_revive"
///from base of /mob/living/regenerate_limbs(): (noheal, excluded_limbs)
#define COMSIG_LIVING_REGENERATE_LIMBS "living_regen_limbs"
-///from base of /obj/item/bodypart/proc/attach_limb(): (new_limb, special) allows you to fail limb attachment
-#define COMSIG_LIVING_ATTACH_LIMB "living_attach_limb"
- #define COMPONENT_NO_ATTACH (1<<0)
+
///sent from borg recharge stations: (amount, repairs)
#define COMSIG_PROCESS_BORGCHARGER_OCCUPANT "living_charge"
///sent when a mob/login() finishes: (client)
@@ -374,7 +371,13 @@
#define COMSIG_LIVING_CAN_TRACK "mob_cantrack"
#define COMPONENT_CANT_TRACK (1<<0)
-// /mob/living/carbon signals
+// /mob/living/carbon physiology signals
+#define COMSIG_CARBON_GAIN_WOUND "carbon_gain_wound" //from /datum/wound/proc/apply_wound() (/mob/living/carbon/C, /datum/wound/W, /obj/item/bodypart/L)
+#define COMSIG_CARBON_LOSE_WOUND "carbon_lose_wound" //from /datum/wound/proc/remove_wound() (/mob/living/carbon/C, /datum/wound/W, /obj/item/bodypart/L)
+///from base of /obj/item/bodypart/proc/attach_limb(): (new_limb, special) allows you to fail limb attachment
+#define COMSIG_CARBON_ATTACH_LIMB "carbon_attach_limb"
+ #define COMPONENT_NO_ATTACH (1<<0)
+#define COMSIG_CARBON_REMOVE_LIMB "carbon_remove_limb" //from base of /obj/item/bodypart/proc/drop_limb(special, dismembered)
///from base of mob/living/carbon/soundbang_act(): (list(intensity))
#define COMSIG_CARBON_SOUNDBANG "carbon_soundbang"
diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm
index b9a53e85e4c..6ed26789093 100644
--- a/code/__DEFINES/mobs.dm
+++ b/code/__DEFINES/mobs.dm
@@ -66,6 +66,7 @@
#define BODYPART_NOT_DISABLED 0
#define BODYPART_DISABLED_DAMAGE 1
#define BODYPART_DISABLED_PARALYSIS 2
+#define BODYPART_DISABLED_WOUND 3
#define DEFAULT_BODYPART_ICON_ORGANIC 'icons/mob/human_parts_greyscale.dmi'
#define DEFAULT_BODYPART_ICON_ROBOTIC 'icons/mob/augmentation/augments.dmi'
@@ -112,12 +113,14 @@
#define TRAUMA_RESILIENCE_BASIC 1 //Curable with chems
#define TRAUMA_RESILIENCE_SURGERY 2 //Curable with brain surgery
#define TRAUMA_RESILIENCE_LOBOTOMY 3 //Curable with lobotomy
-#define TRAUMA_RESILIENCE_MAGIC 4 //Curable only with magic
-#define TRAUMA_RESILIENCE_ABSOLUTE 5 //This is here to stay
+#define TRAUMA_RESILIENCE_WOUND 4 //Curable by healing the head wound
+#define TRAUMA_RESILIENCE_MAGIC 5 //Curable only with magic
+#define TRAUMA_RESILIENCE_ABSOLUTE 6 //This is here to stay
//Limit of traumas for each resilience tier
#define TRAUMA_LIMIT_BASIC 3
#define TRAUMA_LIMIT_SURGERY 2
+#define TRAUMA_LIMIT_WOUND 2
#define TRAUMA_LIMIT_LOBOTOMY 3
#define TRAUMA_LIMIT_MAGIC 3
#define TRAUMA_LIMIT_ABSOLUTE INFINITY
@@ -360,3 +363,6 @@
#define SLEEP_CHECK_DEATH(X) sleep(X); if(QDELETED(src) || stat == DEAD) return;
#define INTERACTING_WITH(X, Y) (Y in X.do_afters)
+
+/// If you examine the same atom twice in this timeframe, we call examine_more() instead of examine()
+#define EXAMINE_MORE_TIME 1 SECONDS
diff --git a/code/__DEFINES/obj_flags.dm b/code/__DEFINES/obj_flags.dm
index c29184e5c30..b73d5bc5252 100644
--- a/code/__DEFINES/obj_flags.dm
+++ b/code/__DEFINES/obj_flags.dm
@@ -56,3 +56,8 @@
#define ORGAN_VITAL (1<<4) //Currently only the brain
#define ORGAN_EDIBLE (1<<5) //is a snack? :D
#define ORGAN_SYNTHETIC_EMP (1<<6) //Synthetic organ affected by an EMP. Deteriorates over time.
+
+/// Integrity defines for clothing (not flags but close enough)
+#define CLOTHING_PRISTINE 0 // We have no damage on the clothing
+#define CLOTHING_DAMAGED 1 // There's some damage on the clothing but it still has at least one functioning bodypart and can be equipped
+#define CLOTHING_SHREDDED 2 // The clothing is useless and cannot be equipped unless repaired first
diff --git a/code/__DEFINES/status_effects.dm b/code/__DEFINES/status_effects.dm
index 59a0a4c22a7..a7f830dedce 100644
--- a/code/__DEFINES/status_effects.dm
+++ b/code/__DEFINES/status_effects.dm
@@ -36,6 +36,8 @@
#define STATUS_EFFECT_ANTIMAGIC /datum/status_effect/antimagic //grants antimagic (and reapplies if lost) for the duration
+#define STATUS_EFFECT_DETERMINED /datum/status_effect/determined //currently in a combat high from being seriously wounded
+
/////////////
// DEBUFFS //
/////////////
@@ -99,6 +101,8 @@
#define STATUS_EFFECT_FAKE_VIRUS /datum/status_effect/fake_virus //gives you fluff messages for cough, sneeze, headache, etc but without an actual virus
+#define STATUS_EFFECT_LIMP /datum/status_effect/limp //For when you have a busted leg (or two!) and want additional slowdown when walking on that leg
+
/////////////
// NEUTRAL //
/////////////
diff --git a/code/__DEFINES/tools.dm b/code/__DEFINES/tools.dm
index 2385387d2d0..4605975e78c 100644
--- a/code/__DEFINES/tools.dm
+++ b/code/__DEFINES/tools.dm
@@ -14,6 +14,7 @@
#define TOOL_DRILL "drill"
#define TOOL_SCALPEL "scalpel"
#define TOOL_SAW "saw"
+#define TOOL_BONESET "bonesetter"
// If delay between the start and the end of tool operation is less than MIN_TOOL_SOUND_DELAY,
// tool sound is only played when op is started. If not, it's played twice.
diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm
index aff6571082d..51505ae52b3 100644
--- a/code/__DEFINES/traits.dm
+++ b/code/__DEFINES/traits.dm
@@ -187,7 +187,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_NICE_SHOT "nice_shot" //hnnnnnnnggggg..... you're pretty good....
//non-mob traits
-#define TRAIT_PARALYSIS "paralysis" //Used for limb-based paralysis, where replacing the limb will fix it
+#define TRAIT_PARALYSIS "paralysis" //Used for limb-based paralysis, where replacing the limb will fix it
///Used for managing KEEP_TOGETHER in [appearance_flags]
#define TRAIT_KEEP_TOGETHER "keep-together"
diff --git a/code/__DEFINES/wounds.dm b/code/__DEFINES/wounds.dm
new file mode 100644
index 00000000000..b993429961d
--- /dev/null
+++ b/code/__DEFINES/wounds.dm
@@ -0,0 +1,43 @@
+#define WOUND_DAMAGE_EXPONENT 1.4
+
+#define WOUND_SEVERITY_TRIVIAL 0 // for jokey/meme wounds like stubbed toe, no standard messages/sounds or second winds
+#define WOUND_SEVERITY_MODERATE 1
+#define WOUND_SEVERITY_SEVERE 2
+#define WOUND_SEVERITY_CRITICAL 3
+#define WOUND_SEVERITY_LOSS 4 // theoretical total limb loss, like dismemberment for cuts
+
+#define WOUND_BRUTE 0
+#define WOUND_SHARP 1
+#define WOUND_BURN 2
+
+// How much determination reagent to add each time someone gains a new wound in [/datum/wound/proc/second_wind()]
+#define WOUND_DETERMINATION_MODERATE 1
+#define WOUND_DETERMINATION_SEVERE 2.5
+#define WOUND_DETERMINATION_CRITICAL 5
+
+#define WOUND_DETERMINATION_MAX 10
+
+// set wound_bonus on an item or attack to this to disable checking wounding for the attack
+#define CANT_WOUND -100
+
+// list in order of highest severity to lowest
+#define WOUND_LIST_BONE list(/datum/wound/brute/bone/critical, /datum/wound/brute/bone/severe, /datum/wound/brute/bone/moderate)
+#define WOUND_LIST_CUT list(/datum/wound/brute/cut/loss, /datum/wound/brute/cut/critical, /datum/wound/brute/cut/severe, /datum/wound/brute/cut/moderate)
+#define WOUND_LIST_BURN list(/datum/wound/burn/critical, /datum/wound/burn/severe, /datum/wound/burn/moderate)
+
+// Thresholds for infection for burn wounds, once infestation hits each threshold, things get steadily worse
+#define WOUND_INFECTION_MODERATE 4 // below this has no ill effects from infection
+#define WOUND_INFECTION_SEVERE 8 // then below here, you ooze some pus and suffer minor tox damage, but nothing serious
+#define WOUND_INFECTION_CRITICAL 12 // then below here, your limb occasionally locks up from damage and infection and briefly becomes disabled. Things are getting really bad
+#define WOUND_INFECTION_SEPTIC 20 // below here, your skin is almost entirely falling off and your limb locks up more frequently. You are within a stone's throw of septic paralysis and losing the limb
+// above WOUND_INFECTION_SEPTIC, your limb is completely putrid and you start rolling to lose the entire limb by way of paralyzation. After 3 failed rolls (~4-5% each probably), the limb is paralyzed
+
+#define WOUND_BURN_SANITIZATION_RATE 0.15 // how quickly sanitization removes infestation and decays per tick
+#define WOUND_CUT_MAX_BLOODFLOW 8 // how much blood you can lose per tick per cut max. 8 is a LOT of blood for one cut so don't worry about hitting it easily
+#define WOUND_BONE_HEAD_TIME_VARIANCE 20 // if we suffer a bone wound to the head that creates brain traumas, the timer for the trauma cycle is +/- by this percent (0-100)
+
+// The following are for persistent scar save formats
+#define SCAR_SAVE_ZONE 1 // The body_zone we're applying to on granting
+#define SCAR_SAVE_DESC 2 // The description we're loading
+#define SCAR_SAVE_PRECISE_LOCATION 3 // The precise location we're loading
+#define SCAR_SAVE_SEVERITY 4 // The severity the scar had
diff --git a/code/__HELPERS/_logging.dm b/code/__HELPERS/_logging.dm
index d919d0d7a24..a7d5f43ff08 100644
--- a/code/__HELPERS/_logging.dm
+++ b/code/__HELPERS/_logging.dm
@@ -90,6 +90,10 @@
if (CONFIG_GET(flag/log_attack))
WRITE_LOG(GLOB.world_attack_log, "ATTACK: [text]")
+/proc/log_wounded(text)
+ if (CONFIG_GET(flag/log_attack))
+ WRITE_LOG(GLOB.world_attack_log, "WOUND: [text]")
+
/proc/log_econ(text)
if (CONFIG_GET(flag/log_econ))
WRITE_LOG(GLOB.world_econ_log, "MONEY: [text]")
diff --git a/code/__HELPERS/type2type.dm b/code/__HELPERS/type2type.dm
index 3a9a730606e..62cbe99e572 100644
--- a/code/__HELPERS/type2type.dm
+++ b/code/__HELPERS/type2type.dm
@@ -217,8 +217,24 @@ GLOBAL_LIST_INIT(modulo_angle_to_dir, list(NORTH,NORTHEAST,EAST,SOUTHEAST,SOUTH,
return (a+(b-a)*((2/3)-hue)*6)
return a
+/// For finding out what body parts a body zone covers, the inverse of the below basically
+/proc/zone2body_parts_covered(def_zone)
+ switch(def_zone)
+ if(BODY_ZONE_CHEST)
+ return list(CHEST, GROIN)
+ if(BODY_ZONE_HEAD)
+ return list(HEAD)
+ if(BODY_ZONE_L_ARM)
+ return list(ARM_LEFT, HAND_LEFT)
+ if(BODY_ZONE_R_ARM)
+ return list(ARM_RIGHT, HAND_RIGHT)
+ if(BODY_ZONE_L_LEG)
+ return list(LEG_LEFT, FOOT_LEFT)
+ if(BODY_ZONE_R_LEG)
+ return list(LEG_RIGHT, FOOT_RIGHT)
+
//Turns a Body_parts_covered bitfield into a list of organ/limb names.
-//(I challenge you to find a use for this)
+//(I challenge you to find a use for this) -I found a use for it!!
/proc/body_parts_covered2organ_names(bpc)
var/list/covered_parts = list()
diff --git a/code/_onclick/other_mobs.dm b/code/_onclick/other_mobs.dm
index 993cdc41048..6c9e5964ba8 100644
--- a/code/_onclick/other_mobs.dm
+++ b/code/_onclick/other_mobs.dm
@@ -5,8 +5,12 @@
Otherwise pretty standard.
*/
/mob/living/carbon/human/UnarmedAttack(atom/A, proximity)
-
if(!has_active_hand()) //can't attack without a hand.
+ var/obj/item/bodypart/check_arm = get_active_hand()
+ if(check_arm && check_arm.is_disabled() == BODYPART_DISABLED_WOUND)
+ to_chat(src, "The damage in your [check_arm.name] is preventing you from using it! Get it fixed, or at least splinted!")
+ return
+
to_chat(src, "You look at your arm and sigh.")
return
diff --git a/code/controllers/subsystem/persistence.dm b/code/controllers/subsystem/persistence.dm
index c60b5e685c7..ab75a1c619a 100644
--- a/code/controllers/subsystem/persistence.dm
+++ b/code/controllers/subsystem/persistence.dm
@@ -180,6 +180,7 @@ SUBSYSTEM_DEF(persistence)
CollectAntagReputation()
SaveRandomizedRecipes()
SavePaintings()
+ SaveScars()
/datum/controller/subsystem/persistence/proc/GetPhotoAlbums()
var/album_path = file("data/photo_albums.json")
@@ -388,3 +389,24 @@ SUBSYSTEM_DEF(persistence)
var/json_file = file("data/paintings.json")
fdel(json_file)
WRITE_FILE(json_file, json_encode(paintings))
+
+/datum/controller/subsystem/persistence/proc/SaveScars()
+ for(var/i in GLOB.joined_player_list)
+ var/mob/living/carbon/human/ending_human = get_mob_by_ckey(i)
+ if(!istype(ending_human) || !ending_human.mind || !ending_human.client || !ending_human.client.prefs || !ending_human.client.prefs.persistent_scars)
+ continue
+
+ var/mob/living/carbon/human/original_human = ending_human.mind.original_character
+ if(!original_human || original_human.stat == DEAD || !original_human.all_scars || !(original_human == ending_human))
+ if(ending_human.client) // i was told if i don't check this every step of the way byond might decide a client ceases to exist mid proc so here we go
+ ending_human.client.prefs.scars_list["[ending_human.client.prefs.scars_index]"] = ""
+ else
+ for(var/k in ending_human.all_wounds)
+ var/datum/wound/W = k
+ W.remove_wound() // so we can get the scars for open wounds
+ if(!ending_human.client)
+ return
+ ending_human.client.prefs.scars_list["[ending_human.client.prefs.scars_index]"] = ending_human.format_scars()
+ if(!ending_human.client)
+ return
+ ending_human.client.prefs.save_character()
diff --git a/code/controllers/subsystem/shuttle.dm b/code/controllers/subsystem/shuttle.dm
index 94ce94393e8..5024a1803c5 100644
--- a/code/controllers/subsystem/shuttle.dm
+++ b/code/controllers/subsystem/shuttle.dm
@@ -890,3 +890,4 @@ SUBSYSTEM_DEF(shuttle)
message_admins("[key_name_admin(usr)] loaded [mdp] with the shuttle manipulator.")
log_admin("[key_name(usr)] loaded [mdp] with the shuttle manipulator.")
SSblackbox.record_feedback("text", "shuttle_manipulator", 1, "[mdp.name]")
+
diff --git a/code/datums/armor.dm b/code/datums/armor.dm
index cbf4b76c60f..e317a05de2b 100644
--- a/code/datums/armor.dm
+++ b/code/datums/armor.dm
@@ -1,9 +1,9 @@
-#define ARMORID "armor-[melee]-[bullet]-[laser]-[energy]-[bomb]-[bio]-[rad]-[fire]-[acid]-[magic]"
+#define ARMORID "armor-[melee]-[bullet]-[laser]-[energy]-[bomb]-[bio]-[rad]-[fire]-[acid]-[magic]-[wound]"
-/proc/getArmor(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0, magic = 0)
+/proc/getArmor(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0, magic = 0, wound = 0)
. = locate(ARMORID)
if (!.)
- . = new /datum/armor(melee, bullet, laser, energy, bomb, bio, rad, fire, acid, magic)
+ . = new /datum/armor(melee, bullet, laser, energy, bomb, bio, rad, fire, acid, magic, wound)
/datum/armor
datum_flags = DF_USE_TAG
@@ -17,8 +17,9 @@
var/fire
var/acid
var/magic
+ var/wound
-/datum/armor/New(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0, magic = 0)
+/datum/armor/New(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0, magic = 0, wound = 0)
src.melee = melee
src.bullet = bullet
src.laser = laser
@@ -29,15 +30,16 @@
src.fire = fire
src.acid = acid
src.magic = magic
+ src.wound = wound
tag = ARMORID
-/datum/armor/proc/modifyRating(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0, magic = 0)
- return getArmor(src.melee+melee, src.bullet+bullet, src.laser+laser, src.energy+energy, src.bomb+bomb, src.bio+bio, src.rad+rad, src.fire+fire, src.acid+acid, src.magic+magic)
+/datum/armor/proc/modifyRating(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0, magic = 0, wound = 0)
+ return getArmor(src.melee+melee, src.bullet+bullet, src.laser+laser, src.energy+energy, src.bomb+bomb, src.bio+bio, src.rad+rad, src.fire+fire, src.acid+acid, src.magic+magic, src.wound+wound)
/datum/armor/proc/modifyAllRatings(modifier = 0)
- return getArmor(melee+modifier, bullet+modifier, laser+modifier, energy+modifier, bomb+modifier, bio+modifier, rad+modifier, fire+modifier, acid+modifier, magic+modifier)
+ return getArmor(melee+modifier, bullet+modifier, laser+modifier, energy+modifier, bomb+modifier, bio+modifier, rad+modifier, fire+modifier, acid+modifier, magic+modifier, wound+modifier)
-/datum/armor/proc/setRating(melee, bullet, laser, energy, bomb, bio, rad, fire, acid, magic)
+/datum/armor/proc/setRating(melee, bullet, laser, energy, bomb, bio, rad, fire, acid, magic, wound)
return getArmor((isnull(melee) ? src.melee : melee),\
(isnull(bullet) ? src.bullet : bullet),\
(isnull(laser) ? src.laser : laser),\
@@ -47,19 +49,20 @@
(isnull(rad) ? src.rad : rad),\
(isnull(fire) ? src.fire : fire),\
(isnull(acid) ? src.acid : acid),\
- (isnull(magic) ? src.magic : magic))
+ (isnull(magic) ? src.magic : magic),\
+ (isnull(wound) ? src.wound : wound))
/datum/armor/proc/getRating(rating)
return vars[rating]
/datum/armor/proc/getList()
- return list("melee" = melee, "bullet" = bullet, "laser" = laser, "energy" = energy, "bomb" = bomb, "bio" = bio, "rad" = rad, "fire" = fire, "acid" = acid, "magic" = magic)
+ return list("melee" = melee, "bullet" = bullet, "laser" = laser, "energy" = energy, "bomb" = bomb, "bio" = bio, "rad" = rad, "fire" = fire, "acid" = acid, "magic" = magic, "wound" = wound)
/datum/armor/proc/attachArmor(datum/armor/AA)
- return getArmor(melee+AA.melee, bullet+AA.bullet, laser+AA.laser, energy+AA.energy, bomb+AA.bomb, bio+AA.bio, rad+AA.rad, fire+AA.fire, acid+AA.acid, magic+AA.magic)
+ return getArmor(melee+AA.melee, bullet+AA.bullet, laser+AA.laser, energy+AA.energy, bomb+AA.bomb, bio+AA.bio, rad+AA.rad, fire+AA.fire, acid+AA.acid, magic+AA.magic, wound+AA.wound)
/datum/armor/proc/detachArmor(datum/armor/AA)
- return getArmor(melee-AA.melee, bullet-AA.bullet, laser-AA.laser, energy-AA.energy, bomb-AA.bomb, bio-AA.bio, rad-AA.rad, fire-AA.fire, acid-AA.acid, magic-AA.magic)
+ return getArmor(melee-AA.melee, bullet-AA.bullet, laser-AA.laser, energy-AA.energy, bomb-AA.bomb, bio-AA.bio, rad-AA.rad, fire-AA.fire, acid-AA.acid, magic-AA.magic, wound-AA.wound)
/datum/armor/vv_edit_var(var_name, var_value)
if (var_name == NAMEOF(src, tag))
diff --git a/code/datums/brain_damage/magic.dm b/code/datums/brain_damage/magic.dm
index ff04ceead93..a00b341b820 100644
--- a/code/datums/brain_damage/magic.dm
+++ b/code/datums/brain_damage/magic.dm
@@ -94,7 +94,7 @@
if(get_dist(owner, stalker) <= 1)
playsound(owner, 'sound/magic/demon_attack1.ogg', 50)
owner.visible_message("[owner] is torn apart by invisible claws!", "Ghostly claws tear your body apart!")
- owner.take_bodypart_damage(rand(20, 45))
+ owner.take_bodypart_damage(rand(20, 45), wound_bonus=CANT_WOUND)
else if(prob(50))
stalker.forceMove(get_step_towards(stalker, owner))
if(get_dist(owner, stalker) <= 8)
diff --git a/code/datums/components/butchering.dm b/code/datums/components/butchering.dm
index 6a964029b47..c34cd5bcd2f 100644
--- a/code/datums/components/butchering.dm
+++ b/code/datums/components/butchering.dm
@@ -2,7 +2,7 @@
var/speed = 80 //time in deciseconds taken to butcher something
var/effectiveness = 100 //percentage effectiveness; numbers above 100 yield extra drops
var/bonus_modifier = 0 //percentage increase to bonus item chance
- var/butcher_sound = 'sound/weapons/slice.ogg' //sound played when butchering
+ var/butcher_sound = 'sound/effects/butcher.ogg' //sound played when butchering
var/butchering_enabled = TRUE
var/can_be_blunt = FALSE
@@ -47,6 +47,10 @@
Butcher(user, M)
/datum/component/butchering/proc/startNeckSlice(obj/item/source, mob/living/carbon/human/H, mob/living/user)
+ if(INTERACTING_WITH(user, H))
+ to_chat(user, "You're already interacting with [H]!")
+ return
+
user.visible_message("[user] is slitting [H]'s throat!", \
"You start slicing [H]'s throat!", \
"You hear a cutting noise!", ignored_mobs = H)
@@ -64,8 +68,11 @@
H.visible_message("[user] slits [H]'s throat!", \
"[user] slits your throat...")
log_combat(user, H, "finishes slicing the throat of")
- H.apply_damage(source.force, BRUTE, BODY_ZONE_HEAD)
- H.bleed_rate = clamp(H.bleed_rate + 20, 0, 30)
+ H.apply_damage(source.force, BRUTE, BODY_ZONE_HEAD, wound_bonus=CANT_WOUND) // easy tiger, we'll get to that in a sec
+ var/obj/item/bodypart/slit_throat = H.get_bodypart(BODY_ZONE_HEAD)
+ if(slit_throat)
+ var/datum/wound/brute/cut/critical/screaming_through_a_slit_throat = new
+ screaming_through_a_slit_throat.apply_wound(slit_throat)
H.apply_status_effect(/datum/status_effect/neck_slice)
/datum/component/butchering/proc/Butcher(mob/living/butcher, mob/living/meat)
diff --git a/code/datums/components/caltrop.dm b/code/datums/components/caltrop.dm
index 3300392811c..1e91d771685 100644
--- a/code/datums/components/caltrop.dm
+++ b/code/datums/components/caltrop.dm
@@ -60,5 +60,5 @@
"You slide on [A]!")
cooldown = world.time
- H.apply_damage(damage, BRUTE, picked_def_zone)
+ H.apply_damage(damage, BRUTE, picked_def_zone, wound_bonus = CANT_WOUND)
H.Paralyze(60)
diff --git a/code/datums/components/embedded.dm b/code/datums/components/embedded.dm
index 41ad39e291f..2803fee3060 100644
--- a/code/datums/components/embedded.dm
+++ b/code/datums/components/embedded.dm
@@ -147,7 +147,7 @@
playsound(victim,'sound/weapons/bladeslice.ogg', 40)
weapon.add_mob_blood(victim)//it embedded itself in you, of course it's bloody!
var/damage = weapon.w_class * impact_pain_mult
- limb.receive_damage(brute=(1-pain_stam_pct) * damage, stamina=pain_stam_pct * damage)
+ limb.receive_damage(brute=(1-pain_stam_pct) * damage, stamina=pain_stam_pct * damage, wound_bonus=-30, sharpness = TRUE)
SEND_SIGNAL(victim, COMSIG_ADD_MOOD_EVENT, "embedded", /datum/mood_event/embedded)
else
victim.visible_message("[weapon] sticks itself to [victim]'s [limb.name]!",ignored_mobs=victim)
@@ -163,7 +163,7 @@
if(harmful && prob(chance))
var/damage = weapon.w_class * jostle_pain_mult
- limb.receive_damage(brute=(1-pain_stam_pct) * damage, stamina=pain_stam_pct * damage)
+ limb.receive_damage(brute=(1-pain_stam_pct) * damage, stamina=pain_stam_pct * damage, wound_bonus = CANT_WOUND)
to_chat(victim, "[weapon] embedded in your [limb.name] jostles and stings!")
@@ -173,7 +173,7 @@
if(harmful)
var/damage = weapon.w_class * remove_pain_mult
- limb.receive_damage(brute=(1-pain_stam_pct) * damage, stamina=pain_stam_pct * damage)
+ limb.receive_damage(brute=(1-pain_stam_pct) * damage, stamina=pain_stam_pct * damage, wound_bonus = CANT_WOUND)
victim.visible_message("[weapon] falls out of [victim.name]'s [limb.name]!", ignored_mobs=victim)
to_chat(victim, "[weapon] falls out of your [limb.name]!")
else
@@ -199,7 +199,7 @@
if(harmful)
var/damage = weapon.w_class * remove_pain_mult
- limb.receive_damage(brute=(1-pain_stam_pct) * damage, stamina=pain_stam_pct * damage) //It hurts to rip it out, get surgery you dingus.
+ limb.receive_damage(brute=(1-pain_stam_pct) * damage, stamina=pain_stam_pct * damage, sharpness=TRUE) //It hurts to rip it out, get surgery you dingus.
victim.emote("scream")
victim.visible_message("[victim] successfully rips [weapon] out of [victim.p_their()] [limb.name]!", "You successfully remove [weapon] from your [limb.name].")
else
@@ -276,7 +276,7 @@
damage *= 0.7
if(harmful && prob(chance))
- limb.receive_damage(brute=(1-pain_stam_pct) * damage, stamina=pain_stam_pct * damage)
+ limb.receive_damage(brute=(1-pain_stam_pct) * damage, stamina=pain_stam_pct * damage, wound_bonus = CANT_WOUND)
to_chat(victim, "[weapon] embedded in your [limb.name] hurts!")
if(prob(fall_chance))
diff --git a/code/datums/components/tackle.dm b/code/datums/components/tackle.dm
index 7d203665765..25620f97bbb 100644
--- a/code/datums/components/tackle.dm
+++ b/code/datums/components/tackle.dm
@@ -64,6 +64,7 @@
///Store the thrownthing datum for later use
/datum/component/tackler/proc/registerTackle(mob/living/carbon/user, datum/thrownthing/TT)
tackle = TT
+ tackle.thrower = user
///See if we can tackle or not. If we can, leap!
/datum/component/tackler/proc/checkTackle(mob/living/carbon/user, atom/A, params)
diff --git a/code/datums/diseases/advance/symptoms/flesh_eating.dm b/code/datums/diseases/advance/symptoms/flesh_eating.dm
index 2fbc4d8a4a6..f5c97e6f900 100644
--- a/code/datums/diseases/advance/symptoms/flesh_eating.dm
+++ b/code/datums/diseases/advance/symptoms/flesh_eating.dm
@@ -63,7 +63,8 @@ Bonus
if(bleed)
if(ishuman(M))
var/mob/living/carbon/human/H = M
- H.bleed_rate += 5 * power
+ var/obj/item/bodypart/random_part = pick(H.bodyparts)
+ random_part.generic_bleedstacks += 5 * power
return 1
/*
diff --git a/code/datums/diseases/advance/symptoms/sneeze.dm b/code/datums/diseases/advance/symptoms/sneeze.dm
index ac32f416aa5..d6e6d408c56 100644
--- a/code/datums/diseases/advance/symptoms/sneeze.dm
+++ b/code/datums/diseases/advance/symptoms/sneeze.dm
@@ -62,4 +62,4 @@ Bonus
if(cartoon_sneezing) //Yeah, this can fling you around even if you have a space suit helmet on. It's, uh, bluespace snot, yeah.
var/sneeze_distance = rand(2,4) //twice as far as a normal baseball bat strike will fling you
var/turf/target = get_ranged_target_turf(M, turn(M.dir, 180), sneeze_distance)
- M.throw_at(target, sneeze_distance, 7) //flings you at the speed that a normal baseball bat would fling you at
+ M.throw_at(target, sneeze_distance, rand(1,4)) //with the wounds update, sneezing at 7 speed was causing peoples bones to spontaneously explode, turning cartoonish sneezing into a nightmarishly lethal GBS 2.0 outbreak
diff --git a/code/datums/martial/sleeping_carp.dm b/code/datums/martial/sleeping_carp.dm
index 9e7850ba800..75e80df4cd9 100644
--- a/code/datums/martial/sleeping_carp.dm
+++ b/code/datums/martial/sleeping_carp.dm
@@ -45,7 +45,7 @@
playsound(get_turf(A), 'sound/effects/hit_kick.ogg', 50, TRUE, -1)
var/atom/throw_target = get_edge_target_turf(D, A.dir)
D.throw_at(throw_target, 7, 14, A)
- D.apply_damage(15, A.dna.species.attack_type, BODY_ZONE_CHEST)
+ D.apply_damage(15, A.dna.species.attack_type, BODY_ZONE_CHEST, wound_bonus = CANT_WOUND)
log_combat(A, D, "launchkicked (Sleeping Carp)")
return
@@ -54,13 +54,13 @@
A.do_attack_animation(D, ATTACK_EFFECT_KICK)
playsound(get_turf(A), 'sound/effects/hit_kick.ogg', 50, TRUE, -1)
if((D.mobility_flags & MOBILITY_STAND))
- D.apply_damage(10, A.dna.species.attack_type, BODY_ZONE_HEAD)
+ D.apply_damage(10, A.dna.species.attack_type, BODY_ZONE_HEAD, wound_bonus = CANT_WOUND)
D.apply_damage(40, STAMINA, BODY_ZONE_HEAD)
D.Knockdown(40)
D.visible_message("[A] kicks [D] in the head, sending them face first into the floor!", \
"You are kicked in the head by [A], sending you crashing to the floor!", "You hear a sickening sound of flesh hitting flesh!", COMBAT_MESSAGE_RANGE, A)
else
- D.apply_damage(5, A.dna.species.attack_type, BODY_ZONE_HEAD)
+ D.apply_damage(5, A.dna.species.attack_type, BODY_ZONE_HEAD, wound_bonus = CANT_WOUND)
D.apply_damage(40, STAMINA, BODY_ZONE_HEAD)
D.drop_all_held_items()
D.visible_message("[A] kicks [D] in the head!", \
@@ -85,7 +85,7 @@
D.visible_message("[A] [atk_verb]s [D]!", \
"[A] [atk_verb]s you!", null, null, A)
to_chat(A, "You [atk_verb] [D]!")
- D.apply_damage(rand(10,15), BRUTE, affecting)
+ D.apply_damage(rand(10,15), BRUTE, affecting, wound_bonus = CANT_WOUND)
playsound(get_turf(D), 'sound/weapons/punch1.ogg', 25, TRUE, -1)
log_combat(A, D, "punched (Sleeping Carp)")
return TRUE
diff --git a/code/datums/mind.dm b/code/datums/mind.dm
index 3e5854fe77f..651cd7501e1 100644
--- a/code/datums/mind.dm
+++ b/code/datums/mind.dm
@@ -71,6 +71,8 @@
var/list/skills_rewarded
///Assoc list of skills. Use SKILL_LVL to access level, and SKILL_EXP to access skill's exp.
var/list/known_skills = list()
+ ///What character we spawned in as- either at roundstart or latejoin, so we know for persistent scars if we ended as the same person or not
+ var/mob/original_character
/datum/mind/New(key)
src.key = key
@@ -90,6 +92,7 @@
return language_holder
/datum/mind/proc/transfer_to(mob/new_character, force_key_move = 0)
+ original_character = null
if(current) // remove ourself from our old body's mind variable
current.mind = null
UnregisterSignal(current, COMSIG_MOB_DEATH)
@@ -122,6 +125,8 @@
RegisterSignal(new_character, COMSIG_MOB_DEATH, .proc/set_death_time)
if(active || force_key_move)
new_character.key = key //now transfer the key to link the client to our new body
+ if(new_character.client)
+ LAZYCLEARLIST(new_character.client.recent_examines)
current.update_atom_languages()
/datum/mind/proc/init_known_skills()
diff --git a/code/datums/mood_events/generic_negative_events.dm b/code/datums/mood_events/generic_negative_events.dm
index 3f779cc8df3..7fd2a06b1d1 100644
--- a/code/datums/mood_events/generic_negative_events.dm
+++ b/code/datums/mood_events/generic_negative_events.dm
@@ -96,14 +96,18 @@
var/mob/living/carbon/human/H = owner
H.dna.species.start_wagging_tail(H)
addtimer(CALLBACK(H.dna.species, /datum/species.proc/stop_wagging_tail, H), 30)
- description = "They want to play on the table!\n"
+ description = "They want to play on the table!\n"
mood_change = 2
-/datum/mood_event/table_headsmash
- description = "My fucking head, that hurts..."
+/datum/mood_event/table_limbsmash
+ description = "That fucking table, man that hurts...\n"
mood_change = -3
timeout = 3 MINUTES
+/datum/mood_event/table_limbsmash/add_effects(obj/item/bodypart/banged_limb)
+ if(banged_limb)
+ description = "My fucking [banged_limb.name], man that hurts...\n"
+
/datum/mood_event/brain_damage
mood_change = -3
diff --git a/code/datums/mutations/body.dm b/code/datums/mutations/body.dm
index b1b2fcb3644..24c213ecab8 100644
--- a/code/datums/mutations/body.dm
+++ b/code/datums/mutations/body.dm
@@ -477,13 +477,13 @@
head.drop_organs()
qdel(head)
owner.regenerate_icons()
- RegisterSignal(owner, COMSIG_LIVING_ATTACH_LIMB, .proc/abortattachment)
+ RegisterSignal(owner, COMSIG_CARBON_ATTACH_LIMB, .proc/abortattachment)
/datum/mutation/human/headless/on_losing()
. = ..()
if(.)
return TRUE
- UnregisterSignal(owner, COMSIG_LIVING_ATTACH_LIMB)
+ UnregisterSignal(owner, COMSIG_CARBON_ATTACH_LIMB)
var/successful = owner.regenerate_limb(BODY_ZONE_HEAD, noheal = TRUE) //noheal needs to be TRUE to prevent weird adding and removing mutation healing
if(!successful)
stack_trace("HARS mutation head regeneration failed! (usually caused by headless syndrome having a head)")
diff --git a/code/datums/skills/medical.dm b/code/datums/skills/medical.dm
index f9bd5d541e6..07bc08d1e17 100644
--- a/code/datums/skills/medical.dm
+++ b/code/datums/skills/medical.dm
@@ -2,5 +2,6 @@
name = "Healing"
title = "Healer"
desc = "From Bandaids to biopsies, this improves your ability to get people back up both in the field and on the operating table."
- modifiers = list(SKILL_SPEED_MODIFIER = list(1, 0.95, 0.9, 0.85, 0.75, 0.6, 0.5))
+ modifiers = list(SKILL_SPEED_MODIFIER = list(1, 0.95, 0.9, 0.85, 0.75, 0.6, 0.5),
+ SKILL_PROBS_MODIFIER = list(0, 2, 4, 6, 8, 10, 12))
skill_cape_path = /obj/item/clothing/neck/cloak/skill_reward/healing
diff --git a/code/datums/status_effects/buffs.dm b/code/datums/status_effects/buffs.dm
index e4afaff7c63..c103097c454 100644
--- a/code/datums/status_effects/buffs.dm
+++ b/code/datums/status_effects/buffs.dm
@@ -252,6 +252,10 @@
owner.adjustBruteLoss(-10, FALSE)
owner.adjustFireLoss(-5, FALSE)
owner.adjustOxyLoss(-10)
+ if(!iscarbon(owner))
+ return
+ var/mob/living/carbon/C = owner
+ QDEL_LIST(C.all_scars)
/obj/screen/alert/status_effect/fleshmend
name = "Fleshmend"
diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm
index 6ccf07e32b2..f9a722eedbf 100644
--- a/code/datums/status_effects/debuffs.dm
+++ b/code/datums/status_effects/debuffs.dm
@@ -334,8 +334,19 @@
/datum/status_effect/neck_slice/tick()
var/mob/living/carbon/human/H = owner
- if(H.stat == DEAD || H.bleed_rate <= 8)
+ var/obj/item/bodypart/throat = H.get_bodypart(BODY_ZONE_HEAD)
+ if(H.stat == DEAD || !throat)
H.remove_status_effect(/datum/status_effect/neck_slice)
+
+ var/still_bleeding = FALSE
+ for(var/thing in throat.wounds)
+ var/datum/wound/W = thing
+ if(W.wound_type == WOUND_LIST_CUT && W.severity > WOUND_SEVERITY_MODERATE)
+ still_bleeding = TRUE
+ break
+ if(!still_bleeding)
+ H.remove_status_effect(/datum/status_effect/neck_slice)
+
if(prob(10))
H.emote(pick("gasp", "gag", "choke"))
diff --git a/code/datums/status_effects/status_effect.dm b/code/datums/status_effects/status_effect.dm
index 3130dd9a749..c0ffc35e788 100644
--- a/code/datums/status_effects/status_effect.dm
+++ b/code/datums/status_effects/status_effect.dm
@@ -73,6 +73,10 @@
return
duration = world.time + original_duration
+//do_after modifier!
+/datum/status_effect/proc/interact_speed_modifier()
+ return 1
+
//clickdelay/nextmove modifiers!
/datum/status_effect/proc/nextmove_modifier()
return 1
diff --git a/code/datums/status_effects/wound_effects.dm b/code/datums/status_effects/wound_effects.dm
new file mode 100644
index 00000000000..751a3508a38
--- /dev/null
+++ b/code/datums/status_effects/wound_effects.dm
@@ -0,0 +1,186 @@
+
+// The shattered remnants of your broken limbs fill you with determination!
+/obj/screen/alert/status_effect/determined
+ name = "Determined"
+ desc = "The serious wounds you've sustained have put your body into fight-or-flight mode! Now's the time to look for an exit!"
+ icon_state = "regenerative_core"
+
+/datum/status_effect/determined
+ id = "determined"
+ alert_type = /obj/screen/alert/status_effect/determined
+
+/datum/status_effect/determined/on_apply()
+ . = ..()
+ owner.visible_message("[owner] grits [owner.p_their()] teeth in pain!", "Your senses sharpen as your body tenses up from the wounds you've sustained!", vision_distance=COMBAT_MESSAGE_RANGE)
+
+/datum/status_effect/determined/on_remove()
+ owner.visible_message("[owner]'s body slackens noticeably!", "Your adrenaline rush dies off, and the pain from your wounds come aching back in...", vision_distance=COMBAT_MESSAGE_RANGE)
+ return ..()
+
+/datum/status_effect/limp
+ id = "limp"
+ status_type = STATUS_EFFECT_REPLACE
+ tick_interval = 10
+ alert_type = /obj/screen/alert/status_effect/limp
+ var/msg_stage = 0//so you dont get the most intense messages immediately
+ /// The left leg of the limping person
+ var/obj/item/bodypart/l_leg/left
+ /// The right leg of the limping person
+ var/obj/item/bodypart/r_leg/right
+ /// Which leg we're limping with next
+ var/obj/item/bodypart/next_leg
+ /// How many deciseconds we limp for on the left leg
+ var/slowdown_left = 0
+ /// How many deciseconds we limp for on the right leg
+ var/slowdown_right = 0
+
+/datum/status_effect/limp/on_apply()
+ if(!iscarbon(owner))
+ return FALSE
+ var/mob/living/carbon/C = owner
+ left = C.get_bodypart(BODY_ZONE_L_LEG)
+ right = C.get_bodypart(BODY_ZONE_R_LEG)
+ update_limp()
+ RegisterSignal(C, COMSIG_MOVABLE_MOVED, .proc/check_step)
+ RegisterSignal(C, list(COMSIG_CARBON_GAIN_WOUND, COMSIG_CARBON_LOSE_WOUND, COMSIG_CARBON_ATTACH_LIMB, COMSIG_CARBON_REMOVE_LIMB), .proc/update_limp)
+ return TRUE
+
+/datum/status_effect/limp/on_remove()
+ UnregisterSignal(owner, list(COMSIG_MOVABLE_MOVED, COMSIG_CARBON_GAIN_WOUND, COMSIG_CARBON_LOSE_WOUND, COMSIG_CARBON_ATTACH_LIMB, COMSIG_CARBON_REMOVE_LIMB))
+
+/obj/screen/alert/status_effect/limp
+ name = "Limping"
+ desc = "One or more of your legs has been wounded, slowing down steps with that leg! Get it fixed, or at least splinted!"
+
+/datum/status_effect/limp/proc/check_step(mob/whocares, OldLoc, Dir, forced)
+ if(!owner.client || !(owner.mobility_flags & MOBILITY_STAND) || !owner.has_gravity() || (owner.movement_type & FLYING) || forced)
+ return
+ var/determined_mod = 1
+ if(owner.has_status_effect(STATUS_EFFECT_DETERMINED))
+ determined_mod = 0.25
+ if(next_leg == left)
+ owner.client.move_delay += slowdown_left * determined_mod
+ next_leg = right
+ else
+ owner.client.move_delay += slowdown_right * determined_mod
+ next_leg = left
+
+/datum/status_effect/limp/proc/update_limp()
+ var/mob/living/carbon/C = owner
+ left = C.get_bodypart(BODY_ZONE_L_LEG)
+ right = C.get_bodypart(BODY_ZONE_R_LEG)
+
+ if(!left && !right)
+ C.remove_status_effect(src)
+ return
+
+ slowdown_left = 0
+ slowdown_right = 0
+
+ if(left)
+ for(var/thing in left.wounds)
+ var/datum/wound/W = thing
+ slowdown_left += W.limp_slowdown
+
+ if(right)
+ for(var/thing in right.wounds)
+ var/datum/wound/W = thing
+ slowdown_right += W.limp_slowdown
+
+ // this handles losing your leg with the limp and the other one being in good shape as well
+ if(!slowdown_left && !slowdown_right)
+ C.remove_status_effect(src)
+ return
+
+
+/////////////////////////
+//////// WOUNDS /////////
+/////////////////////////
+
+// wound alert
+/obj/screen/alert/status_effect/wound
+ name = "Wounded"
+ desc = "Your body has sustained serious damage, click here to inspect yourself."
+
+/obj/screen/alert/status_effect/wound/Click()
+ var/mob/living/carbon/C = usr
+ C.check_self_for_injuries()
+
+// wound status effect base
+/datum/status_effect/wound
+ id = "wound"
+ status_type = STATUS_EFFECT_MULTIPLE
+ var/obj/item/bodypart/linked_limb
+ var/datum/wound/linked_wound
+ alert_type = NONE
+
+/datum/status_effect/wound/on_creation(mob/living/new_owner, incoming_wound)
+ . = ..()
+ var/datum/wound/W = incoming_wound
+ linked_wound = W
+ linked_limb = linked_wound.limb
+
+/datum/status_effect/wound/on_remove()
+ linked_wound = null
+ linked_limb = null
+ UnregisterSignal(owner, COMSIG_CARBON_LOSE_WOUND)
+
+/datum/status_effect/wound/on_apply()
+ if(!iscarbon(owner))
+ return FALSE
+ RegisterSignal(owner, COMSIG_CARBON_LOSE_WOUND, .proc/check_remove)
+ return TRUE
+
+/// check if the wound getting removed is the wound we're tied to
+/datum/status_effect/wound/proc/check_remove(mob/living/L, datum/wound/W)
+ if(W == linked_wound)
+ qdel(src)
+
+
+// bones
+/datum/status_effect/wound/bone
+
+/datum/status_effect/wound/bone/interact_speed_modifier()
+ var/mob/living/carbon/C = owner
+
+ if(C.get_active_hand() == linked_limb)
+ to_chat(C, "The [lowertext(linked_wound)] in your [linked_limb.name] slows your progress!")
+ return linked_wound.interaction_efficiency_penalty
+
+ return 1
+
+/datum/status_effect/wound/bone/nextmove_modifier()
+ var/mob/living/carbon/C = owner
+
+ if(C.get_active_hand() == linked_limb)
+ return linked_wound.interaction_efficiency_penalty
+
+ return 1
+
+/datum/status_effect/wound/bone/moderate
+ id = "disjoint"
+/datum/status_effect/wound/bone/severe
+ id = "hairline"
+
+/datum/status_effect/wound/bone/critical
+ id = "compound"
+
+// cuts
+/datum/status_effect/wound/cut/moderate
+ id = "abrasion"
+
+/datum/status_effect/wound/cut/severe
+ id = "laceration"
+
+/datum/status_effect/wound/cut/critical
+ id = "avulsion"
+
+// burns
+/datum/status_effect/wound/burn/moderate
+ id = "seconddeg"
+
+/datum/status_effect/wound/burn/severe
+ id = "thirddeg"
+
+/datum/status_effect/wound/burn/critical
+ id = "fourthdeg"
diff --git a/code/datums/traits/negative.dm b/code/datums/traits/negative.dm
index 1e9e2187ee1..bb066f106f2 100644
--- a/code/datums/traits/negative.dm
+++ b/code/datums/traits/negative.dm
@@ -217,7 +217,7 @@
/datum/quirk/frail
name = "Frail"
- desc = "Your bones might as well be made of glass! Your limbs can take less damage before they become disabled."
+ desc = "Your bones might as well be made of glass! You suffer wounds much more easily than most."
value = -2
mob_trait = TRAIT_EASYLIMBDISABLE
gain_text = "You feel frail."
diff --git a/code/datums/traits/neutral.dm b/code/datums/traits/neutral.dm
index 48810769fce..88438040111 100644
--- a/code/datums/traits/neutral.dm
+++ b/code/datums/traits/neutral.dm
@@ -240,3 +240,19 @@
///Applies a bad moodlet for having an uncovered head
/datum/quirk/bald/proc/unequip_hat(mob/user, obj/item/clothing, force, newloc, no_move, invdrop, silent)
SEND_SIGNAL(quirk_holder, COMSIG_ADD_MOOD_EVENT, "bad_hair_day", /datum/mood_event/bald)
+
+/datum/quirk/longtimer
+ name = "Longtimer"
+ desc = "You've been around for a long time and seen more than your fair share of action, suffering some pretty nasty scars along the way. For whatever reason, you've declined to get them removed or augmented."
+ value = 0
+ gain_text = "Your body has seen better days."
+ lose_text = "Your sins may wash away, but those scars are here to stay..."
+ medical_record_text = "Patient has withstood significant physical trauma and declined plastic surgery procedures to heal scarring."
+ /// the minimum amount of scars we can generate
+ var/min_scars = 3
+ /// the maximum amount of scars we can generate
+ var/max_scars = 7
+
+/datum/quirk/longtimer/on_spawn()
+ var/mob/living/carbon/C = quirk_holder
+ C.generate_fake_scars(rand(min_scars, max_scars))
diff --git a/code/datums/wounds/_wounds.dm b/code/datums/wounds/_wounds.dm
new file mode 100644
index 00000000000..d70a4ebdb2d
--- /dev/null
+++ b/code/datums/wounds/_wounds.dm
@@ -0,0 +1,320 @@
+/*
+ Wounds are specific medical complications that can arise and be applied to (currently) carbons, with a focus on humans. All of the code for and related to this is heavily WIP,
+ and the documentation will be slanted towards explaining what each part/piece is leading up to, until such a time as I finish the core implementations. The original design doc
+ can be found at https://hackmd.io/@Ryll/r1lb4SOwU
+
+ Wounds are datums that operate like a mix of diseases, brain traumas, and components, and are applied to a /obj/item/bodypart (preferably attached to a carbon) when they take large spikes of damage
+ or under other certain conditions (thrown hard against a wall, sustained exposure to plasma fire, etc). Wounds are categorized by the three following criteria:
+ 1. Severity: Either MODERATE, SEVERE, or CRITICAL. See the hackmd for more details
+ 2. Viable zones: What body parts the wound is applicable to. Generic wounds like broken bones and severe burns can apply to every zone, but you may want to add special wounds for certain limbs
+ like a twisted ankle for legs only, or open air exposure of the organs for particularly gruesome chest wounds. Wounds should be able to function for every zone they are marked viable for.
+ 3. Damage type: Currently either BRUTE or BURN. Again, see the hackmd for a breakdown of my plans for each type.
+
+ When a body part suffers enough damage to get a wound, the severity (determined by a roll or something, worse damage leading to worse wounds), affected limb, and damage type sustained are factored into
+ deciding what specific wound will be applied. I'd like to have a few different types of wounds for at least some of the choices, but I'm just doing rough generals for now. Expect polishing
+*/
+
+/datum/wound
+ /// What it's named
+ var/name = "ouchie"
+ /// The description shown on the scanners
+ var/desc = ""
+ /// The basic treatment suggested by health analyzers
+ var/treat_text = ""
+ /// What the limb looks like on a cursory examine
+ var/examine_desc = "is badly hurt"
+
+ /// needed for "your arm has a compound fracture" vs "your arm has some third degree burns"
+ var/a_or_from = "a"
+ /// The visible message when this happens
+ var/occur_text = ""
+ /// This sound will be played upon the wound being applied
+ var/sound_effect
+
+ /// Either WOUND_SEVERITY_TRIVIAL (meme wounds like stubbed toe), WOUND_SEVERITY_MODERATE, WOUND_SEVERITY_SEVERE, or WOUND_SEVERITY_CRITICAL (or maybe WOUND_SEVERITY_LOSS)
+ var/severity = WOUND_SEVERITY_MODERATE
+ /// The list of wounds it belongs in, WOUND_LIST_BONE, WOUND_LIST_CUT, or WOUND_LIST_BURN
+ var/wound_type
+
+ /// What body zones can we affect
+ var/list/viable_zones = list(BODY_ZONE_HEAD, BODY_ZONE_CHEST, BODY_ZONE_L_ARM, BODY_ZONE_R_ARM, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)
+ /// Who owns the body part that we're wounding
+ var/mob/living/carbon/victim = null
+ /// If we only work on organics (everything right now)
+ var/organic_only = TRUE
+ /// The bodypart we're parented to
+ var/obj/item/bodypart/limb = null
+
+ /// Specific items such as bandages or sutures that can try directly treating this wound
+ var/list/treatable_by
+ /// Specific items such as bandages or sutures that can try directly treating this wound only if the user has the victim in an aggressive grab or higher
+ var/list/treatable_by_grabbed
+ /// Tools with the specified tool flag will also be able to try directly treating this wound
+ var/treatable_tool
+ /// Set to TRUE if we don't give a shit about the patient's comfort and are allowed to just use any random sharp thing on this wound. Will require an aggressive grab or more to perform
+ var/treatable_sharp
+ /// How long it will take to treat this wound with a standard effective tool, assuming it doesn't need surgery
+ var/base_treat_time = 5 SECONDS
+
+ /// Using this limb in a do_after interaction will multiply the length by this duration (arms)
+ var/interaction_efficiency_penalty = 1
+ /// Incoming damage on this limb will be multiplied by this, to simulate tenderness and vulnerability (mostly burns).
+ var/damage_mulitplier_penalty = 1
+ /// If set and this wound is applied to a leg, we take this many deciseconds extra per step on this leg
+ var/limp_slowdown
+ /// How much we're contributing to this limb's bleed_rate
+ var/blood_flow
+
+ /// The minimum we need to roll on [/obj/item/bodypart/proc/check_wounding()] to begin suffering this wound, see check_wounding_mods() for more
+ var/threshold_minimum
+ /// How much having this wound will add to all future check_wounding() rolls on this limb, to allow progression to worse injuries with repeated damage
+ var/threshold_penalty
+ /// If we need to process each life tick
+ var/processes = FALSE
+
+ /// If TRUE and an item that can treat multiple different types of coexisting wounds (gauze can be used to splint broken bones, staunch bleeding, and cover burns), we get first dibs if we come up first for it, then become nonpriority.
+ /// Otherwise, if no untreated wound claims the item, we cycle through the non priority wounds and pick a random one who can use that item.
+ var/treat_priority = FALSE
+
+ /// If having this wound makes currently makes the parent bodypart unusable
+ var/disabling
+
+ /// What status effect we assign on application
+ var/status_effect_type
+ /// The status effect we're linked to
+ var/datum/status_effect/linked_status_effect
+ /// If we're operating on this wound and it gets healed, we'll nix the surgery too
+ var/datum/surgery/attached_surgery
+ /// if you're a lazy git and just throw them in cryo, the wound will go away after accumulating severity * 25 power
+ var/cryo_progress
+
+ /// What kind of scars this wound will create description wise once healed
+ var/list/scarring_descriptions = list("general disfigurement")
+ /// If we've already tried scarring while removing (since remove_wound calls qdel, and qdel calls remove wound, .....) TODO: make this cleaner
+ var/already_scarred = FALSE
+ /// If we forced this wound through badmin smite, we won't count it towards the round totals
+ var/from_smite
+
+/datum/wound/Destroy()
+ if(attached_surgery)
+ QDEL_NULL(attached_surgery)
+ if(limb?.wounds && (src in limb.wounds)) // destroy can call remove_wound() and remove_wound() calls qdel, so we check to make sure there's anything to remove first
+ remove_wound()
+ limb = null
+ victim = null
+ return ..()
+
+/**
+ * apply_wound() is used once a wound type is instantiated to assign it to a bodypart, and actually come into play.
+ *
+ *
+ * Arguments:
+ * * L: The bodypart we're wounding, we don't care about the person, we can get them through the limb
+ * * silent: Not actually necessary I don't think, was originally used for demoting wounds so they wouldn't make new messages, but I believe old_wound took over that, I may remove this shortly
+ * * old_wound: If our new wound is a replacement for one of the same time (promotion or demotion), we can reference the old one just before it's removed to copy over necessary vars
+ * * smited- If this is a smite, we don't care about this wound for stat tracking purposes (not yet implemented)
+ */
+/datum/wound/proc/apply_wound(obj/item/bodypart/L, silent = FALSE, datum/wound/old_wound = null, smited = FALSE)
+ if(!istype(L) || !L.owner || !(L.body_zone in viable_zones) || isalien(L.owner))
+ qdel(src)
+ return
+
+ if(ishuman(L.owner))
+ var/mob/living/carbon/human/H = L.owner
+ if(organic_only && ((NOBLOOD in H.dna.species.species_traits) || !L.is_organic_limb()))
+ qdel(src)
+ return
+
+ // we accept promotions and demotions, but no point in redundancy. This should have already been checked wherever the wound was rolled and applied for (see: bodypart damage code), but we do an extra check
+ // in case we ever directly add wounds
+ for(var/i in L.wounds)
+ var/datum/wound/preexisting_wound = i
+ if((preexisting_wound.type == type) && (preexisting_wound != old_wound))
+ qdel(src)
+ return
+
+ victim = L.owner
+ limb = L
+ LAZYADD(victim.all_wounds, src)
+ LAZYADD(limb.wounds, src)
+ limb.update_wounds()
+ if(status_effect_type)
+ linked_status_effect = victim.apply_status_effect(status_effect_type, src)
+ SEND_SIGNAL(victim, COMSIG_CARBON_GAIN_WOUND, src, limb)
+ if(!victim.alerts["wound"]) // only one alert is shared between all of the wounds
+ victim.throw_alert("wound", /obj/screen/alert/status_effect/wound)
+
+ var/demoted
+ if(old_wound)
+ demoted = (severity <= old_wound.severity)
+
+ if(severity == WOUND_SEVERITY_TRIVIAL)
+ return
+
+ if(!(silent || demoted))
+ var/msg = "[victim]'s [limb.name] [occur_text]!"
+ var/vis_dist = COMBAT_MESSAGE_RANGE
+
+ if(severity != WOUND_SEVERITY_MODERATE)
+ msg = "[msg]"
+ vis_dist = DEFAULT_MESSAGE_RANGE
+
+ victim.visible_message(msg, "Your [limb.name] [occur_text]!", vision_distance = vis_dist)
+ if(sound_effect)
+ playsound(L.owner, sound_effect, 60 + 20 * severity, TRUE)
+
+ if(!demoted)
+ wound_injury(old_wound)
+ second_wind()
+
+/// Remove the wound from whatever it's afflicting, and cleans up whateverstatus effects it had or modifiers it had on interaction times. ignore_limb is used for detachments where we only want to forget the victim
+/datum/wound/proc/remove_wound(ignore_limb, replaced = FALSE)
+ //TODO: have better way to tell if we're getting removed without replacement (full heal) scar stuff
+ if(limb && !already_scarred && !replaced)
+ already_scarred = TRUE
+ var/datum/scar/new_scar = new
+ new_scar.generate(limb, src)
+ if(victim)
+ LAZYREMOVE(victim.all_wounds, src)
+ if(!victim.all_wounds)
+ victim.clear_alert("wound")
+ SEND_SIGNAL(victim, COMSIG_CARBON_LOSE_WOUND, src, limb)
+ if(limb && !ignore_limb)
+ LAZYREMOVE(limb.wounds, src)
+ limb.update_wounds()
+
+/**
+ * replace_wound() is used when you want to replace the current wound with a new wound, presumably of the same category, just of a different severity (either up or down counts)
+ *
+ * This proc actually instantiates the new wound based off the specific type path passed, then returns the new instantiated wound datum.
+ *
+ * Arguments:
+ * * new_type- The TYPE PATH of the wound you want to replace this, like /datum/wound/brute/cut/severe
+ * * smited- If this is a smite, we don't care about this wound for stat tracking purposes (not yet implemented)
+ */
+/datum/wound/proc/replace_wound(new_type, smited = FALSE)
+ var/datum/wound/new_wound = new new_type
+ already_scarred = TRUE
+ remove_wound(replaced=TRUE)
+ new_wound.apply_wound(limb, old_wound = src, smited = smited)
+ qdel(src)
+ return new_wound
+
+/// The immediate negative effects faced as a result of the wound
+/datum/wound/proc/wound_injury(datum/wound/old_wound = null)
+ return
+
+/// Additional beneficial effects when the wound is gained, in case you want to give a temporary boost to allow the victim to try an escape or last stand
+/datum/wound/proc/second_wind()
+ if(HAS_TRAIT(victim, TRAIT_NOMETABOLISM))
+ return
+
+ switch(severity)
+ if(WOUND_SEVERITY_MODERATE)
+ victim.reagents.add_reagent(/datum/reagent/determination, WOUND_DETERMINATION_MODERATE)
+ if(WOUND_SEVERITY_SEVERE)
+ victim.reagents.add_reagent(/datum/reagent/determination, WOUND_DETERMINATION_SEVERE)
+ if(WOUND_SEVERITY_CRITICAL)
+ victim.reagents.add_reagent(/datum/reagent/determination, WOUND_DETERMINATION_CRITICAL)
+
+/**
+ * try_treating() is an intercept run from [/mob/living/carbon/attackby()] right after surgeries but before anything else. Return TRUE here if the item is something that is relevant to treatment to take over the interaction.
+ *
+ * This proc leads into [/datum/wound/proc/treat()] and probably shouldn't be added onto in children types. You can specify what items or tools you want to be intercepted
+ * with var/list/treatable_by and var/treatable_tool, then if an item fulfills one of those requirements and our wound claims it first, it goes over to treat() and treat_self().
+ *
+ * Arguments:
+ * * I: The item we're trying to use
+ * * user: The mob trying to use it on us
+ */
+/datum/wound/proc/try_treating(obj/item/I, mob/user)
+ // first we weed out if we're not dealing with our wound's bodypart, or if it might be an attack
+ if(!I || limb.body_zone != user.zone_selected || (I.force && user.a_intent != INTENT_HELP))
+ return FALSE
+
+ var/allowed = FALSE
+
+ // check if we have a valid treatable tool (or, if cauteries are allowed, if we have something hot)
+ if((I.tool_behaviour == treatable_tool) || (treatable_tool == TOOL_CAUTERY && I.get_temperature()))
+ allowed = TRUE
+ // failing that, see if we're aggro grabbing them and if we have an item that works for aggro grabs only
+ else if(user.pulling == victim && user.grab_state >= GRAB_AGGRESSIVE && check_grab_treatments(I, user))
+ allowed = TRUE
+ // failing THAT, we check if we have a generally allowed item
+ else
+ for(var/allowed_type in treatable_by)
+ if(istype(I, allowed_type))
+ allowed = TRUE
+ break
+
+ // if none of those apply, we return false to avoid interrupting
+ if(!allowed)
+ return FALSE
+
+ // now that we've determined we have a valid attempt at treating, we can stomp on their dreams if we're already interacting with the patient
+ if(INTERACTING_WITH(user, victim))
+ to_chat(user, "You're already interacting with [victim]!")
+ return TRUE
+
+ // lastly, treat them
+ treat(I, user)
+ return TRUE
+
+/// Return TRUE if we have an item that can only be used while aggro grabbed (unhanded aggro grab treatments go in [/datum/wound/proc/try_handling()]). Treatment is still is handled in [/datum/wound/proc/treat()]
+/datum/wound/proc/check_grab_treatments(obj/item/I, mob/user)
+ return FALSE
+
+/// Like try_treating() but for unhanded interactions from humans, used by joint dislocations for manual bodypart chiropractice for example.
+/datum/wound/proc/try_handling(mob/living/carbon/human/user)
+ return FALSE
+
+/// Someone is using something that might be used for treating the wound on this limb
+/datum/wound/proc/treat(obj/item/I, mob/user)
+ return
+
+/// If var/processing is TRUE, this is run on each life tick
+/datum/wound/proc/handle_process()
+ return
+
+/// For use in do_after callback checks
+/datum/wound/proc/still_exists()
+ return (!QDELETED(src) && limb)
+
+/// When our parent bodypart is hurt
+/datum/wound/proc/receive_damage(wounding_type, wounding_dmg, wound_bonus)
+ return
+
+/// Called from cryoxadone and pyroxadone when they're proc'ing. Wounds will slowly be fixed separately from other methods when these are in effect. crappy name but eh
+/datum/wound/proc/on_xadone(power)
+ cryo_progress += power
+ if(cryo_progress > 33 * severity)
+ qdel(src)
+
+/// Called when we're crushed in an airlock or firedoor, for one of the improvised joint dislocation fixes
+/datum/wound/proc/crush()
+ return
+
+/**
+ * get_examine_description() is used in carbon/examine and human/examine to show the status of this wound. Useful if you need to show some status like the wound being splinted or bandaged.
+ *
+ * Return the full string line you want to show, note that we're already dealing with the 'warning' span at this point, and that \n is already appended for you in the place this is called from
+ *
+ * Arguments:
+ * * mob/user: The user examining the wound's owner, if that matters
+ */
+/datum/wound/proc/get_examine_description(mob/user)
+ return "[victim.p_their(TRUE)] [limb.name] [examine_desc]!"
+
+/datum/wound/proc/get_scanner_description(mob/user)
+ return "Type: [name]\nSeverity: [severity_text()]\nDescription: [desc]\nRecommended Treatment: [treat_text]"
+
+/datum/wound/proc/severity_text()
+ switch(severity)
+ if(WOUND_SEVERITY_TRIVIAL)
+ return "Trivial"
+ if(WOUND_SEVERITY_MODERATE)
+ return "Moderate"
+ if(WOUND_SEVERITY_SEVERE)
+ return "Severe"
+ if(WOUND_SEVERITY_CRITICAL)
+ return "Critical"
diff --git a/code/datums/wounds/bones.dm b/code/datums/wounds/bones.dm
new file mode 100644
index 00000000000..6926d321660
--- /dev/null
+++ b/code/datums/wounds/bones.dm
@@ -0,0 +1,461 @@
+
+/*
+ Bones
+*/
+// TODO: well, a lot really, but i'd kill to get overlays and a bonebreaking effect like Blitz: The League, similar to electric shock skeletons
+
+/*
+ Base definition
+*/
+/datum/wound/brute/bone
+ sound_effect = 'sound/effects/crack1.ogg'
+ wound_type = WOUND_LIST_BONE
+
+ /// The item we're currently splinted with, if there is one
+ var/obj/item/stack/splinted
+
+ /// Have we been taped?
+ var/taped
+ /// Have we been bone gel'd?
+ var/gelled
+ /// If we did the gel + surgical tape healing method for fractures, how many regen points we need
+ var/regen_points_needed
+ /// Our current counter for gel + surgical tape regeneration
+ var/regen_points_current
+ /// If we suffer severe head booboos, we can get brain traumas tied to them
+ var/datum/brain_trauma/active_trauma
+ /// What brain trauma group, if any, we can draw from for head wounds
+ var/brain_trauma_group
+ /// If we deal brain traumas, when is the next one due?
+ var/next_trauma_cycle
+ /// How long do we wait +/- 20% for the next trauma?
+ var/trauma_cycle_cooldown
+ /// If this is a chest wound and this is set, we have this chance to cough up blood when hit in the chest
+ var/chance_internal_bleeding = 0
+
+/*
+ Overwriting of base procs
+*/
+/datum/wound/brute/bone/wound_injury(datum/wound/old_wound = null)
+ if(limb.body_zone == BODY_ZONE_HEAD && brain_trauma_group)
+ processes = TRUE
+ active_trauma = victim.gain_trauma_type(brain_trauma_group, TRAUMA_RESILIENCE_WOUND)
+ next_trauma_cycle = world.time + (rand(100-WOUND_BONE_HEAD_TIME_VARIANCE, 100+WOUND_BONE_HEAD_TIME_VARIANCE) * 0.01 * trauma_cycle_cooldown)
+
+ RegisterSignal(victim, COMSIG_HUMAN_EARLY_UNARMED_ATTACK, .proc/attack_with_hurt_hand)
+ if(limb.held_index && victim.get_item_for_held_index(limb.held_index) && (disabling || prob(30 * severity)))
+ var/obj/item/I = victim.get_item_for_held_index(limb.held_index)
+ if(istype(I, /obj/item/offhand))
+ I = victim.get_inactive_held_item()
+
+ if(I && victim.dropItemToGround(I))
+ victim.visible_message("[victim] drops [I] in shock!", "The force on your [limb.name] causes you to drop [I]!", vision_distance=COMBAT_MESSAGE_RANGE)
+
+ update_inefficiencies()
+
+/datum/wound/brute/bone/remove_wound(ignore_limb, replaced)
+ limp_slowdown = 0
+ QDEL_NULL(active_trauma)
+ if(victim)
+ UnregisterSignal(victim, COMSIG_HUMAN_EARLY_UNARMED_ATTACK)
+ return ..()
+
+/datum/wound/brute/bone/handle_process()
+ . = ..()
+ if(limb.body_zone == BODY_ZONE_HEAD && brain_trauma_group && world.time > next_trauma_cycle)
+ if(active_trauma)
+ QDEL_NULL(active_trauma)
+ else
+ active_trauma = victim.gain_trauma_type(brain_trauma_group, TRAUMA_RESILIENCE_WOUND)
+ next_trauma_cycle = world.time + (rand(100-WOUND_BONE_HEAD_TIME_VARIANCE, 100+WOUND_BONE_HEAD_TIME_VARIANCE) * 0.01 * trauma_cycle_cooldown)
+
+ if(!regen_points_needed)
+ return
+
+ regen_points_current++
+ if(prob(severity * 2))
+ victim.take_bodypart_damage(rand(2, severity * 2), stamina=rand(2, severity * 2.5), wound_bonus=CANT_WOUND)
+ if(prob(33))
+ to_chat(victim, "You feel a sharp pain in your body as your bones are reforming!")
+
+ if(regen_points_current > regen_points_needed)
+ if(!victim || !limb)
+ qdel(src)
+ return
+ to_chat(victim, "Your [limb.name] has recovered from your fracture!")
+ remove_wound()
+
+/// If we're a human who's punching something with a broken arm, we might hurt ourselves doing so
+/datum/wound/brute/bone/proc/attack_with_hurt_hand(mob/M, atom/target, proximity)
+ if(victim.get_active_hand() != limb || victim.a_intent == INTENT_HELP || !ismob(target) || severity <= WOUND_SEVERITY_MODERATE)
+ return
+
+ // With a severe or critical wound, you have a 15% or 30% chance to proc pain on hit
+ if(prob((severity - 1) * 15))
+ // And you have a 70% or 50% chance to actually land the blow, respectively
+ if(prob(70 - 20 * (severity - 1)))
+ to_chat(victim, "The fracture in your [limb.name] shoots with pain as you strike [target]!")
+ limb.receive_damage(brute=rand(1,5))
+ else
+ victim.visible_message("[victim] weakly strikes [target] with [victim.p_their()] broken [limb.name], recoiling from pain!", \
+ "You fail to strike [target] as the fracture in your [limb.name] lights up in unbearable pain!", vision_distance=COMBAT_MESSAGE_RANGE)
+ victim.emote("scream")
+ victim.Stun(0.5 SECONDS)
+ limb.receive_damage(brute=rand(3,7))
+ return COMPONENT_NO_ATTACK_HAND
+
+/datum/wound/brute/bone/receive_damage(wounding_type, wounding_dmg, wound_bonus)
+ if(!victim)
+ return
+
+ if(limb.body_zone == BODY_ZONE_CHEST && victim.blood_volume && prob(chance_internal_bleeding + wounding_dmg))
+ var/blood_bled = rand(1, wounding_dmg * (severity == WOUND_SEVERITY_CRITICAL ? 2 : 1.5)) // 12 brute toolbox can cause up to 18/24 bleeding with a severe/critical chest wound
+ switch(blood_bled)
+ if(1 to 6)
+ victim.bleed(blood_bled, TRUE)
+ if(7 to 13)
+ victim.visible_message("[victim] coughs up a bit of blood from the blow to [victim.p_their()] chest.", "You cough up a bit of blood from the blow to your chest.")
+ victim.bleed(blood_bled, TRUE)
+ if(14 to 19)
+ victim.visible_message("[victim] spits out a string of blood from the blow to [victim.p_their()] chest!", "You spit out a string of blood from the blow to your chest!")
+ new /obj/effect/temp_visual/dir_setting/bloodsplatter(victim.loc, victim.dir)
+ victim.bleed(blood_bled)
+ if(20 to INFINITY)
+ victim.visible_message("[victim] chokes up a spray of blood from the blow to [victim.p_their()] chest!", "You choke up on a spray of blood from the blow to your chest!")
+ victim.bleed(blood_bled)
+ new /obj/effect/temp_visual/dir_setting/bloodsplatter(victim.loc, victim.dir)
+ victim.add_splatter_floor(get_step(victim.loc, victim.dir))
+
+ if(!(wounding_type in list(WOUND_SHARP, WOUND_BURN)) || !splinted || wound_bonus == CANT_WOUND)
+ return
+
+ splinted.take_damage(wounding_dmg, damage_type = (wounding_type == WOUND_SHARP ? BRUTE : BURN), sound_effect = FALSE)
+ if(QDELETED(splinted))
+ var/destroyed_verb = (wounding_type == WOUND_SHARP ? "torn" : "burned")
+ victim.visible_message("The splint securing [victim]'s [limb.name] is [destroyed_verb] away!", "The splint securing your [limb.name] is [destroyed_verb] away!", vision_distance=COMBAT_MESSAGE_RANGE)
+ splinted = null
+ treat_priority = TRUE
+ update_inefficiencies()
+
+
+/datum/wound/brute/bone/get_examine_description(mob/user)
+ if(!splinted && !gelled && !taped)
+ return ..()
+
+ var/msg = ""
+ if(!splinted)
+ msg = "[victim.p_their(TRUE)] [limb.name] [examine_desc]"
+ else
+ var/splint_condition = ""
+ // how much life we have left in these bandages
+ switch(splinted.obj_integrity / splinted.max_integrity * 100)
+ if(0 to 25)
+ splint_condition = "just barely "
+ if(25 to 50)
+ splint_condition = "loosely "
+ if(50 to 75)
+ splint_condition = "mostly "
+ if(75 to INFINITY)
+ splint_condition = "tightly "
+
+ msg = "[victim.p_their(TRUE)] [limb.name] is [splint_condition] fastened in a splint of [splinted.name]"
+
+ if(taped)
+ msg += ", and appears to be reforming itself under some surgical tape!"
+ else if(gelled)
+ msg += ", with fizzing flecks of blue bone gel sparking off the bone!"
+ else
+ msg += "!"
+ return "[msg]"
+
+/*
+ New common procs for /datum/wound/brute/bone/
+*/
+
+/datum/wound/brute/bone/proc/update_inefficiencies()
+ if(limb.body_zone in list(BODY_ZONE_L_LEG, BODY_ZONE_R_LEG))
+ if(splinted)
+ limp_slowdown = initial(limp_slowdown) * splinted.splint_factor
+ else
+ limp_slowdown = initial(limp_slowdown)
+ victim.apply_status_effect(STATUS_EFFECT_LIMP)
+ else if(limb.body_zone in list(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM))
+ if(splinted)
+ interaction_efficiency_penalty = 1 + ((interaction_efficiency_penalty - 1) * splinted.splint_factor)
+ else
+ interaction_efficiency_penalty = interaction_efficiency_penalty
+
+ if(initial(disabling) && splinted)
+ disabling = FALSE
+ else if(initial(disabling))
+ disabling = TRUE
+
+ limb.update_wounds()
+
+/*
+ BEWARE OF REDUNDANCY AHEAD THAT I MUST PARE DOWN
+*/
+
+/datum/wound/brute/bone/proc/splint(obj/item/stack/I, mob/user)
+ if(splinted && splinted.splint_factor >= I.splint_factor)
+ to_chat(user, "The splint already on [user == victim ? "your" : "[victim]'s"] [limb.name] is better than you can do with [I].")
+ return
+
+ user.visible_message("[user] begins splinting [victim]'s [limb.name] with [I].", "You begin splinting [user == victim ? "your" : "[victim]'s"] [limb.name] with [I]...")
+
+ if(!do_after(user, base_treat_time * (user == victim ? 1.5 : 1), target = victim, extra_checks=CALLBACK(src, .proc/still_exists)))
+ return
+
+ user.visible_message("[user] finishes splinting [victim]'s [limb.name]!", "You finish splinting [user == victim ? "your" : "[victim]'s"] [limb.name]!")
+ treat_priority = FALSE
+ splinted = new I.type(limb)
+ splinted.amount = 1
+ I.use(1)
+ update_inefficiencies()
+
+/*
+ Moderate (Joint Dislocation)
+*/
+
+/datum/wound/brute/bone/moderate
+ name = "Joint Dislocation"
+ desc = "Patient's bone has been unset from socket, causing pain and reduced motor function."
+ treat_text = "Recommended application of bonesetter to affected limb, though manual relocation by applying an aggressive grab to the patient and helpfully interacting with afflicted limb may suffice."
+ examine_desc = "is awkwardly jammed out of place"
+ occur_text = "jerks violently and becomes unseated"
+ severity = WOUND_SEVERITY_MODERATE
+ viable_zones = list(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)
+ interaction_efficiency_penalty = 1.5
+ limp_slowdown = 3
+ threshold_minimum = 35
+ threshold_penalty = 15
+ treatable_tool = TOOL_BONESET
+ status_effect_type = /datum/status_effect/wound/bone/moderate
+ scarring_descriptions = list("light discoloring", "a slight blue tint")
+
+/datum/wound/brute/bone/moderate/crush()
+ if(prob(33))
+ victim.visible_message("[victim]'s dislocated [limb.name] pops back into place!", "Your dislocated [limb.name] pops back into place! Ow!")
+ remove_wound()
+
+/datum/wound/brute/bone/moderate/try_handling(mob/living/carbon/human/user)
+ if(user.pulling != victim || user.zone_selected != limb.body_zone || user.a_intent == INTENT_GRAB)
+ return FALSE
+
+ if(user.grab_state == GRAB_PASSIVE)
+ to_chat(user, "You must have [victim] in an aggressive grab to manipulate [victim.p_their()] [lowertext(name)]!")
+ return TRUE
+
+ if(user.grab_state >= GRAB_AGGRESSIVE)
+ user.visible_message("[user] begins twisting and straining [victim]'s dislocated [limb.name]!", "You begin twisting and straining [victim]'s dislocated [limb.name]...", ignored_mobs=victim)
+ to_chat(victim, "[user] begins twisting and straining your dislocated [limb.name]!")
+ if(user.a_intent == INTENT_HELP)
+ chiropractice(user)
+ else
+ malpractice(user)
+ return TRUE
+
+/// If someone is snapping our dislocated joint back into place by hand with an aggro grab and help intent
+/datum/wound/brute/bone/moderate/proc/chiropractice(mob/living/carbon/human/user)
+ var/time = base_treat_time
+ var/time_mod = user.mind?.get_skill_modifier(/datum/skill/healing, SKILL_SPEED_MODIFIER)
+ var/prob_mod = user.mind?.get_skill_modifier(/datum/skill/healing, SKILL_PROBS_MODIFIER)
+ if(time_mod)
+ time *= time_mod
+
+ if(!do_after(user, time, target=victim, extra_checks = CALLBACK(src, .proc/still_exists)))
+ return
+
+ if(prob(65 + prob_mod))
+ user.visible_message("[user] snaps [victim]'s dislocated [limb.name] back into place!", "You snap [victim]'s dislocated [limb.name] back into place!", ignored_mobs=victim)
+ to_chat(victim, "[user] snaps your dislocated [limb.name] back into place!")
+ victim.emote("scream")
+ limb.receive_damage(brute=20, wound_bonus=CANT_WOUND)
+ qdel(src)
+ else
+ user.visible_message("[user] wrenches [victim]'s dislocated [limb.name] around painfully!", "You wrench [victim]'s dislocated [limb.name] around painfully!", ignored_mobs=victim)
+ to_chat(victim, "[user] wrenches your dislocated [limb.name] around painfully!")
+ limb.receive_damage(brute=10, wound_bonus=CANT_WOUND)
+ chiropractice(user)
+
+/// If someone is snapping our dislocated joint into a fracture by hand with an aggro grab and harm or disarm intent
+/datum/wound/brute/bone/moderate/proc/malpractice(mob/living/carbon/human/user)
+ var/time = base_treat_time
+ var/time_mod = user.mind?.get_skill_modifier(/datum/skill/healing, SKILL_SPEED_MODIFIER)
+ var/prob_mod = user.mind?.get_skill_modifier(/datum/skill/healing, SKILL_PROBS_MODIFIER)
+ if(time_mod)
+ time *= time_mod
+
+ if(!do_after(user, time, target=victim, extra_checks = CALLBACK(src, .proc/still_exists)))
+ return
+
+ if(prob(65 + prob_mod))
+ user.visible_message("[user] snaps [victim]'s dislocated [limb.name] with a sickening crack!", "You snap [victim]'s dislocated [limb.name] with a sickening crack!", ignored_mobs=victim)
+ to_chat(victim, "[user] snaps your dislocated [limb.name] with a sickening crack!")
+ victim.emote("scream")
+ limb.receive_damage(brute=25, wound_bonus=30 + prob_mod * 3)
+ else
+ user.visible_message("[user] wrenches [victim]'s dislocated [limb.name] around painfully!", "You wrench [victim]'s dislocated [limb.name] around painfully!", ignored_mobs=victim)
+ to_chat(victim, "[user] wrenches your dislocated [limb.name] around painfully!")
+ limb.receive_damage(brute=10, wound_bonus=CANT_WOUND)
+ malpractice(user)
+
+
+/datum/wound/brute/bone/moderate/treat(obj/item/I, mob/user)
+ if(victim == user)
+ victim.visible_message("[user] begins resetting [victim.p_their()] [limb.name] with [I].", "You begin resetting your [limb.name] with [I]...")
+ else
+ user.visible_message("[user] begins resetting [victim]'s [limb.name] with [I].", "You begin resetting [victim]'s [limb.name] with [I]...")
+
+ if(!do_after(user, base_treat_time * (user == victim ? 1.5 : 1), target = victim, extra_checks=CALLBACK(src, .proc/still_exists)))
+ return
+
+ if(victim == user)
+ limb.receive_damage(brute=15, wound_bonus=CANT_WOUND)
+ victim.visible_message("[user] finishes resetting [victim.p_their()] [limb.name]!", "You reset your [limb.name]!")
+ else
+ limb.receive_damage(brute=10, wound_bonus=CANT_WOUND)
+ user.visible_message("[user] finishes resetting [victim]'s [limb.name]!", "You finish resetting [victim]'s [limb.name]!", victim)
+ to_chat(victim, "[user] resets your [limb.name]!")
+
+ victim.emote("scream")
+ qdel(src)
+
+/*
+ Severe (Hairline Fracture)
+*/
+
+/datum/wound/brute/bone/severe
+ name = "Hairline Fracture"
+ desc = "Patient's bone has suffered a crack in the foundation, causing serious pain and reduced limb functionality."
+ treat_text = "Recommended light surgical application of bone gel, though splinting will prevent worsening situation."
+ examine_desc = "appears bruised and grotesquely swollen"
+
+ occur_text = "sprays chips of bone and develops a nasty looking bruise"
+ severity = WOUND_SEVERITY_SEVERE
+ interaction_efficiency_penalty = 2
+ limp_slowdown = 6
+ threshold_minimum = 60
+ threshold_penalty = 30
+ treatable_by = list(/obj/item/stack/sticky_tape/surgical, /obj/item/stack/medical/gauze, /obj/item/stack/medical/bone_gel)
+ status_effect_type = /datum/status_effect/wound/bone/severe
+ treat_priority = TRUE
+ scarring_descriptions = list("a faded, fist-sized bruise", "a vaguely triangular peel scar")
+ brain_trauma_group = BRAIN_TRAUMA_MILD
+ trauma_cycle_cooldown = 1.5 MINUTES
+ chance_internal_bleeding = 40
+
+/datum/wound/brute/bone/critical
+ name = "Compound Fracture"
+ desc = "Patient's bones have suffered multiple gruesome fractures, causing significant pain and near uselessness of limb."
+ treat_text = "Immediate binding of affected limb, followed by surgical intervention ASAP."
+ examine_desc = "has a cracked bone sticking out of it"
+ occur_text = "cracks apart, exposing broken bones to open air"
+ severity = WOUND_SEVERITY_CRITICAL
+ interaction_efficiency_penalty = 4
+ limp_slowdown = 9
+ sound_effect = 'sound/effects/crack2.ogg'
+ threshold_minimum = 115
+ threshold_penalty = 50
+ disabling = TRUE
+ treatable_by = list(/obj/item/stack/sticky_tape/surgical, /obj/item/stack/medical/gauze, /obj/item/stack/medical/bone_gel)
+ status_effect_type = /datum/status_effect/wound/bone/critical
+ treat_priority = TRUE
+ scarring_descriptions = list("a section of janky skin lines and badly healed scars", "a large patch of uneven skin tone", "a cluster of calluses")
+ brain_trauma_group = BRAIN_TRAUMA_SEVERE
+ trauma_cycle_cooldown = 2.5 MINUTES
+ chance_internal_bleeding = 60
+
+// doesn't make much sense for "a" bone to stick out of your head
+/datum/wound/brute/bone/critical/apply_wound(obj/item/bodypart/L, silent, datum/wound/old_wound, smited)
+ if(L.body_zone == BODY_ZONE_HEAD)
+ occur_text = "splits open, exposing a bare, cracked skull through the flesh and blood"
+ examine_desc = "has an unsettling indent, with bits of skull poking out"
+ . = ..()
+
+/// if someone is using bone gel on our wound
+/datum/wound/brute/bone/proc/gel(obj/item/stack/medical/bone_gel/I, mob/user)
+ if(gelled)
+ to_chat(user, "[user == victim ? "Your" : "[victim]'s"] [limb.name] is already coated with bone gel!")
+ return
+
+ user.visible_message("[user] begins hastily applying [I] to [victim]'s' [limb.name]...", "You begin hastily applying [I] to [user == victim ? "your" : "[victim]'s"] [limb.name], disregarding the warning label...")
+
+ if(!do_after(user, base_treat_time * 1.5 * (user == victim ? 1.5 : 1), target = victim, extra_checks=CALLBACK(src, .proc/still_exists)))
+ return
+
+ I.use(1)
+ victim.emote("scream")
+ if(user != victim)
+ user.visible_message("[user] finishes applying [I] to [victim]'s [limb.name], emitting a fizzing noise!", "You finish applying [I] to [victim]'s [limb.name]!", ignored_mobs=victim)
+ to_chat(victim, "[user] finishes applying [I] to your [limb.name], and you can feel the bones exploding with pain as they begin melting and reforming!")
+ else
+ var/painkiller_bonus = 0
+ if(victim.drunkenness)
+ painkiller_bonus += 5
+ if(victim.reagents && victim.reagents.has_reagent(/datum/reagent/medicine/morphine))
+ painkiller_bonus += 10
+ if(victim.reagents && victim.reagents.has_reagent(/datum/reagent/determination))
+ painkiller_bonus += 5
+
+ if(prob(25 + (20 * severity - 2) - painkiller_bonus)) // 25%/45% chance to fail self-applying with severe and critical wounds, modded by painkillers
+ victim.visible_message("[victim] fails to finish applying [I] to [victim.p_their()] [limb.name], passing out from the pain!", "You black out from the pain of applying [I] to your [limb.name] before you can finish!")
+ victim.AdjustUnconscious(5 SECONDS)
+ return
+ victim.visible_message("[victim] finishes applying [I] to [victim.p_their()] [limb.name], grimacing from the pain!", "You finish applying [I] to your [limb.name], and your bones explode in pain!")
+
+ limb.receive_damage(30, stamina=100, wound_bonus=CANT_WOUND)
+ if(!gelled)
+ gelled = TRUE
+
+/// if someone is using surgical tape on our wound
+/datum/wound/brute/bone/proc/tape(obj/item/stack/sticky_tape/surgical/I, mob/user)
+ if(!gelled)
+ to_chat(user, "[user == victim ? "Your" : "[victim]'s"] [limb.name] must be coated with bone gel to perform this emergency operation!")
+ return
+ if(taped)
+ to_chat(user, "[user == victim ? "Your" : "[victim]'s"] [limb.name] is already wrapped in [I.name] and reforming!")
+ return
+
+ user.visible_message("[user] begins applying [I] to [victim]'s' [limb.name]...", "You begin applying [I] to [user == victim ? "your" : "[victim]'s"] [limb.name]...")
+
+ if(!do_after(user, base_treat_time * (user == victim ? 1.5 : 1), target = victim, extra_checks=CALLBACK(src, .proc/still_exists)))
+ return
+
+ regen_points_current = 0
+ regen_points_needed = 30 SECONDS * (user == victim ? 1.5 : 1) * (severity - 1)
+ I.use(1)
+ if(user != victim)
+ user.visible_message("[user] finishes applying [I] to [victim]'s [limb.name], emitting a fizzing noise!", "You finish applying [I] to [victim]'s [limb.name]!", ignored_mobs=victim)
+ to_chat(victim, "[user] finishes applying [I] to your [limb.name], you immediately begin to feel your bones start to reform!")
+ else
+ victim.visible_message("[victim] finishes applying [I] to [victim.p_their()] [limb.name], !", "You finish applying [I] to your [limb.name], and you immediately begin to feel your bones start to reform!")
+
+ taped = TRUE
+ processes = TRUE
+
+/datum/wound/brute/bone/treat(obj/item/I, mob/user)
+ if(istype(I, /obj/item/stack/medical/bone_gel))
+ gel(I, user)
+ else if(istype(I, /obj/item/stack/sticky_tape/surgical))
+ tape(I, user)
+ else if(istype(I, /obj/item/stack/medical/gauze))
+ splint(I, user)
+
+/datum/wound/brute/bone/get_scanner_description(mob/user)
+ . = ..()
+
+ . += "
"
+
+ if(!gelled)
+ . += "Alternative Treatment: Apply bone gel directly to injured limb, then apply surgical tape to begin bone regeneration. This is both excruciatingly painful and slow, and only recommended in dire circumstances.\n"
+ else if(!taped)
+ . += "Continue Alternative Treatment: Apply surgical tape directly to injured limb to begin bone regeneration. Note, this is both excruciatingly painful and slow.\n"
+ else
+ . += "Note: Bone regeneration in effect. Bone is [round(regen_points_current/regen_points_needed)]% regenerated.\n"
+
+ if(limb.body_zone == BODY_ZONE_HEAD)
+ . += "Cranial Trauma Detected: Patient will suffer random bouts of [severity == WOUND_SEVERITY_SEVERE ? "mild" : "severe"] brain traumas until bone is repaired."
+ else if(limb.body_zone == BODY_ZONE_CHEST && victim.blood_volume)
+ . += "Ribcage Trauma Detected: Further trauma to chest is likely to worsen internal bleeding until bone is repaired."
+ . += "
"
diff --git a/code/datums/wounds/burns.dm b/code/datums/wounds/burns.dm
new file mode 100644
index 00000000000..feff9bf4de4
--- /dev/null
+++ b/code/datums/wounds/burns.dm
@@ -0,0 +1,323 @@
+
+
+
+// TODO: well, a lot really, but specifically I want to add potential fusing of clothing/equipment on the affected area, and limb infections, though those may go in body part code
+/datum/wound/burn
+ a_or_from = "from"
+ wound_type = WOUND_LIST_BURN
+ processes = TRUE
+ sound_effect = 'sound/effects/sizzle1.ogg'
+
+ treatable_by = list(/obj/item/stack/medical/gauze, /obj/item/stack/medical/ointment, /obj/item/stack/medical/mesh) // sterilizer and alcohol will require reagent treatments, coming soon
+
+ // Flesh damage vars
+ /// How much damage to our flesh we currently have. Once both this and infestation reach 0, the wound is considered healed
+ var/flesh_damage = 5
+ /// Our current counter for how much flesh regeneration we have stacked from regenerative mesh/synthflesh/whatever, decrements each tick and lowers flesh_damage
+ var/flesh_healing = 0
+
+ // Infestation vars (only for severe and critical)
+ /// How quickly infection breeds on this burn if we don't have disinfectant
+ var/infestation_rate = 0
+ /// Our current level of infection
+ var/infestation = 0
+ /// Our current level of sanitization/anti-infection, from disinfectants/alcohol/UV lights. While positive, totally pauses and slowly reverses infestation effects each tick
+ var/sanitization = 0
+
+ /// Once we reach infestation beyond WOUND_INFESTATION_SEPSIS, we get this many warnings before the limb is completely paralyzed (you'd have to ignore a really bad burn for a really long time for this to happen)
+ var/strikes_to_lose_limb = 3
+
+ /// The current bandage we have for this wound (maybe move bandages to the limb?)
+ var/obj/item/stack/current_bandage
+
+/datum/wound/burn/handle_process()
+ . = ..()
+ if(strikes_to_lose_limb == 0)
+ victim.adjustToxLoss(0.5)
+ if(prob(1))
+ victim.visible_message("The infection on the remnants of [victim]'s [limb.name] shift and bubble nauseatingly!", "You can feel the infection on the remnants of your [limb.name] coursing through your veins!")
+ return
+
+ if(victim.reagents)
+ if(victim.reagents.has_reagent(/datum/reagent/medicine/spaceacillin))
+ sanitization += 0.9
+ if(victim.reagents.has_reagent(/datum/reagent/space_cleaner/sterilizine/))
+ sanitization += 0.9
+ if(victim.reagents.has_reagent(/datum/reagent/medicine/mine_salve))
+ sanitization += 0.3
+ flesh_healing += 0.5
+
+ if(current_bandage)
+ current_bandage.absorption_capacity -= WOUND_BURN_SANITIZATION_RATE
+ if(current_bandage.absorption_capacity <= 0)
+ victim.visible_message("Pus soaks through \the [current_bandage] on [victim]'s [limb.name].", "Pus soaks through \the [current_bandage] on your [limb.name].", vision_distance=COMBAT_MESSAGE_RANGE)
+ QDEL_NULL(current_bandage)
+ treat_priority = TRUE
+
+ if(flesh_healing > 0)
+ var/bandage_factor = (current_bandage ? current_bandage.splint_factor : 1)
+ flesh_damage = max(0, flesh_damage - 1)
+ flesh_healing = max(0, flesh_healing - bandage_factor) // good bandages multiply the length of flesh healing
+
+ // here's the check to see if we're cleared up
+ if((flesh_damage <= 0) && (infestation <= 1))
+ to_chat(victim, "The burns on your [limb.name] have cleared up!")
+ qdel(src)
+ return
+
+ // sanitization is checked after the clearing check but before the rest, because we freeze the effects of infection while we have sanitization
+ if(sanitization > 0)
+ var/bandage_factor = (current_bandage ? current_bandage.splint_factor : 1)
+ infestation = max(0, infestation - WOUND_BURN_SANITIZATION_RATE)
+ sanitization = max(0, sanitization - (WOUND_BURN_SANITIZATION_RATE * bandage_factor))
+ return
+
+ infestation += infestation_rate
+
+ switch(infestation)
+ if(0 to WOUND_INFECTION_MODERATE)
+ if(WOUND_INFECTION_MODERATE to WOUND_INFECTION_SEVERE)
+ if(prob(30))
+ victim.adjustToxLoss(0.2)
+ if(prob(6))
+ to_chat(victim, "The blisters on your [limb.name] ooze a strange pus...")
+ if(WOUND_INFECTION_SEVERE to WOUND_INFECTION_CRITICAL)
+ if(!disabling && prob(2))
+ to_chat(victim, "Your [limb.name] completely locks up, as you struggle for control against the infection!")
+ disabling = TRUE
+ else if(disabling && prob(8))
+ to_chat(victim, "You regain sensation in your [limb.name], but it's still in terrible shape!")
+ disabling = FALSE
+ else if(prob(20))
+ victim.adjustToxLoss(0.5)
+ if(WOUND_INFECTION_CRITICAL to WOUND_INFECTION_SEPTIC)
+ if(!disabling && prob(3))
+ to_chat(victim, "You suddenly lose all sensation of the festering infection in your [limb.name]!")
+ disabling = TRUE
+ else if(disabling && prob(3))
+ to_chat(victim, "You can barely feel your [limb.name] again, and you have to strain to retain motor control!")
+ disabling = FALSE
+ else if(prob(1))
+ to_chat(victim, "You contemplate life without your [limb.name]...")
+ victim.adjustToxLoss(0.75)
+ else if(prob(4))
+ victim.adjustToxLoss(1)
+ if(WOUND_INFECTION_SEPTIC to INFINITY)
+ if(prob(infestation))
+ switch(strikes_to_lose_limb)
+ if(3 to INFINITY)
+ to_chat(victim, "The skin on your [limb.name] is literally dripping off, you feel awful!")
+ if(2)
+ to_chat(victim, "The infection in your [limb.name] is literally dripping off, you feel horrible!")
+ if(1)
+ to_chat(victim, "Infection has just about completely claimed your [limb.name]!")
+ if(0)
+ to_chat(victim, "The last of the nerve endings in your [limb.name] wither away, as the infection completely paralyzes your joint connector.")
+ threshold_penalty = 120 // piss easy to destroy
+ var/datum/brain_trauma/severe/paralysis/sepsis = new (limb.body_zone)
+ victim.gain_trauma(sepsis)
+ strikes_to_lose_limb--
+
+/datum/wound/burn/get_examine_description(mob/user)
+ if(strikes_to_lose_limb <= 0)
+ return "[victim.p_their(TRUE)] [limb.name] is completely dead and unrecognizable as organic."
+
+ var/condition = ""
+ if(current_bandage)
+ var/bandage_condition
+ switch(current_bandage.absorption_capacity)
+ if(0 to 1.25)
+ bandage_condition = "nearly ruined "
+ if(1.25 to 2.75)
+ bandage_condition = "badly worn "
+ if(2.75 to 4)
+ bandage_condition = "slightly pus-stained "
+ if(4 to INFINITY)
+ bandage_condition = "clean "
+
+ condition += " underneath a dressing of [bandage_condition] [current_bandage.name]"
+ else
+ switch(infestation)
+ if(WOUND_INFECTION_MODERATE to WOUND_INFECTION_SEVERE)
+ condition += ", with small spots of discoloration along the nearby veins!"
+ if(WOUND_INFECTION_SEVERE to WOUND_INFECTION_CRITICAL)
+ condition += ", with dark clouds spreading outwards under the skin!"
+ if(WOUND_INFECTION_CRITICAL to WOUND_INFECTION_SEPTIC)
+ condition += ", with streaks of rotten infection pulsating outward!"
+ if(WOUND_INFECTION_SEPTIC to INFINITY)
+ return "[victim.p_their(TRUE)] [limb.name] is a mess of char and rot, skin literally dripping off the bone with infection!"
+ else
+ condition += "!"
+
+ return "[victim.p_their(TRUE)] [limb.name] [examine_desc][condition]"
+
+/datum/wound/burn/get_scanner_description(mob/user)
+ if(strikes_to_lose_limb == 0)
+ var/oopsie = "Type: [name]\nSeverity: [severity_text()]"
+ oopsie += "Infection Level: The infection is total. The bodypart is lost. Amputate or augment limb immediately.
"
+ return oopsie
+
+ . = ..()
+ . += ""
+
+ if(infestation <= sanitization && flesh_damage <= flesh_healing)
+ . += "No further treatment required: Burns will heal shortly."
+ else
+ switch(infestation)
+ if(WOUND_INFECTION_MODERATE to WOUND_INFECTION_SEVERE)
+ . += "Infection Level: Moderate\n"
+ if(WOUND_INFECTION_SEVERE to WOUND_INFECTION_CRITICAL)
+ . += "Infection Level: Severe\n"
+ if(WOUND_INFECTION_CRITICAL to WOUND_INFECTION_SEPTIC)
+ . += "Infection Level: CRITICAL\n"
+ if(WOUND_INFECTION_SEPTIC to INFINITY)
+ . += "Infection Level: LOSS IMMINENT\n"
+ if(infestation > sanitization)
+ . += "\tSurgical debridement, antiobiotics/sterilizers, or regenerative mesh will rid infection. Paramedic UV penlights are also effective.\n"
+
+ if(flesh_damage > 0)
+ . += "Flesh damage detected: Please apply ointment or regenerative mesh to allow recovery.\n"
+ . += "
"
+
+/*
+ new burn common procs
+*/
+
+/// if someone is using ointment on our burns
+/datum/wound/burn/proc/ointment(obj/item/stack/medical/ointment/I, mob/user)
+ user.visible_message("[user] begins applying [I] to [victim]'s [limb.name]...", "You begin applying [I] to [user == victim ? "your" : "[victim]'s"] [limb.name]...")
+ if(!do_after(user, (user == victim ? I.self_delay : I.other_delay), extra_checks = CALLBACK(src, .proc/still_exists)))
+ return
+
+ limb.heal_damage(I.heal_brute, I.heal_burn)
+ user.visible_message("[user] applies [I] to [victim].", "You apply [I] to [user == victim ? "your" : "[victim]'s"] [limb.name].")
+ I.use(1)
+ sanitization += I.sanitization
+ flesh_healing += I.flesh_regeneration
+
+ if((infestation <= 0 || sanitization >= infestation) && (flesh_damage <= 0 || flesh_healing > flesh_damage))
+ to_chat(user, "You've done all you can with [I], now you must wait for the flesh on [victim]'s [limb.name] to recover.")
+ else
+ try_treating(I, user)
+
+/// for use in the burn dressing surgery since we don't want to make them do another do_after obviously
+/datum/wound/burn/proc/force_bandage(obj/item/stack/medical/gauze/I, mob/user)
+ QDEL_NULL(current_bandage)
+ current_bandage = new I.type(limb)
+ current_bandage.amount = 1
+ treat_priority = FALSE
+ sanitization += I.sanitization
+ I.use(1)
+
+/// if someone is wrapping gauze on our burns
+/datum/wound/burn/proc/bandage(obj/item/stack/medical/gauze/I, mob/user)
+ if(current_bandage)
+ if(current_bandage.absorption_capacity > I.absorption_capacity + 1)
+ to_chat(user, "The [current_bandage] on [victim]'s [limb.name] is still in better condition than your [I.name]!")
+ return
+ user.visible_message("[user] begins to redress the burns on [victim]'s [limb.name] with [I]...", "You begin redressing the burns on [user == victim ? "your" : "[victim]'s"] [limb.name] with [I]...")
+ else
+ user.visible_message("[user] begins to dress the burns on [victim]'s [limb.name] with [I]...", "You begin dressing the burns on [user == victim ? "your" : "[victim]'s"] [limb.name] with [I]...")
+
+ if(!do_after(user, (user == victim ? I.self_delay : I.other_delay), target=victim, extra_checks = CALLBACK(src, .proc/still_exists)))
+ return
+
+ user.visible_message("[user] applies [I] to [victim].", "You apply [I] to [user == victim ? "your" : "[victim]'s"] [limb.name].")
+ QDEL_NULL(current_bandage)
+ current_bandage = new I.type(limb)
+ current_bandage.amount = 1
+ treat_priority = FALSE
+ sanitization += I.sanitization
+ I.use(1)
+
+/// if someone is using mesh on our burns
+/datum/wound/burn/proc/mesh(obj/item/stack/medical/mesh/I, mob/user)
+ user.visible_message("[user] begins wrapping [victim]'s [limb.name] with [I]...", "You begin wrapping [user == victim ? "your" : "[victim]'s"] [limb.name] with [I]...")
+ if(!do_after(user, (user == victim ? I.self_delay : I.other_delay), target=victim, extra_checks = CALLBACK(src, .proc/still_exists)))
+ return
+
+ limb.heal_damage(I.heal_brute, I.heal_burn)
+ user.visible_message("[user] applies [I] to [victim].", "You apply [I] to [user == victim ? "your" : "[victim]'s"] [limb.name].")
+ I.use(1)
+ sanitization += I.sanitization
+ flesh_healing += I.flesh_regeneration
+
+ if(sanitization >= infestation && flesh_healing > flesh_damage)
+ to_chat(user, "You've done all you can with [I], now you must wait for the flesh on [victim]'s [limb.name] to recover.")
+ else
+ try_treating(I, user)
+
+/// Paramedic UV penlights
+/datum/wound/burn/proc/uv(obj/item/flashlight/pen/paramedic/I, mob/user)
+ if(I.uv_cooldown > world.time)
+ to_chat(user, "[I] is still recharging!")
+ return
+ if(infestation <= 0 || infestation < sanitization)
+ to_chat(user, "There's no infection to treat on [victim]'s [limb.name]!")
+ return
+
+ user.visible_message("[user] flashes the burns on [victim]'s [limb] with [I].", "You flash the burns on [user == victim ? "your" : "[victim]'s"] [limb.name] with [I].", vision_distance=COMBAT_MESSAGE_RANGE)
+ sanitization += I.uv_power
+ I.uv_cooldown = world.time + I.uv_cooldown_length
+
+/datum/wound/burn/treat(obj/item/I, mob/user)
+ if(istype(I, /obj/item/stack/medical/gauze))
+ bandage(I, user)
+ else if(istype(I, /obj/item/stack/medical/ointment))
+ ointment(I, user)
+ else if(istype(I, /obj/item/stack/medical/mesh))
+ mesh(I, user)
+ else if(istype(I, /obj/item/flashlight/pen/paramedic))
+ uv(I, user)
+
+/// basic support for instabitaluri/synthflesh healing flesh damage, more chem support in the future
+/datum/wound/burn/proc/regenerate_flesh(amount)
+ flesh_healing += amount * 0.5 // 20u patch will heal 10 flesh standard
+
+// we don't even care about first degree burns, straight to second
+/datum/wound/burn/moderate
+ name = "Second Degree Burns"
+ desc = "Patient is suffering considerable burns with mild skin penetration, weakening limb integrity and increased burning sensations."
+ treat_text = "Recommended application of topical ointment or regenerative mesh to affected region."
+ examine_desc = "is badly burned and breaking out in blisters"
+ occur_text = "breaks out with violent red burns"
+ severity = WOUND_SEVERITY_MODERATE
+ damage_mulitplier_penalty = 1.1
+ threshold_minimum = 40
+ threshold_penalty = 30 // burns cause significant decrease in limb integrity compared to other wounds
+ status_effect_type = /datum/status_effect/wound/burn/moderate
+ flesh_damage = 5
+ scarring_descriptions = list("small amoeba-shaped skinmarks", "a faded streak of depressed skin")
+
+/datum/wound/burn/severe
+ name = "Third Degree Burns"
+ desc = "Patient is suffering extreme burns with full skin penetration, creating serious risk of infection and greatly reduced limb integrity."
+ treat_text = "Recommended immediate disinfection and excision of any infected skin, followed by bandaging and ointment."
+ examine_desc = "appears seriously charred, with aggressive red splotches"
+ occur_text = "chars rapidly, exposing ruined tissue and spreading angry red burns"
+ severity = WOUND_SEVERITY_SEVERE
+ damage_mulitplier_penalty = 1.2
+ threshold_minimum = 80
+ threshold_penalty = 40
+ status_effect_type = /datum/status_effect/wound/burn/severe
+ treatable_by = list(/obj/item/flashlight/pen/paramedic, /obj/item/stack/medical/gauze, /obj/item/stack/medical/ointment, /obj/item/stack/medical/mesh)
+ infestation_rate = 0.05 // appx 13 minutes to reach sepsis without any treatment
+ flesh_damage = 12.5
+ scarring_descriptions = list("a large, jagged patch of faded skin", "random spots of shiny, smooth skin", "spots of taut, leathery skin")
+
+/datum/wound/burn/critical
+ name = "Catastrophic Burns"
+ desc = "Patient is suffering near complete loss of tissue and significantly charred muscle and bone, creating life-threatening risk of infection and negligible limb integrity."
+ treat_text = "Immediate surgical debriding of any infected skin, followed by potent tissue regeneration formula and bandaging."
+ examine_desc = "is a ruined mess of blanched bone, melted fat, and charred tissue"
+ occur_text = "vaporizes as flesh, bone, and fat melt together in a horrifying mess"
+ severity = WOUND_SEVERITY_CRITICAL
+ damage_mulitplier_penalty = 1.3
+ sound_effect = 'sound/effects/sizzle2.ogg'
+ threshold_minimum = 140
+ threshold_penalty = 80
+ status_effect_type = /datum/status_effect/wound/burn/critical
+ treatable_by = list(/obj/item/flashlight/pen/paramedic, /obj/item/stack/medical/gauze, /obj/item/stack/medical/ointment, /obj/item/stack/medical/mesh)
+ infestation_rate = 0.15 // appx 4.33 minutes to reach sepsis without any treatment
+ flesh_damage = 20
+ scarring_descriptions = list("massive, disfiguring keloid scars", "several long streaks of badly discolored and malformed skin", "unmistakeable splotches of dead tissue from serious burns")
diff --git a/code/datums/wounds/cuts.dm b/code/datums/wounds/cuts.dm
new file mode 100644
index 00000000000..61a4b8a1ea0
--- /dev/null
+++ b/code/datums/wounds/cuts.dm
@@ -0,0 +1,309 @@
+
+/*
+ Cuts
+*/
+
+/datum/wound/brute/cut
+ sound_effect = 'sound/weapons/slice.ogg'
+ processes = TRUE
+ wound_type = WOUND_LIST_CUT
+ treatable_by = list(/obj/item/stack/medical/suture, /obj/item/stack/medical/gauze)
+ treatable_by_grabbed = list(/obj/item/gun/energy/laser)
+ treatable_tool = TOOL_CAUTERY
+ treat_priority = TRUE
+ base_treat_time = 3 SECONDS
+
+ /// How much blood we start losing when this wound is first applied
+ var/initial_flow
+ /// When we have less than this amount of flow, either from treatment or clotting, we demote to a lower cut or are healed of the wound
+ var/minimum_flow
+ /// How fast our blood flow will naturally decrease per tick, not only do larger cuts bleed more faster, they clot slower
+ var/clot_rate
+
+ /// Once the blood flow drops below minimum_flow, we demote it to this type of wound. If there's none, we're all better
+ var/demotes_to
+
+ /// How much staunching per type (cautery, suturing, bandaging) you can have before that type is no longer effective for this cut NOT IMPLEMENTED
+ var/max_per_type
+ /// The maximum flow we've had so far
+ var/highest_flow
+ /// How much flow we've already cauterized
+ var/cauterized
+ /// How much flow we've already sutured
+ var/sutured
+
+ /// The current bandage we have for this wound (maybe move bandages to the limb?)
+ var/obj/item/stack/current_bandage
+ /// A bad system I'm using to track the worst scar we earned (since we can demote, we want the biggest our wound has been, not what it was when it was cured (probably moderate))
+ var/datum/scar/highest_scar
+
+/datum/wound/brute/cut/wound_injury(datum/wound/brute/cut/old_wound = null)
+ blood_flow = initial_flow
+ if(old_wound)
+ blood_flow = max(old_wound.blood_flow, initial_flow)
+ if(old_wound.severity > severity && old_wound.highest_scar)
+ highest_scar = old_wound.highest_scar
+ old_wound.highest_scar = null
+ if(old_wound.current_bandage)
+ current_bandage = old_wound.current_bandage
+ old_wound.current_bandage = null
+
+ if(!highest_scar)
+ highest_scar = new
+ highest_scar.generate(limb, src, add_to_scars=FALSE)
+
+/datum/wound/brute/cut/remove_wound(ignore_limb, replaced)
+ if(!replaced && highest_scar)
+ already_scarred = TRUE
+ highest_scar.lazy_attach(limb)
+ return ..()
+
+/datum/wound/brute/cut/get_examine_description(mob/user)
+ if(!current_bandage)
+ return ..()
+
+ var/bandage_condition = ""
+ // how much life we have left in these bandages
+ switch(current_bandage.absorption_capacity)
+ if(0 to 1.25)
+ bandage_condition = "nearly ruined "
+ if(1.25 to 2.75)
+ bandage_condition = "badly worn "
+ if(2.75 to 4)
+ bandage_condition = "slightly bloodied "
+ if(4 to INFINITY)
+ bandage_condition = "clean "
+ return "The cuts on [victim.p_their()] [limb.name] are wrapped with [bandage_condition] [current_bandage.name]!"
+
+/datum/wound/brute/cut/receive_damage(wounding_type, wounding_dmg, wound_bonus)
+ if(victim.stat != DEAD && wounding_type == WOUND_SHARP) // can't stab dead bodies to make it bleed faster this way
+ blood_flow += 0.05 * wounding_dmg
+
+/datum/wound/brute/cut/handle_process()
+ blood_flow = min(blood_flow, WOUND_CUT_MAX_BLOODFLOW)
+
+ if(victim.reagents && victim.reagents.has_reagent(/datum/reagent/toxin/heparin))
+ blood_flow += 0.5 // old herapin used to just add +2 bleed stacks per tick, this adds 0.5 bleed flow to all open cuts which is probably even stronger as long as you can cut them first
+ else if(victim.reagents && victim.reagents.has_reagent(/datum/reagent/medicine/coagulant))
+ blood_flow -= 0.25
+
+ if(current_bandage)
+ if(clot_rate > 0)
+ blood_flow -= clot_rate
+ blood_flow -= current_bandage.absorption_rate
+ current_bandage.absorption_capacity -= current_bandage.absorption_rate
+ if(current_bandage.absorption_capacity < 0)
+ victim.visible_message("Blood soaks through \the [current_bandage] on [victim]'s [limb.name].", "Blood soaks through \the [current_bandage] on your [limb.name].", vision_distance=COMBAT_MESSAGE_RANGE)
+ QDEL_NULL(current_bandage)
+ treat_priority = TRUE
+ else
+ blood_flow -= clot_rate
+
+ if(blood_flow > highest_flow)
+ highest_flow = blood_flow
+
+ if(blood_flow < minimum_flow)
+ if(demotes_to)
+ replace_wound(demotes_to)
+ else
+ to_chat(victim, "The cut on your [limb.name] has stopped bleeding!")
+ qdel(src)
+
+/* BEWARE, THE BELOW NONSENSE IS MADNESS. bones.dm looks more like what I have in mind and is sufficiently clean, don't pay attention to this messiness */
+
+/datum/wound/brute/cut/check_grab_treatments(obj/item/I, mob/user)
+ if(istype(I, /obj/item/gun/energy/laser))
+ return TRUE
+
+/datum/wound/brute/cut/treat(obj/item/I, mob/user)
+ if(istype(I, /obj/item/gun/energy/laser))
+ las_cauterize(I, user)
+ else if(I.tool_behaviour == TOOL_CAUTERY || I.get_temperature() > 300)
+ tool_cauterize(I, user)
+ else if(istype(I, /obj/item/stack/medical/gauze))
+ bandage(I, user)
+ else if(istype(I, /obj/item/stack/medical/suture))
+ suture(I, user)
+
+/datum/wound/brute/cut/try_handling(mob/living/carbon/human/user)
+ if(user.pulling != victim || user.zone_selected != limb.body_zone || user.a_intent == INTENT_GRAB)
+ return FALSE
+
+ if(!isfelinid(user))
+ return FALSE
+
+ lick_wounds(user)
+ return TRUE
+
+/// if a felinid is licking this cut to reduce bleeding
+/datum/wound/brute/cut/proc/lick_wounds(mob/living/carbon/human/user)
+ if(INTERACTING_WITH(user, victim))
+ to_chat(user, "You're already interacting with [victim]!")
+ return
+
+ user.visible_message("[user] begins licking the wounds on [victim]'s [limb.name].", "You begin licking the wounds on [victim]'s [limb.name]...", ignored_mobs=victim)
+ to_chat(victim, "[user] begins to lick the wounds on your [limb.name].[user] licks the wounds on [victim]'s [limb.name].", "You lick some of the wounds on [victim]'s [limb.name]", ignored_mobs=victim)
+ to_chat(victim, "[user] licks the wounds on your [limb.name]! minimum_flow)
+ try_handling(user)
+ else if(demotes_to)
+ to_chat(user, "You successfully lower the severity of [victim]'s cuts.")
+
+/datum/wound/brute/cut/on_xadone(power)
+ . = ..()
+ blood_flow -= 0.03 * power // i think it's like a minimum of 3 power, so .09 blood_flow reduction per tick is pretty good for 0 effort
+
+/// If someone's putting a laser gun up to our cut to cauterize it
+/datum/wound/brute/cut/proc/las_cauterize(obj/item/gun/energy/laser/lasgun, mob/user)
+ var/self_penalty_mult = (user == victim ? 1.25 : 1)
+ user.visible_message("[user] begins aiming [lasgun] directly at [victim]'s [limb.name]...", "You begin aiming [lasgun] directly at [user == victim ? "your" : "[victim]'s"] [limb.name]...")
+ if(!do_after(user, base_treat_time * self_penalty_mult, target=victim, extra_checks = CALLBACK(src, .proc/still_exists)))
+ return
+ var/damage = lasgun.chambered.BB.damage
+ lasgun.chambered.BB.wound_bonus -= 30
+ lasgun.chambered.BB.damage *= self_penalty_mult
+ if(!lasgun.process_fire(victim, victim, TRUE, null, limb.body_zone))
+ return
+ victim.emote("scream")
+ blood_flow -= damage / (5 * self_penalty_mult) // 20 / 5 = 4 bloodflow removed, p good
+ cauterized += damage / (5 * self_penalty_mult)
+ victim.visible_message("The cuts on [victim]'s [limb.name] scar over!")
+
+/// If someone is using either a cautery tool or something with heat to cauterize this cut
+/datum/wound/brute/cut/proc/tool_cauterize(obj/item/I, mob/user)
+ var/self_penalty_mult = (user == victim ? 1.5 : 1)
+ user.visible_message("[user] begins cauterizing [victim]'s [limb.name] with [I]...", "You begin cauterizing [user == victim ? "your" : "[victim]'s"] [limb.name] with [I]...")
+ var/time_mod = user.mind?.get_skill_modifier(/datum/skill/healing, SKILL_SPEED_MODIFIER) || 1
+ if(!do_after(user, base_treat_time * time_mod * self_penalty_mult, target=victim, extra_checks = CALLBACK(src, .proc/still_exists)))
+ return
+
+ user.visible_message("[user] cauterizes some of the bleeding on [victim].", "You cauterize some of the bleeding on [victim].")
+ limb.receive_damage(burn = 2 + severity, wound_bonus = CANT_WOUND)
+ if(prob(30))
+ victim.emote("scream")
+ var/blood_cauterized = (0.6 / self_penalty_mult)
+ blood_flow -= blood_cauterized
+ cauterized += blood_cauterized
+
+ if(blood_flow > minimum_flow)
+ try_treating(I, user)
+ else if(demotes_to)
+ to_chat(user, "You successfully lower the severity of [user == victim ? "your" : "[victim]'s"] cuts.")
+
+/// If someone is using a suture to close this cut
+/datum/wound/brute/cut/proc/suture(obj/item/stack/medical/suture/I, mob/user)
+ var/self_penalty_mult = (user == victim ? 1.4 : 1)
+ user.visible_message("[user] begins stitching [victim]'s [limb.name] with [I]...", "You begin stitching [user == victim ? "your" : "[victim]'s"] [limb.name] with [I]...")
+ var/time_mod = user.mind?.get_skill_modifier(/datum/skill/healing, SKILL_SPEED_MODIFIER) || 1
+ if(!do_after(user, base_treat_time * time_mod * self_penalty_mult, target=victim, extra_checks = CALLBACK(src, .proc/still_exists)))
+ return
+ user.visible_message("[user] stitches up some of the bleeding on [victim].", "You stitch up some of the bleeding on [user == victim ? "yourself" : "[victim]"].")
+ var/blood_sutured = I.stop_bleeding / self_penalty_mult
+ blood_flow -= blood_sutured
+ sutured += blood_sutured
+ limb.heal_damage(I.heal_brute, I.heal_burn)
+
+ if(blood_flow > minimum_flow)
+ try_treating(I, user)
+ else if(demotes_to)
+ to_chat(user, "You successfully lower the severity of [user == victim ? "your" : "[victim]'s"] cuts.")
+
+/// If someone is using gauze on this cut
+/datum/wound/brute/cut/proc/bandage(obj/item/stack/I, mob/user)
+ if(current_bandage)
+ if(current_bandage.absorption_capacity > I.absorption_capacity + 1)
+ to_chat(user, "The [current_bandage] on [victim]'s [limb.name] is still in better condition than your [I.name]!")
+ return
+ else
+ user.visible_message("[user] begins rewrapping the cuts on [victim]'s [limb.name] with [I]...", "You begin rewrapping the cuts on [user == victim ? "your" : "[victim]'s"] [limb.name] with [I]...")
+ else
+ user.visible_message("[user] begins wrapping the cuts on [victim]'s [limb.name] with [I]...", "You begin wrapping the cuts on [user == victim ? "your" : "[victim]'s"] [limb.name] with [I]...")
+ var/time_mod = user.mind?.get_skill_modifier(/datum/skill/healing, SKILL_SPEED_MODIFIER) || 1
+ if(!do_after(user, base_treat_time * time_mod, target=victim, extra_checks = CALLBACK(src, .proc/still_exists)))
+ return
+
+ user.visible_message("[user] applies [I] to [victim]'s [limb.name].", "You bandage some of the bleeding on [user == victim ? "yourself" : "[victim]"].")
+ QDEL_NULL(current_bandage)
+ current_bandage = new I.type(limb)
+ current_bandage.amount = 1
+ treat_priority = FALSE
+ I.use(1)
+
+
+/datum/wound/brute/cut/moderate
+ name = "Rough Abrasion"
+ desc = "Patient's skin has been badly scraped, generating moderate blood loss."
+ treat_text = "Application of clean bandages or first-aid grade sutures, followed by food and rest."
+ examine_desc = "has an open cut"
+ occur_text = "is cut open, slowly leaking blood"
+ sound_effect = 'sound/effects/blood1.ogg'
+ severity = WOUND_SEVERITY_MODERATE
+ initial_flow = 2
+ minimum_flow = 0.5
+ max_per_type = 3
+ clot_rate = 0.15
+ threshold_minimum = 20
+ threshold_penalty = 10
+ status_effect_type = /datum/status_effect/wound/cut/moderate
+ scarring_descriptions = list("light, faded lines", "minor cut marks", "a small faded slit", "a series of small scars")
+
+/datum/wound/brute/cut/severe
+ name = "Open Laceration"
+ desc = "Patient's skin is ripped clean open, allowing significant blood loss."
+ treat_text = "Speedy application of first-aid grade sutures and clean bandages, followed by vitals monitoring to ensure recovery."
+ examine_desc = "has a severe cut"
+ occur_text = "is ripped open, veins spurting blood"
+ sound_effect = 'sound/effects/blood2.ogg'
+ severity = WOUND_SEVERITY_SEVERE
+ initial_flow = 3.25
+ minimum_flow = 2.75
+ clot_rate = 0.07
+ max_per_type = 4
+ threshold_minimum = 50
+ threshold_penalty = 25
+ demotes_to = /datum/wound/brute/cut/moderate
+ status_effect_type = /datum/status_effect/wound/cut/severe
+ scarring_descriptions = list("a twisted line of faded gashes", "a gnarled sickle-shaped slice scar", "a long-faded puncture wound")
+
+/datum/wound/brute/cut/critical
+ name = "Weeping Avulsion"
+ desc = "Patient's skin is completely torn open, along with significant loss of tissue. Extreme blood loss will lead to quick death without intervention."
+ treat_text = "Immediate bandaging and either suturing or cauterization, followed by supervised resanguination."
+ examine_desc = "is spurting blood at an alarming rate"
+ occur_text = "is torn open, spraying blood wildly"
+ sound_effect = 'sound/effects/blood3.ogg'
+ severity = WOUND_SEVERITY_CRITICAL
+ initial_flow = 4.25
+ minimum_flow = 4
+ clot_rate = -0.05 // critical cuts actively get worse instead of better
+ max_per_type = 5
+ threshold_minimum = 80
+ threshold_penalty = 40
+ demotes_to = /datum/wound/brute/cut/severe
+ status_effect_type = /datum/status_effect/wound/cut/critical
+ scarring_descriptions = list("a winding path of very badly healed scar tissue", "a series of peaks and valleys along a gruesome line of cut scar tissue", "a grotesque snake of indentations and stitching scars")
+
+// TODO: see about moving dismemberment over to this, i'll have to add judging dismembering power/wound potential wrt item size i guess
+/datum/wound/brute/cut/loss
+ name = "Dismembered"
+ desc = "oof ouch!!"
+ occur_text = "is violently dismembered!"
+ sound_effect = 'sound/effects/dismember.ogg'
+ viable_zones = list(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)
+ severity = WOUND_SEVERITY_LOSS
+ threshold_minimum = 180
+ status_effect_type = null
+
+/datum/wound/brute/cut/loss/apply_wound(obj/item/bodypart/L, silent, datum/wound/brute/cut/old_wound, smited = FALSE)
+ if(!L.dismemberable)
+ qdel(src)
+ return
+
+ L.dismember()
+ qdel(src)
diff --git a/code/datums/wounds/scars/_scars.dm b/code/datums/wounds/scars/_scars.dm
new file mode 100644
index 00000000000..bfbaab835e6
--- /dev/null
+++ b/code/datums/wounds/scars/_scars.dm
@@ -0,0 +1,134 @@
+/**
+ * scars are cosmetic datums that are assigned to bodyparts once they recover from wounds. Each wound type and severity have their own descriptions for what the scars
+ * look like, and then each body part has a list of "specific locations" like your elbow or wrist or wherever the scar can appear, to make it more interesting than "right arm"
+ *
+ *
+ * Arguments:
+ * *
+ */
+/datum/scar
+ var/obj/item/bodypart/limb
+ var/mob/living/carbon/victim
+ var/severity
+ var/description
+ var/precise_location
+
+ /// Scars from the longtimer quirk are "fake" and won't be saved with persistent scarring, since it makes you spawn with a lot by default
+ var/fake=FALSE
+
+ /// How many tiles away someone can see this scar, goes up with severity. Clothes covering this limb will decrease visibility by 1 each, except for the head/face which is a binary "is mask obscuring face" check
+ var/visibility = 2
+ /// Whether this scar can actually be covered up by clothing
+ var/coverable = TRUE
+ /// What zones this scar can be applied to
+ var/list/applicable_zones = list(BODY_ZONE_CHEST, BODY_ZONE_HEAD, BODY_ZONE_L_ARM, BODY_ZONE_L_LEG, BODY_ZONE_R_ARM, BODY_ZONE_R_LEG)
+
+/datum/scar/Destroy(force, ...)
+ if(limb)
+ LAZYREMOVE(limb.scars, src)
+ if(victim)
+ LAZYREMOVE(victim.all_scars, src)
+ . = ..()
+
+/**
+ * generate() is used to actually fill out the info for a scar, according to the limb and wound it is provided.
+ *
+ * After creating a scar, call this on it while targeting the scarred bodypart with a given wound to apply the scar.
+ *
+ * Arguments:
+ * * BP- The bodypart being targeted
+ * * W- The wound being used to generate the severity and description info
+ * * add_to_scars- Should always be TRUE unless you're just storing a scar for later usage, like how cuts want to store a scar for the highest severity of cut, rather than the severity when the wound is fully healed (probably demoted to moderate)
+ */
+/datum/scar/proc/generate(obj/item/bodypart/BP, datum/wound/W, add_to_scars=TRUE)
+ if(!(BP.body_zone in applicable_zones))
+ qdel(src)
+ return
+ limb = BP
+ severity = W.severity
+ if(limb.owner)
+ victim = limb.owner
+ if(add_to_scars)
+ LAZYADD(limb.scars, src)
+ if(victim)
+ LAZYADD(victim.all_scars, src)
+
+ description = pick(W.scarring_descriptions)
+ precise_location = pick(limb.specific_locations)
+ switch(W.severity)
+ if(WOUND_SEVERITY_MODERATE)
+ visibility = 2
+ if(WOUND_SEVERITY_SEVERE)
+ visibility = 3
+ if(WOUND_SEVERITY_CRITICAL)
+ visibility = 5
+
+/// Used when we finalize a scar from a healing cut
+/datum/scar/proc/lazy_attach(obj/item/bodypart/BP, datum/wound/W)
+ LAZYADD(BP.scars, src)
+ if(BP.owner)
+ victim = BP.owner
+ LAZYADD(victim.all_scars, src)
+
+/// Used to "load" a persistent scar
+/datum/scar/proc/load(obj/item/bodypart/BP, description, specific_location, severity=WOUND_SEVERITY_SEVERE)
+ if(!(BP.body_zone in applicable_zones))
+ qdel(src)
+ return
+ limb = BP
+ src.severity = severity
+ LAZYADD(limb.scars, src)
+ if(BP.owner)
+ victim = BP.owner
+ LAZYADD(victim.all_scars, src)
+ src.description = description
+ precise_location = specific_location
+ switch(severity)
+ if(WOUND_SEVERITY_MODERATE)
+ visibility = 2
+ if(WOUND_SEVERITY_SEVERE)
+ visibility = 3
+ if(WOUND_SEVERITY_CRITICAL)
+ visibility = 5
+ return TRUE
+
+/// What will show up in examine_more() if this scar is visible
+/datum/scar/proc/get_examine_description(mob/viewer)
+ if(!victim || !is_visible(viewer))
+ return
+
+ var/msg = "[victim.p_they(TRUE)] [victim.p_have()] [description] on [victim.p_their()] [precise_location]."
+ switch(severity)
+ if(WOUND_SEVERITY_MODERATE)
+ msg = "[msg]"
+ if(WOUND_SEVERITY_SEVERE)
+ msg = "[msg]"
+ if(WOUND_SEVERITY_CRITICAL)
+ msg = "[msg]"
+ return "\t[msg]"
+
+/// Whether a scar can currently be seen by the viewer
+/datum/scar/proc/is_visible(mob/viewer)
+ if(!victim || !viewer)
+ return
+ if(get_dist(viewer, victim) > visibility)
+ return
+
+ if(!ishuman(victim) || isobserver(viewer) || victim == viewer)
+ return TRUE
+
+ var/mob/living/carbon/human/H = victim
+ if(istype(limb, /obj/item/bodypart/head))
+ if((H.wear_mask && (H.wear_mask.flags_inv & HIDEFACE)) || (H.head && (H.head.flags_inv & HIDEFACE)))
+ return FALSE
+ else if(limb.scars_covered_by_clothes)
+ var/num_covers = LAZYLEN(H.clothingonpart(limb))
+ if(num_covers + get_dist(viewer, victim) >= visibility)
+ return FALSE
+
+ return TRUE
+
+/// Used to format a scar to safe in preferences for persistent scars
+/datum/scar/proc/format()
+ if(!fake)
+ return "[limb.body_zone]|[description]|[precise_location]|[severity]"
diff --git a/code/game/atoms.dm b/code/game/atoms.dm
index b2624057960..e47da358723 100644
--- a/code/game/atoms.dm
+++ b/code/game/atoms.dm
@@ -540,6 +540,19 @@
. += "It's empty."
SEND_SIGNAL(src, COMSIG_PARENT_EXAMINE, user, .)
+/**
+ * Called when a mob examines (shift click or verb) this atom twice (or more) within EXAMINE_MORE_TIME (default 1.5 seconds)
+ *
+ * This is where you can put extra information on something that may be superfluous or not important in critical gameplay
+ * moments, while allowing people to manually double-examine to take a closer look
+ *
+ * Produces a signal [COMSIG_PARENT_EXAMINE_MORE]
+ */
+/atom/proc/examine_more(mob/user)
+ . = list()
+ SEND_SIGNAL(src, COMSIG_PARENT_EXAMINE_MORE, user, .)
+ if(!LAZYLEN(.)) // lol ..length
+ return list("You examine [src] closer, but find nothing of interest...")
/// Updates the icon of the atom
/atom/proc/update_icon()
@@ -1241,6 +1254,37 @@
var/reverse_message = "has been [what_done] by [ssource][postfix]"
target.log_message(reverse_message, LOG_ATTACK, color="orange", log_globally=FALSE)
+/**
+ * log_wound() is for when someone is *attacked* and suffers a wound. Note that this only captures wounds from damage, so smites/forced wounds aren't logged, as well as demotions like cuts scabbing over
+ *
+ * Note that this has no info on the attack that dealt the wound: information about where damage came from isn't passed to the bodypart's damaged proc. When in doubt, check the attack log for attacks at that same time
+ * TODO later: Add logging for healed wounds, though that will require some rewriting of healing code to prevent admin heals from spamming the logs. Not high priority
+ *
+ * Arguments:
+ * * victim- The guy who got wounded
+ * * suffered_wound- The wound, already applied, that we're logging. It has to already be attached so we can get the limb from it
+ * * dealt_damage- How much damage is associated with the attack that dealt with this wound.
+ * * dealt_wound_bonus- The wound_bonus, if one was specified, of the wounding attack
+ * * dealt_bare_wound_bonus- The bare_wound_bonus, if one was specified *and applied*, of the wounding attack. Not shown if armor was present
+ * * base_roll- Base wounding ability of an attack is a random number from 1 to (dealt_damage ** WOUND_DAMAGE_EXPONENT). This is the number that was rolled in there, before mods
+ */
+/proc/log_wound(atom/victim, datum/wound/suffered_wound, dealt_damage, dealt_wound_bonus, dealt_bare_wound_bonus, base_roll)
+ var/message = "has suffered: [suffered_wound] to [suffered_wound.limb.name]" // maybe indicate if it's a promote/demote?
+
+ if(dealt_damage)
+ message += " | Damage: [dealt_damage]"
+ // The base roll is useful since it can show how lucky someone got with the given attack. For example, dealing a cut
+ if(base_roll)
+ message += "(rolled [base_roll]/[dealt_damage ** WOUND_DAMAGE_EXPONENT])"
+
+ if(dealt_wound_bonus)
+ message += " | WB: [dealt_wound_bonus]"
+
+ if(dealt_bare_wound_bonus)
+ message += " | BWB: [dealt_bare_wound_bonus]"
+
+ victim.log_message(message, LOG_ATTACK, color="blue")
+
/atom/movable/proc/add_filter(name,priority,list/params)
LAZYINITLIST(filter_data)
var/list/p = params.Copy()
diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm
index acb0ba691d5..fbee034949d 100644
--- a/code/game/machinery/doors/door.dm
+++ b/code/game/machinery/doors/door.dm
@@ -348,6 +348,10 @@
/obj/machinery/door/proc/crush()
for(var/mob/living/L in get_turf(src))
L.visible_message("[src] closes on [L], crushing [L.p_them()]!", "[src] closes on you and crushes you!")
+ if(iscarbon(L))
+ var/mob/living/carbon/C = L
+ for(var/datum/wound/W in C.all_wounds)
+ W.crush(DOOR_CRUSH_DAMAGE)
if(isalien(L)) //For xenos
L.adjustBruteLoss(DOOR_CRUSH_DAMAGE * 1.5) //Xenos go into crit after aproximately the same amount of crushes as humans.
L.emote("roar")
diff --git a/code/game/machinery/medical_kiosk.dm b/code/game/machinery/medical_kiosk.dm
index ba33ab23ad5..203b8c627b2 100644
--- a/code/game/machinery/medical_kiosk.dm
+++ b/code/game/machinery/medical_kiosk.dm
@@ -207,7 +207,7 @@
sickness_data = "\nName: [D.name].\nType: [D.spread_text].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure_text]"
if(altPatient.has_dna()) //Blood levels Information
- if(altPatient.bleed_rate)
+ if(altPatient.is_bleeding())
bleed_status = "Patient is currently bleeding!"
if(blood_percent <= 80)
blood_warning = " Patient has low blood levels. Seek a large meal, or iron supplements."
diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm
index eb190a75df4..7130eb705ce 100644
--- a/code/game/objects/items/devices/flashlight.dm
+++ b/code/game/objects/items/devices/flashlight.dm
@@ -179,9 +179,21 @@
var/T = get_turf(target)
if(locate(/mob/living) in T)
new /obj/effect/temp_visual/medical_holosign(T,user) //produce a holographic glow
- holo_cooldown = world.time + 100
+ holo_cooldown = world.time + 10 SECONDS
return
+// see: [/datum/wound/burn/proc/uv()]
+/obj/item/flashlight/pen/paramedic
+ name = "paramedic penlight"
+ desc = "A high-powered UV penlight intended to help stave off infection in the field on serious burned patients. Probably really bad to look into."
+ icon_state = "penlight_surgical"
+ /// Our current UV cooldown
+ var/uv_cooldown = 0
+ /// How long between UV fryings
+ var/uv_cooldown_length = 1 MINUTES
+ /// How much sanitization to apply to the burn wound
+ var/uv_power = 1
+
/obj/effect/temp_visual/medical_holosign
name = "medical holosign"
desc = "A small holographic glow that indicates a medic is coming to treat a patient."
diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm
index c83dfcd48f9..c7dc1066601 100644
--- a/code/game/objects/items/devices/scanners.dm
+++ b/code/game/objects/items/devices/scanners.dm
@@ -11,9 +11,10 @@ GENE SCANNER
*/
-// Describes the two modes of scanning available for health analyzers
+// Describes the three modes of scanning available for health analyzers
#define SCANMODE_HEALTH 0
#define SCANMODE_CHEMICAL 1
+#define SCANMODE_WOUND 2
#define SCANNER_CONDENSED 0
#define SCANNER_VERBOSE 1
@@ -104,8 +105,14 @@ GENE SCANNER
return BRUTELOSS
/obj/item/healthanalyzer/attack_self(mob/user)
- scanmode = !scanmode
- to_chat(user, "You switch the health analyzer to [scanmode ? "scan chemical contents" : "check physical health"].")
+ scanmode = (scanmode + 1) % 3
+ switch(scanmode)
+ if(SCANMODE_HEALTH)
+ to_chat(user, "You switch the health analyzer to check physical health.")
+ if(SCANMODE_CHEMICAL)
+ to_chat(user, "You switch the health analyzer to scan chemical contents.")
+ if(SCANMODE_WOUND)
+ to_chat(user, "You switch the health analyzer to report extra info on wounds.")
/obj/item/healthanalyzer/attack(mob/living/M, mob/living/carbon/human/user)
flick("[icon_state]-scan", src) //makes it so that it plays the scan animation upon scanning, including clumsy scanning
@@ -125,8 +132,10 @@ GENE SCANNER
if(scanmode == SCANMODE_HEALTH)
healthscan(user, M, mode, advanced)
- else
+ else if(scanmode == SCANMODE_CHEMICAL)
chemscan(user, M)
+ else
+ woundscan(user, M, src)
add_fingerprint(user)
@@ -187,6 +196,8 @@ GENE SCANNER
trauma_desc += "severe "
if(TRAUMA_RESILIENCE_LOBOTOMY)
trauma_desc += "deep-rooted "
+ if(TRAUMA_RESILIENCE_WOUND)
+ trauma_desc += "fracture-derived "
if(TRAUMA_RESILIENCE_MAGIC, TRAUMA_RESILIENCE_ABSOLUTE)
trauma_desc += "permanent "
trauma_desc += B.scan_desc
@@ -324,6 +335,18 @@ GENE SCANNER
var/tdelta = round(world.time - M.timeofdeath)
render_list += "Subject died [DisplayTimeText(tdelta)] ago.\n"
+ // Wounds
+ if(iscarbon(M))
+ var/mob/living/carbon/C = M
+ var/list/wounded_parts = C.get_wounded_bodyparts()
+ for(var/i in wounded_parts)
+ var/obj/item/bodypart/wounded_part = i
+ render_list += "Warning: Physical trauma[LAZYLEN(wounded_part.wounds) > 1? "s" : ""] detected in [wounded_part.name]"
+ for(var/k in wounded_part.wounds)
+ var/datum/wound/W = k
+ render_list += "Type: [W.name]\nSeverity: [W.severity_text()]\nRecommended Treatment: [W.treat_text]
\n" // less lines than in woundscan() so we don't overload people trying to get basic med info
+ render_list += ""
+
for(var/thing in M.diseases)
var/datum/disease/D = thing
if(!(D.visibility_flags & HIDDEN_SCANNER))
@@ -338,7 +361,7 @@ GENE SCANNER
if(blood_id)
if(ishuman(C))
var/mob/living/carbon/human/H = C
- if(H.bleed_rate)
+ if(H.is_bleeding())
render_list += "Subject is bleeding!\n"
var/blood_percent = round((C.blood_volume / BLOOD_VOLUME_NORMAL)*100)
var/blood_type = C.dna.blood_type
@@ -397,6 +420,63 @@ GENE SCANNER
desc = "A hand-held body scanner able to distinguish vital signs of the subject with high accuracy."
advanced = TRUE
+/// Displays wounds with extended information on their status vs medscanners
+/proc/woundscan(mob/user, mob/living/carbon/patient, obj/item/healthanalyzer/wound/scanner)
+ if(!istype(patient))
+ return
+
+ var/render_list = ""
+ for(var/i in patient.get_wounded_bodyparts())
+ var/obj/item/bodypart/wounded_part = i
+ render_list += "Warning: Physical trauma[LAZYLEN(wounded_part.wounds) > 1? "s" : ""] detected in [wounded_part.name]"
+ for(var/k in wounded_part.wounds)
+ var/datum/wound/W = k
+ render_list += "[W.get_scanner_description()]
\n"
+ render_list += ""
+
+ if(render_list == "")
+ playsound(scanner, 'sound/machines/ping.ogg', 50, FALSE)
+ to_chat(user, "\The [scanner] makes a happy ping and briefly displays a smiley face with several exclamation points! It's really excited to report that [patient] has no wounds!")
+ else
+ to_chat(user, jointext(render_list, ""))
+
+/obj/item/healthanalyzer/wound
+ name = "first aid analyzer"
+ icon_state = "adv_spectrometer"
+ desc = "A prototype MeLo-Tech medical scanner used to diagnose injuries and recommend treatment for serious wounds, but offers no further insight into the patient's health. You hope the final version is less annoying to read!"
+ var/next_encouragement
+ var/greedy
+
+/obj/item/healthanalyzer/wound/attack_self(mob/user)
+ if(next_encouragement < world.time)
+ playsound(src, 'sound/machines/ping.ogg', 50, FALSE)
+ var/list/encouragements = list("briefly displays a happy face, gazing emptily at you", "briefly displays a spinning cartoon heart", "displays an encouraging message about eating healthy and exercising", \
+ "reminds you that everyone is doing their best", "displays a message wishing you well", "displays a sincere thank-you for your interest in first-aid", "formally absolves you of all your sins")
+ to_chat(user, "\The [src] makes a happy ping and [pick(encouragements)]!")
+ next_encouragement = world.time + 10 SECONDS
+ greedy = FALSE
+ else if(!greedy)
+ to_chat(user, "\The [src] displays an eerily high-definition frowny face, chastizing you for asking it for too much encouragement.")
+ greedy = TRUE
+ else
+ playsound(src, 'sound/machines/buzz-sigh.ogg', 50, FALSE)
+ if(isliving(user))
+ var/mob/living/L = user
+ to_chat(L, "\The [src] makes a disappointed buzz and pricks your finger for being greedy. Ow!")
+ L.adjustBruteLoss(4)
+ L.dropItemToGround(src)
+
+/obj/item/healthanalyzer/wound/attack(mob/living/carbon/patient, mob/living/carbon/human/user)
+ add_fingerprint(user)
+ user.visible_message("[user] scans [patient] for serious injuries.", "You scan [patient] for serious injuries.")
+
+ if(!istype(patient))
+ playsound(src, 'sound/machines/buzz-sigh.ogg', 30, TRUE)
+ to_chat(user, "\The [src] makes a sad buzz and briefly displays a frowny face, indicating it can't scan [patient].")
+ return
+
+ woundscan(user, patient, src)
+
/obj/item/analyzer
desc = "A hand-held environmental scanner which reports current gas levels. Alt-Click to use the built in barometer function."
name = "analyzer"
@@ -802,5 +882,6 @@ GENE SCANNER
#undef SCANMODE_HEALTH
#undef SCANMODE_CHEMICAL
+#undef SCANMODE_WOUND
#undef SCANNER_CONDENSED
#undef SCANNER_VERBOSE
diff --git a/code/game/objects/items/dualsaber.dm b/code/game/objects/items/dualsaber.dm
index e8c99f98f40..1b5d6d5d300 100644
--- a/code/game/objects/items/dualsaber.dm
+++ b/code/game/objects/items/dualsaber.dm
@@ -23,6 +23,8 @@
max_integrity = 200
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 70)
resistance_flags = FIRE_PROOF
+ wound_bonus = -110
+ bare_wound_bonus = 20
var/two_hand_force = 34
var/hacked = FALSE
var/brightness_on = 6 //TWICE AS BRIGHT AS A REGULAR ESWORD
diff --git a/code/game/objects/items/fireaxe.dm b/code/game/objects/items/fireaxe.dm
index 512ca1f4b0e..b0ecff19839 100644
--- a/code/game/objects/items/fireaxe.dm
+++ b/code/game/objects/items/fireaxe.dm
@@ -17,6 +17,7 @@
max_integrity = 200
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 30)
resistance_flags = FIRE_PROOF
+ wound_bonus = -20
var/wielded = FALSE // track wielded status on item
/obj/item/fireaxe/Initialize()
diff --git a/code/game/objects/items/grenades/flashbang.dm b/code/game/objects/items/grenades/flashbang.dm
index 2a42bce4ad2..b44a735e1da 100644
--- a/code/game/objects/items/grenades/flashbang.dm
+++ b/code/game/objects/items/grenades/flashbang.dm
@@ -57,6 +57,14 @@
shrapnel_type = /obj/projectile/bullet/pellet/stingball/mega
shrapnel_radius = 12
+/obj/item/grenade/stingbang/breaker
+ name = "breakbang"
+ shrapnel_type = /obj/projectile/bullet/pellet/stingball/breaker
+
+/obj/item/grenade/stingbang/shred
+ name = "shredbang"
+ shrapnel_type = /obj/projectile/bullet/pellet/stingball/shred
+
/obj/item/grenade/stingbang/prime(mob/living/lanced_by)
if(iscarbon(loc))
var/mob/living/carbon/C = loc
diff --git a/code/game/objects/items/holy_weapons.dm b/code/game/objects/items/holy_weapons.dm
index 5f233bc9eca..169f805fef9 100644
--- a/code/game/objects/items/holy_weapons.dm
+++ b/code/game/objects/items/holy_weapons.dm
@@ -201,6 +201,7 @@
throwforce = 10
w_class = WEIGHT_CLASS_TINY
obj_flags = UNIQUE_RENAME
+ wound_bonus = -10
var/reskinned = FALSE
var/chaplain_spawnable = TRUE
@@ -602,6 +603,8 @@
item_flags = ABSTRACT
w_class = WEIGHT_CLASS_HUGE
sharpness = IS_SHARP
+ wound_bonus = -20
+ bare_wound_bonus = 25
/obj/item/nullrod/armblade/Initialize()
. = ..()
diff --git a/code/game/objects/items/kitchen.dm b/code/game/objects/items/kitchen.dm
index 7219fe980c6..87fceeff6f2 100644
--- a/code/game/objects/items/kitchen.dm
+++ b/code/game/objects/items/kitchen.dm
@@ -89,6 +89,8 @@
item_flags = EYE_STAB
var/bayonet = FALSE //Can this be attached to a gun?
custom_price = 250
+ wound_bonus = -5
+ bare_wound_bonus = 10
/obj/item/kitchen/knife/ComponentInitialize()
. = ..()
diff --git a/code/game/objects/items/manuals.dm b/code/game/objects/items/manuals.dm
index 2eb1ba8cb8b..55e57bcdee1 100644
--- a/code/game/objects/items/manuals.dm
+++ b/code/game/objects/items/manuals.dm
@@ -432,7 +432,9 @@
if(prob(50))
step(W, pick(GLOB.alldirs))
ADD_TRAIT(H, TRAIT_DISFIGURED, TRAIT_GENERIC)
- H.bleed_rate = 5
+ for(var/i in H.bodyparts)
+ var/obj/item/bodypart/BP = i
+ BP.generic_bleedstacks += 5
H.gib_animation()
sleep(3)
H.adjustBruteLoss(1000) //to make the body super-bloody
diff --git a/code/game/objects/items/melee/misc.dm b/code/game/objects/items/melee/misc.dm
index 98dd8794274..20b53c0788c 100644
--- a/code/game/objects/items/melee/misc.dm
+++ b/code/game/objects/items/melee/misc.dm
@@ -20,6 +20,8 @@
slot_flags = ITEM_SLOT_BELT
force = 10
throwforce = 7
+ wound_bonus = 15
+ bare_wound_bonus = 10
w_class = WEIGHT_CLASS_NORMAL
attack_verb = list("flogged", "whipped", "lashed", "disciplined")
hitsound = 'sound/weapons/chainhit.ogg'
@@ -193,6 +195,8 @@
var/force_off // Damage when off - not stunning
var/weight_class_on // What is the new size class when turned on
+ wound_bonus = 15
+
// Description for trying to stun when still on cooldown.
/obj/item/melee/classic_baton/proc/get_wait_description()
return
@@ -340,6 +344,7 @@
force_on = 10
force_off = 0
weight_class_on = WEIGHT_CLASS_BULKY
+ bare_wound_bonus = 5
/obj/item/melee/classic_baton/telescopic/suicide_act(mob/user)
var/mob/living/carbon/human/H = user
diff --git a/code/game/objects/items/melee/transforming.dm b/code/game/objects/items/melee/transforming.dm
index a2e10426784..15feb3e78a6 100644
--- a/code/game/objects/items/melee/transforming.dm
+++ b/code/game/objects/items/melee/transforming.dm
@@ -13,6 +13,8 @@
var/list/nemesis_factions //Any mob with a faction that exists in this list will take bonus damage/effects
var/w_class_on = WEIGHT_CLASS_BULKY
var/clumsy_check = TRUE
+ wound_bonus = -30
+ bare_wound_bonus = 40
/obj/item/melee/transforming/Initialize()
. = ..()
diff --git a/code/game/objects/items/powerfist.dm b/code/game/objects/items/powerfist.dm
index 516bbb5f1b8..ff62775bd90 100644
--- a/code/game/objects/items/powerfist.dm
+++ b/code/game/objects/items/powerfist.dm
@@ -93,7 +93,7 @@
target.visible_message("[user]'s powerfist lets out a weak hiss as [user.p_they()] punch[user.p_es()] [target.name]!", \
"[user]'s punch strikes with force!")
return
- target.apply_damage(force * fisto_setting, BRUTE)
+ target.apply_damage(force * fisto_setting, BRUTE, wound_bonus = -25*fisto_setting**2)
target.visible_message("[user]'s powerfist lets out a loud hiss as [user.p_they()] punch[user.p_es()] [target.name]!", \
"You cry out in pain as [user]'s punch flings you backwards!")
new /obj/effect/temp_visual/kinetic_blast(target.loc)
diff --git a/code/game/objects/items/shrapnel.dm b/code/game/objects/items/shrapnel.dm
index cd3436846e6..9ac91317cd1 100644
--- a/code/game/objects/items/shrapnel.dm
+++ b/code/game/objects/items/shrapnel.dm
@@ -7,11 +7,13 @@
icon_state = "large"
w_class = WEIGHT_CLASS_TINY
item_flags = DROPDEL
+ sharpness = TRUE
/obj/item/shrapnel/stingball // stingbang grenades
name = "stingball"
embedding = list(embed_chance=90, fall_chance=3, jostle_chance=7, ignore_throwspeed_threshold=TRUE, pain_stam_pct=0.7, pain_mult=5, jostle_pain_mult=6, rip_time=15, embed_chance_turf_mod=-100)
icon_state = "tiny"
+ sharpness = FALSE
/obj/item/shrapnel/bullet // bullets
name = "bullet"
@@ -28,7 +30,7 @@
/obj/projectile/bullet/shrapnel
name = "flying shrapnel shard"
- damage = 9
+ damage = 8
range = 10
armour_penetration = -30
dismemberment = 5
@@ -37,6 +39,8 @@
shrapnel_type = /obj/item/shrapnel
ricochet_incidence_leeway = 60
hit_stunned_targets = TRUE
+ sharpness = TRUE
+ wound_bonus = 30
/obj/projectile/bullet/shrapnel/mega
name = "flying shrapnel hunk"
@@ -64,5 +68,17 @@
ricochets_max = 6
ricochet_chance = 110
+/obj/projectile/bullet/pellet/stingball/breaker
+ name = "breakbang pellet"
+ damage = 10
+ wound_bonus = 40
+ sharpness = FALSE
+
+/obj/projectile/bullet/pellet/stingball/shred
+ name = "shredbang pellet"
+ damage = 10
+ wound_bonus = 30
+ sharpness = TRUE
+
/obj/projectile/bullet/pellet/stingball/on_ricochet(atom/A)
hit_stunned_targets = TRUE // ducking will save you from the first wave, but not the rebounds
diff --git a/code/game/objects/items/spear.dm b/code/game/objects/items/spear.dm
index f9d9e294fb7..4e25c4e931d 100644
--- a/code/game/objects/items/spear.dm
+++ b/code/game/objects/items/spear.dm
@@ -20,6 +20,8 @@
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30)
var/war_cry = "AAAAARGH!!!"
var/icon_prefix = "spearglass"
+ wound_bonus = -25
+ bare_wound_bonus = 15
/obj/item/spear/ComponentInitialize()
. = ..()
diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm
index ca543f4a05d..a2448fe0b27 100644
--- a/code/game/objects/items/stacks/medical.dm
+++ b/code/game/objects/items/stacks/medical.dm
@@ -16,6 +16,16 @@
var/other_delay = 0
var/repeating = FALSE
var/experience_given = 1
+ /// How much brute we heal per application
+ var/heal_brute
+ /// How much burn we heal per application
+ var/heal_burn
+ /// How much we reduce bleeding per application on cut wounds
+ var/stop_bleeding
+ /// How much sanitization to apply to burns on application
+ var/sanitization
+ /// How much we add to flesh_healing for burn wounds on application
+ var/flesh_regeneration
/obj/item/stack/medical/attack(mob/living/M, mob/user)
. = ..()
@@ -75,8 +85,9 @@
icon_state = "brutepack"
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
- var/heal_brute = 40
- self_delay = 20
+ heal_brute = 40
+ self_delay = 40
+ other_delay = 20
grind_results = list(/datum/reagent/medicine/C2/libital = 10)
/obj/item/stack/medical/bruise_pack/heal(mob/living/M, mob/user)
@@ -95,8 +106,8 @@
M.heal_bodypart_damage((heal_brute/2))
return TRUE
if(iscarbon(M))
- return heal_carbon(M, user, heal_brute, 0)
- to_chat(user, "You can't heal [M] with the \the [src]!")
+ return heal_carbon(M, user, heal_brute, heal_burn)
+ to_chat(user, "You can't heal [M] with \the [src]!")
/obj/item/stack/medical/bruise_pack/suicide_act(mob/user)
user.visible_message("[user] is bludgeoning [user.p_them()]self with [src]! It looks like [user.p_theyre()] trying to commit suicide!")
@@ -104,28 +115,32 @@
/obj/item/stack/medical/gauze
name = "medical gauze"
- desc = "A roll of elastic cloth that is extremely effective at stopping bleeding, but does not heal wounds."
+ desc = "A roll of elastic cloth, perfect for stabilizing all kinds of wounds, from cuts and burns, to broken bones. "
gender = PLURAL
singular_name = "medical gauze"
icon_state = "gauze"
- var/stop_bleeding = 1800
- self_delay = 20
+ self_delay = 50
+ other_delay = 20
max_amount = 12
+ amount = 6
grind_results = list(/datum/reagent/cellulose = 2)
custom_price = 100
+ absorption_rate = 0.25
+ absorption_capacity = 5
+ splint_factor = 0.35
+
+// gauze is only relevant for wounds, which are handled in the wounds themselves
+/obj/item/stack/medical/gauze/try_heal(mob/living/M, mob/user, silent)
+ var/obj/item/bodypart/limb = M.get_bodypart(check_zone(user.zone_selected))
+ if(limb)
+ if(limb.brute_dam > 40)
+ to_chat(user, "The bleeding on [user==M ? "your" : "[M]'s"] [limb.name] is from bruising, and cannot be treated with [src]!")
+ else
+ to_chat(user, "There's no bleeding on [user==M ? "your" : "[M]'s"] [limb.name]")
/obj/item/stack/medical/gauze/twelve
amount = 12
-/obj/item/stack/medical/gauze/heal(mob/living/M, mob/user)
- if(ishuman(M))
- var/mob/living/carbon/human/H = M
- if(!H.bleedsuppress && H.bleed_rate) //so you can't stack bleed suppression
- H.suppress_bloodloss(stop_bleeding)
- to_chat(user, "You stop the bleeding of [M]!")
- return TRUE
- to_chat(user, "You can not use \the [src] on [M]!")
-
/obj/item/stack/medical/gauze/attackby(obj/item/I, mob/user, params)
if(I.tool_behaviour == TOOL_WIRECUTTER || I.get_sharpness())
if(get_amount() < 2)
@@ -146,57 +161,45 @@
/obj/item/stack/medical/gauze/improvised
name = "improvised gauze"
singular_name = "improvised gauze"
- desc = "A roll of cloth roughly cut from something that can stop bleeding, but does not heal wounds."
- stop_bleeding = 900
+ desc = "A roll of cloth roughly cut from something that does a decent job of stabilizing wounds, but less efficiently so than real medical gauze."
+ self_delay = 60
+ other_delay = 30
+ absorption_rate = 0.15
+ absorption_capacity = 4
/obj/item/stack/medical/gauze/cyborg
custom_materials = null
is_cyborg = 1
cost = 250
-/obj/item/stack/medical/ointment
- name = "ointment"
- desc = "Used to treat those nasty burn wounds."
- gender = PLURAL
- singular_name = "ointment"
- icon_state = "ointment"
- lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
- righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
- var/heal_burn = 40
- self_delay = 20
- grind_results = list(/datum/reagent/medicine/C2/lenturi = 10)
-
-/obj/item/stack/medical/ointment/heal(mob/living/M, mob/user)
- if(M.stat == DEAD)
- to_chat(user, "[M] is dead! You can not help [M.p_them()].")
- return
- if(iscarbon(M))
- return heal_carbon(M, user, 0, heal_burn)
- to_chat(user, "You can't heal [M] with the \the [src]!")
-
-/obj/item/stack/medical/ointment/suicide_act(mob/living/user)
- user.visible_message("[user] is squeezing \the [src] into [user.p_their()] mouth! [user.p_do(TRUE)]n't [user.p_they()] know that stuff is toxic?")
- return TOXLOSS
-
/obj/item/stack/medical/suture
name = "suture"
- desc = "Sterile sutures used to seal up cuts and lacerations."
+ desc = "Basic sterile sutures used to seal up cuts and lacerations and stop bleeding."
gender = PLURAL
singular_name = "suture"
icon_state = "suture"
self_delay = 30
other_delay = 10
- amount = 15
- max_amount = 15
+ amount = 10
+ max_amount = 10
repeating = TRUE
- var/heal_brute = 10
+ heal_brute = 10
+ stop_bleeding = 0.6
grind_results = list(/datum/reagent/medicine/spaceacillin = 2)
+/obj/item/stack/medical/suture/emergency
+ name = "emergency suture"
+ desc = "A value pack of cheap sutures, not very good at repairing damage, but still decent at stopping bleeding."
+ heal_brute = 5
+ amount = 5
+ max_amount = 5
+
/obj/item/stack/medical/suture/medicated
name = "medicated suture"
icon_state = "suture_purp"
desc = "A suture infused with drugs that speed up wound healing of the treated laceration."
heal_brute = 15
+ stop_bleeding = 0.75
grind_results = list(/datum/reagent/medicine/polypyr = 2)
/obj/item/stack/medical/suture/heal(mob/living/M, mob/user)
@@ -205,7 +208,7 @@
to_chat(user, "[M] is dead! You can not help [M.p_them()].")
return
if(iscarbon(M))
- return heal_carbon(M, user, heal_brute, 0)
+ return heal_carbon(M, user, heal_brute, heal_burn)
if(isanimal(M))
var/mob/living/simple_animal/critter = M
if (!(critter.healable))
@@ -218,7 +221,37 @@
M.heal_bodypart_damage(heal_brute)
return TRUE
- to_chat(user, "You can't heal [M] with the \the [src]!")
+ to_chat(user, "You can't heal [M] with \the [src]!")
+
+/obj/item/stack/medical/ointment
+ name = "ointment"
+ desc = "Basic burn ointment, rated effective for second degree burns with proper bandaging, though it's still an effective stabilizer for worse burns. Not terribly good at outright healing burns though."
+ gender = PLURAL
+ singular_name = "ointment"
+ icon_state = "ointment"
+ lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
+ righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
+ amount = 10
+ max_amount = 10
+ self_delay = 40
+ other_delay = 20
+
+ heal_burn = 5
+ flesh_regeneration = 2.5
+ sanitization = 0.3
+ grind_results = list(/datum/reagent/medicine/C2/lenturi = 10)
+
+/obj/item/stack/medical/ointment/heal(mob/living/M, mob/user)
+ if(M.stat == DEAD)
+ to_chat(user, "[M] is dead! You can not help [M.p_them()].")
+ return
+ if(iscarbon(M))
+ return heal_carbon(M, user, heal_brute, heal_burn)
+ to_chat(user, "You can't heal [M] with \the [src]!")
+
+/obj/item/stack/medical/ointment/suicide_act(mob/living/user)
+ user.visible_message("[user] is squeezing \the [src] into [user.p_their()] mouth! [user.p_do(TRUE)]n't [user.p_they()] know that stuff is toxic?")
+ return TOXLOSS
/obj/item/stack/medical/mesh
name = "regenerative mesh"
@@ -229,9 +262,12 @@
self_delay = 30
other_delay = 10
amount = 15
+ heal_burn = 10
max_amount = 15
repeating = TRUE
- var/heal_burn = 10
+ sanitization = 0.75
+ flesh_regeneration = 3
+
var/is_open = TRUE ///This var determines if the sterile packaging of the mesh has been opened.
grind_results = list(/datum/reagent/medicine/spaceacillin = 2)
@@ -253,8 +289,8 @@
to_chat(user, "[M] is dead! You can not help [M.p_them()].")
return
if(iscarbon(M))
- return heal_carbon(M, user, 0, heal_burn)
- to_chat(user, "You can't heal [M] with the \the [src]!")
+ return heal_carbon(M, user, heal_brute, heal_burn)
+ to_chat(user, "You can't heal [M] with \the [src]!")
/obj/item/stack/medical/mesh/try_heal(mob/living/M, mob/user, silent = FALSE)
@@ -292,6 +328,8 @@
singular_name = "advanced regenerative mesh"
icon_state = "aloe_mesh"
heal_burn = 15
+ sanitization = 1.25
+ flesh_regeneration = 3.5
grind_results = list(/datum/reagent/consumable/aloejuice = 1)
/obj/item/stack/medical/mesh/advanced/update_icon_state()
@@ -334,7 +372,6 @@
to_chat(user, "You can't heal [M] with the \the [src]!")
-
/*
The idea is for these medical devices to work like a hybrid of the old brute packs and tend wounds,
they heal a little at a time, have reduced healing density and does not allow for rapid healing while in combat.
@@ -342,3 +379,49 @@
The interesting limb targeting mechanic is retained and i still believe they will be a viable choice, especially when healing others in the field.
*/
+
+/obj/item/stack/medical/bone_gel
+ name = "bone gel"
+ singular_name = "bone gel"
+ desc = "A potent medical gel that, when applied to a damaged bone in a proper surgical setting, triggers an intense melding reaction to repair the wound. Can be directly applied alongside surgical sticky tape to a broken bone in dire circumstances, though this is very harmful to the patient and not recommended."
+
+ icon = 'icons/obj/surgery.dmi'
+ icon_state = "bone-gel"
+ lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
+ righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
+
+ amount = 4
+ self_delay = 20
+ grind_results = list(/datum/reagent/medicine/C2/libital = 10)
+ novariants = TRUE
+
+/obj/item/stack/medical/bone_gel/attack(mob/living/M, mob/user)
+ to_chat(user, "Bone gel can only be used on fractured limbs!")
+ return
+
+/obj/item/stack/medical/bone_gel/suicide_act(mob/user)
+ if(iscarbon(user))
+ var/mob/living/carbon/C = user
+ C.visible_message("[C] is squirting all of \the [src] into [C.p_their()] mouth! That's not proper procedure! It looks like [C.p_theyre()] trying to commit suicide!")
+ if(do_after(C, 2 SECONDS))
+ C.emote("scream")
+ for(var/i in C.bodyparts)
+ var/obj/item/bodypart/bone = i
+ var/datum/wound/brute/bone/severe/oof_ouch = new
+ oof_ouch.apply_wound(bone)
+ var/datum/wound/brute/bone/critical/oof_OUCH = new
+ oof_OUCH.apply_wound(bone)
+
+ for(var/i in C.bodyparts)
+ var/obj/item/bodypart/bone = i
+ bone.receive_damage(brute=60)
+ use(1)
+ return (BRUTELOSS)
+ else
+ C.visible_message("[C] screws up like an idiot and still dies anyway!")
+ return (BRUTELOSS)
+
+/obj/item/stack/medical/bone_gel/cyborg
+ custom_materials = null
+ is_cyborg = 1
+ cost = 250
diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm
index 1df89067b4a..0ea8b83e065 100644
--- a/code/game/objects/items/stacks/stack.dm
+++ b/code/game/objects/items/stacks/stack.dm
@@ -14,6 +14,7 @@
icon = 'icons/obj/stack_objects.dmi'
gender = PLURAL
material_modifier = 0.01
+ max_integrity = 100
var/list/datum/stack_recipe/recipes
var/singular_name
var/amount = 1
@@ -30,6 +31,15 @@
//NOTE: When adding grind_results, the amounts should be for an INDIVIDUAL ITEM - these amounts will be multiplied by the stack size in on_grind()
var/obj/structure/table/tableVariant // we tables now (stores table variant to be built from this stack)
+ // The following are all for medical treatment, they're here instead of /stack/medical because sticky tape can be used as a makeshift bandage or splint
+ /// If set and this used as a splint for a broken bone wound, this is used as a multiplier for applicable slowdowns (lower = better) (also for speeding up burn recoveries)
+ var/splint_factor
+ /// How much blood flow this stack can absorb if used as a bandage on a cut wound, note that absorption is how much we lower the flow rate, not the raw amount of blood we suck up
+ var/absorption_capacity
+ /// How quickly we lower the blood flow on a cut wound we're bandaging. Expected lifetime of this bandage in ticks is thus absorption_capacity/absorption_rate, or until the cut heals, whichever comes first
+ var/absorption_rate
+
+
/obj/item/stack/on_grind()
for(var/i in 1 to grind_results.len) //This should only call if it's ground, so no need to check if grind_results exists
grind_results[grind_results[i]] *= get_amount() //Gets the key at position i, then the reagent amount of that key, then multiplies it by stack size
diff --git a/code/game/objects/items/stacks/tape.dm b/code/game/objects/items/stacks/tape.dm
index f7760622c2c..60ee47f0549 100644
--- a/code/game/objects/items/stacks/tape.dm
+++ b/code/game/objects/items/stacks/tape.dm
@@ -7,11 +7,14 @@
icon = 'icons/obj/tapes.dmi'
icon_state = "tape_w"
var/prefix = "sticky"
+ w_class = WEIGHT_CLASS_TINY
+ full_w_class = WEIGHT_CLASS_TINY
item_flags = NOBLUDGEON
amount = 5
max_amount = 5
resistance_flags = FLAMMABLE
grind_results = list(/datum/reagent/cellulose = 5)
+ splint_factor = 0.8
var/list/conferred_embed = EMBED_HARMLESS
var/overwrite_existing = FALSE
@@ -51,6 +54,7 @@
icon_state = "tape_y"
prefix = "super sticky"
conferred_embed = EMBED_HARMLESS_SUPERIOR
+ splint_factor = 0.6
/obj/item/stack/sticky_tape/pointy
name = "pointy tape"
@@ -67,3 +71,13 @@
icon_state = "tape_spikes"
prefix = "super pointy"
conferred_embed = EMBED_POINTY_SUPERIOR
+
+/obj/item/stack/sticky_tape/surgical
+ name = "surgical tape"
+ singular_name = "surgical tape"
+ desc = "Made for patching broken bones back together alongside bone gel, not for playing pranks."
+ //icon_state = "tape_spikes"
+ prefix = "surgical"
+ conferred_embed = list("embed_chance" = 30, "pain_mult" = 0, "jostle_pain_mult" = 0, "ignore_throwspeed_threshold" = TRUE)
+ splint_factor = 0.4
+ custom_price = 500
diff --git a/code/game/objects/items/storage/backpack.dm b/code/game/objects/items/storage/backpack.dm
index 38becaec6ce..1d39f887c87 100644
--- a/code/game/objects/items/storage/backpack.dm
+++ b/code/game/objects/items/storage/backpack.dm
@@ -373,6 +373,7 @@
new /obj/item/circular_saw(src)
new /obj/item/surgicaldrill(src)
new /obj/item/cautery(src)
+ new /obj/item/bonesetter(src)
new /obj/item/surgical_drapes(src)
new /obj/item/clothing/mask/surgical(src)
new /obj/item/razor(src)
@@ -392,6 +393,7 @@
new /obj/item/hemostat(src)
new /obj/item/retractor(src)
new /obj/item/circular_saw(src)
+ new /obj/item/bonesetter(src)
new /obj/item/surgicaldrill(src)
new /obj/item/cautery(src)
new /obj/item/surgical_drapes(src)
@@ -477,6 +479,7 @@
new /obj/item/hemostat(src)
new /obj/item/retractor(src)
new /obj/item/circular_saw(src)
+ new /obj/item/bonesetter(src)
new /obj/item/surgicaldrill(src)
new /obj/item/cautery(src)
new /obj/item/surgical_drapes(src)
diff --git a/code/game/objects/items/storage/belt.dm b/code/game/objects/items/storage/belt.dm
index 07ca092e95a..a945e2a84ec 100644
--- a/code/game/objects/items/storage/belt.dm
+++ b/code/game/objects/items/storage/belt.dm
@@ -158,6 +158,7 @@
/obj/item/surgical_drapes, //for true paramedics
/obj/item/scalpel,
/obj/item/circular_saw,
+ /obj/item/bonesetter,
/obj/item/surgicaldrill,
/obj/item/retractor,
/obj/item/cautery,
@@ -179,7 +180,8 @@
/obj/item/construction/plumbing,
/obj/item/plunger,
/obj/item/reagent_containers/spray,
- /obj/item/shears
+ /obj/item/shears,
+ /obj/item/stack/sticky_tape //surgical tape
))
/obj/item/storage/belt/medical/paramedic/PopulateContents()
@@ -187,9 +189,9 @@
new /obj/item/pinpointer/crew/prox(src)
new /obj/item/stack/medical/gauze/twelve(src)
new /obj/item/reagent_containers/syringe(src)
- new /obj/item/reagent_containers/glass/bottle/epinephrine(src)
+ new /obj/item/stack/medical/bone_gel(src)
+ new /obj/item/stack/sticky_tape/surgical(src)
new /obj/item/reagent_containers/glass/bottle/calomel(src)
- new /obj/item/reagent_containers/glass/bottle/formaldehyde(src)
update_icon()
/obj/item/storage/belt/security
diff --git a/code/game/objects/items/storage/firstaid.dm b/code/game/objects/items/storage/firstaid.dm
index 1aa0607bfff..21945f9f771 100644
--- a/code/game/objects/items/storage/firstaid.dm
+++ b/code/game/objects/items/storage/firstaid.dm
@@ -37,6 +37,23 @@
/obj/item/reagent_containers/hypospray/medipen = 1)
generate_items_inside(items_inside,src)
+/obj/item/storage/firstaid/emergency
+ icon_state = "medbriefcase"
+ name = "emergency first-aid kit"
+ desc = "A very simple first aid kit meant to secure and stabilize serious wounds for later treatment."
+
+/obj/item/storage/firstaid/emergency/PopulateContents()
+ if(empty)
+ return
+ var/static/items_inside = list(
+ /obj/item/healthanalyzer/wound = 1,
+ /obj/item/stack/medical/gauze = 1,
+ /obj/item/stack/medical/suture/emergency = 1,
+ /obj/item/stack/medical/ointment = 1,
+ /obj/item/reagent_containers/hypospray/medipen/ekit = 2,
+ /obj/item/storage/pill_bottle/iron = 1)
+ generate_items_inside(items_inside,src)
+
/obj/item/storage/firstaid/medical
name = "medical aid kit"
icon_state = "firstaid_surgery"
@@ -76,6 +93,7 @@
/obj/item/surgical_drapes, //for true paramedics
/obj/item/scalpel,
/obj/item/circular_saw,
+ /obj/item/bonesetter,
/obj/item/surgicaldrill,
/obj/item/retractor,
/obj/item/cautery,
@@ -102,10 +120,10 @@
if(empty)
return
var/static/items_inside = list(
- /obj/item/stack/medical/gauze = 1,
+ /obj/item/stack/medical/gauze/twelve = 1,
/obj/item/stack/medical/suture = 2,
/obj/item/stack/medical/mesh = 2,
- /obj/item/reagent_containers/hypospray/medipen = 1,
+ /obj/item/reagent_containers/hypospray/medipen/ekit = 1,
/obj/item/surgical_drapes = 1,
/obj/item/scalpel = 1,
/obj/item/hemostat = 1,
diff --git a/code/game/objects/items/storage/toolbox.dm b/code/game/objects/items/storage/toolbox.dm
index 89bdef5b96f..a21c3a2e737 100644
--- a/code/game/objects/items/storage/toolbox.dm
+++ b/code/game/objects/items/storage/toolbox.dm
@@ -19,6 +19,7 @@
material_flags = MATERIAL_COLOR
var/latches = "single_latch"
var/has_latches = TRUE
+ wound_bonus = 5
/obj/item/storage/toolbox/Initialize()
. = ..()
diff --git a/code/game/objects/items/weaponry.dm b/code/game/objects/items/weaponry.dm
index 6eeecd43ff9..060d0a7f5ec 100644
--- a/code/game/objects/items/weaponry.dm
+++ b/code/game/objects/items/weaponry.dm
@@ -582,6 +582,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi'
force = 10
+ wound_bonus = -10
throwforce = 12
attack_verb = list("beat", "smacked")
custom_materials = list(/datum/material/wood = MINERAL_MATERIAL_AMOUNT * 3.5)
@@ -620,7 +621,8 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
homerun_ready = 0
return
else if(!target.anchored)
- target.throw_at(throw_target, rand(1,2), 7, user)
+ var/whack_speed = (prob(60) ? 1 : 4)
+ target.throw_at(throw_target, rand(1, 2), whack_speed, user) // sorry friends, 7 speed batting caused wounds to absolutely delete whoever you knocked your target into (and said target)
/obj/item/melee/baseball_bat/ablative
name = "metal baseball bat"
diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm
index b063a8eda34..4fbad44290e 100644
--- a/code/game/objects/objs.dm
+++ b/code/game/objects/objs.dm
@@ -8,6 +8,11 @@
var/damtype = BRUTE
var/force = 0
+ /// How good a given object is at causing wounds on carbons. Higher values equal better shots at creating serious wounds.
+ var/wound_bonus = 0
+ /// If this attacks a human with no wound armor on the affected body part, add this to the wound mod. Some attacks may be significantly worse at wounding if there's even a slight layer of armor to absorb some of it vs bare flesh
+ var/bare_wound_bonus = 0
+
var/datum/armor/armor
var/obj_integrity //defaults to max_integrity
var/max_integrity = 500
diff --git a/code/game/objects/structures/crates_lockers/closets/utility_closets.dm b/code/game/objects/structures/crates_lockers/closets/utility_closets.dm
index c5d0ec3eec8..16a69905947 100644
--- a/code/game/objects/structures/crates_lockers/closets/utility_closets.dm
+++ b/code/game/objects/structures/crates_lockers/closets/utility_closets.dm
@@ -26,7 +26,7 @@
if (prob(40))
new /obj/item/storage/toolbox/emergency(src)
- switch (pickweight(list("small" = 40, "aid" = 25, "tank" = 20, "both" = 10, "nothing" = 4, "delete" = 1)))
+ switch (pickweight(list("small" = 35, "aid" = 30, "tank" = 20, "both" = 10, "nothing" = 4, "delete" = 1)))
if ("small")
new /obj/item/tank/internals/emergency_oxygen(src)
new /obj/item/tank/internals/emergency_oxygen(src)
@@ -35,7 +35,7 @@
if ("aid")
new /obj/item/tank/internals/emergency_oxygen(src)
- new /obj/item/storage/firstaid/o2(src)
+ new /obj/item/storage/firstaid/emergency(src)
new /obj/item/clothing/mask/breath(src)
if ("tank")
diff --git a/code/game/objects/structures/guillotine.dm b/code/game/objects/structures/guillotine.dm
index 9f7ccff65ee..86a20291725 100644
--- a/code/game/objects/structures/guillotine.dm
+++ b/code/game/objects/structures/guillotine.dm
@@ -123,7 +123,7 @@
if (QDELETED(head))
return
- playsound(src, 'sound/weapons/bladeslice.ogg', 100, TRUE)
+ playsound(src, 'sound/weapons/guillotine.ogg', 100, TRUE)
if (blade_sharpness >= GUILLOTINE_DECAP_MIN_SHARP || head.brute_dam >= 100)
head.dismember()
log_combat(user, H, "beheaded", src)
diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm
index faf7bace013..6344caacca9 100644
--- a/code/game/objects/structures/tables_racks.dm
+++ b/code/game/objects/structures/tables_racks.dm
@@ -67,7 +67,7 @@
to_chat(user, "You need a better grip to do that!")
return
if(user.grab_state >= GRAB_NECK)
- tableheadsmash(user, pushed_mob)
+ tablelimbsmash(user, pushed_mob)
else
tablepush(user, pushed_mob)
if(user.a_intent == INTENT_HELP)
@@ -136,18 +136,22 @@
log_combat(user, pushed_mob, "tabled", null, "onto [src]")
SEND_SIGNAL(pushed_mob, COMSIG_ADD_MOOD_EVENT, "table", /datum/mood_event/table)
-/obj/structure/table/proc/tableheadsmash(mob/living/user, mob/living/pushed_mob)
+/obj/structure/table/proc/tablelimbsmash(mob/living/user, mob/living/pushed_mob)
pushed_mob.Knockdown(30)
- pushed_mob.apply_damage(30, BRUTE, BODY_ZONE_HEAD)
- pushed_mob.apply_damage(40, STAMINA)
+ var/obj/item/bodypart/banged_limb = pushed_mob.get_bodypart(user.zone_selected) || pushed_mob.get_bodypart(BODY_ZONE_HEAD)
+ var/extra_wound = 0
+ if(HAS_TRAIT(user, TRAIT_HULK))
+ extra_wound = 20
+ banged_limb.receive_damage(30, wound_bonus = extra_wound)
+ pushed_mob.apply_damage(60, STAMINA)
take_damage(50)
if(user.mind?.martial_art.smashes_tables && user.mind?.martial_art.can_use(user))
deconstruct(FALSE)
- playsound(pushed_mob, "sound/effects/tableheadsmash.ogg", 90, TRUE)
- pushed_mob.visible_message("[user] smashes [pushed_mob]'s head against \the [src]!",
- "[user] smashes your head against \the [src]")
+ playsound(pushed_mob, "sound/effects/tablelimbsmash.ogg", 90, TRUE)
+ pushed_mob.visible_message("[user] smashes [pushed_mob]'s [banged_limb.name] against \the [src]!",
+ "[user] smashes your [banged_limb.name] against \the [src]")
log_combat(user, pushed_mob, "head slammed", null, "against [src]")
- SEND_SIGNAL(pushed_mob, COMSIG_ADD_MOOD_EVENT, "table", /datum/mood_event/table_headsmash)
+ SEND_SIGNAL(pushed_mob, COMSIG_ADD_MOOD_EVENT, "table", /datum/mood_event/table_limbsmash, banged_limb)
/obj/structure/table/attackby(obj/item/I, mob/user, params)
if(!(flags_1 & NODECONSTRUCT_1) && user.a_intent != INTENT_HELP)
@@ -183,7 +187,7 @@
switch(user.a_intent)
if(INTENT_HARM)
user.unbuckle_mob(carried_mob)
- tableheadsmash(user, carried_mob)
+ tablelimbsmash(user, carried_mob)
if(INTENT_HELP)
var/tableplace_delay = 3.5 SECONDS
var/skills_space = ""
diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm
index 270cd5fafc4..54aa46cd098 100644
--- a/code/modules/admin/verbs/randomverbs.dm
+++ b/code/modules/admin/verbs/randomverbs.dm
@@ -1066,7 +1066,10 @@ Traitors and the like can also be revived with the previous role mostly intact.
ADMIN_PUNISHMENT_IMMERSE,
ADMIN_PUNISHMENT_FAT,
ADMIN_PUNISHMENT_FAKEBWOINK,
- ADMIN_PUNISHMENT_NUGGET
+ ADMIN_PUNISHMENT_NUGGET,
+ ADMIN_PUNISHMENT_CRACK,
+ ADMIN_PUNISHMENT_BLEED,
+ ADMIN_PUNISHMENT_SCARIFY
)
var/punishment = input("Choose a punishment", "DIVINE SMITING") as null|anything in sortList(punishment_list)
@@ -1150,7 +1153,33 @@ Traitors and the like can also be revived with the previous role mostly intact.
addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound, C, 'sound/effects/cartoon_pop.ogg', 70), timer)
addtimer(CALLBACK(C, /mob/living/.proc/spin, 4, 1), timer - 0.4 SECONDS)
timer += 2 SECONDS
-
+ if(ADMIN_PUNISHMENT_CRACK)
+ if(!iscarbon(target))
+ to_chat(usr,"This must be used on a carbon mob.", confidential = TRUE)
+ return
+ var/mob/living/carbon/C = target
+ for(var/obj/item/bodypart/squish_part in C.bodyparts)
+ var/type_wound = pick(list(/datum/wound/brute/bone/critical, /datum/wound/brute/bone/severe, /datum/wound/brute/bone/critical, /datum/wound/brute/bone/severe, /datum/wound/brute/bone/moderate))
+ squish_part.force_wound_upwards(type_wound, smited=TRUE)
+ if(ADMIN_PUNISHMENT_BLEED)
+ if(!iscarbon(target))
+ to_chat(usr,"This must be used on a carbon mob.", confidential = TRUE)
+ return
+ var/mob/living/carbon/C = target
+ for(var/obj/item/bodypart/slice_part in C.bodyparts)
+ var/type_wound = pick(list(/datum/wound/brute/cut/severe, /datum/wound/brute/cut/moderate))
+ slice_part.force_wound_upwards(type_wound, smited=TRUE)
+ type_wound = pick(list(/datum/wound/brute/cut/critical, /datum/wound/brute/cut/severe, /datum/wound/brute/cut/moderate))
+ slice_part.force_wound_upwards(type_wound, smited=TRUE)
+ type_wound = pick(list(/datum/wound/brute/cut/critical, /datum/wound/brute/cut/severe))
+ slice_part.force_wound_upwards(type_wound, smited=TRUE)
+ if(ADMIN_PUNISHMENT_SCARIFY)
+ if(!iscarbon(target))
+ to_chat(usr,"This must be used on a carbon mob.", confidential = TRUE)
+ return
+ var/mob/living/carbon/C = target
+ C.generate_fake_scars(rand(1, 4))
+ to_chat(C, "You feel your body grow jaded and torn...")
punish_log(target, punishment)
diff --git a/code/modules/antagonists/blob/blobstrains/blazing_oil.dm b/code/modules/antagonists/blob/blobstrains/blazing_oil.dm
index 97b974e28fd..f97e271e72a 100644
--- a/code/modules/antagonists/blob/blobstrains/blazing_oil.dm
+++ b/code/modules/antagonists/blob/blobstrains/blazing_oil.dm
@@ -36,6 +36,6 @@
M.adjust_fire_stacks(round(reac_volume/10))
M.IgniteMob()
if(M)
- M.apply_damage(0.8*reac_volume, BURN)
+ M.apply_damage(0.8*reac_volume, BURN, wound_bonus=CANT_WOUND)
if(iscarbon(M))
M.emote("scream")
diff --git a/code/modules/antagonists/blob/blobstrains/cryogenic_poison.dm b/code/modules/antagonists/blob/blobstrains/cryogenic_poison.dm
index b019146f0bc..1665724cbb3 100644
--- a/code/modules/antagonists/blob/blobstrains/cryogenic_poison.dm
+++ b/code/modules/antagonists/blob/blobstrains/cryogenic_poison.dm
@@ -22,7 +22,7 @@
M.reagents.add_reagent(/datum/reagent/consumable/frostoil, 0.3*reac_volume)
M.reagents.add_reagent(/datum/reagent/consumable/ice, 0.3*reac_volume)
M.reagents.add_reagent(/datum/reagent/blob/cryogenic_poison, 0.3*reac_volume)
- M.apply_damage(0.2*reac_volume, BRUTE)
+ M.apply_damage(0.2*reac_volume, BRUTE, wound_bonus=CANT_WOUND)
/datum/reagent/blob/cryogenic_poison/on_mob_life(mob/living/carbon/M)
M.adjustBruteLoss(0.3*REAGENTS_EFFECT_MULTIPLIER, 0)
diff --git a/code/modules/antagonists/blob/blobstrains/electromagnetic_web.dm b/code/modules/antagonists/blob/blobstrains/electromagnetic_web.dm
index 6bea4db0162..1275473499a 100644
--- a/code/modules/antagonists/blob/blobstrains/electromagnetic_web.dm
+++ b/code/modules/antagonists/blob/blobstrains/electromagnetic_web.dm
@@ -34,4 +34,4 @@
if(prob(reac_volume*2))
M.emp_act(EMP_LIGHT)
if(M)
- M.apply_damage(reac_volume, BURN)
+ M.apply_damage(reac_volume, BURN, wound_bonus=CANT_WOUND)
diff --git a/code/modules/antagonists/blob/blobstrains/explosive_lattice.dm b/code/modules/antagonists/blob/blobstrains/explosive_lattice.dm
index f8fd2e2f0df..3d005ba9138 100644
--- a/code/modules/antagonists/blob/blobstrains/explosive_lattice.dm
+++ b/code/modules/antagonists/blob/blobstrains/explosive_lattice.dm
@@ -33,8 +33,8 @@
if(ROLE_BLOB in L.faction) //no friendly fire
continue
var/aoe_volume = ..(L, TOUCH, initial_volume, 0, L.get_permeability_protection(), O)
- L.apply_damage(0.4*aoe_volume, BRUTE)
+ L.apply_damage(0.4*aoe_volume, BRUTE, wound_bonus=CANT_WOUND)
if(M)
- M.apply_damage(0.6*reac_volume, BRUTE)
+ M.apply_damage(0.6*reac_volume, BRUTE, wound_bonus=CANT_WOUND)
else
- M.apply_damage(0.6*reac_volume, BRUTE)
+ M.apply_damage(0.6*reac_volume, BRUTE, wound_bonus=CANT_WOUND)
diff --git a/code/modules/antagonists/blob/blobstrains/networked_fibers.dm b/code/modules/antagonists/blob/blobstrains/networked_fibers.dm
index 67f47a4b806..6edc0e238a4 100644
--- a/code/modules/antagonists/blob/blobstrains/networked_fibers.dm
+++ b/code/modules/antagonists/blob/blobstrains/networked_fibers.dm
@@ -33,6 +33,6 @@
/datum/reagent/blob/networked_fibers/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O)
reac_volume = ..()
- M.apply_damage(0.6*reac_volume, BRUTE)
+ M.apply_damage(0.6*reac_volume, BRUTE, wound_bonus=CANT_WOUND)
if(!QDELETED(M))
- M.apply_damage(0.6*reac_volume, BURN)
+ M.apply_damage(0.6*reac_volume, BURN, wound_bonus=CANT_WOUND)
diff --git a/code/modules/antagonists/blob/blobstrains/pressurized_slime.dm b/code/modules/antagonists/blob/blobstrains/pressurized_slime.dm
index e5754329979..766794e1561 100644
--- a/code/modules/antagonists/blob/blobstrains/pressurized_slime.dm
+++ b/code/modules/antagonists/blob/blobstrains/pressurized_slime.dm
@@ -44,7 +44,7 @@
T.MakeSlippery(TURF_WET_LUBE, min_wet_time = 10 SECONDS, wet_time_to_add = 5 SECONDS)
M.adjust_fire_stacks(-(reac_volume / 10))
M.ExtinguishMob()
- M.apply_damage(0.4*reac_volume, BRUTE)
+ M.apply_damage(0.4*reac_volume, BRUTE, wound_bonus=CANT_WOUND)
if(M)
M.apply_damage(0.4*reac_volume, OXY)
if(M)
diff --git a/code/modules/antagonists/blob/blobstrains/replicating_foam.dm b/code/modules/antagonists/blob/blobstrains/replicating_foam.dm
index 57868963472..70c5a21154f 100644
--- a/code/modules/antagonists/blob/blobstrains/replicating_foam.dm
+++ b/code/modules/antagonists/blob/blobstrains/replicating_foam.dm
@@ -32,4 +32,4 @@
/datum/reagent/blob/replicating_foam/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O)
reac_volume = ..()
- M.apply_damage(0.7*reac_volume, BRUTE)
+ M.apply_damage(0.7*reac_volume, BRUTE, wound_bonus=CANT_WOUND)
diff --git a/code/modules/antagonists/blob/blobstrains/shifting_fragments.dm b/code/modules/antagonists/blob/blobstrains/shifting_fragments.dm
index d06357f8363..5041bc231c2 100644
--- a/code/modules/antagonists/blob/blobstrains/shifting_fragments.dm
+++ b/code/modules/antagonists/blob/blobstrains/shifting_fragments.dm
@@ -33,4 +33,4 @@
/datum/reagent/blob/shifting_fragments/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O)
reac_volume = ..()
- M.apply_damage(0.7*reac_volume, BRUTE)
+ M.apply_damage(0.7*reac_volume, BRUTE, wound_bonus=CANT_WOUND)
diff --git a/code/modules/antagonists/blob/blobstrains/synchronous_mesh.dm b/code/modules/antagonists/blob/blobstrains/synchronous_mesh.dm
index 7f500bbe291..8b84a4973c9 100644
--- a/code/modules/antagonists/blob/blobstrains/synchronous_mesh.dm
+++ b/code/modules/antagonists/blob/blobstrains/synchronous_mesh.dm
@@ -31,9 +31,9 @@
/datum/reagent/blob/synchronous_mesh/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O)
reac_volume = ..()
- M.apply_damage(0.2*reac_volume, BRUTE)
+ M.apply_damage(0.2*reac_volume, BRUTE, wound_bonus=CANT_WOUND)
if(M && reac_volume)
for(var/obj/structure/blob/B in range(1, M)) //if the target is completely surrounded, this is 2.4*reac_volume bonus damage, total of 2.6*reac_volume
if(M)
B.blob_attack_animation(M) //show them they're getting a bad time
- M.apply_damage(0.3*reac_volume, BRUTE)
+ M.apply_damage(0.3*reac_volume, BRUTE, wound_bonus=CANT_WOUND)
diff --git a/code/modules/antagonists/changeling/powers/fleshmend.dm b/code/modules/antagonists/changeling/powers/fleshmend.dm
index ff33afe856c..3acc565e4bf 100644
--- a/code/modules/antagonists/changeling/powers/fleshmend.dm
+++ b/code/modules/antagonists/changeling/powers/fleshmend.dm
@@ -1,6 +1,6 @@
/datum/action/changeling/fleshmend
name = "Fleshmend"
- desc = "Our flesh rapidly regenerates, healing our burns, bruises, and shortness of breath. Costs 20 chemicals."
+ desc = "Our flesh rapidly regenerates, healing our burns, bruises, and shortness of breath, as well as hiding all of our scars. Costs 20 chemicals."
helptext = "If we are on fire, the healing effect will not function. Does not regrow limbs or restore lost blood. Functions while unconscious."
button_icon_state = "fleshmend"
chemical_cost = 20
diff --git a/code/modules/antagonists/changeling/powers/mutations.dm b/code/modules/antagonists/changeling/powers/mutations.dm
index 2f2d853b141..59d82af85fe 100644
--- a/code/modules/antagonists/changeling/powers/mutations.dm
+++ b/code/modules/antagonists/changeling/powers/mutations.dm
@@ -162,6 +162,8 @@
hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
sharpness = IS_SHARP
+ wound_bonus = -60
+ bare_wound_bonus = 20
var/can_drop = FALSE
var/fake = FALSE
diff --git a/code/modules/antagonists/changeling/powers/regenerate.dm b/code/modules/antagonists/changeling/powers/regenerate.dm
index 7f0e9e2f4c9..d65d1181bed 100644
--- a/code/modules/antagonists/changeling/powers/regenerate.dm
+++ b/code/modules/antagonists/changeling/powers/regenerate.dm
@@ -34,6 +34,9 @@
B.decoy_override = TRUE
B.Insert(C)
C.regenerate_organs()
+ for(var/i in C.all_wounds)
+ var/datum/wound/W = i
+ W.remove_wound()
if(ishuman(user))
var/mob/living/carbon/human/H = user
H.restore_blood()
diff --git a/code/modules/antagonists/cult/cult_items.dm b/code/modules/antagonists/cult/cult_items.dm
index e3dc9b5b5db..5d36564cb2e 100644
--- a/code/modules/antagonists/cult/cult_items.dm
+++ b/code/modules/antagonists/cult/cult_items.dm
@@ -19,6 +19,8 @@
w_class = WEIGHT_CLASS_SMALL
force = 15
throwforce = 25
+ wound_bonus = -30
+ bare_wound_bonus = 30
armour_penetration = 35
actions_types = list(/datum/action/item_action/cult_dagger)
var/drawing_rune = FALSE
@@ -39,8 +41,10 @@
flags_1 = CONDUCT_1
sharpness = IS_SHARP
w_class = WEIGHT_CLASS_BULKY
- force = 30
+ force = 30 // whoever balanced this got beat in the head by a bible too many times good lord
throwforce = 10
+ wound_bonus = -80
+ bare_wound_bonus = 30
hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "rended")
diff --git a/code/modules/antagonists/cult/ritual.dm b/code/modules/antagonists/cult/ritual.dm
index 4c65d14522f..95df4de39ac 100644
--- a/code/modules/antagonists/cult/ritual.dm
+++ b/code/modules/antagonists/cult/ritual.dm
@@ -120,7 +120,7 @@ This file contains the cult dagger and rune list code
user.visible_message("[user] [user.blood_volume ? "cuts open [user.p_their()] arm and begins writing in [user.p_their()] own blood":"begins sketching out a strange design"]!", \
"You [user.blood_volume ? "slice open your arm and ":""]begin drawing a sigil of the Geometer.")
if(user.blood_volume)
- user.apply_damage(initial(rune_to_scribe.scribe_damage), BRUTE, pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM))
+ user.apply_damage(initial(rune_to_scribe.scribe_damage), BRUTE, pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM), wound_bonus = CANT_WOUND) // *cuts arm* *bone explodes* ever have one of those days?
var/scribe_mod = initial(rune_to_scribe.scribe_delay)
if(istype(get_turf(user), /turf/open/floor/engine/cult) && !(ispath(rune_to_scribe, /obj/effect/rune/narsie)))
scribe_mod *= 0.5
diff --git a/code/modules/antagonists/slaughter/slaughter.dm b/code/modules/antagonists/slaughter/slaughter.dm
index af51357f3dd..13fa3793cde 100644
--- a/code/modules/antagonists/slaughter/slaughter.dm
+++ b/code/modules/antagonists/slaughter/slaughter.dm
@@ -34,20 +34,35 @@
healable = 0
environment_smash = ENVIRONMENT_SMASH_STRUCTURES
obj_damage = 50
- melee_damage_lower = 30
- melee_damage_upper = 30
+ melee_damage_lower = 15 // reduced from 30 to 15 with wounds since they get big buffs to slicing wounds
+ melee_damage_upper = 15
+ wound_bonus = -10
+ bare_wound_bonus = 0
+ sharpness = TRUE
see_in_dark = 8
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
var/playstyle_string = "You are a slaughter demon, a terrible creature from another realm. You have a single desire: To kill. \
You may use the \"Blood Crawl\" ability near blood pools to travel through them, appearing and disappearing from the station at will. \
Pulling a dead or unconscious mob while you enter a pool will pull them in with you, allowing you to feast and regain your health. \
- You move quickly upon leaving a pool of blood, but the material world will soon sap your strength and leave you sluggish. "
+ You move quickly upon leaving a pool of blood, but the material world will soon sap your strength and leave you sluggish. \
+ You gain strength the more attacks you land on live humanoids, though this resets when you return to the blood zone. You can also \
+ launch a devastating slam attack with ctrl+shift+click, capable of smashing bones in one strike."
loot = list(/obj/effect/decal/cleanable/blood, \
/obj/effect/decal/cleanable/blood/innards, \
/obj/item/organ/heart/demon)
del_on_death = 1
deathmessage = "screams in anger as it collapses into a puddle of viscera!"
+ /// How long it takes for the alt-click slam attack to come off cooldown
+ var/slam_cooldown_time = 45 SECONDS
+ /// The actual instance var for the cooldown
+ var/slam_cooldown = 0
+ /// How many times we have hit humanoid targets since we last bloodcrawled, scaling wounding power
+ var/current_hitstreak = 0
+ /// How much both our wound_bonus and bare_wound_bonus go up per hitstreak hit
+ var/wound_bonus_per_hit = 5
+ /// How much our wound_bonus hitstreak bonus caps at (peak demonry)
+ var/wound_bonus_hitstreak_max = 12
/mob/living/simple_animal/slaughter/Initialize()
..()
@@ -57,6 +72,33 @@
if(istype(loc, /obj/effect/dummy/phased_mob/slaughter))
bloodspell.phased = TRUE
+/mob/living/simple_animal/slaughter/CtrlShiftClickOn(atom/A)
+ if(!isliving(A))
+ return ..()
+ if(slam_cooldown + slam_cooldown_time > world.time)
+ to_chat(src, "Your slam ability is still on cooldown!")
+ return
+
+ face_atom(A)
+ var/mob/living/victim = A
+ victim.take_bodypart_damage(brute=20, wound_bonus=wound_bonus) // don't worry, there's more punishment when they hit something
+ visible_message("[src] slams into [victim] with monstrous strength!", "You slam into [victim] with monstrous strength!", ignored_mobs=victim)
+ to_chat(victim, "[src] slams into you with monstrous strength, sending you flying like a ragdoll!")
+ var/turf/yeet_target = get_edge_target_turf(victim, dir)
+ victim.throw_at(yeet_target, 10, 5, src)
+ slam_cooldown = world.time
+ log_combat(src, victim, "slaughter slammed")
+
+/mob/living/simple_animal/slaughter/UnarmedAttack(atom/A, proximity)
+ if(iscarbon(A))
+ var/mob/living/carbon/target = A
+ if(target.stat != DEAD && target.mind && current_hitstreak < wound_bonus_hitstreak_max)
+ current_hitstreak++
+ wound_bonus += wound_bonus_per_hit
+ bare_wound_bonus += wound_bonus_per_hit
+
+ return ..()
+
/obj/effect/decal/cleanable/blood/innards
name = "pile of viscera"
desc = "A repulsive pile of guts and gore."
diff --git a/code/modules/antagonists/slaughter/slaughter_antag.dm b/code/modules/antagonists/slaughter/slaughter_antag.dm
index 81f1e774674..b4b33814419 100644
--- a/code/modules/antagonists/slaughter/slaughter_antag.dm
+++ b/code/modules/antagonists/slaughter/slaughter_antag.dm
@@ -13,6 +13,7 @@
/datum/antagonist/slaughter/greet()
. = ..()
owner.announce_objectives()
+ to_chat(owner, "You have a powerful alt-attack that slams people backwards that you can activate by shift+ctrl+clicking your target!")
/datum/antagonist/slaughter/proc/forge_objectives()
if(summoner)
diff --git a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm
index 7772825290f..75b656880ca 100644
--- a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm
+++ b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm
@@ -38,6 +38,8 @@
var/escape_in_progress = FALSE
var/message_cooldown
var/breakout_time = 300
+ ///Cryo will continue to treat people with 0 damage but existing wounds, but will sound off when damage healing is done in case doctors want to directly treat the wounds instead
+ var/treating_wounds = FALSE
fair_market_price = 10
payment_department = ACCOUNT_MED
@@ -204,15 +206,27 @@
if(mob_occupant.stat == DEAD) // We don't bother with dead people.
return
if(mob_occupant.health >= mob_occupant.getMaxHealth()) // Don't bother with fully healed people.
- on = FALSE
- update_icon()
- playsound(src, 'sound/machines/cryo_warning.ogg', volume) // Bug the doctors.
- var/msg = "Patient fully restored."
- if(autoeject) // Eject if configured.
- msg += " Auto ejecting patient now."
- open_machine()
- radio.talk_into(src, msg, radio_channel)
- return
+ if(iscarbon(mob_occupant))
+ var/mob/living/carbon/C = mob_occupant
+ if(C.all_wounds)
+ if(!treating_wounds) // if we have wounds and haven't already alerted the doctors we're only dealing with the wounds, let them know
+ treating_wounds = TRUE
+ playsound(src, 'sound/machines/cryo_warning.ogg', volume) // Bug the doctors.
+ var/msg = "Patient vitals fully recovered, continuing automated wound treatment."
+ radio.talk_into(src, msg, radio_channel)
+ else // otherwise if we were only treating wounds and now we don't have any, turn off treating_wounds so we can boot 'em out
+ treating_wounds = FALSE
+
+ if(!treating_wounds)
+ on = FALSE
+ update_icon()
+ playsound(src, 'sound/machines/cryo_warning.ogg', volume) // Bug the doctors.
+ var/msg = "Patient fully restored."
+ if(autoeject) // Eject if configured.
+ msg += " Auto ejecting patient now."
+ open_machine()
+ radio.talk_into(src, msg, radio_channel)
+ return
var/datum/gas_mixture/air1 = airs[1]
@@ -285,6 +299,7 @@
..()
/obj/machinery/atmospherics/components/unary/cryo_cell/close_machine(mob/living/carbon/user)
+ treating_wounds = FALSE
if((isnull(user) || istype(user)) && state_open && !panel_open)
flick("pod-close-anim", src)
..(user)
diff --git a/code/modules/cargo/goodies.dm b/code/modules/cargo/goodies.dm
index d9c46cf5f44..567df0bc0f1 100644
--- a/code/modules/cargo/goodies.dm
+++ b/code/modules/cargo/goodies.dm
@@ -41,11 +41,17 @@
contains = list(/obj/item/gun/ballistic/shotgun/automatic/combat, /obj/item/storage/belt/bandolier)
/datum/supply_pack/goody/energy_single
- name = "Energy Guns Single-Pack"
- desc = "Contains one Energy Gun, capable of firing both nonlethal and lethal blasts of light."
+ name = "Energy Gun Single-Pack"
+ desc = "Contains one energy gun, capable of firing both nonlethal and lethal blasts of light."
cost = 1000
contains = list(/obj/item/gun/energy/e_gun)
+/datum/supply_pack/goody/hell_single
+ name = "Hellgun Single-Pack"
+ desc = "Contains one hellgun, an old pattern of laser gun infamous for its ability to horribly disfigure targets with burns. Technically violates the Space Geneva Convention when used on humanoids."
+ cost = 1500
+ contains = list(/obj/item/gun/energy/laser/hellgun)
+
/datum/supply_pack/goody/wt550_single
name = "WT-550 Auto Rifle Single-Pack"
desc = "Contains one high-powered, semiautomatic rifles chambered in 4.6x30mm." // "high-powered" lol yea right
diff --git a/code/modules/cargo/packs.dm b/code/modules/cargo/packs.dm
index 6600246d049..e4e8d91ea0d 100644
--- a/code/modules/cargo/packs.dm
+++ b/code/modules/cargo/packs.dm
@@ -1221,6 +1221,8 @@
/obj/item/reagent_containers/blood/OMinus,
/obj/item/storage/pill_bottle/mining,
/obj/item/reagent_containers/pill/neurine,
+ /obj/item/stack/medical/bone_gel,
+ /obj/item/stack/medical/bone_gel,
/obj/item/vending_refill/medical)
crate_name = "medical supplies crate"
diff --git a/code/modules/client/client_defines.dm b/code/modules/client/client_defines.dm
index 99caba8a9ac..0c3f7daeb69 100644
--- a/code/modules/client/client_defines.dm
+++ b/code/modules/client/client_defines.dm
@@ -142,6 +142,8 @@
/// Messages currently seen by this client
var/list/seen_messages
var/datum/viewData/view_size
+ ///A lazy list of atoms we've examined in the last EXAMINE_MORE_TIME (default 1.5) seconds, so that we will call [atom/proc/examine_more()] instead of [atom/proc/examine()] on them when examining
+ var/list/recent_examines
var/list/parallax_layers
var/list/parallax_layers_cached
diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm
index d751c21807f..eea9fd73e05 100644
--- a/code/modules/client/preferences.dm
+++ b/code/modules/client/preferences.dm
@@ -128,6 +128,13 @@ GLOBAL_LIST_EMPTY(preferences_datums)
/// Agendered spessmen can choose whether to have a male or female bodytype
var/body_type
+ /// If we have persistent scars enabled
+ var/persistent_scars = TRUE
+ /// We have 5 slots for persistent scars, if enabled we pick a random one to load (empty by default) and scars at the end of the shift if we survived as our original person
+ var/list/scars_list = list("1" = "", "2" = "", "3" = "", "4" = "", "5" = "")
+ /// Which of the 5 persistent scar slots we randomly roll to load for this round, if enabled. Actually rolled in [/datum/preferences/proc/load_character(slot)]
+ var/scars_index = 1
+
/datum/preferences/New(client/C)
parent = C
@@ -289,6 +296,12 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "
Jumpsuit Style:
[jumpsuit_style]"
dat += "[(randomise[RANDOM_JUMPSUIT_STYLE]) ? "Lock" : "Unlock"]"
+ dat += "
Backpack:
[backpack]"
+ dat += "[(randomise[RANDOM_BACKPACK]) ? "Lock" : "Unlock"]"
+
+ if(CAN_SCAR in pref_species.species_traits)
+ dat += "
Temporal Scarring:
[(persistent_scars) ? "Enabled" : "Disabled"]"
+ dat += "Clear scar slots"
dat += "
Uplink Spawn Location:
[uplink_spawn_loc]
"
if (user.client.get_exp_living(TRUE) >= PLAYTIME_VETERAN)
@@ -1699,6 +1712,17 @@ GLOBAL_LIST_EMPTY(preferences_datums)
else
randomise[random_type] = TRUE
+ if("persistent_scars")
+ persistent_scars = !persistent_scars
+
+ if("clear_scars")
+ to_chat(user, "All scar slots cleared. Please save character to confirm.")
+ scars_list["1"] = ""
+ scars_list["2"] = ""
+ scars_list["3"] = ""
+ scars_list["4"] = ""
+ scars_list["5"] = ""
+
if("hear_midis")
toggles ^= SOUND_MIDI
diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm
index cf13cf51068..af31ec76454 100644
--- a/code/modules/client/preferences_savefile.dm
+++ b/code/modules/client/preferences_savefile.dm
@@ -330,6 +330,8 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
if(newtype)
pref_species = new newtype
+ scars_index = rand(1,5)
+
if(!S["features["mcolor"]"] || S["features["mcolor"]"] == "#000")
WRITE_FILE(S["features["mcolor"]"] , "#FFF")
@@ -368,6 +370,12 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["feature_lizard_legs"] >> features["legs"]
S["feature_moth_wings"] >> features["moth_wings"]
S["feature_moth_markings"] >> features["moth_markings"]
+ S["persistent_scars"] >> persistent_scars
+ S["scars1"] >> scars_list["1"]
+ S["scars2"] >> scars_list["2"]
+ S["scars3"] >> scars_list["3"]
+ S["scars4"] >> scars_list["4"]
+ S["scars5"] >> scars_list["5"]
if(!CONFIG_GET(flag/join_with_mutant_humans))
features["tail_human"] = "none"
features["ears"] = "none"
@@ -458,6 +466,13 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
features["moth_wings"] = sanitize_inlist(features["moth_wings"], GLOB.moth_wings_list, "Plain")
features["moth_markings"] = sanitize_inlist(features["moth_markings"], GLOB.moth_markings_list, "None")
+ persistent_scars = sanitize_integer(persistent_scars)
+ scars_list["1"] = sanitize_text(scars_list["1"])
+ scars_list["2"] = sanitize_text(scars_list["2"])
+ scars_list["3"] = sanitize_text(scars_list["3"])
+ scars_list["4"] = sanitize_text(scars_list["4"])
+ scars_list["5"] = sanitize_text(scars_list["5"])
+
joblessrole = sanitize_integer(joblessrole, 1, 3, initial(joblessrole))
//Validate job prefs
for(var/j in job_preferences)
@@ -513,6 +528,12 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
WRITE_FILE(S["feature_lizard_legs"] , features["legs"])
WRITE_FILE(S["feature_moth_wings"] , features["moth_wings"])
WRITE_FILE(S["feature_moth_markings"] , features["moth_markings"])
+ WRITE_FILE(S["persistent_scars"] , persistent_scars)
+ WRITE_FILE(S["scars1"] , scars_list["1"])
+ WRITE_FILE(S["scars2"] , scars_list["2"])
+ WRITE_FILE(S["scars3"] , scars_list["3"])
+ WRITE_FILE(S["scars4"] , scars_list["4"])
+ WRITE_FILE(S["scars5"] , scars_list["5"])
//Custom names
diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm
index 5ca03470b6c..edb112dc39b 100644
--- a/code/modules/clothing/clothing.dm
+++ b/code/modules/clothing/clothing.dm
@@ -3,7 +3,8 @@
resistance_flags = FLAMMABLE
max_integrity = 200
integrity_failure = 0.4
- var/damaged_clothes = 0 //similar to machine's BROKEN stat and structure's broken var
+ var/damaged_clothes = CLOTHING_PRISTINE //similar to machine's BROKEN stat and structure's broken var
+
///What level of bright light protection item has.
var/flash_protect = FLASH_PROTECTION_NONE
var/tint = 0 //Sets the item's level of visual impairment tint, normally set to the same as flash_protect
@@ -24,6 +25,9 @@
var/clothing_flags = NONE
+ /// What items can be consumed to repair this clothing (must by an /obj/item/stack)
+ var/repairable_by = /obj/item/stack/sheet/cloth
+
//Var modification - PLEASE be careful with this I know who you are and where you live
var/list/user_vars_to_edit //VARNAME = VARVALUE eg: "name" = "butts"
var/list/user_vars_remembered //Auto built by the above + dropped() + equipped()
@@ -42,6 +46,13 @@
///These are armor values that protect the clothing, taken from its armor datum. List updates on examine because it's currently only used to print armor ratings to chat in Topic().
var/list/durability_list = list()
+ /// How much clothing damage has been dealt to each of the limbs of the clothing, assuming it covers more than one limb
+ var/list/damage_by_parts
+ /// How much integrity is in a specific limb before that limb is disabled (for use in [/obj/item/clothing/proc/take_damage_zone], and only if we cover multiple zones.) Set to 0 to disable shredding.
+ var/limb_integrity = 0
+ /// How many zones (body parts, not precise) we have disabled so far, for naming purposes
+ var/zones_disabled
+
/obj/item/clothing/Initialize()
if((clothing_flags & VOICEBOX_TOGGLABLE))
actions_types += /datum/action/item_action/toggle_voice_box
@@ -79,15 +90,105 @@
return ..()
/obj/item/clothing/attackby(obj/item/W, mob/user, params)
- if(damaged_clothes && istype(W, /obj/item/stack/sheet/cloth))
- var/obj/item/stack/sheet/cloth/C = W
- C.use(1)
- update_clothes_damaged_state(FALSE)
- obj_integrity = max_integrity
- to_chat(user, "You fix the damage on [src] with [C].")
+ if(damaged_clothes && istype(W, repairable_by))
+ var/obj/item/stack/S = W
+ switch(damaged_clothes)
+ if(CLOTHING_DAMAGED)
+ S.use(1)
+ repair(user, params)
+ if(CLOTHING_SHREDDED)
+ if(S.amount < 3)
+ to_chat(user, "You require 3 [S.name] to repair [src].")
+ return
+ to_chat(user, "You begin fixing the damage to [src] with [S]...")
+ if(do_after(user, 6 SECONDS, TRUE, src))
+ if(S.use(3))
+ repair(user, params)
return 1
return ..()
+/// Set the clothing's integrity back to 100%, remove all damage to bodyparts, and generally fix it up
+/obj/item/clothing/proc/repair(mob/user, params)
+ damaged_clothes = CLOTHING_PRISTINE
+ update_clothes_damaged_state()
+ obj_integrity = max_integrity
+ name = initial(name) // remove "tattered" or "shredded" if there's a prefix
+ body_parts_covered = initial(body_parts_covered)
+ slot_flags = initial(slot_flags)
+ damage_by_parts = null
+ if(user)
+ UnregisterSignal(user, COMSIG_MOVABLE_MOVED)
+ to_chat(user, "You fix the damage on [src].")
+
+/**
+ * take_damage_zone() is used for dealing damage to specific bodyparts on a worn piece of clothing, meant to be called from [/obj/item/bodypart/proc/check_woundings_mods()]
+ *
+ * This proc only matters when a bodypart that this clothing is covering is harmed by a direct attack (being on fire or in space need not apply), and only if this clothing covers
+ * more than one bodypart to begin with. No point in tracking damage by zone for a hat, and I'm not cruel enough to let you fully break them in a few shots.
+ * Also if limb_integrity is 0, then this clothing doesn't have bodypart damage enabled so skip it.
+ *
+ * Arguments:
+ * * def_zone: The bodypart zone in question
+ * * damage_amount: Incoming damage
+ * * damage_type: BRUTE or BURN
+ * * armour_penetration: If the attack had armour_penetration
+ */
+/obj/item/clothing/proc/take_damage_zone(def_zone, damage_amount, damage_type, armour_penetration)
+ if(!def_zone || !limb_integrity || (initial(body_parts_covered) in GLOB.bitflags)) // the second check sees if we only cover one bodypart anyway and don't need to bother with this
+ return
+ var/list/covered_limbs = body_parts_covered2organ_names(body_parts_covered) // what do we actually cover?
+ if(!(def_zone in covered_limbs))
+ return
+
+ var/damage_dealt = take_damage(damage_amount * 0.1, damage_type, armour_penetration, FALSE) * 10 // only deal 10% of the damage to the general integrity damage, then multiply it by 10 so we know how much to deal to limb
+ LAZYINITLIST(damage_by_parts)
+ damage_by_parts[def_zone] += damage_dealt
+ if(damage_by_parts[def_zone] > limb_integrity)
+ disable_zone(def_zone, damage_type)
+
+/**
+ * disable_zone() is used to disable a given bodypart's protection on our clothing item, mainly from [/obj/item/clothing/proc/take_damage_zone()]
+ *
+ * This proc disables all protection on the specified bodypart for this piece of clothing: it'll be as if it doesn't cover it at all anymore (because it won't!)
+ * If every possible bodypart has been disabled on the clothing, we put it out of commission entirely and mark it as shredded, whereby it will have to be repaired in
+ * order to equip it again. Also note we only consider it damaged if there's more than one bodypart disabled.
+ *
+ * Arguments:
+ * * def_zone: The bodypart zone we're disabling
+ * * damage_type: Only really relevant for the verb for describing the breaking, and maybe obj_destruction()
+ */
+/obj/item/clothing/proc/disable_zone(def_zone, damage_type)
+ var/list/covered_limbs = body_parts_covered2organ_names(body_parts_covered)
+ if(!(def_zone in covered_limbs))
+ return
+
+ var/zone_name = parse_zone(def_zone)
+ var/break_verb = ((damage_type == BRUTE) ? "torn" : "burned")
+
+ if(iscarbon(loc))
+ var/mob/living/carbon/C = loc
+ C.visible_message("The [zone_name] on [C]'s [src.name] is [break_verb] away!", "The [zone_name] on your [src.name] is [break_verb] away!", vision_distance = COMBAT_MESSAGE_RANGE)
+ RegisterSignal(C, COMSIG_MOVABLE_MOVED, .proc/bristle)
+
+ zones_disabled++
+ for(var/i in zone2body_parts_covered(def_zone))
+ body_parts_covered &= ~i
+
+ if(body_parts_covered == NONE) // if there are no more parts to break then the whole thing is kaput
+ obj_destruction((damage_type == BRUTE ? "melee" : "laser")) // melee/laser is good enough since this only procs from direct attacks anyway and not from fire/bombs
+ return
+
+ damaged_clothes = CLOTHING_DAMAGED
+ switch(zones_disabled)
+ if(1)
+ name = "damaged [initial(name)]"
+ if(2)
+ name = "mangy [initial(name)]"
+ if(3 to INFINITY) // take better care of your shit, dude
+ name = "tattered [initial(name)]"
+
+ update_clothes_damaged_state()
+
/obj/item/clothing/Destroy()
user_vars_remembered = null //Oh god somebody put REFERENCES in here? not to worry, we'll clean it up
return ..()
@@ -96,6 +197,7 @@
..()
if(!istype(user))
return
+ UnregisterSignal(user, COMSIG_MOVABLE_MOVED)
if(LAZYLEN(user_vars_remembered))
for(var/variable in user_vars_remembered)
if(variable in user.vars)
@@ -108,6 +210,8 @@
if (!istype(user))
return
if(slot_flags & slot) //Was equipped to a valid slot for this item?
+ if(iscarbon(user) && LAZYLEN(zones_disabled))
+ RegisterSignal(user, COMSIG_MOVABLE_MOVED, .proc/bristle)
if (LAZYLEN(user_vars_to_edit))
for(var/variable in user_vars_to_edit)
if(variable in user.vars)
@@ -116,6 +220,10 @@
/obj/item/clothing/examine(mob/user)
. = ..()
+ if(damaged_clothes == CLOTHING_SHREDDED)
+ . += "It is completely shredded and requires mending before it can be worn again!"
+ return
+
switch (max_heat_protection_temperature)
if (400 to 1000)
. += "[src] offers the wearer limited protection from fire."
@@ -123,8 +231,18 @@
. += "[src] offers the wearer some protection from fire."
if (1601 to 35000)
. += "[src] offers the wearer robust protection from fire."
- if(damaged_clothes)
- . += "It looks damaged!"
+
+ for(var/zone in damage_by_parts)
+ var/pct_damage_part = damage_by_parts[zone] / limb_integrity * 100
+ var/zone_name = parse_zone(zone)
+ switch(pct_damage_part)
+ if(100 to INFINITY)
+ . += "The [zone_name] is useless and requires mending!"
+ if(60 to 99)
+ . += "The [zone_name] is heavily shredded!"
+ if(30 to 59)
+ . += "The [zone_name] is partially shredded."
+
var/datum/component/storage/pockets = GetComponent(/datum/component/storage)
if(pockets)
var/list/how_cool_are_your_threads = list("")
@@ -225,8 +343,8 @@
return .
/obj/item/clothing/obj_break(damage_flag)
- if(!damaged_clothes)
- update_clothes_damaged_state(TRUE)
+ damaged_clothes = CLOTHING_DAMAGED
+ update_clothes_damaged_state()
if(ismob(loc)) //It's not important enough to warrant a message if nobody's wearing it
var/mob/M = loc
to_chat(M, "Your [name] starts to fall apart!")
@@ -351,12 +469,20 @@ BLIND // can't see anything
if(adjusted)
if(fitted != FEMALE_UNIFORM_TOP)
fitted = NO_FEMALE_UNIFORM
- if(!alt_covers_chest) // for the special snowflake suits that expose the chest when adjusted
+ if(!alt_covers_chest) // for the special snowflake suits that expose the chest when adjusted (and also the arms, realistically)
body_parts_covered &= ~CHEST
+ body_parts_covered &= ~ARMS
else
fitted = initial(fitted)
if(!alt_covers_chest)
body_parts_covered |= CHEST
+ body_parts_covered |= ARMS
+ if(!LAZYLEN(damage_by_parts))
+ return adjusted
+ for(var/zone in list(BODY_ZONE_CHEST, BODY_ZONE_L_ARM, BODY_ZONE_R_ARM)) // ugly check to make sure we don't reenable protection on a disabled part
+ if(damage_by_parts[zone] > limb_integrity)
+ for(var/part in zone2body_parts_covered(zone))
+ body_parts_covered &= part
return adjusted
/obj/item/clothing/proc/weldingvisortoggle(mob/user) //proc to toggle welding visors on helmets, masks, goggles, etc.
@@ -402,13 +528,22 @@ BLIND // can't see anything
return 1
return 0
-
/obj/item/clothing/obj_destruction(damage_flag)
- if(damage_flag == "bomb" || damage_flag == "melee")
+ if(damage_flag == "bomb")
var/turf/T = get_turf(src)
//so the shred survives potential turf change from the explosion.
addtimer(CALLBACK_NEW(/obj/effect/decal/cleanable/shreds, list(T, name)), 1)
deconstruct(FALSE)
+ else if(!(damage_flag in list("acid", "fire")))
+ damaged_clothes = CLOTHING_SHREDDED
+ body_parts_covered = NONE
+ name = "shredded [initial(name)]"
+ slot_flags = NONE
+ update_clothes_damaged_state()
+ if(ismob(loc))
+ var/mob/M = loc
+ M.visible_message("[M]'s [src.name] falls off, completely shredded!", "Your [src.name] falls off, completely shredded!", vision_distance = COMBAT_MESSAGE_RANGE)
+ M.dropItemToGround(src)
else
..()
/obj/item/clothing/proc/set_sensor_glob()
@@ -422,3 +557,10 @@ BLIND // can't see anything
GLOB.suit_sensors_list -= H
else
GLOB.suit_sensors_list -= H
+
+/// If we're a clothing with at least 1 shredded/disabled zone, give the wearer a periodic heads up letting them know their clothes are damaged
+/obj/item/clothing/proc/bristle(mob/living/L)
+ if(!istype(L))
+ return
+ if(prob(0.2))
+ to_chat(L, "The damaged threads on your [src.name] chafe!")
diff --git a/code/modules/clothing/gloves/_gloves.dm b/code/modules/clothing/gloves/_gloves.dm
index 64a6c48a2f4..965fd90e4bf 100644
--- a/code/modules/clothing/gloves/_gloves.dm
+++ b/code/modules/clothing/gloves/_gloves.dm
@@ -32,7 +32,7 @@
if(HAS_BLOOD_DNA(src))
. += mutable_appearance('icons/effects/blood.dmi', "bloodyhands")
-/obj/item/clothing/gloves/update_clothes_damaged_state(damaging = TRUE)
+/obj/item/clothing/gloves/update_clothes_damaged_state()
..()
if(ismob(loc))
var/mob/M = loc
diff --git a/code/modules/clothing/head/_head.dm b/code/modules/clothing/head/_head.dm
index 8f7f9985596..bcee97c23d4 100644
--- a/code/modules/clothing/head/_head.dm
+++ b/code/modules/clothing/head/_head.dm
@@ -69,7 +69,7 @@
if(HAS_BLOOD_DNA(src))
. += mutable_appearance('icons/effects/blood.dmi', "helmetblood")
-/obj/item/clothing/head/update_clothes_damaged_state(damaging = TRUE)
+/obj/item/clothing/head/update_clothes_damaged_state()
..()
if(ismob(loc))
var/mob/M = loc
diff --git a/code/modules/clothing/masks/_masks.dm b/code/modules/clothing/masks/_masks.dm
index c61c5d78cf6..ace9f5aacf2 100644
--- a/code/modules/clothing/masks/_masks.dm
+++ b/code/modules/clothing/masks/_masks.dm
@@ -37,7 +37,7 @@
if(HAS_BLOOD_DNA(src))
. += mutable_appearance('icons/effects/blood.dmi', "maskblood")
-/obj/item/clothing/mask/update_clothes_damaged_state(damaging = TRUE)
+/obj/item/clothing/mask/update_clothes_damaged_state()
..()
if(ismob(loc))
var/mob/M = loc
diff --git a/code/modules/clothing/shoes/_shoes.dm b/code/modules/clothing/shoes/_shoes.dm
index fdcc5b3f7cc..ee52a5599c7 100644
--- a/code/modules/clothing/shoes/_shoes.dm
+++ b/code/modules/clothing/shoes/_shoes.dm
@@ -94,7 +94,7 @@
restore_offsets(user)
. = ..()
-/obj/item/clothing/shoes/update_clothes_damaged_state(damaging = TRUE)
+/obj/item/clothing/shoes/update_clothes_damaged_state()
..()
if(ismob(loc))
var/mob/M = loc
diff --git a/code/modules/clothing/spacesuits/hardsuit.dm b/code/modules/clothing/spacesuits/hardsuit.dm
index f8f06fecd71..2ff9479d642 100644
--- a/code/modules/clothing/spacesuits/hardsuit.dm
+++ b/code/modules/clothing/spacesuits/hardsuit.dm
@@ -100,7 +100,7 @@
icon_state = "hardsuit-engineering"
inhand_icon_state = "eng_hardsuit"
max_integrity = 300
- armor = list("melee" = 10, "bullet" = 5, "laser" = 10, "energy" = 20, "bomb" = 10, "bio" = 100, "rad" = 75, "fire" = 50, "acid" = 75)
+ armor = list("melee" = 10, "bullet" = 5, "laser" = 10, "energy" = 20, "bomb" = 10, "bio" = 100, "rad" = 75, "fire" = 50, "acid" = 75, "wound" = 10)
allowed = list(/obj/item/flashlight, /obj/item/tank/internals, /obj/item/t_scanner, /obj/item/construction/rcd, /obj/item/pipe_dispenser)
siemens_coefficient = 0
var/obj/item/clothing/head/helmet/space/hardsuit/helmet
@@ -205,7 +205,7 @@
desc = "A special helmet designed for work in a hazardous, low-pressure environment. Has radiation shielding."
icon_state = "hardsuit0-engineering"
inhand_icon_state = "eng_helm"
- armor = list("melee" = 30, "bullet" = 5, "laser" = 10, "energy" = 20, "bomb" = 10, "bio" = 100, "rad" = 75, "fire" = 100, "acid" = 75)
+ armor = list("melee" = 30, "bullet" = 5, "laser" = 10, "energy" = 20, "bomb" = 10, "bio" = 100, "rad" = 75, "fire" = 100, "acid" = 75, "wound" = 10)
hardsuit_type = "engineering"
resistance_flags = FIRE_PROOF
@@ -214,7 +214,7 @@
desc = "A special suit that protects against hazardous, low pressure environments. Has radiation shielding."
icon_state = "hardsuit-engineering"
inhand_icon_state = "eng_hardsuit"
- armor = list("melee" = 30, "bullet" = 5, "laser" = 10, "energy" = 20, "bomb" = 10, "bio" = 100, "rad" = 75, "fire" = 100, "acid" = 75)
+ armor = list("melee" = 30, "bullet" = 5, "laser" = 10, "energy" = 20, "bomb" = 10, "bio" = 100, "rad" = 75, "fire" = 100, "acid" = 75, "wound" = 10)
helmettype = /obj/item/clothing/head/helmet/space/hardsuit/engine
resistance_flags = FIRE_PROOF
@@ -225,7 +225,7 @@
icon_state = "hardsuit0-atmospherics"
inhand_icon_state = "atmo_helm"
hardsuit_type = "atmospherics"
- armor = list("melee" = 30, "bullet" = 5, "laser" = 10, "energy" = 20, "bomb" = 10, "bio" = 100, "rad" = 25, "fire" = 100, "acid" = 75)
+ armor = list("melee" = 30, "bullet" = 5, "laser" = 10, "energy" = 20, "bomb" = 10, "bio" = 100, "rad" = 25, "fire" = 100, "acid" = 75, "wound" = 10)
heat_protection = HEAD //Uncomment to enable firesuit protection
max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT
@@ -234,7 +234,7 @@
desc = "A special suit that protects against hazardous, low pressure environments. Has thermal shielding."
icon_state = "hardsuit-atmospherics"
inhand_icon_state = "atmo_hardsuit"
- armor = list("melee" = 30, "bullet" = 5, "laser" = 10, "energy" = 20, "bomb" = 10, "bio" = 100, "rad" = 25, "fire" = 100, "acid" = 75)
+ armor = list("melee" = 30, "bullet" = 5, "laser" = 10, "energy" = 20, "bomb" = 10, "bio" = 100, "rad" = 25, "fire" = 100, "acid" = 75, "wound" = 10)
heat_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS //Uncomment to enable firesuit protection
max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT
helmettype = /obj/item/clothing/head/helmet/space/hardsuit/engine/atmos
@@ -247,7 +247,7 @@
icon_state = "hardsuit0-white"
inhand_icon_state = "ce_helm"
hardsuit_type = "white"
- armor = list("melee" = 40, "bullet" = 5, "laser" = 10, "energy" = 20, "bomb" = 50, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 90)
+ armor = list("melee" = 40, "bullet" = 5, "laser" = 10, "energy" = 20, "bomb" = 50, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 90, "wound" = 10)
heat_protection = HEAD
max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT
@@ -256,7 +256,7 @@
name = "advanced hardsuit"
desc = "An advanced suit that protects against hazardous, low pressure environments. Shines with a high polish."
inhand_icon_state = "ce_hardsuit"
- armor = list("melee" = 40, "bullet" = 5, "laser" = 10, "energy" = 20, "bomb" = 50, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 90)
+ armor = list("melee" = 40, "bullet" = 5, "laser" = 10, "energy" = 20, "bomb" = 50, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 90, "wound" = 10)
heat_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS
max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT
helmettype = /obj/item/clothing/head/helmet/space/hardsuit/engine/elite
@@ -273,7 +273,7 @@
max_heat_protection_temperature = FIRE_SUIT_MAX_TEMP_PROTECT
resistance_flags = FIRE_PROOF
heat_protection = HEAD
- armor = list("melee" = 30, "bullet" = 5, "laser" = 10, "energy" = 20, "bomb" = 50, "bio" = 100, "rad" = 50, "fire" = 50, "acid" = 75)
+ armor = list("melee" = 30, "bullet" = 5, "laser" = 10, "energy" = 20, "bomb" = 50, "bio" = 100, "rad" = 50, "fire" = 50, "acid" = 75, "wound" = 15)
brightness_on = 7
allowed = list(/obj/item/flashlight, /obj/item/tank/internals, /obj/item/resonator, /obj/item/mining_scanner, /obj/item/t_scanner/adv_mining_scanner, /obj/item/gun/energy/kinetic_accelerator)
@@ -288,7 +288,7 @@
inhand_icon_state = "mining_hardsuit"
max_heat_protection_temperature = FIRE_SUIT_MAX_TEMP_PROTECT
resistance_flags = FIRE_PROOF
- armor = list("melee" = 30, "bullet" = 5, "laser" = 10, "energy" = 20, "bomb" = 50, "bio" = 100, "rad" = 50, "fire" = 50, "acid" = 75)
+ armor = list("melee" = 30, "bullet" = 5, "laser" = 10, "energy" = 20, "bomb" = 50, "bio" = 100, "rad" = 50, "fire" = 50, "acid" = 75, "wound" = 15)
allowed = list(/obj/item/flashlight, /obj/item/tank/internals, /obj/item/storage/bag/ore, /obj/item/pickaxe)
helmettype = /obj/item/clothing/head/helmet/space/hardsuit/mining
heat_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS
@@ -305,7 +305,7 @@
icon_state = "hardsuit1-syndi"
inhand_icon_state = "syndie_helm"
hardsuit_type = "syndi"
- armor = list("melee" = 40, "bullet" = 50, "laser" = 30, "energy" = 40, "bomb" = 35, "bio" = 100, "rad" = 50, "fire" = 50, "acid" = 90)
+ armor = list("melee" = 40, "bullet" = 50, "laser" = 30, "energy" = 40, "bomb" = 35, "bio" = 100, "rad" = 50, "fire" = 50, "acid" = 90, "wound" = 25)
on = TRUE
var/obj/item/clothing/suit/space/hardsuit/syndi/linkedsuit = null
actions_types = list(/datum/action/item_action/toggle_helmet_mode)
@@ -384,7 +384,7 @@
inhand_icon_state = "syndie_hardsuit"
hardsuit_type = "syndi"
w_class = WEIGHT_CLASS_NORMAL
- armor = list("melee" = 40, "bullet" = 50, "laser" = 30, "energy" = 40, "bomb" = 35, "bio" = 100, "rad" = 50, "fire" = 50, "acid" = 90)
+ armor = list("melee" = 40, "bullet" = 50, "laser" = 30, "energy" = 40, "bomb" = 35, "bio" = 100, "rad" = 50, "fire" = 50, "acid" = 90, "wound" = 25)
allowed = list(/obj/item/gun, /obj/item/ammo_box,/obj/item/ammo_casing, /obj/item/melee/baton, /obj/item/melee/transforming/energy/sword/saber, /obj/item/restraints/handcuffs, /obj/item/tank/internals)
helmettype = /obj/item/clothing/head/helmet/space/hardsuit/syndi
jetpack = /obj/item/tank/jetpack/suit
@@ -397,7 +397,7 @@
alt_desc = "An elite version of the syndicate helmet, with improved armour and fireproofing. It is in combat mode. Property of Gorlex Marauders."
icon_state = "hardsuit0-syndielite"
hardsuit_type = "syndielite"
- armor = list("melee" = 60, "bullet" = 60, "laser" = 50, "energy" = 60, "bomb" = 55, "bio" = 100, "rad" = 70, "fire" = 100, "acid" = 100)
+ armor = list("melee" = 60, "bullet" = 60, "laser" = 50, "energy" = 60, "bomb" = 55, "bio" = 100, "rad" = 70, "fire" = 100, "acid" = 100, "wound" = 25)
heat_protection = HEAD
max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT
resistance_flags = FIRE_PROOF | ACID_PROOF
@@ -415,7 +415,7 @@
icon_state = "hardsuit0-syndielite"
hardsuit_type = "syndielite"
helmettype = /obj/item/clothing/head/helmet/space/hardsuit/syndi/elite
- armor = list("melee" = 60, "bullet" = 60, "laser" = 50, "energy" = 60, "bomb" = 55, "bio" = 100, "rad" = 70, "fire" = 100, "acid" = 100)
+ armor = list("melee" = 60, "bullet" = 60, "laser" = 50, "energy" = 60, "bomb" = 55, "bio" = 100, "rad" = 70, "fire" = 100, "acid" = 100, "wound" = 25)
heat_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS
max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT
resistance_flags = FIRE_PROOF | ACID_PROOF
@@ -454,7 +454,7 @@
inhand_icon_state = "wiz_helm"
hardsuit_type = "wiz"
resistance_flags = FIRE_PROOF | ACID_PROOF //No longer shall our kind be foiled by lone chemists with spray bottles!
- armor = list("melee" = 40, "bullet" = 40, "laser" = 40, "energy" = 50, "bomb" = 35, "bio" = 100, "rad" = 50, "fire" = 100, "acid" = 100)
+ armor = list("melee" = 40, "bullet" = 40, "laser" = 40, "energy" = 50, "bomb" = 35, "bio" = 100, "rad" = 50, "fire" = 100, "acid" = 100, "wound" = 30)
heat_protection = HEAD //Uncomment to enable firesuit protection
max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT
@@ -465,7 +465,7 @@
inhand_icon_state = "wiz_hardsuit"
w_class = WEIGHT_CLASS_NORMAL
resistance_flags = FIRE_PROOF | ACID_PROOF
- armor = list("melee" = 40, "bullet" = 40, "laser" = 40, "energy" = 50, "bomb" = 35, "bio" = 100, "rad" = 50, "fire" = 100, "acid" = 100)
+ armor = list("melee" = 40, "bullet" = 40, "laser" = 40, "energy" = 50, "bomb" = 35, "bio" = 100, "rad" = 50, "fire" = 100, "acid" = 100, "wound" = 30)
allowed = list(/obj/item/teleportation_scroll, /obj/item/tank/internals)
heat_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS //Uncomment to enable firesuit protection
max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT
@@ -485,7 +485,7 @@
inhand_icon_state = "medical_helm"
hardsuit_type = "medical"
flash_protect = FLASH_PROTECTION_NONE
- armor = list("melee" = 30, "bullet" = 5, "laser" = 10, "energy" = 20, "bomb" = 10, "bio" = 100, "rad" = 60, "fire" = 60, "acid" = 75)
+ armor = list("melee" = 30, "bullet" = 5, "laser" = 10, "energy" = 20, "bomb" = 10, "bio" = 100, "rad" = 60, "fire" = 60, "acid" = 75, "wound" = 10)
clothing_flags = STOPSPRESSUREDAMAGE | THICKMATERIAL | SCAN_REAGENTS | SNUG_FIT
/obj/item/clothing/suit/space/hardsuit/medical
@@ -494,7 +494,7 @@
icon_state = "hardsuit-medical"
inhand_icon_state = "medical_hardsuit"
allowed = list(/obj/item/flashlight, /obj/item/tank/internals, /obj/item/storage/firstaid, /obj/item/healthanalyzer, /obj/item/stack/medical)
- armor = list("melee" = 30, "bullet" = 5, "laser" = 10, "energy" = 20, "bomb" = 10, "bio" = 100, "rad" = 60, "fire" = 60, "acid" = 75)
+ armor = list("melee" = 30, "bullet" = 5, "laser" = 10, "energy" = 20, "bomb" = 10, "bio" = 100, "rad" = 60, "fire" = 60, "acid" = 75, "wound" = 10)
helmettype = /obj/item/clothing/head/helmet/space/hardsuit/medical
slowdown = 0.5
@@ -506,7 +506,7 @@
hardsuit_type = "rd"
resistance_flags = ACID_PROOF | FIRE_PROOF
max_heat_protection_temperature = FIRE_SUIT_MAX_TEMP_PROTECT
- armor = list("melee" = 30, "bullet" = 5, "laser" = 10, "energy" = 20, "bomb" = 100, "bio" = 100, "rad" = 60, "fire" = 60, "acid" = 80)
+ armor = list("melee" = 30, "bullet" = 5, "laser" = 10, "energy" = 20, "bomb" = 100, "bio" = 100, "rad" = 60, "fire" = 60, "acid" = 80, "wound" = 15)
var/explosion_detection_dist = 21
clothing_flags = STOPSPRESSUREDAMAGE | THICKMATERIAL | SCAN_REAGENTS | SNUG_FIT
actions_types = list(/datum/action/item_action/toggle_helmet_light, /datum/action/item_action/toggle_research_scanner)
@@ -545,7 +545,7 @@
max_heat_protection_temperature = FIRE_SUIT_MAX_TEMP_PROTECT //Same as an emergency firesuit. Not ideal for extended exposure.
allowed = list(/obj/item/flashlight, /obj/item/tank/internals, /obj/item/gun/energy/wormhole_projector,
/obj/item/hand_tele, /obj/item/aicard)
- armor = list("melee" = 30, "bullet" = 5, "laser" = 10, "energy" = 20, "bomb" = 100, "bio" = 100, "rad" = 60, "fire" = 60, "acid" = 80)
+ armor = list("melee" = 30, "bullet" = 5, "laser" = 10, "energy" = 20, "bomb" = 100, "bio" = 100, "rad" = 60, "fire" = 60, "acid" = 80, "wound" = 15)
helmettype = /obj/item/clothing/head/helmet/space/hardsuit/rd
cell = /obj/item/stock_parts/cell/super
@@ -556,7 +556,7 @@
icon_state = "hardsuit0-sec"
inhand_icon_state = "sec_helm"
hardsuit_type = "sec"
- armor = list("melee" = 35, "bullet" = 15, "laser" = 30,"energy" = 40, "bomb" = 10, "bio" = 100, "rad" = 50, "fire" = 75, "acid" = 75)
+ armor = list("melee" = 35, "bullet" = 15, "laser" = 30,"energy" = 40, "bomb" = 10, "bio" = 100, "rad" = 50, "fire" = 75, "acid" = 75, "wound" = 20)
/obj/item/clothing/suit/space/hardsuit/security
@@ -564,7 +564,7 @@
name = "security hardsuit"
desc = "A special suit that protects against hazardous, low pressure environments. Has an additional layer of armor."
inhand_icon_state = "sec_hardsuit"
- armor = list("melee" = 35, "bullet" = 15, "laser" = 30, "energy" = 40, "bomb" = 10, "bio" = 100, "rad" = 50, "fire" = 75, "acid" = 75)
+ armor = list("melee" = 35, "bullet" = 15, "laser" = 30, "energy" = 40, "bomb" = 10, "bio" = 100, "rad" = 50, "fire" = 75, "acid" = 75, "wound" = 20)
helmettype = /obj/item/clothing/head/helmet/space/hardsuit/security
/obj/item/clothing/suit/space/hardsuit/security/Initialize()
@@ -577,14 +577,14 @@
desc = "A special bulky helmet designed for work in a hazardous, low pressure environment. Has an additional layer of armor."
icon_state = "hardsuit0-hos"
hardsuit_type = "hos"
- armor = list("melee" = 45, "bullet" = 25, "laser" = 30, "energy" = 40, "bomb" = 25, "bio" = 100, "rad" = 50, "fire" = 95, "acid" = 95)
+ armor = list("melee" = 45, "bullet" = 25, "laser" = 30, "energy" = 40, "bomb" = 25, "bio" = 100, "rad" = 50, "fire" = 95, "acid" = 95, "wound" = 25)
/obj/item/clothing/suit/space/hardsuit/security/hos
icon_state = "hardsuit-hos"
name = "head of security's hardsuit"
desc = "A special bulky suit that protects against hazardous, low pressure environments. Has an additional layer of armor."
- armor = list("melee" = 45, "bullet" = 25, "laser" = 30, "energy" = 40, "bomb" = 25, "bio" = 100, "rad" = 50, "fire" = 95, "acid" = 95)
+ armor = list("melee" = 45, "bullet" = 25, "laser" = 30, "energy" = 40, "bomb" = 25, "bio" = 100, "rad" = 50, "fire" = 95, "acid" = 95, "wound" = 25)
helmettype = /obj/item/clothing/head/helmet/space/hardsuit/security/hos
jetpack = /obj/item/tank/jetpack/suit
cell = /obj/item/stock_parts/cell/super
@@ -595,7 +595,7 @@
icon_state = "swat2helm"
inhand_icon_state = "swat2helm"
desc = "A tactical SWAT helmet MK.II."
- armor = list("melee" = 40, "bullet" = 50, "laser" = 50, "energy" = 60, "bomb" = 50, "bio" = 100, "rad" = 50, "fire" = 100, "acid" = 100)
+ armor = list("melee" = 40, "bullet" = 50, "laser" = 50, "energy" = 60, "bomb" = 50, "bio" = 100, "rad" = 50, "fire" = 100, "acid" = 100, "wound" = 15)
resistance_flags = FIRE_PROOF | ACID_PROOF
flags_inv = HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR //we want to see the mask //this makes the hardsuit not fireproof you genius
heat_protection = HEAD
@@ -609,7 +609,7 @@
desc = "A MK.II SWAT suit with streamlined joints and armor made out of superior materials, insulated against intense heat if worn with the complementary gas mask. The most advanced tactical armor available."
icon_state = "swat2"
inhand_icon_state = "swat2"
- armor = list("melee" = 40, "bullet" = 50, "laser" = 50, "energy" = 60, "bomb" = 50, "bio" = 100, "rad" = 50, "fire" = 100, "acid" = 100)
+ armor = list("melee" = 40, "bullet" = 50, "laser" = 50, "energy" = 60, "bomb" = 50, "bio" = 100, "rad" = 50, "fire" = 100, "acid" = 100, "wound" = 15)
resistance_flags = FIRE_PROOF | ACID_PROOF
heat_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS
max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT //this needed to be added a long fucking time ago
@@ -723,7 +723,7 @@
icon_state = "hardsuit-hos"
helmettype = /obj/item/clothing/head/helmet/space/hardsuit/security/hos
allowed = null
- armor = list("melee" = 30, "bullet" = 15, "laser" = 30, "energy" = 40, "bomb" = 10, "bio" = 100, "rad" = 50, "fire" = 100, "acid" = 100)
+ armor = list("melee" = 30, "bullet" = 15, "laser" = 30, "energy" = 40, "bomb" = 10, "bio" = 100, "rad" = 50, "fire" = 100, "acid" = 100, "wound" = 15)
resistance_flags = FIRE_PROOF | ACID_PROOF
var/current_charges = 3
var/max_charges = 3 //How many charges total the shielding has
@@ -842,7 +842,7 @@
icon_state = "hardsuit1-syndi"
inhand_icon_state = "syndie_hardsuit"
hardsuit_type = "syndi"
- armor = list("melee" = 40, "bullet" = 50, "laser" = 30, "energy" = 40, "bomb" = 35, "bio" = 100, "rad" = 50, "fire" = 100, "acid" = 100)
+ armor = list("melee" = 40, "bullet" = 50, "laser" = 30, "energy" = 40, "bomb" = 35, "bio" = 100, "rad" = 50, "fire" = 100, "acid" = 100, "wound" = 30)
allowed = list(/obj/item/gun, /obj/item/ammo_box, /obj/item/ammo_casing, /obj/item/melee/baton, /obj/item/melee/transforming/energy/sword/saber, /obj/item/restraints/handcuffs, /obj/item/tank/internals)
helmettype = /obj/item/clothing/head/helmet/space/hardsuit/shielded/syndi
slowdown = 0
@@ -876,7 +876,7 @@
icon_state = "hardsuit1-syndi"
inhand_icon_state = "syndie_helm"
hardsuit_type = "syndi"
- armor = list("melee" = 40, "bullet" = 50, "laser" = 30, "energy" = 40, "bomb" = 35, "bio" = 100, "rad" = 50, "fire" = 100, "acid" = 100)
+ armor = list("melee" = 40, "bullet" = 50, "laser" = 30, "energy" = 40, "bomb" = 35, "bio" = 100, "rad" = 50, "fire" = 100, "acid" = 100, "wound" = 30)
///SWAT version
/obj/item/clothing/suit/space/hardsuit/shielded/swat
@@ -888,7 +888,7 @@
max_charges = 4
current_charges = 4
recharge_delay = 15
- armor = list("melee" = 80, "bullet" = 80, "laser" = 50, "energy" = 60, "bomb" = 100, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 100)
+ armor = list("melee" = 80, "bullet" = 80, "laser" = 50, "energy" = 60, "bomb" = 100, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 100, "wound" = 30)
strip_delay = 130
max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT
helmettype = /obj/item/clothing/head/helmet/space/hardsuit/shielded/swat
@@ -900,7 +900,7 @@
icon_state = "deathsquad"
inhand_icon_state = "deathsquad"
hardsuit_type = "syndi"
- armor = list("melee" = 80, "bullet" = 80, "laser" = 50, "energy" = 60, "bomb" = 100, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 100)
+ armor = list("melee" = 80, "bullet" = 80, "laser" = 50, "energy" = 60, "bomb" = 100, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 100, "wound" = 30)
strip_delay = 130
max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT
actions_types = list()
diff --git a/code/modules/clothing/suits/_suits.dm b/code/modules/clothing/suits/_suits.dm
index 09661d5e84a..8aa0481d1ee 100644
--- a/code/modules/clothing/suits/_suits.dm
+++ b/code/modules/clothing/suits/_suits.dm
@@ -10,6 +10,7 @@
var/blood_overlay_type = "suit"
var/togglename = null
var/suittoggled = FALSE
+ limb_integrity = 0 // disabled for most exo-suits
/obj/item/clothing/suit/worn_overlays(isinhands = FALSE)
@@ -27,7 +28,7 @@
if(A.above_suit)
. += U.accessory_overlay
-/obj/item/clothing/suit/update_clothes_damaged_state(damaging = TRUE)
+/obj/item/clothing/suit/update_clothes_damaged_state()
..()
if(ismob(loc))
var/mob/M = loc
diff --git a/code/modules/clothing/suits/armor.dm b/code/modules/clothing/suits/armor.dm
index c7a7b004865..78514228098 100644
--- a/code/modules/clothing/suits/armor.dm
+++ b/code/modules/clothing/suits/armor.dm
@@ -9,7 +9,7 @@
equip_delay_other = 40
max_integrity = 250
resistance_flags = NONE
- armor = list("melee" = 35, "bullet" = 30, "laser" = 30, "energy" = 40, "bomb" = 25, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50)
+ armor = list("melee" = 35, "bullet" = 30, "laser" = 30, "energy" = 40, "bomb" = 25, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50, "wound" = 15)
/obj/item/clothing/suit/armor/Initialize()
. = ..()
@@ -49,7 +49,7 @@
icon_state = "hos"
inhand_icon_state = "greatcoat"
body_parts_covered = CHEST|GROIN|ARMS|LEGS
- armor = list("melee" = 30, "bullet" = 30, "laser" = 30, "energy" = 40, "bomb" = 25, "bio" = 0, "rad" = 0, "fire" = 70, "acid" = 90)
+ armor = list("melee" = 30, "bullet" = 30, "laser" = 30, "energy" = 40, "bomb" = 25, "bio" = 0, "rad" = 0, "fire" = 70, "acid" = 90, "wound" = 20)
cold_protection = CHEST|GROIN|LEGS|ARMS
heat_protection = CHEST|GROIN|LEGS|ARMS
strip_delay = 80
@@ -95,7 +95,7 @@
icon_state = "capcarapace"
inhand_icon_state = "armor"
body_parts_covered = CHEST|GROIN
- armor = list("melee" = 50, "bullet" = 40, "laser" = 50, "energy" = 50, "bomb" = 25, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 90)
+ armor = list("melee" = 50, "bullet" = 40, "laser" = 50, "energy" = 50, "bomb" = 25, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 90, "wound" = 10)
dog_fashion = null
resistance_flags = FIRE_PROOF
@@ -118,7 +118,7 @@
body_parts_covered = CHEST|GROIN|LEGS|FEET|ARMS|HANDS
cold_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS
heat_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS
- armor = list("melee" = 50, "bullet" = 10, "laser" = 10, "energy" = 10, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 80)
+ armor = list("melee" = 50, "bullet" = 10, "laser" = 10, "energy" = 10, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 80, "wound" = 30)
clothing_flags = BLOCKS_SHOVE_KNOCKDOWN
strip_delay = 80
equip_delay_other = 60
@@ -129,7 +129,7 @@
icon_state = "bonearmor"
inhand_icon_state = "bonearmor"
blood_overlay_type = "armor"
- armor = list("melee" = 35, "bullet" = 25, "laser" = 25, "energy" = 35, "bomb" = 25, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50)
+ armor = list("melee" = 35, "bullet" = 25, "laser" = 25, "energy" = 35, "bomb" = 25, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50, "wound" = 10)
body_parts_covered = CHEST|GROIN|LEGS|FEET|ARMS
/obj/item/clothing/suit/armor/bulletproof
@@ -138,7 +138,7 @@
icon_state = "bulletproof"
inhand_icon_state = "armor"
blood_overlay_type = "armor"
- armor = list("melee" = 15, "bullet" = 60, "laser" = 10, "energy" = 10, "bomb" = 40, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50)
+ armor = list("melee" = 15, "bullet" = 60, "laser" = 10, "energy" = 10, "bomb" = 40, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50, "wound" = 20)
strip_delay = 70
equip_delay_other = 50
@@ -258,7 +258,7 @@
icon_state = "knight_greyscale"
inhand_icon_state = "knight_greyscale"
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS//Can change color and add prefix
- armor = list("melee" = 35, "bullet" = 10, "laser" = 10, "energy" = 10, "bomb" = 10, "bio" = 10, "rad" = 10, "fire" = 40, "acid" = 40)
+ armor = list("melee" = 35, "bullet" = 10, "laser" = 10, "energy" = 10, "bomb" = 10, "bio" = 10, "rad" = 10, "fire" = 40, "acid" = 40, "wound" = 15)
/obj/item/clothing/suit/armor/vest/durathread
name = "durathread vest"
@@ -276,7 +276,7 @@
desc = "A bulletproof vest with forest camo. Good thing there's plenty of forests to hide in around here, right?"
icon_state = "rus_armor"
inhand_icon_state = "rus_armor"
- armor = list("melee" = 25, "bullet" = 30, "laser" = 0, "energy" = 10, "bomb" = 10, "bio" = 0, "rad" = 20, "fire" = 20, "acid" = 50)
+ armor = list("melee" = 25, "bullet" = 30, "laser" = 0, "energy" = 10, "bomb" = 10, "bio" = 0, "rad" = 20, "fire" = 20, "acid" = 50, "wound" = 10)
/obj/item/clothing/suit/armor/vest/russian_coat
name = "russian battle coat"
@@ -286,4 +286,4 @@
body_parts_covered = CHEST|GROIN|LEGS|FEET|ARMS|HANDS
cold_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS
min_cold_protection_temperature = SPACE_SUIT_MIN_TEMP_PROTECT
- armor = list("melee" = 25, "bullet" = 20, "laser" = 20, "energy" = 30, "bomb" = 20, "bio" = 50, "rad" = 20, "fire" = -10, "acid" = 50)
+ armor = list("melee" = 25, "bullet" = 20, "laser" = 20, "energy" = 30, "bomb" = 20, "bio" = 50, "rad" = 20, "fire" = -10, "acid" = 50, "wound" = 10)
diff --git a/code/modules/clothing/suits/wiz_robe.dm b/code/modules/clothing/suits/wiz_robe.dm
index 69b5b54d0cc..6d8d14eb453 100644
--- a/code/modules/clothing/suits/wiz_robe.dm
+++ b/code/modules/clothing/suits/wiz_robe.dm
@@ -67,7 +67,7 @@
gas_transfer_coefficient = 0.01
permeability_coefficient = 0.01
body_parts_covered = CHEST|GROIN|ARMS|LEGS
- armor = list("melee" = 30, "bullet" = 20, "laser" = 20, "energy" = 30, "bomb" = 20, "bio" = 20, "rad" = 20, "fire" = 100, "acid" = 100)
+ armor = list("melee" = 30, "bullet" = 20, "laser" = 20, "energy" = 30, "bomb" = 20, "bio" = 20, "rad" = 20, "fire" = 100, "acid" = 100, "wound" = 20)
allowed = list(/obj/item/teleportation_scroll)
flags_inv = HIDEJUMPSUIT
strip_delay = 50
diff --git a/code/modules/clothing/under/_under.dm b/code/modules/clothing/under/_under.dm
index 7b1763a31ed..a6a8ad77ce8 100644
--- a/code/modules/clothing/under/_under.dm
+++ b/code/modules/clothing/under/_under.dm
@@ -5,10 +5,11 @@
body_parts_covered = CHEST|GROIN|LEGS|ARMS
permeability_coefficient = 0.9
slot_flags = ITEM_SLOT_ICLOTHING
- armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0)
+ armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0, "wound" = 5)
equip_sound = 'sound/items/equip/jumpsuit_equip.ogg'
drop_sound = 'sound/items/handling/cloth_drop.ogg'
pickup_sound = 'sound/items/handling/cloth_pickup.ogg'
+ limb_integrity = 30
var/fitted = FEMALE_UNIFORM_FULL // For use in alternate clothing styles for women
var/has_sensor = HAS_SENSORS // For the crew computer
var/random_sensor = TRUE
@@ -41,7 +42,7 @@
if(!attach_accessory(I, user))
return ..()
-/obj/item/clothing/under/update_clothes_damaged_state(damaging = TRUE)
+/obj/item/clothing/under/update_clothes_damaged_state()
..()
if(ismob(loc))
var/mob/M = loc
diff --git a/code/modules/clothing/under/jobs/cargo.dm b/code/modules/clothing/under/jobs/cargo.dm
index 3ddf8f795ab..e3cd6e53725 100644
--- a/code/modules/clothing/under/jobs/cargo.dm
+++ b/code/modules/clothing/under/jobs/cargo.dm
@@ -41,7 +41,7 @@
name = "shaft miner's jumpsuit"
icon_state = "miner"
inhand_icon_state = "miner"
- armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 0)
+ armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 0, "wound" = 10)
resistance_flags = NONE
/obj/item/clothing/under/rank/cargo/miner/lavaland
diff --git a/code/modules/clothing/under/jobs/command.dm b/code/modules/clothing/under/jobs/command.dm
index d4a225a17ed..d21c1a66900 100644
--- a/code/modules/clothing/under/jobs/command.dm
+++ b/code/modules/clothing/under/jobs/command.dm
@@ -7,6 +7,7 @@
random_sensor = FALSE
icon = 'icons/obj/clothing/under/captain.dmi'
worn_icon = 'icons/mob/clothing/under/captain.dmi'
+ armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0, "wound" = 15)
/obj/item/clothing/under/rank/captain/skirt
name = "captain's jumpskirt"
diff --git a/code/modules/clothing/under/jobs/security.dm b/code/modules/clothing/under/jobs/security.dm
index 864d68c667a..e0283d62b75 100644
--- a/code/modules/clothing/under/jobs/security.dm
+++ b/code/modules/clothing/under/jobs/security.dm
@@ -18,7 +18,7 @@
desc = "A tactical security jumpsuit for officers complete with Nanotrasen belt buckle."
icon_state = "rsecurity"
inhand_icon_state = "r_suit"
- armor = list("melee" = 10, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 30, "acid" = 30)
+ armor = list("melee" = 10, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 30, "acid" = 30, "wound" = 10)
strip_delay = 50
alt_covers_chest = TRUE
sensor_mode = SENSOR_COORDS
@@ -66,7 +66,7 @@
desc = "A formal security suit for officers complete with Nanotrasen belt buckle."
icon_state = "rwarden"
inhand_icon_state = "r_suit"
- armor = list("melee" = 10, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 30, "acid" = 30)
+ armor = list("melee" = 10, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 30, "acid" = 30, "wound" = 10)
strip_delay = 50
alt_covers_chest = TRUE
sensor_mode = 3
@@ -102,7 +102,7 @@
desc = "Someone who wears this means business."
icon_state = "detective"
inhand_icon_state = "det"
- armor = list("melee" = 10, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 30, "acid" = 30)
+ armor = list("melee" = 10, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 30, "acid" = 30, "wound" = 10)
strip_delay = 50
alt_covers_chest = TRUE
sensor_mode = 3
@@ -141,7 +141,7 @@
desc = "A security jumpsuit decorated for those few with the dedication to achieve the position of Head of Security."
icon_state = "rhos"
inhand_icon_state = "r_suit"
- armor = list("melee" = 10, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50)
+ armor = list("melee" = 10, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50, "wound" = 10)
strip_delay = 60
alt_covers_chest = TRUE
sensor_mode = 3
diff --git a/code/modules/food_and_drinks/food/snacks_other.dm b/code/modules/food_and_drinks/food/snacks_other.dm
index 6a618ef3fe0..65b2a581dc7 100644
--- a/code/modules/food_and_drinks/food/snacks_other.dm
+++ b/code/modules/food_and_drinks/food/snacks_other.dm
@@ -462,6 +462,7 @@
throwforce = 15
block_chance = 55
armour_penetration = 80
+ wound_bonus = -70
attack_verb = list("slapped", "slathered")
w_class = WEIGHT_CLASS_BULKY
tastes = list("cherry" = 1, "crepe" = 1)
diff --git a/code/modules/goonchat/browserassets/css/browserOutput.css b/code/modules/goonchat/browserassets/css/browserOutput.css
index 49b8d7d6621..9d99e5cba5d 100644
--- a/code/modules/goonchat/browserassets/css/browserOutput.css
+++ b/code/modules/goonchat/browserassets/css/browserOutput.css
@@ -308,6 +308,8 @@ em {font-style: normal; font-weight: bold;}
.rose {color: #ff5050;}
.info {color: #6685f5;}
.notice {color: #6685f5;}
+.tinynotice {color: #6685f5; font-style: italic; font-size: 85%;}
+.smallnotice {color: #6685f5; font-style: italic; font-size: 90%;}
.boldnotice {color: #6685f5; font-weight: bold;}
.hear {color: #6685f5; font-style: italic;}
.adminnotice {color: #6685f5;}
diff --git a/code/modules/goonchat/browserassets/css/browserOutput_white.css b/code/modules/goonchat/browserassets/css/browserOutput_white.css
index 4675926985e..0bddfb761af 100644
--- a/code/modules/goonchat/browserassets/css/browserOutput_white.css
+++ b/code/modules/goonchat/browserassets/css/browserOutput_white.css
@@ -306,6 +306,8 @@ h1.alert, h2.alert {color: #000000;}
.rose {color: #ff5050;}
.info {color: #0000CC;}
.notice {color: #000099;}
+.tinynotice {color: #000099; font-style: italic; font-size: 85%;}
+.smallnotice {color: #000099; font-style: italic; font-size: 90%;}
.boldnotice {color: #000099; font-weight: bold;}
.hear {color: #000099; font-style: italic;}
.adminnotice {color: #0000ff;}
diff --git a/code/modules/hydroponics/grown/nettle.dm b/code/modules/hydroponics/grown/nettle.dm
index f12c66587a3..24d0b3017fd 100644
--- a/code/modules/hydroponics/grown/nettle.dm
+++ b/code/modules/hydroponics/grown/nettle.dm
@@ -92,6 +92,7 @@
desc = "The glowing nettle incites rage in you just from looking at it!"
icon_state = "deathnettle"
force = 30
+ wound_bonus = CANT_WOUND
throwforce = 15
/obj/item/reagent_containers/food/snacks/grown/nettle/death/add_juice()
diff --git a/code/modules/jobs/job_types/chief_medical_officer.dm b/code/modules/jobs/job_types/chief_medical_officer.dm
index dd07aa00ff6..837424887b5 100644
--- a/code/modules/jobs/job_types/chief_medical_officer.dm
+++ b/code/modules/jobs/job_types/chief_medical_officer.dm
@@ -41,7 +41,7 @@
shoes = /obj/item/clothing/shoes/sneakers/brown
suit = /obj/item/clothing/suit/toggle/labcoat/cmo
l_hand = /obj/item/storage/firstaid/medical
- suit_store = /obj/item/flashlight/pen
+ suit_store = /obj/item/flashlight/pen/paramedic
backpack_contents = list(/obj/item/melee/classic_baton/telescopic=1)
backpack = /obj/item/storage/backpack/medic
@@ -57,5 +57,5 @@
mask = /obj/item/clothing/mask/breath/medical
suit = /obj/item/clothing/suit/space/hardsuit/medical
suit_store = /obj/item/tank/internals/oxygen
- r_pocket = /obj/item/flashlight/pen
+ r_pocket = /obj/item/flashlight/pen/paramedic
diff --git a/code/modules/jobs/job_types/paramedic.dm b/code/modules/jobs/job_types/paramedic.dm
index 77f65eeff2e..57ea23f7ed5 100644
--- a/code/modules/jobs/job_types/paramedic.dm
+++ b/code/modules/jobs/job_types/paramedic.dm
@@ -31,7 +31,7 @@
belt = /obj/item/storage/belt/medical/paramedic
id = /obj/item/card/id
l_pocket = /obj/item/pda/medical
- suit_store = /obj/item/flashlight/pen
+ suit_store = /obj/item/flashlight/pen/paramedic
backpack_contents = list(/obj/item/roller=1)
pda_slot = ITEM_SLOT_LPOCKET
diff --git a/code/modules/mining/equipment/explorer_gear.dm b/code/modules/mining/equipment/explorer_gear.dm
index d658d2fc44c..5a0681ee499 100644
--- a/code/modules/mining/equipment/explorer_gear.dm
+++ b/code/modules/mining/equipment/explorer_gear.dm
@@ -22,7 +22,7 @@
flags_inv = HIDEHAIR|HIDEFACE|HIDEEARS
min_cold_protection_temperature = FIRE_HELM_MIN_TEMP_PROTECT
max_heat_protection_temperature = FIRE_HELM_MAX_TEMP_PROTECT
- armor = list("melee" = 30, "bullet" = 10, "laser" = 10, "energy" = 20, "bomb" = 50, "bio" = 100, "rad" = 50, "fire" = 50, "acid" = 50)
+ armor = list("melee" = 30, "bullet" = 10, "laser" = 10, "energy" = 20, "bomb" = 50, "bio" = 100, "rad" = 50, "fire" = 50, "acid" = 50, "wound" = 10)
resistance_flags = FIRE_PROOF
/obj/item/clothing/suit/hooded/explorer/Initialize()
@@ -41,7 +41,7 @@
visor_flags_inv = HIDEFACIALHAIR
visor_flags_cover = MASKCOVERSMOUTH
actions_types = list(/datum/action/item_action/adjust)
- armor = list("melee" = 10, "bullet" = 5, "laser" = 5, "energy" = 5, "bomb" = 0, "bio" = 50, "rad" = 0, "fire" = 20, "acid" = 40)
+ armor = list("melee" = 10, "bullet" = 5, "laser" = 5, "energy" = 5, "bomb" = 0, "bio" = 50, "rad" = 0, "fire" = 20, "acid" = 40, "wound" = 5)
resistance_flags = FIRE_PROOF
/obj/item/clothing/mask/gas/explorer/attack_self(mob/user)
diff --git a/code/modules/mob/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm
index b8b08c9e50e..bc2ef1eb7df 100644
--- a/code/modules/mob/dead/new_player/new_player.dm
+++ b/code/modules/mob/dead/new_player/new_player.dm
@@ -435,12 +435,25 @@
is_antag = TRUE
client.prefs.copy_to(H, antagonist = is_antag, is_latejoiner = transfer_after)
+ var/cur_scar_index = client.prefs.scars_index
+ if(client.prefs.persistent_scars && client.prefs.scars_list["[cur_scar_index]"])
+ var/scar_string = client.prefs.scars_list["[cur_scar_index]"]
+ var/valid_scars = ""
+ for(var/scar_line in splittext(scar_string, ";"))
+ if(H.load_scar(scar_line))
+ valid_scars += "[scar_line];"
+
+ client.prefs.scars_list["[cur_scar_index]"] = valid_scars
+ client.prefs.save_character()
+
+ client.prefs.copy_to(H, antagonist = is_antag)
H.dna.update_dna_identity()
if(mind)
if(transfer_after)
mind.late_joiner = TRUE
mind.active = 0 //we wish to transfer the key manually
mind.transfer_to(H) //won't transfer key since the mind is not active
+ mind.original_character = H
H.name = real_name
diff --git a/code/modules/mob/inventory.dm b/code/modules/mob/inventory.dm
index e0dfd3a01e8..b64cc63c672 100644
--- a/code/modules/mob/inventory.dm
+++ b/code/modules/mob/inventory.dm
@@ -37,7 +37,6 @@
return "r"
return "l"
-
//Check we have an organ for this hand slot (Dismemberment), Only relevant for humans
/mob/proc/has_hand_for_held_index(i)
return TRUE
diff --git a/code/modules/mob/living/blood.dm b/code/modules/mob/living/blood.dm
index 88aec66d164..9aa1b1c21b7 100644
--- a/code/modules/mob/living/blood.dm
+++ b/code/modules/mob/living/blood.dm
@@ -4,32 +4,27 @@
BLOOD SYSTEM
****************************************************/
-/mob/living/carbon/human/proc/suppress_bloodloss(amount)
- if(bleedsuppress)
- return
- else
- bleedsuppress = TRUE
- addtimer(CALLBACK(src, .proc/resume_bleeding), amount)
-
-/mob/living/carbon/human/proc/resume_bleeding()
- bleedsuppress = 0
- if(stat != DEAD && bleed_rate)
- to_chat(src, "The blood soaks through your bandage.")
-
-
/mob/living/carbon/monkey/handle_blood()
- if(bodytemperature >= TCRYO && !(HAS_TRAIT(src, TRAIT_HUSK))) //cryosleep or husked people do not pump the blood.
- //Blood regeneration if there is some space
- if(blood_volume < BLOOD_VOLUME_NORMAL)
- blood_volume += 0.1 // regenerate blood VERY slowly
- if(blood_volume < BLOOD_VOLUME_OKAY)
- adjustOxyLoss(round((BLOOD_VOLUME_NORMAL - blood_volume) * 0.02, 1))
+ if(bodytemperature <= TCRYO || (HAS_TRAIT(src, TRAIT_HUSK))) //cryosleep or husked people do not pump the blood.
+ return
+
+ var/temp_bleed = 0
+ for(var/X in bodyparts)
+ var/obj/item/bodypart/BP = X
+ temp_bleed += BP.get_bleed_rate()
+ BP.generic_bleedstacks = max(0, BP.generic_bleedstacks - 1)
+ bleed(temp_bleed)
+
+ //Blood regeneration if there is some space
+ if(blood_volume < BLOOD_VOLUME_NORMAL)
+ blood_volume += 0.1 // regenerate blood VERY slowly
+ if(blood_volume < BLOOD_VOLUME_OKAY)
+ adjustOxyLoss(round((BLOOD_VOLUME_NORMAL - blood_volume) * 0.02, 1))
// Takes care blood loss and regeneration
/mob/living/carbon/human/handle_blood()
- if(NOBLOOD in dna.species.species_traits)
- bleed_rate = 0
+ if(NOBLOOD in dna.species.species_traits || bleedsuppress || (HAS_TRAIT(src, TRAIT_FAKEDEATH)))
return
if(bodytemperature >= TCRYO && !(HAS_TRAIT(src, TRAIT_HUSK))) //cryosleep or husked people do not pump the blood.
@@ -85,21 +80,11 @@
//Bleeding out
for(var/X in bodyparts)
var/obj/item/bodypart/BP = X
- var/brutedamage = BP.brute_dam
+ temp_bleed += BP.get_bleed_rate()
+ BP.generic_bleedstacks = max(0, BP.generic_bleedstacks - 1)
- //We want an accurate reading of .len
- listclearnulls(BP.embedded_objects)
- for(var/obj/item/embeddies in BP.embedded_objects)
- if(!embeddies.isEmbedHarmless())
- temp_bleed += 0.5
-
- if(brutedamage >= 20)
- temp_bleed += (brutedamage * 0.013)
-
- bleed_rate = max(bleed_rate - 0.5, temp_bleed)//if no wounds, other bleed effects (heparin) naturally decreases
-
- if(bleed_rate && !bleedsuppress && !(HAS_TRAIT(src, TRAIT_FAKEDEATH)))
- bleed(bleed_rate)
+ if(temp_bleed)
+ bleed(temp_bleed)
//Makes a blood drop, leaking amt units of blood from the mob
/mob/living/carbon/proc/bleed(amt)
@@ -122,9 +107,11 @@
/mob/living/proc/restore_blood()
blood_volume = initial(blood_volume)
-/mob/living/carbon/human/restore_blood()
+/mob/living/carbon/restore_blood()
blood_volume = BLOOD_VOLUME_NORMAL
- bleed_rate = 0
+ for(var/i in bodyparts)
+ var/obj/item/bodypart/BP = i
+ BP.generic_bleedstacks = 0
/****************************************************
BLOOD TRANSFERS
diff --git a/code/modules/mob/living/brain/brain_item.dm b/code/modules/mob/living/brain/brain_item.dm
index 7ac10912e7e..77f104f71c3 100644
--- a/code/modules/mob/living/brain/brain_item.dm
+++ b/code/modules/mob/living/brain/brain_item.dm
@@ -264,6 +264,8 @@
max_traumas = TRAUMA_LIMIT_BASIC
if(TRAUMA_RESILIENCE_SURGERY)
max_traumas = TRAUMA_LIMIT_SURGERY
+ if(TRAUMA_RESILIENCE_WOUND)
+ max_traumas = TRAUMA_LIMIT_WOUND
if(TRAUMA_RESILIENCE_LOBOTOMY)
max_traumas = TRAUMA_LIMIT_LOBOTOMY
if(TRAUMA_RESILIENCE_MAGIC)
@@ -322,7 +324,7 @@
return
var/trauma_type = pick(possible_traumas)
- gain_trauma(trauma_type, resilience)
+ return gain_trauma(trauma_type, resilience)
//Cure a random trauma of a certain resilience level
/obj/item/organ/brain/proc/cure_trauma_type(brain_trauma_type = /datum/brain_trauma, resilience = TRAUMA_RESILIENCE_BASIC)
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index 383b6663f6d..8a6f1ff684f 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -61,28 +61,50 @@
if((S.self_operable || user != src) && (user.a_intent == INTENT_HELP || user.a_intent == INTENT_DISARM))
if(S.next_step(user,user.a_intent))
return 1
+
+ if(!all_wounds || !(user.a_intent == INTENT_HELP || user == src))
+ return ..()
+
+ // The following priority/nonpriority searching is so that if we have two wounds on a limb that use the same item for treatment (gauze can bandage cuts AND splint broken bones),
+ // we prefer whichever wound is not already treated (ignore the splinted broken bone for the open cut). If there's no priority wounds that this can treat, go through the
+ // non-priority ones randomly.
+ var/list/nonpriority_wounds = list()
+ for(var/datum/wound/W in shuffle(all_wounds))
+ if(!W.treat_priority)
+ nonpriority_wounds += W
+ else if(W.treat_priority && W.try_treating(I, user))
+ return 1
+
+ for(var/datum/wound/W in shuffle(nonpriority_wounds))
+ if(W.try_treating(I, user))
+ return 1
+
return ..()
/mob/living/carbon/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
. = ..()
var/hurt = TRUE
+ var/extra_speed = 0
+ if(throwingdatum.thrower != src)
+ extra_speed = min(max(0, throwingdatum.speed - initial(throw_speed)), 3)
+
if(istype(throwingdatum, /datum/thrownthing))
hurt = !throwingdatum.gentle
if(hit_atom.density && isturf(hit_atom))
if(hurt)
Paralyze(20)
- take_bodypart_damage(10,check_armor = TRUE)
+ take_bodypart_damage(10 + 5 * extra_speed, check_armor = TRUE, wound_bonus = extra_speed)
if(iscarbon(hit_atom) && hit_atom != src)
var/mob/living/carbon/victim = hit_atom
if(victim.movement_type & FLYING)
return
if(hurt)
- victim.take_bodypart_damage(10,check_armor = TRUE)
- take_bodypart_damage(10,check_armor = TRUE)
+ victim.take_bodypart_damage(10 + 5 * extra_speed, check_armor = TRUE, wound_bonus = extra_speed * 5)
+ take_bodypart_damage(10 + 5 * extra_speed, check_armor = TRUE, wound_bonus = extra_speed * 5)
victim.Paralyze(20)
Paralyze(20)
- visible_message("[src] crashes into [victim], knocking them both over!",\
- "You violently crash into [victim]!")
+ visible_message("[src] crashes into [victim] [extra_speed ? "really hard" : ""], knocking them both over!",\
+ "You violently crash into [victim] [extra_speed ? "extra hard" : ""]!")
playsound(src,'sound/weapons/punch1.ogg',50,TRUE)
@@ -135,16 +157,22 @@
thrown_thing = I.on_thrown(src, target)
if(thrown_thing)
+
if(isliving(thrown_thing))
var/turf/start_T = get_turf(loc) //Get the start and target tile for the descriptors
var/turf/end_T = get_turf(target)
if(start_T && end_T)
log_combat(src, thrown_thing, "thrown", addition="grab from tile in [AREACOORD(start_T)] towards tile at [AREACOORD(end_T)]")
- visible_message("[src] throws [thrown_thing].", \
- "You throw [thrown_thing].")
- log_message("has thrown [thrown_thing]", LOG_ATTACK)
+ var/power_throw = 0
+ if(HAS_TRAIT(src, TRAIT_HULK))
+ power_throw++
+ if(pulling && grab_state >= GRAB_NECK)
+ power_throw++
+ visible_message("[src] throws [thrown_thing][power_throw ? " really hard!" : "."]", \
+ "You throw [thrown_thing][power_throw ? " really hard!" : "."]")
+ log_message("has thrown [thrown_thing] [power_throw ? "really hard" : ""]", LOG_ATTACK)
newtonian_move(get_dir(target, src))
- thrown_thing.safe_throw_at(target, thrown_thing.throw_range, thrown_thing.throw_speed, src, null, null, null, move_force)
+ thrown_thing.safe_throw_at(target, thrown_thing.throw_range, thrown_thing.throw_speed + power_throw, src, null, null, null, move_force)
/mob/living/carbon/restrained(ignore_grab)
. = (handcuffed || (!ignore_grab && pulledby && pulledby.grab_state >= GRAB_AGGRESSIVE))
@@ -819,6 +847,9 @@
var/datum/disease/D = thing
if(D.severity != DISEASE_SEVERITY_POSITIVE)
D.cure(FALSE)
+ for(var/thing in all_wounds)
+ var/datum/wound/W = thing
+ W.remove_wound()
if(admin_revive)
suiciding = FALSE
regenerate_limbs()
@@ -935,6 +966,10 @@
if(SANITY_NEUTRAL to INFINITY)
. *= 0.90
+ for(var/i in status_effects)
+ var/datum/status_effect/S = i
+ . *= S.interact_speed_modifier()
+
/mob/living/carbon/proc/create_internal_organs()
for(var/X in internal_organs)
var/obj/item/organ/I = X
@@ -1109,3 +1144,47 @@
if(shoes && !(HIDESHOES in obscured) && shoes.washed(washer))
update_inv_shoes()
+
+/// if any of our bodyparts are bleeding
+/mob/living/carbon/proc/is_bleeding()
+ for(var/i in bodyparts)
+ var/obj/item/bodypart/BP = i
+ if(BP.get_bleed_rate())
+ return TRUE
+
+/// get our total bleedrate
+/mob/living/carbon/proc/get_total_bleed_rate()
+ var/total_bleed_rate = 0
+ for(var/i in bodyparts)
+ var/obj/item/bodypart/BP = i
+ total_bleed_rate += BP.get_bleed_rate()
+
+ return total_bleed_rate
+
+/**
+ * generate_fake_scars()- for when you want to scar someone, but you don't want to hurt them first. These scars don't count for temporal scarring (hence, fake)
+ *
+ * If you want a specific wound scar, pass that wound type as the second arg, otherwise you can pass a list like WOUND_LIST_CUT to generate a random cut scar.
+ *
+ * Arguments:
+ * * num_scars- A number for how many scars you want to add
+ * * forced_type- Which wound or category of wounds you want to choose from, WOUND_LIST_BONE, WOUND_LIST_CUT, or WOUND_LIST_BURN (or some combination). If passed a list, picks randomly from the listed wounds. Defaults to all 3 types
+ */
+/mob/living/carbon/proc/generate_fake_scars(num_scars, forced_type)
+ for(var/i in 1 to num_scars)
+ var/datum/scar/S = new
+ var/obj/item/bodypart/BP = pick(bodyparts)
+
+ var/wound_type
+ if(forced_type)
+ if(islist(forced_type))
+ wound_type = pick(forced_type)
+ else
+ wound_type = forced_type
+ else
+ wound_type = pick(WOUND_LIST_BONE + WOUND_LIST_CUT + WOUND_LIST_BURN)
+
+ var/datum/wound/W = new wound_type
+ S.generate(BP, W)
+ S.fake = TRUE
+ QDEL_NULL(W)
diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm
index a741720b9b1..ac1ecbc0357 100644
--- a/code/modules/mob/living/carbon/carbon_defense.dm
+++ b/code/modules/mob/living/carbon/carbon_defense.dm
@@ -80,7 +80,7 @@
SEND_SIGNAL(I, COMSIG_ITEM_ATTACK_ZONE, src, user, affecting)
send_item_attack_message(I, user, affecting.name)
if(I.force)
- apply_damage(I.force, I.damtype, affecting)
+ apply_damage(I.force, I.damtype, affecting, wound_bonus = I.wound_bonus, bare_wound_bonus = I.bare_wound_bonus, sharpness = I.get_sharpness())
if(I.damtype == BRUTE && affecting.status == BODYPART_ORGANIC)
if(prob(33))
I.add_mob_blood(src)
@@ -128,6 +128,11 @@
if(user.a_intent == INTENT_HELP || user.a_intent == INTENT_DISARM)
if(S.next_step(user, user.a_intent))
return 1
+
+ for(var/datum/wound/W in all_wounds)
+ if(W.try_handling(user))
+ return 1
+
return 0
@@ -443,6 +448,10 @@
else if(getOxyLoss() <= 50)
REMOVE_TRAIT(src, TRAIT_KNOCKEDOUT, OXYLOSS_TRAIT)
+/mob/living/carbon/proc/get_interaction_efficiency(zone)
+ var/obj/item/bodypart/limb = get_bodypart(zone)
+ if(!limb)
+ return
/mob/living/carbon/setOxyLoss(amount, updating_health = TRUE, forced = FALSE)
. = ..()
diff --git a/code/modules/mob/living/carbon/carbon_defines.dm b/code/modules/mob/living/carbon/carbon_defines.dm
index 0eeae528bad..274abd4ac0c 100644
--- a/code/modules/mob/living/carbon/carbon_defines.dm
+++ b/code/modules/mob/living/carbon/carbon_defines.dm
@@ -72,3 +72,8 @@
/// Timer id of any transformation
var/transformation_timer
+
+ /// All of the wounds a carbon has afflicted throughout their limbs
+ var/list/all_wounds
+ /// All of the scars a carbon has afflicted throughout their limbs
+ var/list/all_scars
diff --git a/code/modules/mob/living/carbon/damage_procs.dm b/code/modules/mob/living/carbon/damage_procs.dm
index a329c0c029c..c64dd449cfc 100644
--- a/code/modules/mob/living/carbon/damage_procs.dm
+++ b/code/modules/mob/living/carbon/damage_procs.dm
@@ -1,6 +1,6 @@
-/mob/living/carbon/apply_damage(damage, damagetype = BRUTE, def_zone = null, blocked = FALSE, forced = FALSE, spread_damage = FALSE)
+/mob/living/carbon/apply_damage(damage, damagetype = BRUTE, def_zone = null, blocked = FALSE, forced = FALSE, spread_damage = FALSE, wound_bonus = 0, bare_wound_bonus = 0, sharpness = FALSE)
SEND_SIGNAL(src, COMSIG_MOB_APPLY_DAMGE, damage, damagetype, def_zone)
var/hit_percent = (100-blocked)/100
if(!damage || (!forced && hit_percent <= 0))
@@ -21,13 +21,13 @@
switch(damagetype)
if(BRUTE)
if(BP)
- if(BP.receive_damage(damage_amount, 0))
+ if(BP.receive_damage(damage_amount, 0, wound_bonus = wound_bonus, bare_wound_bonus = bare_wound_bonus, sharpness = sharpness))
update_damage_overlays()
else //no bodypart, we deal damage with a more general method.
adjustBruteLoss(damage_amount, forced = forced)
if(BURN)
if(BP)
- if(BP.receive_damage(0, damage_amount))
+ if(BP.receive_damage(0, damage_amount, wound_bonus = wound_bonus, bare_wound_bonus = bare_wound_bonus, sharpness = sharpness))
update_damage_overlays()
else
adjustFireLoss(damage_amount, forced = forced)
@@ -174,6 +174,16 @@
parts += BP
return parts
+
+///Returns a list of bodyparts with wounds (in case someone has a wound on an otherwise fully healed limb)
+/mob/living/carbon/proc/get_wounded_bodyparts(brute = FALSE, burn = FALSE, stamina = FALSE, status)
+ var/list/obj/item/bodypart/parts = list()
+ for(var/X in bodyparts)
+ var/obj/item/bodypart/BP = X
+ if(LAZYLEN(BP.wounds))
+ parts += BP
+ return parts
+
/**
* Heals ONE bodypart randomly selected from damaged ones.
*
@@ -199,12 +209,12 @@
*
* It automatically updates health status
*/
-/mob/living/carbon/take_bodypart_damage(brute = 0, burn = 0, stamina = 0, updating_health = TRUE, required_status, check_armor = FALSE)
+/mob/living/carbon/take_bodypart_damage(brute = 0, burn = 0, stamina = 0, updating_health = TRUE, required_status, check_armor = FALSE, wound_bonus = 0, bare_wound_bonus = 0, sharpness = FALSE)
var/list/obj/item/bodypart/parts = get_damageable_bodyparts(required_status)
if(!parts.len)
return
var/obj/item/bodypart/picked = pick(parts)
- if(picked.receive_damage(brute, burn, stamina,check_armor ? run_armor_check(picked, (brute ? "melee" : burn ? "fire" : stamina ? "bullet" : null)) : FALSE))
+ if(picked.receive_damage(brute, burn, stamina,check_armor ? run_armor_check(picked, (brute ? "melee" : burn ? "fire" : stamina ? "bullet" : null)) : FALSE, wound_bonus = wound_bonus, bare_wound_bonus = bare_wound_bonus, sharpness = sharpness))
update_damage_overlays()
///Heal MANY bodyparts, in random order
@@ -250,7 +260,7 @@
var/stamina_was = picked.stamina_dam
- update |= picked.receive_damage(brute_per_part, burn_per_part, stamina_per_part, FALSE, required_status)
+ update |= picked.receive_damage(brute_per_part, burn_per_part, stamina_per_part, FALSE, required_status, wound_bonus = CANT_WOUND) // disabling wounds from these for now cuz your entire body snapping cause your heart stopped would suck
brute = round(brute - (picked.brute_dam - brute_was), DAMAGE_PRECISION)
burn = round(burn - (picked.burn_dam - burn_was), DAMAGE_PRECISION)
diff --git a/code/modules/mob/living/carbon/examine.dm b/code/modules/mob/living/carbon/examine.dm
index f964a0180cf..0040bed767f 100644
--- a/code/modules/mob/living/carbon/examine.dm
+++ b/code/modules/mob/living/carbon/examine.dm
@@ -45,6 +45,8 @@
msg += "[t_He] [t_has] \a [icon2html(I, user)] [I] stuck to [t_his] [BP.name]!\n"
else
msg += "[t_He] [t_has] \a [icon2html(I, user)] [I] embedded in [t_his] [BP.name]!\n"
+ for(var/datum/wound/W in BP.wounds)
+ msg += "[W.get_examine_description(user)]\n"
for(var/X in disabled)
var/obj/item/bodypart/BP = X
@@ -101,6 +103,22 @@
if(pulledby && pulledby.grab_state)
msg += "[t_He] [t_is] restrained by [pulledby]'s grip.\n"
+ var/scar_severity = 0
+ for(var/i in all_scars)
+ var/datum/scar/S = i
+ if(S.is_visible(user))
+ scar_severity += S.severity
+
+ switch(scar_severity)
+ if(1 to 2)
+ msg += "[t_He] [t_has] visible scarring, you can look again to take a closer look...\n"
+ if(3 to 4)
+ msg += "[t_He] [t_has] several bad scars, you can look again to take a closer look...\n"
+ if(5 to 6)
+ msg += "[t_He] [t_has] significantly disfiguring scarring, you can look again to take a closer look...\n"
+ if(7 to INFINITY)
+ msg += "[t_He] [t_is] just absolutely fucked up, you can look again to take a closer look...\n"
+
msg += ""
. += msg.Join("")
@@ -133,3 +151,25 @@
. += "*---------*"
SEND_SIGNAL(src, COMSIG_PARENT_EXAMINE, user, .)
+
+/mob/living/carbon/examine_more(mob/user)
+ if(!all_scars)
+ return ..()
+
+ var/list/visible_scars
+ for(var/i in all_scars)
+ var/datum/scar/S = i
+ if(S.is_visible(user))
+ LAZYADD(visible_scars, S)
+
+ if(!visible_scars)
+ return ..()
+
+ var/msg = list("You examine [src] closer, and note the following...")
+ for(var/i in visible_scars)
+ var/datum/scar/S = i
+ var/scar_text = S.get_examine_description(user)
+ if(scar_text)
+ msg += "[scar_text]"
+
+ return msg
diff --git a/code/modules/mob/living/carbon/human/damage_procs.dm b/code/modules/mob/living/carbon/human/damage_procs.dm
index 466747fc075..231f85097b0 100644
--- a/code/modules/mob/living/carbon/human/damage_procs.dm
+++ b/code/modules/mob/living/carbon/human/damage_procs.dm
@@ -1,4 +1,4 @@
/// depending on the species, it will run the corresponding apply_damage code there
-/mob/living/carbon/human/apply_damage(damage = 0,damagetype = BRUTE, def_zone = null, blocked = FALSE, forced = FALSE, spread_damage = FALSE)
- return dna.species.apply_damage(damage, damagetype, def_zone, blocked, src, forced, spread_damage)
+/mob/living/carbon/human/apply_damage(damage = 0,damagetype = BRUTE, def_zone = null, blocked = FALSE, forced = FALSE, spread_damage = FALSE, wound_bonus = 0, bare_wound_bonus = 0, sharpness = FALSE)
+ return dna.species.apply_damage(damage, damagetype, def_zone, blocked, src, forced, spread_damage, wound_bonus, bare_wound_bonus, sharpness)
diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm
index bcde5bd579d..cadd508f013 100644
--- a/code/modules/mob/living/carbon/human/examine.dm
+++ b/code/modules/mob/living/carbon/human/examine.dm
@@ -151,14 +151,18 @@
else
msg += "[t_He] [t_has] \a [icon2html(I, user)] [I] embedded in [t_his] [BP.name]!\n"
+ for(var/datum/wound/W in BP.wounds)
+ msg += "[W.get_examine_description(user)]\n"
+
for(var/X in disabled)
var/obj/item/bodypart/BP = X
var/damage_text
- if(!(BP.get_damage(include_stamina = FALSE) >= BP.max_damage)) //Stamina is disabling the limb
- damage_text = "limp and lifeless"
- else
- damage_text = (BP.brute_dam >= BP.burn_dam) ? BP.heavy_brute_msg : BP.heavy_burn_msg
- msg += "[capitalize(t_his)] [BP.name] is [damage_text]!\n"
+ if(BP.is_disabled() != BODYPART_DISABLED_WOUND) // skip if it's disabled by a wound (cuz we'll be able to see the bone sticking out!)
+ if(!(BP.get_damage(include_stamina = FALSE) >= BP.max_damage)) //we don't care if it's stamcritted
+ damage_text = "limp and lifeless"
+ else
+ damage_text = (BP.brute_dam >= BP.burn_dam) ? BP.heavy_brute_msg : BP.heavy_burn_msg
+ msg += "[capitalize(t_his)] [BP.name] is [damage_text]!\n"
//stores missing limbs
var/l_limbs_missing = 0
@@ -233,16 +237,42 @@
if(DISGUST_LEVEL_DISGUSTED to INFINITY)
msg += "[t_He] look[p_s()] extremely disgusted.\n"
- if(blood_volume < BLOOD_VOLUME_SAFE || skin_tone == "albino")
- msg += "[t_He] [t_has] pale skin.\n"
+ var/apparent_blood_volume = blood_volume
+ if(skin_tone == "albino")
+ apparent_blood_volume -= 150 // enough to knock you down one tier
+ switch(apparent_blood_volume)
+ if(BLOOD_VOLUME_OKAY to BLOOD_VOLUME_SAFE)
+ msg += "[t_He] [t_has] pale skin.\n"
+ if(BLOOD_VOLUME_BAD to BLOOD_VOLUME_OKAY)
+ msg += "[t_He] look[p_s()] like pale death.\n"
+ if(-INFINITY to BLOOD_VOLUME_BAD)
+ msg += "[t_He] resemble[p_s()] a crushed, empty juice pouch.\n"
if(bleedsuppress)
- msg += "[t_He] [t_is] bandaged with something.\n"
- else if(bleed_rate)
+ msg += "[t_He] [t_is] embued with a power that defies bleeding.\n" // only statues and highlander sword can cause this so whatever
+ else if(is_bleeding())
+ var/list/obj/item/bodypart/bleeding_limbs = list()
+
+ for(var/i in bodyparts)
+ var/obj/item/bodypart/BP = i
+ if(BP.get_bleed_rate())
+ bleeding_limbs += BP
+
+ var/num_bleeds = LAZYLEN(bleeding_limbs)
+ var/bleed_text = "[t_He] [t_is] bleeding from [t_his]"
+ switch(num_bleeds)
+ if(1 to 2)
+ bleed_text += " [bleeding_limbs[1].name][num_bleeds == 2 ? " and [bleeding_limbs[2].name]" : ""]"
+ if(3 to INFINITY)
+ for(var/i in 1 to (num_bleeds - 1))
+ var/obj/item/bodypart/BP = bleeding_limbs[i]
+ bleed_text += " [BP.name],"
+ bleed_text += " and [bleeding_limbs[num_bleeds].name]"
if(reagents.has_reagent(/datum/reagent/toxin/heparin, needs_metabolizing = TRUE))
- msg += "[t_He] [t_is] bleeding uncontrollably!\n"
- else
- msg += "[t_He] [t_is] bleeding!\n"
+ bleed_text += " incredibly quickly"
+
+ bleed_text += "!\n"
+ msg += bleed_text
if(reagents.has_reagent(/datum/reagent/teslium, needs_metabolizing = TRUE))
msg += "[t_He] [t_is] emitting a gentle blue glow!\n"
@@ -311,6 +341,23 @@
else if(!client)
msg += "[t_He] [t_has] a blank, absent-minded stare and appears completely unresponsive to anything. [t_He] may snap out of it soon.\n"
+ var/scar_severity = 0
+ for(var/i in all_scars)
+ var/datum/scar/S = i
+ if(S.is_visible(user))
+ scar_severity += S.severity
+
+ switch(scar_severity)
+ if(1 to 2)
+ msg += "[t_He] [t_has] visible scarring, you can look again to take a closer look...\n"
+ if(3 to 4)
+ msg += "[t_He] [t_has] several bad scars, you can look again to take a closer look...\n"
+ if(5 to 6)
+ msg += "[t_He] [t_has] significantly disfiguring scarring, you can look again to take a closer look...\n"
+ if(7 to INFINITY)
+ msg += "[t_He] [t_is] just absolutely fucked up, you can look again to take a closer look...\n"
+
+
if (length(msg))
. += "[msg.Join("")]"
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 2557b6ddc2d..532e3464def 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -1127,6 +1127,16 @@
return FALSE
return ..()
+/mob/living/carbon/human/is_bleeding()
+ if(NOBLOOD in dna.species.species_traits || bleedsuppress)
+ return FALSE
+ return ..()
+
+/mob/living/carbon/human/get_total_bleed_rate()
+ if(NOBLOOD in dna.species.species_traits)
+ return FALSE
+ return ..()
+
/mob/living/carbon/human/species
var/race = null
diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm
index 6d7097dcfd2..d357848124c 100644
--- a/code/modules/mob/living/carbon/human/human_defense.dm
+++ b/code/modules/mob/living/carbon/human/human_defense.dm
@@ -35,6 +35,19 @@
protection += physiology.armor.getRating(d_type)
return protection
+///Get all the clothing on a specific body part
+/mob/living/carbon/human/proc/clothingonpart(obj/item/bodypart/def_zone)
+ var/list/covering_part = list()
+ var/list/body_parts = list(head, wear_mask, wear_suit, w_uniform, back, gloves, shoes, belt, s_store, glasses, ears, wear_id, wear_neck) //Everything but pockets. Pockets are l_store and r_store. (if pockets were allowed, putting something armored, gloves or hats for example, would double up on the armor)
+ for(var/bp in body_parts)
+ if(!bp)
+ continue
+ if(bp && istype(bp , /obj/item/clothing))
+ var/obj/item/clothing/C = bp
+ if(C.body_parts_covered & def_zone.body_part)
+ covering_part += C
+ return covering_part
+
/mob/living/carbon/human/on_hit(obj/projectile/P)
if(dna && dna.species)
dna.species.on_hit(P, src)
@@ -183,7 +196,7 @@
visible_message("[user] [hulk_verb]ed [src]!", \
"[user] [hulk_verb]ed [src]!", "You hear a sickening sound of flesh hitting flesh!", null, user)
to_chat(user, "You [hulk_verb] [src]!")
- adjustBruteLoss(15)
+ apply_damage(15, BRUTE, wound_bonus=10)
/mob/living/carbon/human/attack_hand(mob/user)
if(..()) //to allow surgery to return properly.
@@ -311,14 +324,16 @@
if(!affecting)
affecting = get_bodypart(BODY_ZONE_CHEST)
var/armor = run_armor_check(affecting, "melee", armour_penetration = M.armour_penetration)
- apply_damage(damage, M.melee_damage_type, affecting, armor)
+ apply_damage(damage, M.melee_damage_type, affecting, armor, wound_bonus = M.wound_bonus, bare_wound_bonus = M.bare_wound_bonus, sharpness = M.sharpness)
/mob/living/carbon/human/attack_slime(mob/living/simple_animal/slime/M)
if(..()) //successful slime attack
var/damage = rand(5, 25)
+ var/wound_mod = -45 // 25^1.4=90, 90-45=45
if(M.is_adult)
damage = rand(10, 35)
+ wound_mod = -90 // 35^1.4=145, 145-90=55
if(check_shields(M, damage, "the [M.name]"))
return 0
@@ -331,7 +346,7 @@
if(!affecting)
affecting = get_bodypart(BODY_ZONE_CHEST)
var/armor_block = run_armor_check(affecting, "melee")
- apply_damage(damage, BRUTE, affecting, armor_block)
+ apply_damage(damage, BRUTE, affecting, armor_block, wound_bonus=wound_mod)
/mob/living/carbon/human/mech_melee_attack(obj/mecha/M)
@@ -738,6 +753,20 @@
isdisabled += " and "
to_chat(src, "\t Your [LB.name][isdisabled][self_aware ? " has " : " is "][status].")
+ for(var/thing in LB.wounds)
+ var/datum/wound/W = thing
+ var/msg
+ switch(W.severity)
+ if(WOUND_SEVERITY_TRIVIAL)
+ msg = "\t Your [LB.name] is suffering [W.a_or_from] [lowertext(W.name)]."
+ if(WOUND_SEVERITY_MODERATE)
+ msg = "\t Your [LB.name] is suffering [W.a_or_from] [lowertext(W.name)]!"
+ if(WOUND_SEVERITY_SEVERE)
+ msg = "\t Your [LB.name] is suffering [W.a_or_from] [lowertext(W.name)]!"
+ if(WOUND_SEVERITY_CRITICAL)
+ msg = "\t Your [LB.name] is suffering [W.a_or_from] [lowertext(W.name)]!!"
+ to_chat(src, msg)
+
for(var/obj/item/I in LB.embedded_objects)
if(I.isEmbedHarmless())
to_chat(src, "\t There is \a [I] stuck to your [LB.name]!")
@@ -747,8 +776,26 @@
for(var/t in missing)
to_chat(src, "Your [parse_zone(t)] is missing!")
- if(bleed_rate)
- to_chat(src, "You are bleeding!")
+ if(is_bleeding())
+ var/list/obj/item/bodypart/bleeding_limbs = list()
+ for(var/i in bodyparts)
+ var/obj/item/bodypart/BP = i
+ if(BP.get_bleed_rate())
+ bleeding_limbs += BP
+
+ var/num_bleeds = LAZYLEN(bleeding_limbs)
+ var/bleed_text = "You are bleeding from your"
+ switch(num_bleeds)
+ if(1 to 2)
+ bleed_text += " [bleeding_limbs[1].name][num_bleeds == 2 ? " and [bleeding_limbs[2].name]" : ""]"
+ if(3 to INFINITY)
+ for(var/i in 1 to (num_bleeds - 1))
+ var/obj/item/bodypart/BP = bleeding_limbs[i]
+ bleed_text += " [BP.name],"
+ bleed_text += " and [bleeding_limbs[num_bleeds].name]"
+ bleed_text += "!"
+ to_chat(src, bleed_text)
+
if(getStaminaLoss())
if(getStaminaLoss() > 30)
to_chat(src, "You're completely exhausted.")
diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm
index dac12e45b2d..985c25888fe 100644
--- a/code/modules/mob/living/carbon/human/human_defines.dm
+++ b/code/modules/mob/living/carbon/human/human_defines.dm
@@ -48,7 +48,6 @@
var/special_voice = "" // For changing our voice. Used by a symptom.
- var/bleed_rate = 0 //how much are we bleeding
var/bleedsuppress = 0 //for stopping bloodloss, eventually this will be limb-based like bleeding
var/name_override //For temporary visible name changes
diff --git a/code/modules/mob/living/carbon/human/human_helpers.dm b/code/modules/mob/living/carbon/human/human_helpers.dm
index 12a9567bc16..c7f4738487c 100644
--- a/code/modules/mob/living/carbon/human/human_helpers.dm
+++ b/code/modules/mob/living/carbon/human/human_helpers.dm
@@ -175,3 +175,22 @@
return TRUE
if(isclothing(wear_mask) && (wear_mask.clothing_flags & SCAN_REAGENTS))
return TRUE
+
+/// For use formatting all of the scars this human has for saving for persistent scarring
+/mob/living/carbon/human/proc/format_scars()
+ if(!all_scars)
+ return
+ var/scars = ""
+ for(var/i in all_scars)
+ var/datum/scar/S = i
+ scars += "[S.format()];"
+ return scars
+
+/// Takes a single scar from the persistent scar loader and recreates it from the saved data
+/mob/living/carbon/human/proc/load_scar(scar_line)
+ var/list/scar_data = splittext(scar_line, "|")
+ if(LAZYLEN(scar_data) != 4)
+ return // invalid, should delete
+ var/obj/item/bodypart/BP = get_bodypart("[scar_data[SCAR_SAVE_ZONE]]")
+ var/datum/scar/S = new
+ return S.load(BP, scar_data[SCAR_SAVE_DESC], scar_data[SCAR_SAVE_PRECISE_LOCATION], text2num(scar_data[SCAR_SAVE_SEVERITY]))
diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm
index 64eb3b42fc3..ed904fa60a2 100644
--- a/code/modules/mob/living/carbon/human/species.dm
+++ b/code/modules/mob/living/carbon/human/species.dm
@@ -1555,9 +1555,14 @@ GLOBAL_LIST_EMPTY(roundstart_races)
var/armor_block = H.run_armor_check(affecting, "melee", "Your armor has protected your [hit_area]!", "Your armor has softened a hit to your [hit_area]!",I.armour_penetration)
armor_block = min(90,armor_block) //cap damage reduction at 90%
var/Iforce = I.force //to avoid runtimes on the forcesay checks at the bottom. Some items might delete themselves if you drop them. (stunning yourself, ninja swords)
+ var/Iwound_bonus = I.wound_bonus
+
+ // this way, you can't wound with a surgical tool on help intent if they have a surgery active and are laying down, so a misclick with a circular saw on the wrong limb doesn't bleed them dry (they still get hit tho)
+ if((I.item_flags & SURGICAL_TOOL) && user.a_intent == INTENT_HELP && (H.mobility_flags & ~MOBILITY_STAND) && (LAZYLEN(H.surgeries) > 0))
+ Iwound_bonus = CANT_WOUND
var/weakness = H.check_weakness(I, user)
- apply_damage(I.force * weakness, I.damtype, def_zone, armor_block, H)
+ apply_damage(I.force * weakness, I.damtype, def_zone, armor_block, H, wound_bonus = Iwound_bonus, bare_wound_bonus = I.bare_wound_bonus, sharpness = I.get_sharpness())
H.send_item_attack_message(I, user, hit_area)
@@ -1633,8 +1638,8 @@ GLOBAL_LIST_EMPTY(roundstart_races)
H.forcesay(GLOB.hit_appends) //forcesay checks stat already.
return TRUE
-/datum/species/proc/apply_damage(damage, damagetype = BRUTE, def_zone = null, blocked, mob/living/carbon/human/H, forced = FALSE, spread_damage = FALSE)
- SEND_SIGNAL(H, COMSIG_MOB_APPLY_DAMGE, damage, damagetype, def_zone)
+/datum/species/proc/apply_damage(damage, damagetype = BRUTE, def_zone = null, blocked, mob/living/carbon/human/H, forced = FALSE, spread_damage = FALSE, wound_bonus = 0, bare_wound_bonus = 0, sharpness = FALSE)
+ SEND_SIGNAL(H, COMSIG_MOB_APPLY_DAMGE, damage, damagetype, def_zone, wound_bonus, bare_wound_bonus, sharpness) // make sure putting wound_bonus here doesn't screw up other signals or uses for this signal
var/hit_percent = (100-(blocked+armor))/100
hit_percent = (hit_percent * (100-H.physiology.damage_resistance))/100
if(!damage || (!forced && hit_percent <= 0))
@@ -1656,7 +1661,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
H.damageoverlaytemp = 20
var/damage_amount = forced ? damage : damage * hit_percent * brutemod * H.physiology.brute_mod
if(BP)
- if(BP.receive_damage(damage_amount, 0))
+ if(BP.receive_damage(damage_amount, 0, wound_bonus = wound_bonus, bare_wound_bonus = bare_wound_bonus, sharpness = sharpness))
H.update_damage_overlays()
else//no bodypart, we deal damage with a more general method.
H.adjustBruteLoss(damage_amount)
@@ -1664,7 +1669,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
H.damageoverlaytemp = 20
var/damage_amount = forced ? damage : damage * hit_percent * burnmod * H.physiology.burn_mod
if(BP)
- if(BP.receive_damage(0, damage_amount))
+ if(BP.receive_damage(0, damage_amount, wound_bonus = wound_bonus, bare_wound_bonus = bare_wound_bonus, sharpness = sharpness))
H.update_damage_overlays()
else
H.adjustFireLoss(damage_amount)
diff --git a/code/modules/mob/living/carbon/human/species_types/humans.dm b/code/modules/mob/living/carbon/human/species_types/humans.dm
index 8f546a7d216..b91d704fcfd 100644
--- a/code/modules/mob/living/carbon/human/species_types/humans.dm
+++ b/code/modules/mob/living/carbon/human/species_types/humans.dm
@@ -2,7 +2,7 @@
name = "Human"
id = "human"
default_color = "FFFFFF"
- species_traits = list(EYECOLOR,HAIR,FACEHAIR,LIPS)
+ species_traits = list(EYECOLOR,HAIR,FACEHAIR,LIPS,CAN_SCAR)
default_features = list("mcolor" = "FFF", "wings" = "None")
use_skintones = 1
skinned_type = /obj/item/stack/sheet/animalhide/human
diff --git a/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm b/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm
index 9ac5c88d3ed..6cca6ff9a36 100644
--- a/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm
+++ b/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm
@@ -4,7 +4,7 @@
id = "lizard"
say_mod = "hisses"
default_color = "00FF00"
- species_traits = list(MUTCOLORS,EYECOLOR,LIPS)
+ species_traits = list(MUTCOLORS,EYECOLOR,LIPS,CAN_SCAR)
inherent_biotypes = MOB_ORGANIC|MOB_HUMANOID|MOB_REPTILE
mutant_bodyparts = list("tail_lizard", "snout", "spines", "horns", "frills", "body_markings", "legs")
mutanttongue = /obj/item/organ/tongue/lizard
@@ -84,6 +84,6 @@
name = "Ash Walker"
id = "ashlizard"
limbs_id = "lizard"
- species_traits = list(MUTCOLORS,EYECOLOR,LIPS,DIGITIGRADE)
+ species_traits = list(MUTCOLORS,EYECOLOR,LIPS,DIGITIGRADE,CAN_SCAR)
inherent_traits = list(TRAIT_CHUNKYFINGERS,TRAIT_NOBREATH)
species_language_holder = /datum/language_holder/lizard/ash
diff --git a/code/modules/mob/living/carbon/human/species_types/mothmen.dm b/code/modules/mob/living/carbon/human/species_types/mothmen.dm
index 9b6d92d3246..70e8dff4afe 100644
--- a/code/modules/mob/living/carbon/human/species_types/mothmen.dm
+++ b/code/modules/mob/living/carbon/human/species_types/mothmen.dm
@@ -3,7 +3,7 @@
id = "moth"
say_mod = "flutters"
default_color = "00FF00"
- species_traits = list(LIPS, NOEYESPRITES)
+ species_traits = list(LIPS, NOEYESPRITES, CAN_SCAR)
inherent_biotypes = MOB_ORGANIC|MOB_HUMANOID|MOB_BUG
mutant_bodyparts = list("moth_wings", "moth_markings")
default_features = list("moth_wings" = "Plain", "moth_markings" = "None")
diff --git a/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm b/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm
index 63a5362042c..cbf79aecc95 100644
--- a/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm
+++ b/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm
@@ -173,6 +173,8 @@
item_flags = ABSTRACT | DROPDEL
w_class = WEIGHT_CLASS_HUGE
sharpness = IS_SHARP
+ wound_bonus = -60
+ bare_wound_bonus = 20
/obj/item/light_eater/Initialize()
. = ..()
diff --git a/code/modules/mob/living/carbon/human/species_types/zombies.dm b/code/modules/mob/living/carbon/human/species_types/zombies.dm
index 2fafbcbcfbe..9c98ff66547 100644
--- a/code/modules/mob/living/carbon/human/species_types/zombies.dm
+++ b/code/modules/mob/living/carbon/human/species_types/zombies.dm
@@ -46,7 +46,7 @@
/datum/species/zombie/infectious/spec_stun(mob/living/carbon/human/H,amount)
. = min(20, amount)
-/datum/species/zombie/infectious/apply_damage(damage, damagetype = BRUTE, def_zone = null, blocked, mob/living/carbon/human/H, forced = FALSE)
+/datum/species/zombie/infectious/apply_damage(damage, damagetype = BRUTE, def_zone = null, blocked, mob/living/carbon/human/H, forced = FALSE, wound_bonus = 0, bare_wound_bonus = 0, sharpness = FALSE)
. = ..()
if(.)
regen_cooldown = world.time + REGENERATION_DELAY
@@ -63,6 +63,10 @@
heal_amt *= 2
C.heal_overall_damage(heal_amt,heal_amt)
C.adjustToxLoss(-heal_amt)
+ for(var/i in C.all_wounds)
+ var/datum/wound/W = i
+ if(prob(4-W.severity))
+ W.remove_wound()
if(!C.InCritical() && prob(4))
playsound(C, pick(spooks), 50, TRUE, 10)
diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm
index addc277890c..fcd11ea2aea 100644
--- a/code/modules/mob/living/carbon/life.dm
+++ b/code/modules/mob/living/carbon/life.dm
@@ -362,6 +362,12 @@
if(stat != DEAD || D.process_dead)
D.stage_act()
+/mob/living/carbon/handle_wounds()
+ for(var/thing in all_wounds)
+ var/datum/wound/W = thing
+ if(W.processes) // meh
+ W.handle_process()
+
//todo generalize this and move hud out
/mob/living/carbon/proc/handle_changeling()
if(mind && hud_used && hud_used.lingchemdisplay)
diff --git a/code/modules/mob/living/carbon/monkey/punpun.dm b/code/modules/mob/living/carbon/monkey/punpun.dm
index bfc889bc7b6..618dcd7a12e 100644
--- a/code/modules/mob/living/carbon/monkey/punpun.dm
+++ b/code/modules/mob/living/carbon/monkey/punpun.dm
@@ -26,6 +26,8 @@
//These have to be after the parent new to ensure that the monkey
//bodyparts are actually created before we try to equip things to
//those slots
+ if(ancestor_chain > 1)
+ generate_fake_scars(rand(ancestor_chain, ancestor_chain * 4))
if(relic_hat)
equip_to_slot_or_del(new relic_hat, ITEM_SLOT_HEAD)
if(relic_mask)
diff --git a/code/modules/mob/living/damage_procs.dm b/code/modules/mob/living/damage_procs.dm
index c6720838a99..d282a0f1c5d 100644
--- a/code/modules/mob/living/damage_procs.dm
+++ b/code/modules/mob/living/damage_procs.dm
@@ -14,7 +14,7 @@
*
* Returns TRUE if damage applied
*/
-/mob/living/proc/apply_damage(damage = 0,damagetype = BRUTE, def_zone = null, blocked = FALSE, forced = FALSE, spread_damage = FALSE)
+/mob/living/proc/apply_damage(damage = 0,damagetype = BRUTE, def_zone = null, blocked = FALSE, forced = FALSE, spread_damage = FALSE, wound_bonus = 0, bare_wound_bonus = 0, sharpness = FALSE)
SEND_SIGNAL(src, COMSIG_MOB_APPLY_DAMGE, damage, damagetype, def_zone)
var/hit_percent = (100-blocked)/100
if(!damage || (!forced && hit_percent <= 0))
@@ -262,7 +262,7 @@
update_stamina()
/// damage ONE external organ, organ gets randomly selected from damaged ones.
-/mob/living/proc/take_bodypart_damage(brute = 0, burn = 0, stamina = 0, updating_health = TRUE, required_status, check_armor = FALSE)
+/mob/living/proc/take_bodypart_damage(brute = 0, burn = 0, stamina = 0, updating_health = TRUE, required_status, check_armor = FALSE, wound_bonus = 0, bare_wound_bonus = 0, sharpness = FALSE)
adjustBruteLoss(brute, FALSE) //zero as argument for no instant health update
adjustFireLoss(burn, FALSE)
adjustStaminaLoss(stamina, FALSE)
diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm
index 9ab7eaa4fb7..8de7082926d 100644
--- a/code/modules/mob/living/life.dm
+++ b/code/modules/mob/living/life.dm
@@ -45,6 +45,8 @@
handle_diseases()// DEAD check is in the proc itself; we want it to spread even if the mob is dead, but to handle its disease-y properties only if you're not.
+ handle_wounds()
+
if (QDELETED(src)) // diseases can qdel the mob via transformations
return
@@ -81,6 +83,9 @@
/mob/living/proc/handle_diseases()
return
+/mob/living/proc/handle_wounds()
+ return
+
/mob/living/proc/handle_random_events()
return
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index 791b407ee0f..90c64d1cb0b 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -702,7 +702,7 @@
TH.transfer_mob_blood_dna(src)
/mob/living/carbon/human/makeTrail(turf/T)
- if((NOBLOOD in dna.species.species_traits) || !bleed_rate || bleedsuppress)
+ if((NOBLOOD in dna.species.species_traits) || !is_bleeding() || bleedsuppress)
return
..()
diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm
index cd140faac95..4104f4b4c7a 100644
--- a/code/modules/mob/living/living_defense.dm
+++ b/code/modules/mob/living/living_defense.dm
@@ -51,7 +51,7 @@
var/armor = run_armor_check(def_zone, P.flag, "","",P.armour_penetration)
var/on_hit_state = P.on_hit(src, armor)
if(!P.nodamage && on_hit_state != BULLET_ACT_BLOCK)
- apply_damage(P.damage, P.damage_type, def_zone, armor)
+ apply_damage(P.damage, P.damage_type, def_zone, armor, wound_bonus=P.wound_bonus, bare_wound_bonus=P.bare_wound_bonus, sharpness=P.sharpness)
apply_effects(P.stun, P.knockdown, P.unconscious, P.irradiate, P.slur, P.stutter, P.eyeblur, P.drowsy, armor, P.stamina, P.jitter, P.paralyze, P.immobilize)
if(P.dismemberment)
check_projectile_dismemberment(P, def_zone)
@@ -85,7 +85,7 @@
if(!I.throwforce)
return
var/armor = run_armor_check(zone, "melee", "Your armor has protected your [parse_zone(zone)].", "Your armor has softened hit to your [parse_zone(zone)].",I.armour_penetration)
- apply_damage(I.throwforce, dtype, zone, armor)
+ apply_damage(I.throwforce, dtype, zone, armor, sharpness=I.sharpness)
if(I.thrownby)
log_combat(I.thrownby, src, "threw and hit", I)
else
diff --git a/code/modules/mob/living/silicon/damage_procs.dm b/code/modules/mob/living/silicon/damage_procs.dm
index 53e32fc3b49..ce0910e0b31 100644
--- a/code/modules/mob/living/silicon/damage_procs.dm
+++ b/code/modules/mob/living/silicon/damage_procs.dm
@@ -1,5 +1,5 @@
-/mob/living/silicon/apply_damage(damage = 0,damagetype = BRUTE, def_zone = null, blocked = FALSE, forced = FALSE)
+/mob/living/silicon/apply_damage(damage = 0,damagetype = BRUTE, def_zone = null, blocked = FALSE, forced = FALSE, wound_bonus = 0, bare_wound_bonus = 0, sharpness = FALSE)
var/hit_percent = (100-blocked)/100
if((!damage || (!forced && hit_percent <= 0)))
return 0
diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm
index 808903d268a..79ba044b204 100644
--- a/code/modules/mob/living/silicon/robot/robot_modules.dm
+++ b/code/modules/mob/living/silicon/robot/robot_modules.dm
@@ -282,10 +282,12 @@
/obj/item/surgicaldrill,
/obj/item/scalpel,
/obj/item/circular_saw,
+ /obj/item/bonesetter,
/obj/item/extinguisher/mini,
/obj/item/roller/robo,
/obj/item/borg/cyborghug/medical,
/obj/item/stack/medical/gauze/cyborg,
+ /obj/item/stack/medical/bone_gel/cyborg,
/obj/item/organ_storage,
/obj/item/borg/lollipop)
radio_channels = list(RADIO_CHANNEL_MEDICAL)
diff --git a/code/modules/mob/living/simple_animal/hostile/bear.dm b/code/modules/mob/living/simple_animal/hostile/bear.dm
index 938cdf137f6..00f93474267 100644
--- a/code/modules/mob/living/simple_animal/hostile/bear.dm
+++ b/code/modules/mob/living/simple_animal/hostile/bear.dm
@@ -25,8 +25,11 @@
speed = 0
obj_damage = 60
- melee_damage_lower = 20
- melee_damage_upper = 30
+ melee_damage_lower = 15 // i know it's like half what it used to be, but bears cause bleeding like crazy now so it works out
+ melee_damage_upper = 15
+ wound_bonus = -5
+ bare_wound_bonus = 10 // BEAR wound bonus am i right
+ sharpness = TRUE
attack_verb_continuous = "claws"
attack_verb_simple = "claw"
attack_sound = 'sound/weapons/bladeslice.ogg'
@@ -91,8 +94,9 @@
icon_dead = "combatbear_dead"
faction = list("russian")
butcher_results = list(/obj/item/reagent_containers/food/snacks/meat/slab/bear = 5, /obj/item/clothing/head/bearpelt = 1, /obj/item/bear_armor = 1)
- melee_damage_lower = 25
- melee_damage_upper = 35
+ melee_damage_lower = 18
+ melee_damage_upper = 20
+ wound_bonus = 0
armour_penetration = 20
health = 120
maxHealth = 120
@@ -117,8 +121,9 @@
A.maxHealth += 60
A.health += 60
A.armour_penetration += 20
- A.melee_damage_lower += 5
+ A.melee_damage_lower += 3
A.melee_damage_upper += 5
+ A.wound_bonus += 5
A.update_icons()
to_chat(user, "You strap the armor plating to [A] and sharpen [A.p_their()] claws with the nail filer. This was a great idea.")
qdel(src)
diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm
index 514a911fa8c..7d0a40810dd 100644
--- a/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm
+++ b/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm
@@ -679,7 +679,7 @@ Difficulty: Hard
to_chat(L, "You're struck by a [name]!")
var/limb_to_hit = L.get_bodypart(pick(BODY_ZONE_HEAD, BODY_ZONE_CHEST, BODY_ZONE_R_ARM, BODY_ZONE_L_ARM, BODY_ZONE_R_LEG, BODY_ZONE_L_LEG))
var/armor = L.run_armor_check(limb_to_hit, "melee", "Your armor absorbs [src]!", "Your armor blocks part of [src]!", FALSE, 50, "Your armor was penetrated by [src]!")
- L.apply_damage(damage, BURN, limb_to_hit, armor)
+ L.apply_damage(damage, BURN, limb_to_hit, armor, wound_bonus=CANT_WOUND)
if(ishostile(L))
var/mob/living/simple_animal/hostile/H = L //mobs find and damage you...
if(H.stat == CONSCIOUS && !H.target && H.AIStatus != AI_OFF && !H.client)
diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/legion.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/legion.dm
index 1d35a7f6c81..ea180d631f2 100644
--- a/code/modules/mob/living/simple_animal/hostile/megafauna/legion.dm
+++ b/code/modules/mob/living/simple_animal/hostile/megafauna/legion.dm
@@ -257,6 +257,8 @@
force = 25
damtype = BURN
hitsound = 'sound/weapons/sear.ogg'
+ wound_bonus = -40
+ bare_wound_bonus = 20
var/storm_type = /datum/weather/ash_storm
var/storm_nextuse = 0
var/staff_cooldown = 20 SECONDS // The minimum time between uses.
diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/wendigo.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/wendigo.dm
index 9760ce72860..249a25757ca 100644
--- a/code/modules/mob/living/simple_animal/hostile/megafauna/wendigo.dm
+++ b/code/modules/mob/living/simple_animal/hostile/megafauna/wendigo.dm
@@ -150,7 +150,7 @@ Difficulty: Hard
to_chat(L, "[src]'s ground slam shockwave sends you flying!")
var/turf/thrownat = get_ranged_target_turf_direct(src, L, 8, rand(-10, 10))
L.throw_at(thrownat, 8, 2, src, TRUE, force = MOVE_FORCE_OVERPOWERING, gentle = TRUE)
- L.apply_damage(20, BRUTE)
+ L.apply_damage(20, BRUTE, wound_bonus=CANT_WOUND)
shake_camera(L, 2, 1)
all_turfs -= T
sleep(delay)
diff --git a/code/modules/mob/living/simple_animal/hostile/syndicate.dm b/code/modules/mob/living/simple_animal/hostile/syndicate.dm
index 0155b62f03a..fbb97bb90cf 100644
--- a/code/modules/mob/living/simple_animal/hostile/syndicate.dm
+++ b/code/modules/mob/living/simple_animal/hostile/syndicate.dm
@@ -294,6 +294,9 @@
maxHealth = 25
melee_damage_lower = 15
melee_damage_upper = 15
+ wound_bonus = -10
+ bare_wound_bonus = 20
+ sharpness = TRUE
obj_damage = 0
environment_smash = ENVIRONMENT_SMASH_NONE
attack_verb_continuous = "cuts"
diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm
index 4880727a2c7..41bd46f9643 100644
--- a/code/modules/mob/living/simple_animal/simple_animal.dm
+++ b/code/modules/mob/living/simple_animal/simple_animal.dm
@@ -145,6 +145,13 @@
///What kind of footstep this mob should have. Null if it shouldn't have any.
var/footstep_type
+ ///How much wounding power it has
+ var/wound_bonus = CANT_WOUND
+ ///How much bare wounding power it has
+ var/bare_wound_bonus = 0
+ ///If the attacks from this are sharp
+ var/sharpness = FALSE
+
/mob/living/simple_animal/Initialize()
. = ..()
GLOB.simple_animals[AIStatus] += src
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index d43e0ca34e9..382c9712207 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -418,10 +418,26 @@
return
face_atom(A)
- var/list/result = A.examine(src)
+ var/list/result
+ if(client)
+ LAZYINITLIST(client.recent_examines)
+ if(isnull(client.recent_examines[A]) || client.recent_examines[A] < world.time) // originally this wasn't an assoc list, but sometimes the timer failed and atoms stayed in a client's recent_examines, so we check here manually
+ client.recent_examines[A] = world.time + EXAMINE_MORE_TIME
+ result = A.examine(src)
+ addtimer(CALLBACK(src, .proc/clear_from_recent_examines, A), EXAMINE_MORE_TIME)
+ else
+ result = A.examine_more(src)
+ else
+ result = A.examine(src) // if a tree is examined but no client is there to see it, did the tree ever really exist?
+
to_chat(src, result.Join("\n"))
SEND_SIGNAL(src, COMSIG_MOB_EXAMINATE, A)
+/mob/proc/clear_from_recent_examines(atom/A)
+ if(QDELETED(A) || !client)
+ return
+ LAZYREMOVE(client.recent_examines, A)
+
/**
* Point at an atom
*
diff --git a/code/modules/projectiles/ammunition/ballistic/shotgun.dm b/code/modules/projectiles/ammunition/ballistic/shotgun.dm
index 3d4ec81d5bc..58d979f88bc 100644
--- a/code/modules/projectiles/ammunition/ballistic/shotgun.dm
+++ b/code/modules/projectiles/ammunition/ballistic/shotgun.dm
@@ -8,6 +8,18 @@
custom_materials = list(/datum/material/iron=4000)
projectile_type = /obj/projectile/bullet/shotgun_slug
+/obj/item/ammo_casing/shotgun/executioner
+ name = "executioner slug"
+ desc = "A 12 gauge lead slug purpose built to annihilate flesh on impact."
+ icon_state = "stunshell"
+ projectile_type = /obj/projectile/bullet/shotgun_slug/executioner
+
+/obj/item/ammo_casing/shotgun/pulverizer
+ name = "pulverizer slug"
+ desc = "A 12 gauge lead slug purpose built to annihilate bones on impact."
+ icon_state = "stunshell"
+ projectile_type = /obj/projectile/bullet/shotgun_slug/pulverizer
+
/obj/item/ammo_casing/shotgun/beanbag
name = "beanbag slug"
desc = "A weak beanbag slug for riot control."
diff --git a/code/modules/projectiles/ammunition/energy/laser.dm b/code/modules/projectiles/ammunition/energy/laser.dm
index 05b1f05eecd..5e398a99933 100644
--- a/code/modules/projectiles/ammunition/energy/laser.dm
+++ b/code/modules/projectiles/ammunition/energy/laser.dm
@@ -2,6 +2,11 @@
projectile_type = /obj/projectile/beam/laser
select_name = "kill"
+/obj/item/ammo_casing/energy/laser/hellfire
+ projectile_type = /obj/projectile/beam/laser/hellfire
+ e_cost = 130
+ select_name = "maim"
+
/obj/item/ammo_casing/energy/lasergun
projectile_type = /obj/projectile/beam/laser
e_cost = 83
diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm
index 797406b8da4..a1f58f00d6f 100644
--- a/code/modules/projectiles/gun.dm
+++ b/code/modules/projectiles/gun.dm
@@ -196,6 +196,11 @@
return
user.AddComponent(/datum/component/gunpoint, target, src)
return
+ if(iscarbon(target))
+ var/mob/living/carbon/C = target
+ for(var/datum/wound/W in C.all_wounds)
+ if(W.try_treating(src, user))
+ return // another coward cured!
if(istype(user))//Check if the user can use the gun, if the user isn't alive(turrets) assume it can.
var/mob/living/L = user
diff --git a/code/modules/projectiles/guns/energy/laser.dm b/code/modules/projectiles/guns/energy/laser.dm
index e504b54cdc7..49e7d2932de 100644
--- a/code/modules/projectiles/guns/energy/laser.dm
+++ b/code/modules/projectiles/guns/energy/laser.dm
@@ -29,6 +29,12 @@
ammo_type = list(/obj/item/ammo_casing/energy/lasergun/old)
ammo_x_offset = 3
+/obj/item/gun/energy/laser/hellgun
+ name ="hellfire laser gun"
+ desc = "A relic of a weapon, built before NT began installing regulators on its laser weaponry. This pattern of laser gun became infamous for the gruesome burn wounds it caused, and was quietly discontinued once it began to affect NT's reputation."
+ icon_state = "hellgun"
+ ammo_type = list(/obj/item/ammo_casing/energy/laser/hellfire)
+
/obj/item/gun/energy/laser/captain
name = "antique laser gun"
icon_state = "caplaser"
@@ -101,6 +107,7 @@
damage += 7
transform *= 1 + ((damage/7) * 0.2)//20% larger per tile
+///X-ray gun
/obj/item/gun/energy/xray
name = "\improper X-ray laser gun"
desc = "A high-power laser gun capable of expelling concentrated X-ray blasts that pass through multiple soft targets and heavier materials."
diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm
index dbf4ec9357b..f9c93be9750 100644
--- a/code/modules/projectiles/projectile.dm
+++ b/code/modules/projectiles/projectile.dm
@@ -129,6 +129,11 @@
///If TRUE, hit mobs even if they're on the floor and not our target
var/hit_stunned_targets = FALSE
+ wound_bonus = CANT_WOUND
+ /// For telling whether we want to roll for bone breaking or lacerations if we're bothering with wounds
+ var/sharpness = FALSE
+
+
/obj/projectile/Initialize()
. = ..()
permutated = list()
diff --git a/code/modules/projectiles/projectile/beams.dm b/code/modules/projectiles/projectile/beams.dm
index 4d09118ee41..751a5d08285 100644
--- a/code/modules/projectiles/projectile/beams.dm
+++ b/code/modules/projectiles/projectile/beams.dm
@@ -14,11 +14,26 @@
ricochets_max = 50 //Honk!
ricochet_chance = 80
reflectable = REFLECT_NORMAL
+ wound_bonus = -20
+ bare_wound_bonus = 10
/obj/projectile/beam/laser
tracer_type = /obj/effect/projectile/tracer/laser
muzzle_type = /obj/effect/projectile/muzzle/laser
impact_type = /obj/effect/projectile/impact/laser
+ wound_bonus = -30
+ bare_wound_bonus = 40
+
+//overclocked laser, does a bit more damage but has much higher wound power (-0 vs -20)
+/obj/projectile/beam/laser/hellfire
+ name = "hellfire laser"
+ wound_bonus = 0
+ damage = 25
+ speed = 0.6 // higher power = faster, that's how light works right
+
+/obj/projectile/beam/laser/hellfire/Initialize()
+ . = ..()
+ transform *= 2
/obj/projectile/beam/laser/heavylaser
name = "heavy laser"
@@ -90,6 +105,7 @@
tracer_type = /obj/effect/projectile/tracer/pulse
muzzle_type = /obj/effect/projectile/muzzle/pulse
impact_type = /obj/effect/projectile/impact/pulse
+ wound_bonus = 10
/obj/projectile/beam/pulse/on_hit(atom/target, blocked = FALSE)
. = ..()
@@ -119,6 +135,8 @@
damage = 30
impact_effect_type = /obj/effect/temp_visual/impact_effect/green_laser
light_color = LIGHT_COLOR_GREEN
+ wound_bonus = -40
+ bare_wound_bonus = 70
/obj/projectile/beam/emitter/singularity_pull()
return //don't want the emitters to miss
diff --git a/code/modules/projectiles/projectile/bullets.dm b/code/modules/projectiles/projectile/bullets.dm
index 999e4c0f9bc..0534b766dad 100644
--- a/code/modules/projectiles/projectile/bullets.dm
+++ b/code/modules/projectiles/projectile/bullets.dm
@@ -6,4 +6,5 @@
nodamage = FALSE
flag = "bullet"
hitsound_wall = "ricochet"
+ sharpness = TRUE
impact_effect_type = /obj/effect/temp_visual/impact_effect
diff --git a/code/modules/projectiles/projectile/bullets/revolver.dm b/code/modules/projectiles/projectile/bullets/revolver.dm
index 21555c8554a..7a399287a56 100644
--- a/code/modules/projectiles/projectile/bullets/revolver.dm
+++ b/code/modules/projectiles/projectile/bullets/revolver.dm
@@ -19,6 +19,8 @@
ricochet_chance = 50
ricochet_auto_aim_angle = 10
ricochet_auto_aim_range = 3
+ wound_bonus = -35
+ sharpness = TRUE
/obj/projectile/bullet/c38/match
name = ".38 Match bullet"
@@ -46,6 +48,7 @@
damage = 15
armour_penetration = -30
ricochets_max = 0
+ wound_bonus = 0
shrapnel_type = /obj/item/shrapnel/bullet/c38/dumdum
/obj/projectile/bullet/c38/trac
diff --git a/code/modules/projectiles/projectile/bullets/shotgun.dm b/code/modules/projectiles/projectile/bullets/shotgun.dm
index 551e4ebc4f1..a6d42d11684 100644
--- a/code/modules/projectiles/projectile/bullets/shotgun.dm
+++ b/code/modules/projectiles/projectile/bullets/shotgun.dm
@@ -2,10 +2,22 @@
name = "12g shotgun slug"
damage = 60
+/obj/projectile/bullet/shotgun_slug/executioner
+ name = "executioner slug" // admin only, can dismember limbs
+ sharpness = TRUE
+ wound_bonus = 0
+
+/obj/projectile/bullet/shotgun_slug/pulverizer
+ name = "pulverizer slug" // admin only, can crush bones
+ sharpness = FALSE
+ wound_bonus = 0
+
/obj/projectile/bullet/shotgun_beanbag
name = "beanbag slug"
- damage = 5
+ damage = 10
stamina = 55
+ wound_bonus = 20
+ sharpness = FALSE
/obj/projectile/bullet/incendiary/shotgun
name = "incendiary slug"
@@ -62,6 +74,7 @@
/obj/projectile/bullet/pellet/shotgun_buckshot
name = "buckshot pellet"
damage = 12.5
+ wound_bonus = -10
/obj/projectile/bullet/pellet/shotgun_rubbershot
name = "rubbershot pellet"
diff --git a/code/modules/reagents/chemistry/reagents/cat2_medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/cat2_medicine_reagents.dm
index 0e98971bd4b..a30b3887004 100644
--- a/code/modules/reagents/chemistry/reagents/cat2_medicine_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/cat2_medicine_reagents.dm
@@ -420,6 +420,8 @@
if(method in list(PATCH, TOUCH, VAPOR))
var/harmies = min(carbies.getBruteLoss(),carbies.adjustBruteLoss(-1.25 * reac_volume)*-1)
var/burnies = min(carbies.getFireLoss(),carbies.adjustFireLoss(-1.25 * reac_volume)*-1)
+ for(var/datum/wound/burn/burn_wound in carbies.all_wounds)
+ burn_wound.regenerate_flesh(reac_volume)
carbies.adjustToxLoss((harmies+burnies)*0.66)
if(show_message)
to_chat(carbies, "You feel your burns and bruises healing! It stings like hell!")
diff --git a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm
index 7ebbb965811..00c41700ef4 100644
--- a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm
@@ -148,6 +148,9 @@
M.adjustFireLoss(-power, 0)
M.adjustToxLoss(-power, 0, TRUE) //heals TOXINLOVERs
M.adjustCloneLoss(-power, 0)
+ for(var/i in M.all_wounds)
+ var/datum/wound/W = i
+ W.on_xadone(power)
REMOVE_TRAIT(M, TRAIT_DISFIGURED, TRAIT_GENERIC) //fixes common causes for disfiguration
. = 1
metabolization_rate = REAGENTS_METABOLISM * (0.00001 * (M.bodytemperature ** 2) + 0.5)
@@ -198,6 +201,9 @@
M.adjustFireLoss(-1.5 * power, 0)
M.adjustToxLoss(-power, 0, TRUE)
M.adjustCloneLoss(-power, 0)
+ for(var/i in M.all_wounds)
+ var/datum/wound/W = i
+ W.on_xadone(power)
REMOVE_TRAIT(M, TRAIT_DISFIGURED, TRAIT_GENERIC)
. = 1
..()
@@ -234,7 +240,7 @@
/datum/reagent/medicine/spaceacillin
name = "Spaceacillin"
- description = "Spaceacillin will prevent a patient from conventionally spreading any diseases they are currently infected with."
+ description = "Spaceacillin will prevent a patient from conventionally spreading any diseases they are currently infected with. Also reduces infection in serious burns."
color = "#E1F2E6"
metabolization_rate = 0.1 * REAGENTS_METABOLISM
@@ -305,7 +311,7 @@
/datum/reagent/medicine/mine_salve
name = "Miner's Salve"
- description = "A powerful painkiller. Restores bruising and burns in addition to making the patient believe they are fully healed."
+ description = "A powerful painkiller. Restores bruising and burns in addition to making the patient believe they are fully healed. Also great for treating severe burn wounds in a pinch."
reagent_state = LIQUID
color = "#6D6374"
metabolization_rate = 0.4 * REAGENTS_METABOLISM
@@ -330,7 +336,7 @@
S.speed_modifier = max(0.1, S.speed_modifier)
if(show_message)
- to_chat(M, "You feel your wounds fade away to nothing!" )
+ to_chat(M, "You feel your injuries fade away to nothing!" )
..()
/datum/reagent/medicine/mine_salve/on_mob_end_metabolize(mob/living/M)
@@ -1262,10 +1268,6 @@
/datum/reagent/medicine/polypyr/on_mob_life(mob/living/carbon/M) //I wanted a collection of small positive effects, this is as hard to obtain as coniine after all.
M.adjustOrganLoss(ORGAN_SLOT_LUNGS, -0.25)
M.adjustBruteLoss(-0.35, 0)
- if(prob(50))
- if(ishuman(M))
- var/mob/living/carbon/human/H = M
- H.bleed_rate = max(H.bleed_rate - 1, 0)
..()
. = 1
@@ -1334,3 +1336,11 @@
L.remove_movespeed_mod_immunities(type, /datum/movespeed_modifier/damage_slowdown)
L.Dizzy(0)
L.Jitter(0)
+
+// handled in cut wounds process
+/datum/reagent/medicine/coagulant
+ name = "Sanguirite"
+ description = "A coagulant used to help open cuts clot faster."
+ reagent_state = LIQUID
+ color = "#bb2424"
+ metabolization_rate = 0.25 * REAGENTS_METABOLISM
diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm
index a6ec977db92..1f2dc2b62b9 100644
--- a/code/modules/reagents/chemistry/reagents/other_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm
@@ -2285,3 +2285,36 @@
color = "#623301"
taste_mult = 1.2
+/datum/reagent/determination
+ name = "Determination"
+ description = "For when you need to push on a little more. Do NOT allow near plants."
+ reagent_state = LIQUID
+ color = "#D2FFFA"
+ metabolization_rate = 0.75 * REAGENTS_METABOLISM // 5u (WOUND_DETERMINATION_CRITICAL) will last for ~17 ticks
+ /// Whether we've had at least WOUND_DETERMINATION_SEVERE (2.5u) of determination at any given time. No damage slowdown immunity or indication we're having a second wind if it's just a single moderate wound
+ var/significant = FALSE
+
+/datum/reagent/determination/on_mob_end_metabolize(mob/living/carbon/M)
+ if(significant)
+ var/stam_crash = 0
+ for(var/thing in M.all_wounds)
+ var/datum/wound/W = thing
+ stam_crash += (W.severity + 1) * 3 // spike of 3 stam damage per wound severity (moderate = 6, severe = 9, critical = 12) when the determination wears off if it was a combat rush
+ M.adjustStaminaLoss(stam_crash)
+ M.remove_status_effect(STATUS_EFFECT_DETERMINED)
+ ..()
+
+/datum/reagent/determination/on_mob_life(mob/living/carbon/M)
+ if(!significant && volume >= WOUND_DETERMINATION_SEVERE)
+ significant = TRUE
+ M.apply_status_effect(STATUS_EFFECT_DETERMINED) // in addition to the slight healing, limping cooldowns are divided by 4 during the combat high
+
+ volume = min(volume, WOUND_DETERMINATION_MAX)
+
+ for(var/thing in M.all_wounds)
+ var/datum/wound/W = thing
+ var/obj/item/bodypart/wounded_part = W.limb
+ if(wounded_part)
+ wounded_part.heal_damage(0.25, 0.25)
+ M.adjustStaminaLoss(-0.25*REM) // the more wounds, the more stamina regen
+ ..()
diff --git a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm
index fcd9331ff05..518cfc550e5 100644
--- a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm
@@ -166,6 +166,11 @@
toxpwr = 2
taste_description = "fish"
+/datum/reagent/toxin/carpotoxin/on_mob_life(mob/living/carbon/M)
+ . = ..()
+ for(var/i in M.all_scars)
+ qdel(i)
+
/datum/reagent/toxin/zombiepowder
name = "Zombie Powder"
description = "A strong neurotoxin that puts the subject into a death-like state."
@@ -749,22 +754,13 @@
/datum/reagent/toxin/heparin //Based on a real-life anticoagulant. I'm not a doctor, so this won't be realistic.
name = "Heparin"
- description = "A powerful anticoagulant. Victims will bleed uncontrollably and suffer scaling bruising."
+ description = "A powerful anticoagulant. All open cut wounds on the victim will open up and bleed much faster"
silent_toxin = TRUE
reagent_state = LIQUID
color = "#C8C8C8" //RGB: 200, 200, 200
metabolization_rate = 0.2 * REAGENTS_METABOLISM
toxpwr = 0
-/datum/reagent/toxin/heparin/on_mob_life(mob/living/carbon/M)
- if(ishuman(M))
- var/mob/living/carbon/human/H = M
- H.bleed_rate = min(H.bleed_rate + 2, 8)
- H.adjustBruteLoss(1, 0) //Brute damage increases with the amount they're bleeding
- . = 1
- return ..() || .
-
-
/datum/reagent/toxin/rotatium //Rotatium. Fucks up your rotation and is hilarious
name = "Rotatium"
description = "A constantly swirling, oddly colourful fluid. Causes the consumer's sense of direction and hand-eye coordination to become wild."
diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm
index 436118265a4..61353a40c63 100644
--- a/code/modules/reagents/reagent_containers/hypospray.dm
+++ b/code/modules/reagents/reagent_containers/hypospray.dm
@@ -102,12 +102,12 @@
inhand_icon_state = "medipen"
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
- amount_per_transfer_from_this = 13
- volume = 13
+ amount_per_transfer_from_this = 15
+ volume = 15
ignore_flags = 1 //so you can medipen through hardsuits
reagent_flags = DRAWABLE
flags_1 = null
- list_reagents = list(/datum/reagent/medicine/epinephrine = 10, /datum/reagent/toxin/formaldehyde = 3)
+ list_reagents = list(/datum/reagent/medicine/epinephrine = 10, /datum/reagent/toxin/formaldehyde = 3, /datum/reagent/medicine/coagulant = 2)
custom_price = 150
custom_premium_price = 300
@@ -253,3 +253,10 @@
amount_per_transfer_from_this = 15
list_reagents = list(/datum/reagent/drug/pumpup = 15)
icon_state = "maintenance"
+
+/obj/item/reagent_containers/hypospray/medipen/ekit
+ name = "emergency first-aid autoinjector"
+ desc = "An epinephrine medipen with trace amounts of coagulants and antibiotics to help stabilize bad cuts and burns."
+ volume = 15
+ amount_per_transfer_from_this = 15
+ list_reagents = list(/datum/reagent/medicine/epinephrine = 12, /datum/reagent/medicine/coagulant = 2.5, /datum/reagent/medicine/spaceacillin = 0.5)
diff --git a/code/modules/research/designs/autolathe_designs.dm b/code/modules/research/designs/autolathe_designs.dm
index d1b11fbac57..347334a1655 100644
--- a/code/modules/research/designs/autolathe_designs.dm
+++ b/code/modules/research/designs/autolathe_designs.dm
@@ -504,6 +504,15 @@
category = list("initial", "Medical", "Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE
+/datum/design/bonesetter
+ name = "Bonesetter"
+ id = "bonesetter"
+ build_type = AUTOLATHE | PROTOLATHE
+ materials = list(/datum/material/iron = 1000)
+ build_path = /obj/item/bonesetter
+ category = list("initial", "Medical", "Tool Designs")
+ departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE
+
/datum/design/surgicaldrill
name = "Surgical Drill"
id = "surgicaldrill"
@@ -1130,3 +1139,12 @@
materials = list(/datum/material/plastic = 500)
build_path = /obj/item/stack/sticky_tape
category = list("initial", "Misc")
+
+/datum/design/sticky_tape/surgical
+ name = "Surgical Tape"
+ id = "surgical_tape"
+ build_type = PROTOLATHE
+ materials = list(/datum/material/plastic = 500)
+ build_path = /obj/item/stack/sticky_tape/surgical
+ category = list("initial", "Medical")
+ departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
diff --git a/code/modules/research/techweb/all_nodes.dm b/code/modules/research/techweb/all_nodes.dm
index 22924de15b8..606fbc7eb35 100644
--- a/code/modules/research/techweb/all_nodes.dm
+++ b/code/modules/research/techweb/all_nodes.dm
@@ -56,8 +56,8 @@
starting_node = TRUE
display_name = "Basic Medical Equipment"
description = "Basic medical tools and equipment."
- design_ids = list("cybernetic_liver", "cybernetic_heart", "cybernetic_lungs", "scalpel", "circular_saw", "surgicaldrill", "retractor", "cautery", "hemostat",
- "surgical_drapes", "syringe", "plumbing_rcd", "beaker", "large_beaker", "xlarge_beaker", "dropper", "defibmountdefault")
+ design_ids = list("cybernetic_liver", "cybernetic_heart", "cybernetic_lungs", "scalpel", "circular_saw", "bonesetter", "surgicaldrill", "retractor", "cautery", "hemostat",
+ "surgical_drapes", "syringe", "plumbing_rcd", "beaker", "large_beaker", "xlarge_beaker", "dropper", "defibmountdefault", "surgical_tape")
/////////////////////////Biotech/////////////////////////
/datum/techweb_node/biotech
diff --git a/code/modules/research/xenobiology/crossbreeding/_misc.dm b/code/modules/research/xenobiology/crossbreeding/_misc.dm
index 454531d8bc0..d038e75e218 100644
--- a/code/modules/research/xenobiology/crossbreeding/_misc.dm
+++ b/code/modules/research/xenobiology/crossbreeding/_misc.dm
@@ -38,7 +38,7 @@ Slimecrossing Items
if(!already || already != saved_part.old_part)
saved_part.old_part.replace_limb(src, TRUE)
saved_part.old_part.heal_damage(INFINITY, INFINITY, INFINITY, null, FALSE)
- saved_part.old_part.receive_damage(saved_part.brute_dam, saved_part.burn_dam, saved_part.stamina_dam)
+ saved_part.old_part.receive_damage(saved_part.brute_dam, saved_part.burn_dam, saved_part.stamina_dam, wound_bonus=CANT_WOUND)
dont_chop[zone] = TRUE
for(var/_part in bodyparts)
var/obj/item/bodypart/part = _part
diff --git a/code/modules/spells/spell_types/bloodcrawl.dm b/code/modules/spells/spell_types/bloodcrawl.dm
index 55524788b79..0ac5f5dc58e 100644
--- a/code/modules/spells/spell_types/bloodcrawl.dm
+++ b/code/modules/spells/spell_types/bloodcrawl.dm
@@ -24,6 +24,11 @@
/obj/effect/proc_holder/spell/bloodcrawl/perform(obj/effect/decal/cleanable/target, recharge = 1, mob/living/user = usr)
if(istype(user))
+ if(istype(user, /mob/living/simple_animal/slaughter))
+ var/mob/living/simple_animal/slaughter/slaught = user
+ slaught.current_hitstreak = 0
+ slaught.wound_bonus = initial(slaught.wound_bonus)
+ slaught.bare_wound_bonus = initial(slaught.bare_wound_bonus)
if(phased)
if(user.phasein(target))
phased = FALSE
diff --git a/code/modules/spells/spell_types/shapeshift.dm b/code/modules/spells/spell_types/shapeshift.dm
index 90055ec9482..658e78353e8 100644
--- a/code/modules/spells/spell_types/shapeshift.dm
+++ b/code/modules/spells/spell_types/shapeshift.dm
@@ -130,7 +130,7 @@
var/damage_percent = (stored.maxHealth - stored.health)/stored.maxHealth;
var/damapply = damage_percent * shape.maxHealth;
- shape.apply_damage(damapply, source.convert_damage_type, forced = TRUE);
+ shape.apply_damage(damapply, source.convert_damage_type, forced = TRUE, wound_bonus=CANT_WOUND);
shape.blood_volume = stored.blood_volume;
slink = soullink(/datum/soullink/shapeshift, stored , shape)
@@ -186,7 +186,7 @@
var/damage_percent = (shape.maxHealth - shape.health)/shape.maxHealth;
var/damapply = stored.maxHealth * damage_percent
- stored.apply_damage(damapply, source.convert_damage_type, forced = TRUE)
+ stored.apply_damage(damapply, source.convert_damage_type, forced = TRUE, wound_bonus=CANT_WOUND)
if(source.convert_damage)
stored.blood_volume = shape.blood_volume;
qdel(shape)
diff --git a/code/modules/surgery/bodyparts/bodyparts.dm b/code/modules/surgery/bodyparts/_bodyparts.dm
similarity index 63%
rename from code/modules/surgery/bodyparts/bodyparts.dm
rename to code/modules/surgery/bodyparts/_bodyparts.dm
index 3bdf608c031..19eb27f5d53 100644
--- a/code/modules/surgery/bodyparts/bodyparts.dm
+++ b/code/modules/surgery/bodyparts/_bodyparts.dm
@@ -66,6 +66,29 @@
var/medium_burn_msg = "blistered"
var/heavy_burn_msg = "peeling away"
+ /// The wounds currently afflicting this body part
+ var/list/wounds
+
+ /// The scars currently afflicting this body part
+ var/list/scars
+ /// Our current stored wound damage multiplier
+ var/wound_damage_multiplier = 1
+
+ /// This number is subtracted from all wound rolls on this bodypart, higher numbers mean more defense, negative means easier to wound
+ var/wound_resistance = 0
+ /// When this bodypart hits max damage, this number is added to all wound rolls. Obviously only relevant for bodyparts that have damage caps.
+ var/disabled_wound_penalty = 15
+
+ /// A hat won't cover your face, but a shirt covering your chest will cover your... you know, chest
+ var/scars_covered_by_clothes = TRUE
+ /// Descriptions for the locations on the limb for scars to be assigned, just cosmetic
+ var/list/specific_locations = list("general area")
+ /// So we know if we need to scream if this limb hits max damage
+ var/last_maxed
+ /// How much generic bleedstacks we have on this bodypart
+ var/generic_bleedstacks
+
+
/obj/item/bodypart/examine(mob/user)
. = ..()
if(brute_dam > DAMAGE_PRECISION)
@@ -146,7 +169,7 @@
//Applies brute and burn damage to the organ. Returns 1 if the damage-icon states changed at all.
//Damage will not exceed max_damage using this proc
//Cannot apply negative damage
-/obj/item/bodypart/proc/receive_damage(brute = 0, burn = 0, stamina = 0, blocked = 0, updating_health = TRUE, required_status = null)
+/obj/item/bodypart/proc/receive_damage(brute = 0, burn = 0, stamina = 0, blocked = 0, updating_health = TRUE, required_status = null, wound_bonus = 0, bare_wound_bonus = 0, sharpness = FALSE) // maybe separate BRUTE_SHARP and BRUTE_OTHER eventually somehow hmm
var/hit_percent = (100-blocked)/100
if((!brute && !burn && !stamina) || hit_percent <= 0)
return FALSE
@@ -167,27 +190,42 @@
if(!brute && !burn && !stamina)
return FALSE
+ brute *= wound_damage_multiplier
+ burn *= wound_damage_multiplier
+
switch(animal_origin)
if(ALIEN_BODYPART,LARVA_BODYPART) //aliens take double burn //nothing can burn with so much snowflake code around
burn *= 2
+ var/wounding_type = (brute > burn ? WOUND_BRUTE : WOUND_BURN)
+ var/wounding_dmg = max(brute, burn)
+ if(wounding_type == WOUND_BRUTE && sharpness)
+ wounding_type = WOUND_SHARP
+ // i know this is effectively the same check as above but i don't know if those can null the damage by rounding and want to be safe
+ if(owner && wounding_dmg > 4 && wound_bonus != CANT_WOUND)
+ // if you want to make tox wounds or some other type, this will need to be expanded and made more modular
+ // handle all our wounding stuff
+ check_wounding(wounding_type, wounding_dmg, wound_bonus, bare_wound_bonus)
+
var/can_inflict = max_damage - get_damage()
- if(can_inflict <= 0)
- return FALSE
-
var/total_damage = brute + burn
-
- if(total_damage > can_inflict)
+ if(total_damage > can_inflict && total_damage > 0) // TODO: the second part of this check should be removed once disabling is all done
brute = round(brute * (can_inflict / total_damage),DAMAGE_PRECISION)
burn = round(burn * (can_inflict / total_damage),DAMAGE_PRECISION)
+ if(can_inflict <= 0)
+ return FALSE
+
brute_dam += brute
burn_dam += burn
+ for(var/i in wounds)
+ var/datum/wound/W = i
+ W.receive_damage(wounding_type, wounding_dmg, wound_bonus)
+
//We've dealt the physical damages, if there's room lets apply the stamina damage.
stamina_dam += round(clamp(stamina, 0, max_stamina_damage - stamina_dam), DAMAGE_PRECISION)
-
if(owner && updating_health)
owner.updatehealth()
if(stamina > DAMAGE_PRECISION)
@@ -198,6 +236,107 @@
update_disabled()
return update_bodypart_damage_state() || .
+/**
+ * check_wounding() is where we handle rolling for, selecting, and applying a wound if we meet the criteria
+ *
+ * We generate a "score" for how woundable the attack was based on the damage and other factors discussed in [check_wounding_mods()], then go down the list from most severe to least severe wounds in that category.
+ * We can promote a wound from a lesser to a higher severity this way, but we give up if we have a wound of the given type and fail to roll a higher severity, so no sidegrades/downgrades
+ *
+ * Arguments:
+ * * woundtype- Either WOUND_SHARP, WOUND_BRUTE, or WOUND_BURN based on the attack type.
+ * * damage- How much damage is tied to this attack, since wounding potential scales with damage in an attack (see: WOUND_DAMAGE_EXPONENT)
+ * * wound_bonus- The wound_bonus of an attack
+ * * bare_wound_bonus- The bare_wound_bonus of an attack
+ */
+/obj/item/bodypart/proc/check_wounding(woundtype, damage, wound_bonus, bare_wound_bonus)
+ // actually roll wounds if applicable
+ if(HAS_TRAIT(owner, TRAIT_EASYLIMBDISABLE))
+ damage *= 1.5
+
+ var/base_roll = rand(1, round(damage ** WOUND_DAMAGE_EXPONENT))
+ var/injury_roll = base_roll
+ injury_roll += check_woundings_mods(woundtype, damage, wound_bonus, bare_wound_bonus)
+ var/list/wounds_checking
+
+ switch(woundtype)
+ if(WOUND_SHARP)
+ wounds_checking = WOUND_LIST_CUT
+ if(WOUND_BRUTE)
+ wounds_checking = WOUND_LIST_BONE
+ if(WOUND_BURN)
+ wounds_checking = WOUND_LIST_BURN
+
+ //cycle through the wounds of the relevant category from the most severe down
+ for(var/PW in wounds_checking)
+ var/datum/wound/possible_wound = PW
+ var/datum/wound/replaced_wound
+ for(var/i in wounds)
+ var/datum/wound/existing_wound = i
+ if(existing_wound.type in wounds_checking)
+ if(existing_wound.severity >= initial(possible_wound.severity))
+ return
+ else
+ replaced_wound = existing_wound
+
+ if(initial(possible_wound.threshold_minimum) < injury_roll)
+ if(replaced_wound)
+ var/datum/wound/new_wound = replaced_wound.replace_wound(possible_wound)
+ log_wound(owner, new_wound, damage, wound_bonus, bare_wound_bonus, base_roll)
+ else
+ var/datum/wound/new_wound = new possible_wound
+ new_wound.apply_wound(src)
+ log_wound(owner, new_wound, damage, wound_bonus, bare_wound_bonus, base_roll)
+ return
+
+// try forcing a specific wound, but only if there isn't already a wound of that severity or greater for that type on this bodypart
+/obj/item/bodypart/proc/force_wound_upwards(specific_woundtype, smited = FALSE)
+ var/datum/wound/potential_wound = specific_woundtype
+ for(var/i in wounds)
+ var/datum/wound/existing_wound = i
+ if(existing_wound.type in (initial(potential_wound.wound_type)))
+ if(existing_wound.severity < initial(potential_wound.severity)) // we only try if the existing one is inferior to the one we're trying to force
+ existing_wound.replace_wound(potential_wound, smited)
+ return
+
+ var/datum/wound/new_wound = new potential_wound
+ new_wound.apply_wound(src, smited = smited)
+
+/obj/item/bodypart/proc/check_woundings_mods(wounding_type, damage, wound_bonus, bare_wound_bonus)
+ var/armor_ablation = 0
+ var/injury_mod = 0
+
+ //var/bwb = 0
+
+ if(owner && ishuman(owner))
+ var/mob/living/carbon/human/H = owner
+ var/list/clothing = H.clothingonpart(src)
+ for(var/c in clothing)
+ var/obj/item/clothing/C = c
+ // unlike normal armor checks, we tabluate these piece-by-piece manually so we can also pass on appropriate damage the clothing's limbs if necessary
+ armor_ablation += C.armor.getRating("wound")
+ if(wounding_type == WOUND_SHARP)
+ C.take_damage_zone(body_zone, damage, BRUTE, armour_penetration)
+ else if(wounding_type == WOUND_BURN && damage >= 10) // lazy way to block freezing from shredding clothes without adding another var onto apply_damage()
+ C.take_damage_zone(body_zone, damage, BURN, armour_penetration)
+
+ if(!armor_ablation)
+ injury_mod += bare_wound_bonus
+
+ injury_mod -= armor_ablation
+ injury_mod += wound_bonus
+
+ for(var/thing in wounds)
+ var/datum/wound/W = thing
+ injury_mod += W.threshold_penalty
+
+ var/part_mod = -wound_resistance
+ if(is_disabled())
+ part_mod += disabled_wound_penalty
+
+ injury_mod += part_mod
+
+ return injury_mod
+
//Heals brute and burn damage for the organ. Returns 1 if the damage-icon states changed at all.
//Damage cannot go below zero.
//Cannot remove negative damage (i.e. apply damage)
@@ -225,24 +364,42 @@
//Checks disabled status thresholds
/obj/item/bodypart/proc/update_disabled()
+ if(!owner)
+ return
set_disabled(is_disabled())
/obj/item/bodypart/proc/is_disabled()
+ if(!owner)
+ return
if(HAS_TRAIT(src, TRAIT_PARALYSIS))
return BODYPART_DISABLED_PARALYSIS
+ for(var/i in wounds)
+ var/datum/wound/W = i
+ if(W.disabling)
+ return BODYPART_DISABLED_WOUND
if(can_dismember() && !HAS_TRAIT(owner, TRAIT_NOLIMBDISABLE))
. = disabled //inertia, to avoid limbs healing 0.1 damage and being re-enabled
+
+ // TODO: figure if i'm keeping disabling to broken bones only
if((get_damage(TRUE) >= max_damage) || (HAS_TRAIT(owner, TRAIT_EASYLIMBDISABLE) && (get_damage(TRUE) >= (max_damage * 0.6)))) //Easy limb disable disables the limb at 40% health instead of 0%
- return BODYPART_DISABLED_DAMAGE
- if(disabled && (get_damage(TRUE) <= (max_damage * 0.5)))
+ if(!last_maxed)
+ owner.emote("scream")
+ last_maxed = TRUE
+ if(!is_organic_limb())
+ return BODYPART_DISABLED_DAMAGE
+ else if(disabled && (get_damage(TRUE) <= (max_damage * 0.8))) // reenabled at 80% now instead of 50% as of wounds update
+ last_maxed = FALSE
return BODYPART_NOT_DISABLED
else
return BODYPART_NOT_DISABLED
+ return BODYPART_NOT_DISABLED
/obj/item/bodypart/proc/set_disabled(new_disabled)
- if(disabled == new_disabled)
+ if(disabled == new_disabled || !owner)
return
disabled = new_disabled
+ if(disabled && owner.get_item_for_held_index(held_index))
+ owner.dropItemToGround(owner.get_item_for_held_index(held_index))
owner.update_health_hud() //update the healthdoll
owner.update_body()
owner.update_mobility()
@@ -439,298 +596,46 @@
drop_organs()
qdel(src)
-/obj/item/bodypart/chest
- name = BODY_ZONE_CHEST
- desc = "It's impolite to stare at a person's chest."
- icon_state = "default_human_chest"
- max_damage = 200
- body_zone = BODY_ZONE_CHEST
- body_part = CHEST
- px_x = 0
- px_y = 0
- stam_damage_coeff = 1
- max_stamina_damage = 120
- var/obj/item/cavity_item
-
-/obj/item/bodypart/chest/can_dismember(obj/item/I)
- if(!((owner.stat == DEAD) || owner.InFullCritical()))
- return FALSE
- return ..()
-
-/obj/item/bodypart/chest/Destroy()
- QDEL_NULL(cavity_item)
- return ..()
-
-/obj/item/bodypart/chest/drop_organs(mob/user, violent_removal)
- if(cavity_item)
- cavity_item.forceMove(drop_location())
- cavity_item = null
- ..()
-
-/obj/item/bodypart/chest/monkey
- icon = 'icons/mob/animal_parts.dmi'
- icon_state = "default_monkey_chest"
- animal_origin = MONKEY_BODYPART
-
-/obj/item/bodypart/chest/alien
- icon = 'icons/mob/animal_parts.dmi'
- icon_state = "alien_chest"
- dismemberable = 0
- max_damage = 500
- animal_origin = ALIEN_BODYPART
-
-/obj/item/bodypart/chest/devil
- dismemberable = 0
- max_damage = 5000
- animal_origin = DEVIL_BODYPART
-
-/obj/item/bodypart/chest/larva
- icon = 'icons/mob/animal_parts.dmi'
- icon_state = "larva_chest"
- dismemberable = 0
- max_damage = 50
- animal_origin = LARVA_BODYPART
-
-/obj/item/bodypart/l_arm
- name = "left arm"
- desc = "Did you know that the word 'sinister' stems originally from the \
- Latin 'sinestra' (left hand), because the left hand was supposed to \
- be possessed by the devil? This arm appears to be possessed by no \
- one though."
- icon_state = "default_human_l_arm"
- attack_verb = list("slapped", "punched")
- max_damage = 50
- max_stamina_damage = 50
- body_zone = BODY_ZONE_L_ARM
- body_part = ARM_LEFT
- aux_zone = BODY_ZONE_PRECISE_L_HAND
- aux_layer = HANDS_PART_LAYER
- body_damage_coeff = 0.75
- held_index = 1
- px_x = -6
- px_y = 0
-
-/obj/item/bodypart/l_arm/is_disabled()
- if(HAS_TRAIT(owner, TRAIT_PARALYSIS_L_ARM))
- return BODYPART_DISABLED_PARALYSIS
- return ..()
-
-/obj/item/bodypart/l_arm/set_disabled(new_disabled)
- . = ..()
- if(!.)
+/// Get whatever wound of the given type is currently attached to this limb, if any
+/obj/item/bodypart/proc/get_wound_type(checking_type)
+ if(isnull(wounds))
return
- if(disabled == BODYPART_DISABLED_DAMAGE)
- if(owner.stat < UNCONSCIOUS)
- owner.emote("scream")
- if(owner.stat < DEAD)
- to_chat(owner, "Your [name] is too damaged to function!")
- if(held_index)
- owner.dropItemToGround(owner.get_item_for_held_index(held_index))
- else if(disabled == BODYPART_DISABLED_PARALYSIS)
- if(owner.stat < DEAD)
- to_chat(owner, "You can't feel your [name]!")
- if(held_index)
- owner.dropItemToGround(owner.get_item_for_held_index(held_index))
- if(owner.hud_used)
- var/obj/screen/inventory/hand/L = owner.hud_used.hand_slots["[held_index]"]
- if(L)
- L.update_icon()
-/obj/item/bodypart/l_arm/monkey
- icon = 'icons/mob/animal_parts.dmi'
- icon_state = "default_monkey_l_arm"
- animal_origin = MONKEY_BODYPART
- px_x = -5
- px_y = -3
+ for(var/thing in wounds)
+ var/datum/wound/W = thing
+ if(istype(W, checking_type))
+ return W
-/obj/item/bodypart/l_arm/alien
- icon = 'icons/mob/animal_parts.dmi'
- icon_state = "alien_l_arm"
- px_x = 0
- px_y = 0
- dismemberable = 0
- max_damage = 100
- animal_origin = ALIEN_BODYPART
+/// very rough start for updating efficiency and other stats on a body part whenever a wound is gained/lost
+/obj/item/bodypart/proc/update_wounds()
+ var/dam_mul = 1 //initial(wound_damage_multiplier)
-/obj/item/bodypart/l_arm/devil
- dismemberable = 0
- max_damage = 5000
- animal_origin = DEVIL_BODYPART
+ // we can only have one wound per type, but remember there's multiple types
+ for(var/datum/wound/W in wounds)
+ dam_mul *= W.damage_mulitplier_penalty
-/obj/item/bodypart/r_arm
- name = "right arm"
- desc = "Over 87% of humans are right handed. That figure is much lower \
- among humans missing their right arm."
- icon_state = "default_human_r_arm"
- attack_verb = list("slapped", "punched")
- max_damage = 50
- body_zone = BODY_ZONE_R_ARM
- body_part = ARM_RIGHT
- aux_zone = BODY_ZONE_PRECISE_R_HAND
- aux_layer = HANDS_PART_LAYER
- body_damage_coeff = 0.75
- held_index = 2
- px_x = 6
- px_y = 0
- max_stamina_damage = 50
+ wound_damage_multiplier = dam_mul
+ update_disabled()
-/obj/item/bodypart/r_arm/is_disabled()
- if(HAS_TRAIT(owner, TRAIT_PARALYSIS_R_ARM))
- return BODYPART_DISABLED_PARALYSIS
- return ..()
-
-/obj/item/bodypart/r_arm/set_disabled(new_disabled)
- . = ..()
- if(!.)
+/obj/item/bodypart/proc/get_bleed_rate()
+ if(status != BODYPART_ORGANIC) // maybe in the future we can bleed oil from aug parts, but not now
return
- if(disabled == BODYPART_DISABLED_DAMAGE)
- if(owner.stat < UNCONSCIOUS)
- owner.emote("scream")
- if(owner.stat < DEAD)
- to_chat(owner, "Your [name] is too damaged to function!")
- if(held_index)
- owner.dropItemToGround(owner.get_item_for_held_index(held_index))
- else if(disabled == BODYPART_DISABLED_PARALYSIS)
- if(owner.stat < DEAD)
- to_chat(owner, "You can't feel your [name]!")
- if(held_index)
- owner.dropItemToGround(owner.get_item_for_held_index(held_index))
- if(owner.hud_used)
- var/obj/screen/inventory/hand/R = owner.hud_used.hand_slots["[held_index]"]
- if(R)
- R.update_icon()
-/obj/item/bodypart/r_arm/monkey
- icon = 'icons/mob/animal_parts.dmi'
- icon_state = "default_monkey_r_arm"
- animal_origin = MONKEY_BODYPART
- px_x = 5
- px_y = -3
+ var/bleed_rate = 0
+ if(generic_bleedstacks > 0)
+ bleed_rate++
-/obj/item/bodypart/r_arm/alien
- icon = 'icons/mob/animal_parts.dmi'
- icon_state = "alien_r_arm"
- px_x = 0
- px_y = 0
- dismemberable = 0
- max_damage = 100
- animal_origin = ALIEN_BODYPART
+ if(brute_dam >= 40)
+ bleed_rate += (brute_dam * 0.008)
-/obj/item/bodypart/r_arm/devil
- dismemberable = 0
- max_damage = 5000
- animal_origin = DEVIL_BODYPART
+ //We want an accurate reading of .len
+ listclearnulls(embedded_objects)
+ for(var/obj/item/embeddies in embedded_objects)
+ if(!embeddies.isEmbedHarmless())
+ bleed_rate += 0.5
-/obj/item/bodypart/l_leg
- name = "left leg"
- desc = "Some athletes prefer to tie their left shoelaces first for good \
- luck. In this instance, it probably would not have helped."
- icon_state = "default_human_l_leg"
- attack_verb = list("kicked", "stomped")
- max_damage = 50
- body_zone = BODY_ZONE_L_LEG
- body_part = LEG_LEFT
- body_damage_coeff = 0.75
- px_x = -2
- px_y = 12
- max_stamina_damage = 50
+ for(var/thing in wounds)
+ var/datum/wound/W = thing
+ bleed_rate += W.blood_flow
-/obj/item/bodypart/l_leg/is_disabled()
- if(HAS_TRAIT(owner, TRAIT_PARALYSIS_L_LEG))
- return BODYPART_DISABLED_PARALYSIS
- return ..()
-
-/obj/item/bodypart/l_leg/set_disabled(new_disabled)
- . = ..()
- if(!.)
- return
- if(disabled == BODYPART_DISABLED_DAMAGE)
- if(owner.stat < UNCONSCIOUS)
- owner.emote("scream")
- if(owner.stat < DEAD)
- to_chat(owner, "Your [name] is too damaged to function!")
- else if(disabled == BODYPART_DISABLED_PARALYSIS)
- if(owner.stat < DEAD)
- to_chat(owner, "You can't feel your [name]!")
-
-/obj/item/bodypart/l_leg/digitigrade
- name = "left digitigrade leg"
- use_digitigrade = FULL_DIGITIGRADE
-
-/obj/item/bodypart/l_leg/monkey
- icon = 'icons/mob/animal_parts.dmi'
- icon_state = "default_monkey_l_leg"
- animal_origin = MONKEY_BODYPART
- px_y = 4
-
-/obj/item/bodypart/l_leg/alien
- icon = 'icons/mob/animal_parts.dmi'
- icon_state = "alien_l_leg"
- px_x = 0
- px_y = 0
- dismemberable = 0
- max_damage = 100
- animal_origin = ALIEN_BODYPART
-
-/obj/item/bodypart/l_leg/devil
- dismemberable = 0
- max_damage = 5000
- animal_origin = DEVIL_BODYPART
-
-/obj/item/bodypart/r_leg
- name = "right leg"
- desc = "You put your right leg in, your right leg out. In, out, in, out, \
- shake it all about. And apparently then it detaches.\n\
- The hokey pokey has certainly changed a lot since space colonisation."
- // alternative spellings of 'pokey' are availible
- icon_state = "default_human_r_leg"
- attack_verb = list("kicked", "stomped")
- max_damage = 50
- body_zone = BODY_ZONE_R_LEG
- body_part = LEG_RIGHT
- body_damage_coeff = 0.75
- px_x = 2
- px_y = 12
- max_stamina_damage = 50
-
-/obj/item/bodypart/r_leg/is_disabled()
- if(HAS_TRAIT(owner, TRAIT_PARALYSIS_R_LEG))
- return BODYPART_DISABLED_PARALYSIS
- return ..()
-
-/obj/item/bodypart/r_leg/set_disabled(new_disabled)
- . = ..()
- if(!.)
- return
- if(disabled == BODYPART_DISABLED_DAMAGE)
- if(owner.stat < UNCONSCIOUS)
- owner.emote("scream")
- if(owner.stat < DEAD)
- to_chat(owner, "Your [name] is too damaged to function!")
- else if(disabled == BODYPART_DISABLED_PARALYSIS)
- if(owner.stat < DEAD)
- to_chat(owner, "You can't feel your [name]!")
-
-/obj/item/bodypart/r_leg/digitigrade
- name = "right digitigrade leg"
- use_digitigrade = FULL_DIGITIGRADE
-
-/obj/item/bodypart/r_leg/monkey
- icon = 'icons/mob/animal_parts.dmi'
- icon_state = "default_monkey_r_leg"
- animal_origin = MONKEY_BODYPART
- px_y = 4
-
-/obj/item/bodypart/r_leg/alien
- icon = 'icons/mob/animal_parts.dmi'
- icon_state = "alien_r_leg"
- px_x = 0
- px_y = 0
- dismemberable = 0
- max_damage = 100
- animal_origin = ALIEN_BODYPART
-
-/obj/item/bodypart/r_leg/devil
- dismemberable = 0
- max_damage = 5000
- animal_origin = DEVIL_BODYPART
+ return bleed_rate
diff --git a/code/modules/surgery/bodyparts/dismemberment.dm b/code/modules/surgery/bodyparts/dismemberment.dm
index 84f45cc88c3..48312107dad 100644
--- a/code/modules/surgery/bodyparts/dismemberment.dm
+++ b/code/modules/surgery/bodyparts/dismemberment.dm
@@ -16,9 +16,10 @@
return FALSE
var/obj/item/bodypart/affecting = C.get_bodypart(BODY_ZONE_CHEST)
- affecting.receive_damage(clamp(brute_dam/2 * affecting.body_damage_coeff, 15, 50), clamp(burn_dam/2 * affecting.body_damage_coeff, 0, 50)) //Damage the chest based on limb's existing damage
+ affecting.receive_damage(clamp(brute_dam/2 * affecting.body_damage_coeff, 15, 50), clamp(burn_dam/2 * affecting.body_damage_coeff, 0, 50), wound_bonus=CANT_WOUND) //Damage the chest based on limb's existing damage
C.visible_message("[C]'s [src.name] is violently dismembered!")
C.emote("scream")
+ playsound(get_turf(C), 'sound/effects/dismember.ogg', 80, TRUE)
SEND_SIGNAL(C, COMSIG_ADD_MOOD_EVENT, "dismembered", /datum/mood_event/dismembered)
drop_limb()
@@ -81,11 +82,12 @@
//limb removal. The "special" argument is used for swapping a limb with a new one without the effects of losing a limb kicking in.
-/obj/item/bodypart/proc/drop_limb(special)
+/obj/item/bodypart/proc/drop_limb(special, dismembered)
if(!owner)
return
var/atom/Tsec = owner.drop_location()
var/mob/living/carbon/C = owner
+ SEND_SIGNAL(C, COMSIG_CARBON_REMOVE_LIMB, src, dismembered)
update_limb(1)
C.bodyparts -= src
@@ -96,6 +98,15 @@
C.dropItemToGround(owner.get_item_for_held_index(held_index), 1)
C.hand_bodyparts[held_index] = null
+ for(var/thing in scars)
+ var/datum/scar/S = thing
+ S.victim = null
+ LAZYREMOVE(owner.all_scars, S)
+
+ for(var/thing in wounds)
+ var/datum/wound/W = thing
+ W.remove_wound(TRUE)
+
owner = null
for(var/X in C.surgeries) //if we had an ongoing surgery on that limb, we stop it.
@@ -278,7 +289,7 @@
O.drop_limb(1)
/obj/item/bodypart/proc/attach_limb(mob/living/carbon/C, special)
- if(SEND_SIGNAL(C, COMSIG_LIVING_ATTACH_LIMB, src, special) & COMPONENT_NO_ATTACH)
+ if(SEND_SIGNAL(C, COMSIG_CARBON_ATTACH_LIMB, src, special) & COMPONENT_NO_ATTACH)
return FALSE
. = TRUE
moveToNullspace()
@@ -308,6 +319,15 @@
for(var/obj/item/organ/O in contents)
O.Insert(C)
+ for(var/thing in scars)
+ var/datum/scar/S = thing
+ S.victim = C
+ LAZYADD(C.all_scars, thing)
+
+ for(var/i in wounds)
+ var/datum/wound/W = i
+ W.apply_wound(src, TRUE)
+
update_bodypart_damage_state()
C.updatehealth()
diff --git a/code/modules/surgery/bodyparts/head.dm b/code/modules/surgery/bodyparts/head.dm
index 928216af50f..9abbf3441b6 100644
--- a/code/modules/surgery/bodyparts/head.dm
+++ b/code/modules/surgery/bodyparts/head.dm
@@ -13,6 +13,9 @@
px_y = -8
stam_damage_coeff = 1
max_stamina_damage = 100
+ wound_resistance = 10
+ specific_locations = list("left eyebrow", "cheekbone", "neck", "throat", "jawline", "entire face")
+ scars_covered_by_clothes = FALSE
var/mob/living/brain/brainmob = null //The current occupant.
var/obj/item/organ/brain/brain = null //The brain organ
diff --git a/code/modules/surgery/bodyparts/helpers.dm b/code/modules/surgery/bodyparts/helpers.dm
index a91837e9fe0..c2a96fbce0b 100644
--- a/code/modules/surgery/bodyparts/helpers.dm
+++ b/code/modules/surgery/bodyparts/helpers.dm
@@ -18,6 +18,15 @@
return FALSE
+///Get the bodypart for whatever hand we have active, Only relevant for carbons
+/mob/proc/get_active_hand()
+ return FALSE
+
+/mob/living/carbon/get_active_hand()
+ var/which_hand = BODY_ZONE_PRECISE_L_HAND
+ if(!(active_hand_index % 2))
+ which_hand = BODY_ZONE_PRECISE_R_HAND
+ return get_bodypart(check_zone(which_hand))
/mob/proc/has_left_hand(check_disabled = TRUE)
diff --git a/code/modules/surgery/bodyparts/parts.dm b/code/modules/surgery/bodyparts/parts.dm
new file mode 100644
index 00000000000..bd4abaa7650
--- /dev/null
+++ b/code/modules/surgery/bodyparts/parts.dm
@@ -0,0 +1,307 @@
+
+/obj/item/bodypart/chest
+ name = BODY_ZONE_CHEST
+ desc = "It's impolite to stare at a person's chest."
+ icon_state = "default_human_chest"
+ max_damage = 200
+ body_zone = BODY_ZONE_CHEST
+ body_part = CHEST
+ px_x = 0
+ px_y = 0
+ stam_damage_coeff = 1
+ max_stamina_damage = 120
+ var/obj/item/cavity_item
+ specific_locations = list("upper chest", "lower abdomen", "midsection", "collarbone", "lower back")
+ wound_resistance = 10
+
+/obj/item/bodypart/chest/can_dismember(obj/item/I)
+ if(!((owner.stat == DEAD) || owner.InFullCritical()))
+ return FALSE
+ return ..()
+
+/obj/item/bodypart/chest/Destroy()
+ QDEL_NULL(cavity_item)
+ return ..()
+
+/obj/item/bodypart/chest/drop_organs(mob/user, violent_removal)
+ if(cavity_item)
+ cavity_item.forceMove(drop_location())
+ cavity_item = null
+ ..()
+
+/obj/item/bodypart/chest/monkey
+ icon = 'icons/mob/animal_parts.dmi'
+ icon_state = "default_monkey_chest"
+ animal_origin = MONKEY_BODYPART
+ wound_resistance = -10
+
+/obj/item/bodypart/chest/alien
+ icon = 'icons/mob/animal_parts.dmi'
+ icon_state = "alien_chest"
+ dismemberable = 0
+ max_damage = 500
+ animal_origin = ALIEN_BODYPART
+
+/obj/item/bodypart/chest/devil
+ dismemberable = 0
+ max_damage = 5000
+ animal_origin = DEVIL_BODYPART
+
+/obj/item/bodypart/chest/larva
+ icon = 'icons/mob/animal_parts.dmi'
+ icon_state = "larva_chest"
+ dismemberable = 0
+ max_damage = 50
+ animal_origin = LARVA_BODYPART
+
+/obj/item/bodypart/l_arm
+ name = "left arm"
+ desc = "Did you know that the word 'sinister' stems originally from the \
+ Latin 'sinestra' (left hand), because the left hand was supposed to \
+ be possessed by the devil? This arm appears to be possessed by no \
+ one though."
+ icon_state = "default_human_l_arm"
+ attack_verb = list("slapped", "punched")
+ max_damage = 50
+ max_stamina_damage = 50
+ body_zone = BODY_ZONE_L_ARM
+ body_part = ARM_LEFT
+ aux_zone = BODY_ZONE_PRECISE_L_HAND
+ aux_layer = HANDS_PART_LAYER
+ body_damage_coeff = 0.75
+ held_index = 1
+ px_x = -6
+ px_y = 0
+ specific_locations = list("outer left forearm", "inner left wrist", "left elbow", "left bicep", "left shoulder")
+
+/obj/item/bodypart/l_arm/is_disabled()
+ if(HAS_TRAIT(owner, TRAIT_PARALYSIS_L_ARM))
+ return BODYPART_DISABLED_PARALYSIS
+ return ..()
+
+/obj/item/bodypart/l_arm/set_disabled(new_disabled)
+ . = ..()
+ if(!.)
+ return
+ if(disabled == BODYPART_DISABLED_DAMAGE)
+ if(owner.stat < UNCONSCIOUS)
+ owner.emote("scream")
+ if(owner.stat < DEAD)
+ to_chat(owner, "Your [name] is too damaged to function!")
+ if(held_index)
+ owner.dropItemToGround(owner.get_item_for_held_index(held_index))
+ else if(disabled == BODYPART_DISABLED_PARALYSIS)
+ if(owner.stat < DEAD)
+ to_chat(owner, "You can't feel your [name]!")
+ if(held_index)
+ owner.dropItemToGround(owner.get_item_for_held_index(held_index))
+ if(owner.hud_used)
+ var/obj/screen/inventory/hand/L = owner.hud_used.hand_slots["[held_index]"]
+ if(L)
+ L.update_icon()
+
+/obj/item/bodypart/l_arm/monkey
+ icon = 'icons/mob/animal_parts.dmi'
+ icon_state = "default_monkey_l_arm"
+ animal_origin = MONKEY_BODYPART
+ wound_resistance = -10
+ px_x = -5
+ px_y = -3
+
+/obj/item/bodypart/l_arm/alien
+ icon = 'icons/mob/animal_parts.dmi'
+ icon_state = "alien_l_arm"
+ px_x = 0
+ px_y = 0
+ dismemberable = 0
+ max_damage = 100
+ animal_origin = ALIEN_BODYPART
+
+/obj/item/bodypart/l_arm/devil
+ dismemberable = 0
+ max_damage = 5000
+ animal_origin = DEVIL_BODYPART
+
+/obj/item/bodypart/r_arm
+ name = "right arm"
+ desc = "Over 87% of humans are right handed. That figure is much lower \
+ among humans missing their right arm."
+ icon_state = "default_human_r_arm"
+ attack_verb = list("slapped", "punched")
+ max_damage = 50
+ body_zone = BODY_ZONE_R_ARM
+ body_part = ARM_RIGHT
+ aux_zone = BODY_ZONE_PRECISE_R_HAND
+ aux_layer = HANDS_PART_LAYER
+ body_damage_coeff = 0.75
+ held_index = 2
+ px_x = 6
+ px_y = 0
+ max_stamina_damage = 50
+ specific_locations = list("outer right forearm", "inner right wrist", "right elbow", "right bicep", "right shoulder")
+
+/obj/item/bodypart/r_arm/is_disabled()
+ if(HAS_TRAIT(owner, TRAIT_PARALYSIS_R_ARM))
+ return BODYPART_DISABLED_PARALYSIS
+ return ..()
+
+/obj/item/bodypart/r_arm/set_disabled(new_disabled)
+ . = ..()
+ if(!.)
+ return
+ if(disabled == BODYPART_DISABLED_DAMAGE)
+ if(owner.stat < UNCONSCIOUS)
+ owner.emote("scream")
+ if(owner.stat < DEAD)
+ to_chat(owner, "Your [name] is too damaged to function!")
+ if(held_index)
+ owner.dropItemToGround(owner.get_item_for_held_index(held_index))
+ else if(disabled == BODYPART_DISABLED_PARALYSIS)
+ if(owner.stat < DEAD)
+ to_chat(owner, "You can't feel your [name]!")
+ if(held_index)
+ owner.dropItemToGround(owner.get_item_for_held_index(held_index))
+ if(owner.hud_used)
+ var/obj/screen/inventory/hand/R = owner.hud_used.hand_slots["[held_index]"]
+ if(R)
+ R.update_icon()
+
+/obj/item/bodypart/r_arm/monkey
+ icon = 'icons/mob/animal_parts.dmi'
+ icon_state = "default_monkey_r_arm"
+ animal_origin = MONKEY_BODYPART
+ wound_resistance = -10
+ px_x = 5
+ px_y = -3
+
+/obj/item/bodypart/r_arm/alien
+ icon = 'icons/mob/animal_parts.dmi'
+ icon_state = "alien_r_arm"
+ px_x = 0
+ px_y = 0
+ dismemberable = 0
+ max_damage = 100
+ animal_origin = ALIEN_BODYPART
+
+/obj/item/bodypart/r_arm/devil
+ dismemberable = 0
+ max_damage = 5000
+ animal_origin = DEVIL_BODYPART
+
+/obj/item/bodypart/l_leg
+ name = "left leg"
+ desc = "Some athletes prefer to tie their left shoelaces first for good \
+ luck. In this instance, it probably would not have helped."
+ icon_state = "default_human_l_leg"
+ attack_verb = list("kicked", "stomped")
+ max_damage = 50
+ body_zone = BODY_ZONE_L_LEG
+ body_part = LEG_LEFT
+ body_damage_coeff = 0.75
+ px_x = -2
+ px_y = 12
+ max_stamina_damage = 50
+ specific_locations = list("inner left thigh", "outer left calf", "outer left hip", " left kneecap", "lower left shin")
+
+/obj/item/bodypart/l_leg/is_disabled()
+ if(HAS_TRAIT(owner, TRAIT_PARALYSIS_L_LEG))
+ return BODYPART_DISABLED_PARALYSIS
+ return ..()
+
+/obj/item/bodypart/l_leg/set_disabled(new_disabled)
+ . = ..()
+ if(!.)
+ return
+ if(disabled == BODYPART_DISABLED_DAMAGE)
+ if(owner.stat < UNCONSCIOUS)
+ owner.emote("scream")
+ if(owner.stat < DEAD)
+ to_chat(owner, "Your [name] is too damaged to function!")
+ else if(disabled == BODYPART_DISABLED_PARALYSIS)
+ if(owner.stat < DEAD)
+ to_chat(owner, "You can't feel your [name]!")
+
+/obj/item/bodypart/l_leg/digitigrade
+ name = "left digitigrade leg"
+ use_digitigrade = FULL_DIGITIGRADE
+
+/obj/item/bodypart/l_leg/monkey
+ icon = 'icons/mob/animal_parts.dmi'
+ icon_state = "default_monkey_l_leg"
+ animal_origin = MONKEY_BODYPART
+ wound_resistance = -10
+ px_y = 4
+
+/obj/item/bodypart/l_leg/alien
+ icon = 'icons/mob/animal_parts.dmi'
+ icon_state = "alien_l_leg"
+ px_x = 0
+ px_y = 0
+ dismemberable = 0
+ max_damage = 100
+ animal_origin = ALIEN_BODYPART
+
+/obj/item/bodypart/l_leg/devil
+ dismemberable = 0
+ max_damage = 5000
+ animal_origin = DEVIL_BODYPART
+
+/obj/item/bodypart/r_leg
+ name = "right leg"
+ desc = "You put your right leg in, your right leg out. In, out, in, out, \
+ shake it all about. And apparently then it detaches.\n\
+ The hokey pokey has certainly changed a lot since space colonisation."
+ // alternative spellings of 'pokey' are availible
+ icon_state = "default_human_r_leg"
+ attack_verb = list("kicked", "stomped")
+ max_damage = 50
+ body_zone = BODY_ZONE_R_LEG
+ body_part = LEG_RIGHT
+ body_damage_coeff = 0.75
+ px_x = 2
+ px_y = 12
+ max_stamina_damage = 50
+ specific_locations = list("inner right thigh", "outer right calf", "outer right hip", "right kneecap", "lower right shin")
+
+/obj/item/bodypart/r_leg/is_disabled()
+ if(HAS_TRAIT(owner, TRAIT_PARALYSIS_R_LEG))
+ return BODYPART_DISABLED_PARALYSIS
+ return ..()
+
+/obj/item/bodypart/r_leg/set_disabled(new_disabled)
+ . = ..()
+ if(!.)
+ return
+ if(disabled == BODYPART_DISABLED_DAMAGE)
+ if(owner.stat < UNCONSCIOUS)
+ owner.emote("scream")
+ if(owner.stat < DEAD)
+ to_chat(owner, "Your [name] is too damaged to function!")
+ else if(disabled == BODYPART_DISABLED_PARALYSIS)
+ if(owner.stat < DEAD)
+ to_chat(owner, "You can't feel your [name]!")
+
+/obj/item/bodypart/r_leg/digitigrade
+ name = "right digitigrade leg"
+ use_digitigrade = FULL_DIGITIGRADE
+
+/obj/item/bodypart/r_leg/monkey
+ icon = 'icons/mob/animal_parts.dmi'
+ icon_state = "default_monkey_r_leg"
+ animal_origin = MONKEY_BODYPART
+ wound_resistance = -10
+ px_y = 4
+
+/obj/item/bodypart/r_leg/alien
+ icon = 'icons/mob/animal_parts.dmi'
+ icon_state = "alien_r_leg"
+ px_x = 0
+ px_y = 0
+ dismemberable = 0
+ max_damage = 100
+ animal_origin = ALIEN_BODYPART
+
+/obj/item/bodypart/r_leg/devil
+ dismemberable = 0
+ max_damage = 5000
+ animal_origin = DEVIL_BODYPART
diff --git a/code/modules/surgery/bone_mending.dm b/code/modules/surgery/bone_mending.dm
new file mode 100644
index 00000000000..6afe4941058
--- /dev/null
+++ b/code/modules/surgery/bone_mending.dm
@@ -0,0 +1,142 @@
+
+/////BONE FIXING SURGERIES//////
+
+///// Repair Hairline Fracture (Severe)
+/datum/surgery/repair_bone_hairline
+ name = "Repair bone fracture (hairline)"
+ steps = list(/datum/surgery_step/incise, /datum/surgery_step/repair_bone_hairline, /datum/surgery_step/close)
+ target_mobtypes = list(/mob/living/carbon/human)
+ possible_locs = list(BODY_ZONE_R_ARM,BODY_ZONE_L_ARM,BODY_ZONE_R_LEG,BODY_ZONE_L_LEG,BODY_ZONE_CHEST,BODY_ZONE_HEAD)
+ requires_real_bodypart = TRUE
+ targetable_wound = /datum/wound/brute/bone/severe
+
+/datum/surgery/repair_bone_hairline/can_start(mob/living/user, mob/living/carbon/target)
+ if(..())
+ var/obj/item/bodypart/targeted_bodypart = target.get_bodypart(user.zone_selected)
+ return(targeted_bodypart.get_wound_type(targetable_wound))
+
+
+///// Repair Compound Fracture (Critical)
+/datum/surgery/repair_bone_compound
+ name = "Repair Compound Fracture"
+ steps = list(/datum/surgery_step/incise, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/retract_skin, /datum/surgery_step/reset_compound_fracture, /datum/surgery_step/repair_bone_compound, /datum/surgery_step/close)
+ target_mobtypes = list(/mob/living/carbon/human)
+ possible_locs = list(BODY_ZONE_R_ARM,BODY_ZONE_L_ARM,BODY_ZONE_R_LEG,BODY_ZONE_L_LEG,BODY_ZONE_CHEST,BODY_ZONE_HEAD)
+ requires_real_bodypart = TRUE
+ targetable_wound = /datum/wound/brute/bone/critical
+
+/datum/surgery/repair_bone_compound/can_start(mob/living/user, mob/living/carbon/target)
+ if(..())
+ var/obj/item/bodypart/targeted_bodypart = target.get_bodypart(user.zone_selected)
+ return(targeted_bodypart.get_wound_type(targetable_wound))
+
+
+
+//SURGERY STEPS
+
+///// Repair Hairline Fracture (Severe)
+/datum/surgery_step/repair_bone_hairline
+ name = "repair hairline fracture (bonesetter/bone gel/tape)"
+ implements = list(/obj/item/bonesetter = 100, /obj/item/stack/medical/bone_gel = 100, /obj/item/stack/sticky_tape/surgical = 100, /obj/item/stack/sticky_tape/super = 50, /obj/item/stack/sticky_tape = 30)
+ time = 40
+ experience_given = MEDICAL_SKILL_MEDIUM
+
+/datum/surgery_step/repair_bone_hairline/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
+ if(surgery.operated_wound)
+ display_results(user, target, "You begin to repair the fracture in [target]'s [parse_zone(user.zone_selected)]...",
+ "[user] begins to repair the fracture in [target]'s [parse_zone(user.zone_selected)] with [tool].",
+ "[user] begins to repair the fracture in [target]'s [parse_zone(user.zone_selected)].")
+ else
+ user.visible_message("[user] looks for [target]'s [parse_zone(user.zone_selected)].", "You look for [target]'s [parse_zone(user.zone_selected)]...")
+
+/datum/surgery_step/repair_bone_hairline/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results = FALSE)
+ if(surgery.operated_wound)
+ if(istype(tool, /obj/item/stack))
+ var/obj/item/stack/used_stack = tool
+ used_stack.use(1)
+ display_results(user, target, "You successfully repair the fracture in [target]'s [parse_zone(target_zone)].",
+ "[user] successfully repairs the fracture in [target]'s [parse_zone(target_zone)] with [tool]!",
+ "[user] successfully repairs the fracture in [target]'s [parse_zone(target_zone)]!")
+ log_combat(user, target, "repaired a hairline fracture in", addition="INTENT: [uppertext(user.a_intent)]")
+ qdel(surgery.operated_wound)
+ else
+ to_chat(user, "[target] has no hairline fracture there!")
+ return ..()
+
+/datum/surgery_step/repair_bone_hairline/failure(mob/user, mob/living/target, target_zone, obj/item/tool, datum/surgery/surgery, var/fail_prob = 0)
+ ..()
+ if(istype(tool, /obj/item/stack))
+ var/obj/item/stack/used_stack = tool
+ used_stack.use(1)
+
+
+
+///// Reset Compound Fracture (Crticial)
+/datum/surgery_step/reset_compound_fracture
+ name = "reset bone"
+ implements = list(/obj/item/bonesetter = 100, /obj/item/stack/sticky_tape/surgical = 60, /obj/item/stack/sticky_tape/super = 40, /obj/item/stack/sticky_tape = 20)
+ time = 40
+ experience_given = MEDICAL_SKILL_MEDIUM
+
+/datum/surgery_step/reset_compound_fracture/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
+ if(surgery.operated_wound)
+ display_results(user, target, "You begin to reset the bone in [target]'s [parse_zone(user.zone_selected)]...",
+ "[user] begins to reset the bone in [target]'s [parse_zone(user.zone_selected)] with [tool].",
+ "[user] begins to reset the bone in [target]'s [parse_zone(user.zone_selected)].")
+ else
+ user.visible_message("[user] looks for [target]'s [parse_zone(user.zone_selected)].", "You look for [target]'s [parse_zone(user.zone_selected)]...")
+
+/datum/surgery_step/reset_compound_fracture/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results = FALSE)
+ if(surgery.operated_wound)
+ if(istype(tool, /obj/item/stack))
+ var/obj/item/stack/used_stack = tool
+ used_stack.use(1)
+ display_results(user, target, "You successfully reset the bone in [target]'s [parse_zone(target_zone)].",
+ "[user] successfully resets the bone in [target]'s [parse_zone(target_zone)] with [tool]!",
+ "[user] successfully resets the bone in [target]'s [parse_zone(target_zone)]!")
+ log_combat(user, target, "reset a compound fracture in", addition="INTENT: [uppertext(user.a_intent)]")
+ else
+ to_chat(user, "[target] has no compound fracture there!")
+ return ..()
+
+/datum/surgery_step/reset_compound_fracture/failure(mob/user, mob/living/target, target_zone, obj/item/tool, datum/surgery/surgery, var/fail_prob = 0)
+ ..()
+ if(istype(tool, /obj/item/stack))
+ var/obj/item/stack/used_stack = tool
+ used_stack.use(1)
+
+
+///// Repair Compound Fracture (Crticial)
+/datum/surgery_step/repair_bone_compound
+ name = "repair compound fracture (bone gel/tape)"
+ implements = list(/obj/item/stack/medical/bone_gel = 100, /obj/item/stack/sticky_tape/surgical = 100, /obj/item/stack/sticky_tape/super = 50, /obj/item/stack/sticky_tape = 30)
+ time = 40
+ experience_given = MEDICAL_SKILL_MEDIUM
+
+/datum/surgery_step/repair_bone_compound/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
+ if(surgery.operated_wound)
+ display_results(user, target, "You begin to repair the fracture in [target]'s [parse_zone(user.zone_selected)]...",
+ "[user] begins to repair the fracture in [target]'s [parse_zone(user.zone_selected)] with [tool].",
+ "[user] begins to repair the fracture in [target]'s [parse_zone(user.zone_selected)].")
+ else
+ user.visible_message("[user] looks for [target]'s [parse_zone(user.zone_selected)].", "You look for [target]'s [parse_zone(user.zone_selected)]...")
+
+/datum/surgery_step/repair_bone_compound/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results = FALSE)
+ if(surgery.operated_wound)
+ if(istype(tool, /obj/item/stack))
+ var/obj/item/stack/used_stack = tool
+ used_stack.use(1)
+ display_results(user, target, "You successfully repair the fracture in [target]'s [parse_zone(target_zone)].",
+ "[user] successfully repairs the fracture in [target]'s [parse_zone(target_zone)] with [tool]!",
+ "[user] successfully repairs the fracture in [target]'s [parse_zone(target_zone)]!")
+ log_combat(user, target, "repaired a compound fracture in", addition="INTENT: [uppertext(user.a_intent)]")
+ qdel(surgery.operated_wound)
+ else
+ to_chat(user, "[target] has no compound fracture there!")
+ return ..()
+
+/datum/surgery_step/repair_bone_compound/failure(mob/user, mob/living/target, target_zone, obj/item/tool, datum/surgery/surgery, var/fail_prob = 0)
+ ..()
+ if(istype(tool, /obj/item/stack))
+ var/obj/item/stack/used_stack = tool
+ used_stack.use(1)
diff --git a/code/modules/surgery/burn_dressing.dm b/code/modules/surgery/burn_dressing.dm
new file mode 100644
index 00000000000..1d64d29ff63
--- /dev/null
+++ b/code/modules/surgery/burn_dressing.dm
@@ -0,0 +1,108 @@
+
+/////BURN FIXING SURGERIES//////
+
+///// Debride burnt flesh
+/datum/surgery/debride
+ name = "Debride infected flesh"
+ steps = list(/datum/surgery_step/debride, /datum/surgery_step/dress)
+ target_mobtypes = list(/mob/living/carbon/human)
+ possible_locs = list(BODY_ZONE_R_ARM,BODY_ZONE_L_ARM,BODY_ZONE_R_LEG,BODY_ZONE_L_LEG,BODY_ZONE_CHEST,BODY_ZONE_HEAD)
+ requires_real_bodypart = TRUE
+ targetable_wound = /datum/wound/burn
+
+/datum/surgery/debride/can_start(mob/living/user, mob/living/carbon/target)
+ if(..())
+ var/obj/item/bodypart/targeted_bodypart = target.get_bodypart(user.zone_selected)
+ var/datum/wound/burn/burn_wound = targeted_bodypart.get_wound_type(targetable_wound)
+ return(burn_wound && burn_wound.infestation > 0)
+
+//SURGERY STEPS
+
+///// Debride
+/datum/surgery_step/debride
+ name = "excise infection"
+ implements = list(TOOL_HEMOSTAT = 100, TOOL_SCALPEL = 85, TOOL_SAW = 60, TOOL_WIRECUTTER = 40)
+ time = 30
+ repeatable = TRUE
+ experience_given = MEDICAL_SKILL_MEDIUM
+
+/datum/surgery_step/debride/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
+ if(surgery.operated_wound)
+ var/datum/wound/burn/burn_wound = surgery.operated_wound
+ if(burn_wound.infestation <= 0)
+ to_chat(user, "[target]'s [parse_zone(user.zone_selected)] has no infected flesh to remove!")
+ surgery.status++
+ repeatable = FALSE
+ return
+ display_results(user, target, "You begin to excise infected flesh from [target]'s [parse_zone(user.zone_selected)]...",
+ "[user] begins to excise infected flesh from [target]'s [parse_zone(user.zone_selected)] with [tool].",
+ "[user] begins to excise infected flesh from [target]'s [parse_zone(user.zone_selected)].")
+ else
+ user.visible_message("[user] looks for [target]'s [parse_zone(user.zone_selected)].", "You look for [target]'s [parse_zone(user.zone_selected)]...")
+
+/datum/surgery_step/debride/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results = FALSE)
+ var/datum/wound/burn/burn_wound = surgery.operated_wound
+ if(burn_wound)
+ display_results(user, target, "You successfully excise some of the infected flesh from [target]'s [parse_zone(target_zone)].",
+ "[user] successfully excises some of the infected flesh from [target]'s [parse_zone(target_zone)] with [tool]!",
+ "[user] successfully excises some of the infected flesh from [target]'s [parse_zone(target_zone)]!")
+ log_combat(user, target, "excised infected flesh in", addition="INTENT: [uppertext(user.a_intent)]")
+ surgery.operated_bodypart.receive_damage(brute=3, wound_bonus=CANT_WOUND)
+ burn_wound.infestation -= 0.5
+ burn_wound.sanitization += 0.5
+ if(burn_wound.infestation <= 0)
+ repeatable = FALSE
+ else
+ to_chat(user, "[target] has no infected flesh there!")
+ return ..()
+
+/datum/surgery_step/debride/failure(mob/user, mob/living/target, target_zone, obj/item/tool, datum/surgery/surgery, var/fail_prob = 0)
+ ..()
+ display_results(user, target, "You carve away some of the healthy flesh from [target]'s [parse_zone(target_zone)].",
+ "[user] carves away some of the healthy flesh from [target]'s [parse_zone(target_zone)] with [tool]!",
+ "[user] carves away some of the healthy flesh from [target]'s [parse_zone(target_zone)]!")
+ surgery.operated_bodypart.receive_damage(brute=rand(4,8), sharpness=TRUE)
+
+/datum/surgery_step/debride/initiate(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, try_to_fail = FALSE)
+ if(!..())
+ return
+ var/datum/wound/burn/burn_wound = surgery.operated_wound
+ while(burn_wound && burn_wound.infestation > 0.25)
+ if(!..())
+ break
+
+///// Dressing burns
+/datum/surgery_step/dress
+ name = "bandage burns"
+ implements = list(/obj/item/stack/medical/gauze = 100, /obj/item/stack/sticky_tape/surgical = 100)
+ time = 40
+ experience_given = MEDICAL_SKILL_MEDIUM
+
+/datum/surgery_step/dress/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
+ var/datum/wound/burn/burn_wound = surgery.operated_wound
+ if(burn_wound)
+ display_results(user, target, "You begin to dress the burns on [target]'s [parse_zone(user.zone_selected)]...",
+ "[user] begins to dress the burns on [target]'s [parse_zone(user.zone_selected)] with [tool].",
+ "[user] begins to dress the burns on [target]'s [parse_zone(user.zone_selected)].")
+ else
+ user.visible_message("[user] looks for [target]'s [parse_zone(user.zone_selected)].", "You look for [target]'s [parse_zone(user.zone_selected)]...")
+
+/datum/surgery_step/dress/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results = FALSE)
+ var/datum/wound/burn/burn_wound = surgery.operated_wound
+ if(burn_wound)
+ display_results(user, target, "You successfully wrap [target]'s [parse_zone(target_zone)] with [tool].",
+ "[user] successfully wraps [target]'s [parse_zone(target_zone)] with [tool]!",
+ "[user] successfully wraps [target]'s [parse_zone(target_zone)]!")
+ log_combat(user, target, "dressed burns in", addition="INTENT: [uppertext(user.a_intent)]")
+ burn_wound.sanitization += 3
+ burn_wound.flesh_healing += 5
+ burn_wound.force_bandage(tool)
+ else
+ to_chat(user, "[target] has no burns there!")
+ return ..()
+
+/datum/surgery_step/dress/failure(mob/user, mob/living/target, target_zone, obj/item/tool, datum/surgery/surgery, var/fail_prob = 0)
+ ..()
+ if(istype(tool, /obj/item/stack))
+ var/obj/item/stack/used_stack = tool
+ used_stack.use(1)
diff --git a/code/modules/surgery/coronary_bypass.dm b/code/modules/surgery/coronary_bypass.dm
index ebe735278ee..492620ad92a 100644
--- a/code/modules/surgery/coronary_bypass.dm
+++ b/code/modules/surgery/coronary_bypass.dm
@@ -31,7 +31,8 @@
display_results(user, target, "Blood pools around the incision in [H]'s heart.",
"Blood pools around the incision in [H]'s heart.",
"")
- H.bleed_rate += 10
+ var/obj/item/bodypart/BP = H.get_bodypart(target_zone)
+ BP.generic_bleedstacks += 10
H.adjustBruteLoss(10)
return ..()
@@ -41,7 +42,8 @@
display_results(user, target, "You screw up, cutting too deeply into the heart!",
"[user] screws up, causing blood to spurt out of [H]'s chest!",
"[user] screws up, causing blood to spurt out of [H]'s chest!")
- H.bleed_rate += 20
+ var/obj/item/bodypart/BP = H.get_bodypart(target_zone)
+ BP.generic_bleedstacks += 10
H.adjustOrganLoss(ORGAN_SLOT_HEART, 10)
H.adjustBruteLoss(10)
@@ -74,5 +76,6 @@
"[user] screws up, causing blood to spurt out of [H]'s chest profusely!",
"[user] screws up, causing blood to spurt out of [H]'s chest profusely!")
H.adjustOrganLoss(ORGAN_SLOT_HEART, 20)
- H.bleed_rate += 30
+ var/obj/item/bodypart/BP = H.get_bodypart(target_zone)
+ BP.generic_bleedstacks += 30
return FALSE
diff --git a/code/modules/surgery/experimental_dissection.dm b/code/modules/surgery/experimental_dissection.dm
index e8cc949722e..420b0303531 100644
--- a/code/modules/surgery/experimental_dissection.dm
+++ b/code/modules/surgery/experimental_dissection.dm
@@ -72,7 +72,7 @@
/datum/surgery_step/dissection/success(mob/user, mob/living/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results = FALSE)
user.visible_message("[user] dissects [target], enhancing their medical knowledge!", "You dissect [target] and receive some healing experience!")
var/obj/item/bodypart/L = target.get_bodypart(BODY_ZONE_CHEST)
- target.apply_damage(80, BRUTE, L)
+ target.apply_damage(80, BRUTE, L, wound_bonus=CANT_WOUND)
ADD_TRAIT(target, TRAIT_DISSECTED, "[surgery.name]")
repeatable = FALSE
experience_given = check_value(target, surgery)
@@ -81,7 +81,7 @@
/datum/surgery_step/dissection/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] dissects [target]!", "You attempt to dissect [target], but do not find anything particularly interesting.")
var/obj/item/bodypart/L = target.get_bodypart(BODY_ZONE_CHEST)
- target.apply_damage(80, BRUTE, L)
+ target.apply_damage(80, BRUTE, L, wound_bonus=CANT_WOUND)
return TRUE
/datum/surgery/advanced/experimental_dissection/adv
diff --git a/code/modules/surgery/healing.dm b/code/modules/surgery/healing.dm
index 776c6389794..edf4327a951 100644
--- a/code/modules/surgery/healing.dm
+++ b/code/modules/surgery/healing.dm
@@ -90,7 +90,7 @@
urdamageamt_brute += round((target.getBruteLoss()/ (missinghpbonus*2)),0.1)
urdamageamt_burn += round((target.getFireLoss()/ (missinghpbonus*2)),0.1)
- target.take_bodypart_damage(urdamageamt_brute, urdamageamt_burn)
+ target.take_bodypart_damage(urdamageamt_brute, urdamageamt_burn, wound_bonus=CANT_WOUND)
return FALSE
/***************************BRUTE***************************/
diff --git a/code/modules/surgery/organic_steps.dm b/code/modules/surgery/organic_steps.dm
index 3145669cf2a..1aa82c36832 100644
--- a/code/modules/surgery/organic_steps.dm
+++ b/code/modules/surgery/organic_steps.dm
@@ -24,7 +24,9 @@
display_results(user, target, "Blood pools around the incision in [H]'s [parse_zone(target_zone)].",
"Blood pools around the incision in [H]'s [parse_zone(target_zone)].",
"")
- H.bleed_rate += 3
+ var/obj/item/bodypart/BP = target.get_bodypart(target_zone)
+ if(BP)
+ BP.generic_bleedstacks += 10
return ..()
/datum/surgery_step/incise/nobleed //silly friendly!
@@ -55,7 +57,9 @@
target.heal_bodypart_damage(20,0)
if (ishuman(target))
var/mob/living/carbon/human/H = target
- H.bleed_rate = max( (H.bleed_rate - 3), 0)
+ var/obj/item/bodypart/BP = H.get_bodypart(target_zone)
+ if(BP)
+ BP.generic_bleedstacks -= 3
return ..()
//retract skin
@@ -94,7 +98,9 @@
target.heal_bodypart_damage(45,0)
if (ishuman(target))
var/mob/living/carbon/human/H = target
- H.bleed_rate = max( (H.bleed_rate - 3), 0)
+ var/obj/item/bodypart/BP = H.get_bodypart(target_zone)
+ if(BP)
+ BP.generic_bleedstacks -= 3
return ..()
@@ -117,7 +123,7 @@
return TRUE
/datum/surgery_step/saw/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results)
- target.apply_damage(50, BRUTE, "[target_zone]")
+ target.apply_damage(50, BRUTE, "[target_zone]", wound_bonus=CANT_WOUND)
display_results(user, target, "You saw [target]'s [parse_zone(target_zone)] open.",
"[user] saws [target]'s [parse_zone(target_zone)] open!",
"[user] saws [target]'s [parse_zone(target_zone)] open!")
diff --git a/code/modules/surgery/organs/vocal_cords.dm b/code/modules/surgery/organs/vocal_cords.dm
index 4de3d105070..10db72a5ea2 100644
--- a/code/modules/surgery/organs/vocal_cords.dm
+++ b/code/modules/surgery/organs/vocal_cords.dm
@@ -312,13 +312,14 @@
cooldown = COOLDOWN_DAMAGE
for(var/V in listeners)
var/mob/living/L = V
- L.apply_damage(15 * power_multiplier, def_zone = BODY_ZONE_CHEST)
+ L.apply_damage(15 * power_multiplier, def_zone = BODY_ZONE_CHEST, wound_bonus=CANT_WOUND)
//BLEED
else if((findtext(message, bleed_words)))
cooldown = COOLDOWN_DAMAGE
for(var/mob/living/carbon/human/H in listeners)
- H.bleed_rate += (5 * power_multiplier)
+ var/obj/item/bodypart/BP = pick(H.bodyparts)
+ BP.generic_bleedstacks += 5
//FIRE
else if((findtext(message, burn_words)))
diff --git a/code/modules/surgery/surgery.dm b/code/modules/surgery/surgery.dm
index baa53690529..334d73649e8 100644
--- a/code/modules/surgery/surgery.dm
+++ b/code/modules/surgery/surgery.dm
@@ -12,6 +12,8 @@
var/ignore_clothes = FALSE //This surgery ignores clothes
var/mob/living/carbon/target //Operation target mob
var/obj/item/bodypart/operated_bodypart //Operable body part
+ var/datum/wound/operated_wound //The actual wound datum instance we're targeting
+ var/datum/wound/targetable_wound //The wound type this surgery targets
var/requires_bodypart = TRUE //Surgery available only when a bodypart is present, or only when it is missing.
var/speed_modifier = 0 //Step speed modifier
var/requires_real_bodypart = FALSE //Some surgeries don't work on limbs that don't really exist
@@ -29,8 +31,13 @@
location = surgery_location
if(surgery_bodypart)
operated_bodypart = surgery_bodypart
+ if(targetable_wound)
+ operated_wound = operated_bodypart.get_wound_type(targetable_wound)
+ operated_wound.attached_surgery = src
/datum/surgery/Destroy()
+ if(operated_wound)
+ operated_wound.attached_surgery = null
if(target)
target.surgeries -= src
target = null
diff --git a/code/modules/surgery/surgery_helpers.dm b/code/modules/surgery/surgery_helpers.dm
index 8e9e0436f7a..ace0b1bb6ac 100644
--- a/code/modules/surgery/surgery_helpers.dm
+++ b/code/modules/surgery/surgery_helpers.dm
@@ -108,9 +108,9 @@
to_chat(user, "You need to hold a [is_robotic ? "screwdriver" : "cautery"] in your inactive hand to stop [M]'s surgery!")
return
- if(ishuman(M))
- var/mob/living/carbon/human/H = M
- H.bleed_rate = max( (H.bleed_rate - 3), 0)
+ if(S.operated_bodypart)
+ S.operated_bodypart.generic_bleedstacks -= 5
+
M.surgeries -= S
user.visible_message("[user] closes [M]'s [parse_zone(selected_zone)] with [close_tool] and removes [I].", \
"You close [M]'s [parse_zone(selected_zone)] with [close_tool] and remove [I].")
diff --git a/code/modules/surgery/tools.dm b/code/modules/surgery/tools.dm
index 869616841b2..611f4f8f1cb 100644
--- a/code/modules/surgery/tools.dm
+++ b/code/modules/surgery/tools.dm
@@ -113,6 +113,7 @@
sharpness = IS_SHARP_ACCURATE
tool_behaviour = TOOL_SCALPEL
toolspeed = 1
+ bare_wound_bonus = 20
/obj/item/scalpel/Initialize()
. = ..()
@@ -143,11 +144,13 @@
throwforce = 9
throw_speed = 2
throw_range = 5
- custom_materials = list(/datum/material/iron=10000, /datum/material/glass=6000)
+ custom_materials = list(/datum/material/iron=1000)
attack_verb = list("attacked", "slashed", "sawed", "cut")
sharpness = IS_SHARP
tool_behaviour = TOOL_SAW
toolspeed = 1
+ wound_bonus = 10
+ bare_wound_bonus = 15
/obj/item/circular_saw/Initialize()
. = ..()
@@ -400,3 +403,17 @@
limb_snip_candidate.dismember()
user.visible_message("[src] violently slams shut, amputating [patient]'s [candidate_name].", "You amputate [patient]'s [candidate_name] with [src].")
+/obj/item/bonesetter
+ name = "bonesetter"
+ desc = "For setting things right."
+ icon = 'icons/obj/surgery.dmi'
+ icon_state = "bone setter"
+ lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
+ righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
+ custom_materials = list(/datum/material/iron=5000, /datum/material/glass=2500)
+ flags_1 = CONDUCT_1
+ item_flags = SURGICAL_TOOL
+ w_class = WEIGHT_CLASS_SMALL
+ attack_verb = list("corrected", "properly set")
+ tool_behaviour = TOOL_BONESET
+ toolspeed = 1
diff --git a/code/modules/vending/_vending.dm b/code/modules/vending/_vending.dm
index aac9725fa86..f48e3decb07 100644
--- a/code/modules/vending/_vending.dm
+++ b/code/modules/vending/_vending.dm
@@ -494,7 +494,7 @@ GLOBAL_LIST_EMPTY(vending_products)
var/crit_case
if(crit)
- crit_case = rand(1,5)
+ crit_case = rand(1,6)
if(forcecrit)
crit_case = forcecrit
@@ -507,7 +507,7 @@ GLOBAL_LIST_EMPTY(vending_products)
if(istype(C))
var/crit_rebate = 0 // lessen the normal damage we deal for some of the crits
- if(crit_case != 5) // the head asplode case has its own description
+ if(crit_case < 5) // the body/head asplode case has its own description
C.visible_message("[C] is crushed by [src]!", \
"You are crushed by [src]!")
@@ -517,10 +517,10 @@ GLOBAL_LIST_EMPTY(vending_products)
C.bleed(150)
var/obj/item/bodypart/l_leg/l = C.get_bodypart(BODY_ZONE_L_LEG)
if(l)
- l.receive_damage(brute=200, updating_health=TRUE)
+ l.receive_damage(brute=200)
var/obj/item/bodypart/r_leg/r = C.get_bodypart(BODY_ZONE_R_LEG)
if(r)
- r.receive_damage(brute=200, updating_health=TRUE)
+ r.receive_damage(brute=200)
if(l || r)
C.visible_message("[C]'s legs shatter with a sickening crunch!", \
"Your legs shatter with a sickening crunch!")
@@ -542,7 +542,18 @@ GLOBAL_LIST_EMPTY(vending_products)
// the new paraplegic gets like 4 lines of losing their legs so skip them
visible_message("[C]'s spinal cord is obliterated with a sickening crunch!", ignored_mobs = list(C))
C.gain_trauma(/datum/brain_trauma/severe/paralysis/paraplegic)
- if(5) // skull squish!
+ if(5) // limb squish!
+ for(var/i in C.bodyparts)
+ var/obj/item/bodypart/squish_part = i
+ if(squish_part.is_organic_limb())
+ //var/type_wound = pick(WOUND_LIST_BONE)
+ var/type_wound = pick(list(/datum/wound/brute/bone/critical, /datum/wound/brute/bone/severe, /datum/wound/brute/bone/critical, /datum/wound/brute/bone/severe, /datum/wound/brute/bone/moderate))
+ squish_part.force_wound_upwards(type_wound)
+ else
+ squish_part.receive_damage(brute=30)
+ C.visible_message("[C]'s body is maimed underneath the mass of [src]!", \
+ "Your body is maimed underneath the mass of [src]!")
+ if(6) // skull squish!
var/obj/item/bodypart/head/O = C.get_bodypart(BODY_ZONE_HEAD)
if(O)
C.visible_message("[O] explodes in a shower of gore beneath [src]!", \
@@ -552,7 +563,11 @@ GLOBAL_LIST_EMPTY(vending_products)
qdel(O)
new /obj/effect/gibspawner/human/bodypartless(get_turf(C))
- C.apply_damage(max(0, squish_damage - crit_rebate), forced=TRUE, spread_damage=TRUE)
+ if(prob(30))
+ C.apply_damage(max(0, squish_damage - crit_rebate), forced=TRUE, spread_damage=TRUE) // the 30% chance to spread the damage means you escape breaking any bones
+ else
+ C.take_bodypart_damage((squish_damage - crit_rebate)*0.5, wound_bonus = 5) // otherwise, deal it to 2 random limbs (or the same one) which will likely shatter something
+ C.take_bodypart_damage((squish_damage - crit_rebate)*0.5, wound_bonus = 5)
C.AddElement(/datum/element/squish, 80 SECONDS)
else
L.visible_message("[L] is crushed by [src]!", \
diff --git a/code/modules/vending/medical.dm b/code/modules/vending/medical.dm
index d6a15a7f683..77786456c69 100644
--- a/code/modules/vending/medical.dm
+++ b/code/modules/vending/medical.dm
@@ -24,7 +24,12 @@
/obj/item/reagent_containers/syringe/antiviral = 6,
/obj/item/reagent_containers/medigel/libital = 2,
/obj/item/reagent_containers/medigel/aiuri = 2,
- /obj/item/reagent_containers/medigel/sterilizine = 1)
+ /obj/item/reagent_containers/medigel/sterilizine = 1,
+ /obj/item/stack/sticky_tape/surgical = 3,
+ /obj/item/healthanalyzer/wound = 4,
+ /obj/item/stack/medical/ointment = 2,
+ /obj/item/stack/medical/suture = 2,
+ /obj/item/stack/medical/bone_gel = 4)
contraband = list(/obj/item/reagent_containers/pill/tox = 3,
/obj/item/reagent_containers/pill/morphine = 4,
/obj/item/reagent_containers/pill/multiver = 6,
diff --git a/code/modules/vending/medical_wall.dm b/code/modules/vending/medical_wall.dm
index 706fde6295a..c8e3d2b52d6 100644
--- a/code/modules/vending/medical_wall.dm
+++ b/code/modules/vending/medical_wall.dm
@@ -10,7 +10,9 @@
/obj/item/reagent_containers/pill/multiver = 2,
/obj/item/reagent_containers/medigel/libital = 2,
/obj/item/reagent_containers/medigel/aiuri = 2,
- /obj/item/reagent_containers/medigel/sterilizine = 1)
+ /obj/item/reagent_containers/medigel/sterilizine = 1,
+ /obj/item/healthanalyzer/wound = 2,
+ /obj/item/stack/medical/bone_gel = 2)
contraband = list(/obj/item/reagent_containers/pill/tox = 2,
/obj/item/reagent_containers/pill/morphine = 2,
/obj/item/storage/box/gum/happiness = 1)
diff --git a/code/modules/vending/robotics.dm b/code/modules/vending/robotics.dm
index e8b377db3db..ce3b8b336f8 100644
--- a/code/modules/vending/robotics.dm
+++ b/code/modules/vending/robotics.dm
@@ -16,6 +16,7 @@
/obj/item/healthanalyzer = 3,
/obj/item/scalpel = 2,
/obj/item/circular_saw = 2,
+ /obj/item/bonesetter = 2,
/obj/item/tank/internals/anesthetic = 2,
/obj/item/clothing/mask/breath/medical = 5,
/obj/item/screwdriver = 5,
diff --git a/code/modules/zombie/items.dm b/code/modules/zombie/items.dm
index 6b46542020a..1c97853c466 100644
--- a/code/modules/zombie/items.dm
+++ b/code/modules/zombie/items.dm
@@ -12,6 +12,9 @@
var/icon_right = "bloodhand_right"
hitsound = 'sound/hallucinations/growl1.ogg'
force = 21 // Just enough to break airlocks with melee attacks
+ sharpness = IS_SHARP
+ wound_bonus = -30
+ bare_wound_bonus = 15
damtype = "brute"
/obj/item/zombie_hand/Initialize()
diff --git a/icons/obj/guns/energy.dmi b/icons/obj/guns/energy.dmi
index 24452d057f8..cf1ad37097e 100644
Binary files a/icons/obj/guns/energy.dmi and b/icons/obj/guns/energy.dmi differ
diff --git a/icons/obj/lighting.dmi b/icons/obj/lighting.dmi
index b1c69776188..aa4d4cf7ddc 100644
Binary files a/icons/obj/lighting.dmi and b/icons/obj/lighting.dmi differ
diff --git a/sound/effects/blood1.ogg b/sound/effects/blood1.ogg
new file mode 100644
index 00000000000..88c76eb9e34
Binary files /dev/null and b/sound/effects/blood1.ogg differ
diff --git a/sound/effects/blood2.ogg b/sound/effects/blood2.ogg
new file mode 100644
index 00000000000..0fb165108ab
Binary files /dev/null and b/sound/effects/blood2.ogg differ
diff --git a/sound/effects/blood3.ogg b/sound/effects/blood3.ogg
new file mode 100644
index 00000000000..f6024a5ff6a
Binary files /dev/null and b/sound/effects/blood3.ogg differ
diff --git a/sound/effects/butcher.ogg b/sound/effects/butcher.ogg
new file mode 100644
index 00000000000..2e4a0d2ddc7
Binary files /dev/null and b/sound/effects/butcher.ogg differ
diff --git a/sound/effects/crack1.ogg b/sound/effects/crack1.ogg
new file mode 100644
index 00000000000..aa3bf0ab014
Binary files /dev/null and b/sound/effects/crack1.ogg differ
diff --git a/sound/effects/crack2.ogg b/sound/effects/crack2.ogg
new file mode 100644
index 00000000000..cef226c98bd
Binary files /dev/null and b/sound/effects/crack2.ogg differ
diff --git a/sound/effects/dismember.ogg b/sound/effects/dismember.ogg
new file mode 100644
index 00000000000..f5015ad9615
Binary files /dev/null and b/sound/effects/dismember.ogg differ
diff --git a/sound/effects/sizzle1.ogg b/sound/effects/sizzle1.ogg
new file mode 100644
index 00000000000..4a3d2290181
Binary files /dev/null and b/sound/effects/sizzle1.ogg differ
diff --git a/sound/effects/sizzle2.ogg b/sound/effects/sizzle2.ogg
new file mode 100644
index 00000000000..409206e58a0
Binary files /dev/null and b/sound/effects/sizzle2.ogg differ
diff --git a/sound/weapons/guillotine.ogg b/sound/weapons/guillotine.ogg
new file mode 100644
index 00000000000..f2647b43e34
Binary files /dev/null and b/sound/weapons/guillotine.ogg differ
diff --git a/strings/tips.txt b/strings/tips.txt
index f2a2fb70e96..ef245d31183 100644
--- a/strings/tips.txt
+++ b/strings/tips.txt
@@ -252,3 +252,9 @@ You can light a cigar on a supermatter crystal.
Using sticky tape on items can make them stick to people and walls! Be careful, grenades might stick to your hand during the moment of truth!
In a pinch, stripping yourself naked will give you a sizeable resistance to being tackled. What do you value more, your freedom or your dignity?
Wearing riot armor makes you significantly more effective at performing tackle takedowns, but will use extra stamina with each leap! It will also significantly protect you from other tackles!
+As a Changeling, your Regenerate Limbs power will quickly heal all of your wounds, but they'll still leave scars. Changelings can use Fleshmend to get rid of scars, or you can ingest Carpotoxin to get rid of them like a normal person.
+Stasis beds halt ALL passive life functions, including regeneration. If your patient isn't responding to treatment, especially with cut or burn wounds, try unbuckling them!
+Epipens contain a powerful coagulant that drastically reduces bleeding on all open cuts. If you don't have time to properly treat someone with lots of cuts, stick them with a pen to buy some time!
+If a patient has an absurd amount of wounds, putting them in cryo will slowly treat all of their wounds simultaneously.
+Anything you can light a cigarette with, you can use to cauterize a bleeding wound. Technically, that includes the supermatter.
+Moderate and Severe cuts will slowly clot by themselves and don't require immediate attention on their own. Critical cuts will actively get worse with time, and are an immediate threat to the patient's life.
diff --git a/tgstation.dme b/tgstation.dme
index a5b9ca3cabe..1ea4d7f468a 100644
--- a/tgstation.dme
+++ b/tgstation.dme
@@ -113,6 +113,7 @@
#include "code\__DEFINES\vv.dm"
#include "code\__DEFINES\wall_dents.dm"
#include "code\__DEFINES\wires.dm"
+#include "code\__DEFINES\wounds.dm"
#include "code\__DEFINES\dcs\flags.dm"
#include "code\__DEFINES\dcs\helpers.dm"
#include "code\__DEFINES\dcs\signals.dm"
@@ -615,6 +616,7 @@
#include "code\datums\status_effects\gas.dm"
#include "code\datums\status_effects\neutral.dm"
#include "code\datums\status_effects\status_effect.dm"
+#include "code\datums\status_effects\wound_effects.dm"
#include "code\datums\traits\_quirk.dm"
#include "code\datums\traits\good.dm"
#include "code\datums\traits\negative.dm"
@@ -643,6 +645,11 @@
#include "code\datums\wires\syndicatebomb.dm"
#include "code\datums\wires\tesla_coil.dm"
#include "code\datums\wires\vending.dm"
+#include "code\datums\wounds\_wounds.dm"
+#include "code\datums\wounds\bones.dm"
+#include "code\datums\wounds\burns.dm"
+#include "code\datums\wounds\cuts.dm"
+#include "code\datums\wounds\scars\_scars.dm"
#include "code\game\alternate_appearance.dm"
#include "code\game\atoms.dm"
#include "code\game\atoms_movable.dm"
@@ -2954,7 +2961,9 @@
#include "code\modules\station_goals\shield.dm"
#include "code\modules\station_goals\station_goal.dm"
#include "code\modules\surgery\amputation.dm"
+#include "code\modules\surgery\bone_mending.dm"
#include "code\modules\surgery\brain_surgery.dm"
+#include "code\modules\surgery\burn_dressing.dm"
#include "code\modules\surgery\cavity_implant.dm"
#include "code\modules\surgery\core_removal.dm"
#include "code\modules\surgery\coronary_bypass.dm"
@@ -2995,10 +3004,11 @@
#include "code\modules\surgery\advanced\bioware\nerve_grounding.dm"
#include "code\modules\surgery\advanced\bioware\nerve_splicing.dm"
#include "code\modules\surgery\advanced\bioware\vein_threading.dm"
-#include "code\modules\surgery\bodyparts\bodyparts.dm"
+#include "code\modules\surgery\bodyparts\_bodyparts.dm"
#include "code\modules\surgery\bodyparts\dismemberment.dm"
#include "code\modules\surgery\bodyparts\head.dm"
#include "code\modules\surgery\bodyparts\helpers.dm"
+#include "code\modules\surgery\bodyparts\parts.dm"
#include "code\modules\surgery\bodyparts\robot_bodyparts.dm"
#include "code\modules\surgery\organs\appendix.dm"
#include "code\modules\surgery\organs\augments_arms.dm"