diff --git a/code/__DEFINES/wounds.dm b/code/__DEFINES/wounds.dm index 0d49159ad94..8469dfc058a 100644 --- a/code/__DEFINES/wounds.dm +++ b/code/__DEFINES/wounds.dm @@ -164,3 +164,6 @@ GLOBAL_LIST_INIT(global_all_wound_types, list(/datum/wound/blunt/critical, /datu /// How often can we annoy the player about their bleeding? This duration is extended if it's not serious bleeding #define BLEEDING_MESSAGE_BASE_CD 10 SECONDS + +/// Skeletons and other BIO_ONLY_BONE creatures respond much better to bone gel and can have severe and critical bone wounds healed by bone gel alone. The duration it takes to heal is also multiplied by this, lucky them! +#define WOUND_BONE_BIO_BONE_GEL_MULT 0.25 diff --git a/code/datums/status_effects/wound_effects.dm b/code/datums/status_effects/wound_effects.dm index 07fd641114f..01cd7a3da62 100644 --- a/code/datums/status_effects/wound_effects.dm +++ b/code/datums/status_effects/wound_effects.dm @@ -27,7 +27,7 @@ /datum/status_effect/limp id = "limp" status_type = STATUS_EFFECT_REPLACE - tick_interval = 10 + tick_interval = 0 alert_type = /atom/movable/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 @@ -40,6 +40,10 @@ var/slowdown_left = 0 /// How many deciseconds we limp for on the right leg var/slowdown_right = 0 + /// The chance we limp with the left leg each step it takes + var/limp_chance_left = 0 + /// The chance we limp with the right leg each step it takes + var/limp_chance_right = 0 /datum/status_effect/limp/on_apply() if(!iscarbon(owner)) @@ -64,14 +68,17 @@ if(!owner.client || owner.body_position == LYING_DOWN || !owner.has_gravity() || (owner.movement_type & FLYING) || forced || owner.buckled) return + // less limping while we have determination still - var/determined_mod = owner.has_status_effect(STATUS_EFFECT_DETERMINED) ? 0.25 : 1 + var/determined_mod = owner.has_status_effect(STATUS_EFFECT_DETERMINED) ? 0.5 : 1 if(next_leg == left) - owner.client.move_delay += slowdown_left * determined_mod + if(prob(limp_chance_left * determined_mod)) + owner.client.move_delay += slowdown_left * determined_mod next_leg = right else - owner.client.move_delay += slowdown_right * determined_mod + if(prob(limp_chance_right * determined_mod)) + owner.client.move_delay += slowdown_right * determined_mod next_leg = left /datum/status_effect/limp/proc/update_limp() @@ -87,16 +94,21 @@ slowdown_left = 0 slowdown_right = 0 + limp_chance_left = 0 + limp_chance_right = 0 + // technically you can have multiple wounds causing limps on the same limb, even if practically only bone wounds cause it in normal gameplay if(left) for(var/thing in left.wounds) var/datum/wound/W = thing slowdown_left += W.limp_slowdown + limp_chance_left = max(limp_chance_left, W.limp_chance) if(right) for(var/thing in right.wounds) var/datum/wound/W = thing slowdown_right += W.limp_slowdown + limp_chance_right = max(limp_chance_right, W.limp_chance) // this handles losing your leg with the limp and the other one being in good shape as well if(!slowdown_left && !slowdown_right) diff --git a/code/datums/wounds/_wounds.dm b/code/datums/wounds/_wounds.dm index d2aa5d82f87..46a7ba2e0fa 100644 --- a/code/datums/wounds/_wounds.dm +++ b/code/datums/wounds/_wounds.dm @@ -58,6 +58,8 @@ 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 + /// If this wound has a limp_slowdown and is applied to a leg, it has this chance to limp each step + var/limp_chance /// How much we're contributing to this limb's bleed_rate var/blood_flow diff --git a/code/datums/wounds/bones.dm b/code/datums/wounds/bones.dm index e47dd497016..5cbe1f553f2 100644 --- a/code/datums/wounds/bones.dm +++ b/code/datums/wounds/bones.dm @@ -12,10 +12,10 @@ wound_type = WOUND_BLUNT wound_flags = (BONE_WOUND | ACCEPTS_GAUZE) - /// Have we been taped? - var/taped /// Have we been bone gel'd? var/gelled + /// Have we been taped? + var/taped /// If we did the gel + surgical tape healing method for fractures, how many ticks does it take to heal by default var/regen_ticks_needed /// Our current counter for gel + surgical tape regeneration @@ -56,6 +56,7 @@ /datum/wound/blunt/remove_wound(ignore_limb, replaced) limp_slowdown = 0 + limp_chance = 0 QDEL_NULL(active_trauma) if(limb) UnregisterSignal(limb, list(COMSIG_BODYPART_GAUZED, COMSIG_BODYPART_GAUZE_DESTROYED)) @@ -72,17 +73,18 @@ 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(!gelled || !taped) + var/is_bone_creature = victim.get_biological_state() == BIO_JUST_BONE + if(!gelled || (!taped && !is_bone_creature)) return regen_ticks_current++ if(victim.body_position == LYING_DOWN) if(DT_PROB(30, delta_time)) - regen_ticks_current += 0.5 + regen_ticks_current += 1 if(victim.IsSleeping() && DT_PROB(30, delta_time)) - regen_ticks_current += 0.5 + regen_ticks_current += 1 - if(DT_PROB(severity * 1.5, delta_time)) + if(!is_bone_creature && DT_PROB(severity * 1.5, delta_time)) victim.take_bodypart_damage(rand(1, severity * 2), stamina=rand(2, severity * 2.5), wound_bonus=CANT_WOUND) if(prob(33)) to_chat(victim, span_danger("You feel a sharp pain in your body as your bones are reforming!")) @@ -91,7 +93,7 @@ if(!victim || !limb) qdel(src) return - to_chat(victim, span_green("Your [limb.name] has recovered from your fracture!")) + to_chat(victim, span_green("Your [limb.name] has recovered from its [name]!")) remove_wound() /// If we're a human who's punching something with a broken arm, we might hurt ourselves doing so @@ -179,17 +181,20 @@ /datum/wound/blunt/proc/update_inefficiencies() SIGNAL_HANDLER + if(limb.body_zone in list(BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)) - if(limb.current_gauze) + if(limb.current_gauze?.splint_factor) limp_slowdown = initial(limp_slowdown) * limb.current_gauze.splint_factor + limp_chance = initial(limp_chance) * limb.current_gauze.splint_factor else limp_slowdown = initial(limp_slowdown) + limp_chance = initial(limp_chance) victim.apply_status_effect(STATUS_EFFECT_LIMP) else if(limb.body_zone in list(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM)) - if(limb.current_gauze) + if(limb.current_gauze?.splint_factor) interaction_efficiency_penalty = 1 + ((interaction_efficiency_penalty - 1) * limb.current_gauze.splint_factor) else - interaction_efficiency_penalty = interaction_efficiency_penalty + interaction_efficiency_penalty = initial(interaction_efficiency_penalty) if(initial(disabling)) set_disabling(!limb.current_gauze) @@ -201,12 +206,13 @@ 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" + examine_desc = "is awkwardly janked out of place" + occur_text = "janks 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 + interaction_efficiency_penalty = 1.3 limp_slowdown = 3 + limp_chance = 50 threshold_minimum = 35 threshold_penalty = 15 treatable_tool = TOOL_BONESET @@ -226,7 +232,7 @@ /// Getting smushed in an airlock/firelock is a last-ditch attempt to try relocating your limb /datum/wound/blunt/moderate/proc/door_crush() SIGNAL_HANDLER - if(prob(33)) + if(prob(40)) victim.visible_message(span_danger("[victim]'s dislocated [limb.name] pops back into place!"), span_userdanger("Your dislocated [limb.name] pops back into place! Ow!")) remove_wound() @@ -313,12 +319,13 @@ 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 a sling of medical gauze will prevent worsening situation." - examine_desc = "appears grotesquely swollen, its attachment weakened" + examine_desc = "appears grotesquely swollen, jagged bumps hinting at chips in the bone" occur_text = "sprays chips of bone and develops a nasty looking bruise" severity = WOUND_SEVERITY_SEVERE interaction_efficiency_penalty = 2 limp_slowdown = 6 + limp_chance = 60 threshold_minimum = 60 threshold_penalty = 30 treatable_by = list(/obj/item/stack/sticky_tape/surgical, /obj/item/stack/medical/bone_gel) @@ -335,12 +342,13 @@ 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 = "is mangled and pulped, seemingly held together by tissue alone" + examine_desc = "is thoroughly pulped and cracked, exposing shards of bone to open air" occur_text = "cracks apart, exposing broken bones to open air" severity = WOUND_SEVERITY_CRITICAL - interaction_efficiency_penalty = 4 - limp_slowdown = 9 + interaction_efficiency_penalty = 2.5 + limp_slowdown = 7 + limp_chance = 70 sound_effect = 'sound/effects/wounds/crack2.ogg' threshold_minimum = 115 threshold_penalty = 50 @@ -363,6 +371,11 @@ /// if someone is using bone gel on our wound /datum/wound/blunt/proc/gel(obj/item/stack/medical/bone_gel/I, mob/user) + // skellies get treated nicer with bone gel since their "reattach dismembered limbs by hand" ability sucks when it's still critically wounded + if(victim.get_biological_state() == BIO_JUST_BONE) + skelly_gel(I, user) + return + if(gelled) to_chat(user, span_warning("[user == victim ? "Your" : "[victim]'s"] [limb.name] is already coated with bone gel!")) return @@ -386,7 +399,7 @@ if(victim.reagents.has_reagent(/datum/reagent/determination)) painkiller_bonus += 10 if(victim.reagents.has_reagent(/datum/reagent/consumable/ethanol/painkiller)) - painkiller_bonus += 5 + painkiller_bonus += 15 if(victim.reagents.has_reagent(/datum/reagent/medicine/mine_salve)) painkiller_bonus += 20 @@ -397,8 +410,31 @@ victim.visible_message(span_notice("[victim] finishes applying [I] to [victim.p_their()] [limb.name], grimacing from the pain!"), span_notice("You finish applying [I] to your [limb.name], and your bones explode in pain!")) limb.receive_damage(25, stamina=100, wound_bonus=CANT_WOUND) - if(!gelled) - gelled = TRUE + gelled = TRUE + +/// skellies are less averse to bone gel, since they're literally all bone +/datum/wound/blunt/proc/skelly_gel(obj/item/stack/medical/bone_gel/I, mob/user) + if(victim.get_biological_state() != BIO_JUST_BONE) + return // poser + + if(gelled) + to_chat(user, span_warning("[user == victim ? "Your" : "[victim]'s"] [limb.name] is already coated with bone gel!")) + return + + user.visible_message(span_danger("[user] begins applying [I] to [victim]'s' [limb.name]..."), span_warning("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 + + I.use(1) + if(user != victim) + user.visible_message(span_notice("[user] finishes applying [I] to [victim]'s [limb.name], emitting a fizzing noise!"), span_notice("You finish applying [I] to [victim]'s [limb.name]!"), ignored_mobs=victim) + to_chat(victim, span_userdanger("[user] finishes applying [I] to your [limb.name], and you feel a funny fizzy tickling as they begin to reform!")) + else + victim.visible_message(span_notice("[victim] finishes applying [I] to [victim.p_their()] [limb.name], emitting a funny fizzing sound!"), span_notice("You finish applying [I] to your [limb.name], and feel a funny fizzy tickling as the bone begins to reform!")) + + gelled = TRUE + processes = TRUE /// if someone is using surgical tape on our wound /datum/wound/blunt/proc/tape(obj/item/stack/sticky_tape/surgical/I, mob/user) @@ -438,12 +474,19 @@ . += "
" - 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) - . += "[span_notice("Continue Alternative Treatment: Apply surgical tape directly to injured limb to begin bone regeneration. Note, this is both excruciatingly painful and slow, though sleep or laying down will speed recovery.")]\n" - else - . += "[span_notice("Note: Bone regeneration in effect. Bone is [round(regen_ticks_current*100/regen_ticks_needed)]% regenerated.")]\n" + if(severity > WOUND_SEVERITY_MODERATE) + if(victim.get_biological_state() == BIO_JUST_BONE) + if(!gelled) + . += "Recommended Treatment: Apply bone gel directly to injured limb. Creatures of pure bone don't seem to mind bone gel application nearly as much as fleshed individuals. Surgical tape will also be unnecessary.\n" + else + . += "[span_notice("Note: Bone regeneration in effect. Bone is [round(regen_ticks_current*100/regen_ticks_needed)]% regenerated.")]\n" + else + 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) + . += "[span_notice("Continue Alternative Treatment: Apply surgical tape directly to injured limb to begin bone regeneration. Note, this is both excruciatingly painful and slow, though sleep or laying down will speed recovery.")]\n" + else + . += "[span_notice("Note: Bone regeneration in effect. Bone is [round(regen_ticks_current*100/regen_ticks_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." diff --git a/code/datums/wounds/burns.dm b/code/datums/wounds/burns.dm index 89cf1511ec2..a0bb3a56598 100644 --- a/code/datums/wounds/burns.dm +++ b/code/datums/wounds/burns.dm @@ -55,7 +55,7 @@ limb.seep_gauze(WOUND_BURN_SANITIZATION_RATE * delta_time) if(flesh_healing > 0) // good bandages multiply the length of flesh healing - var/bandage_factor = (limb.current_gauze ? limb.current_gauze.splint_factor : 1) + var/bandage_factor = limb.current_gauze?.burn_cleanliness_bonus || 1 flesh_damage = max(flesh_damage - (0.5 * delta_time), 0) flesh_healing = max(flesh_healing - (0.5 * bandage_factor * delta_time), 0) // good bandages multiply the length of flesh healing @@ -71,7 +71,7 @@ // sanitization is checked after the clearing check but before the actual ill-effects, because we freeze the effects of infection while we have sanitization if(sanitization > 0) - var/bandage_factor = (limb.current_gauze ? limb.current_gauze.splint_factor : 1) + var/bandage_factor = limb.current_gauze?.burn_cleanliness_bonus || 1 infestation = max(infestation - (WOUND_BURN_SANITIZATION_RATE * delta_time), 0) sanitization = max(sanitization - (WOUND_BURN_SANITIZATION_RATE * bandage_factor * delta_time), 0) return diff --git a/code/datums/wounds/pierce.dm b/code/datums/wounds/pierce.dm index c84c45a8633..aeb015f41cd 100644 --- a/code/datums/wounds/pierce.dm +++ b/code/datums/wounds/pierce.dm @@ -32,7 +32,7 @@ if(victim.stat == DEAD || wounding_dmg < 5) return if(victim.blood_volume && prob(internal_bleeding_chance + wounding_dmg)) - if(limb.current_gauze && limb.current_gauze.splint_factor) + if(limb.current_gauze?.splint_factor) wounding_dmg *= (1 - limb.current_gauze.splint_factor) var/blood_bled = rand(1, wounding_dmg * internal_bleeding_coefficient) // 12 brute toolbox can cause up to 15/18/21 bloodloss on mod/sev/crit switch(blood_bled) diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index 518a992caed..7842e89162b 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -132,7 +132,8 @@ custom_price = PAYCHECK_ASSISTANT * 2 absorption_rate = 0.125 absorption_capacity = 5 - splint_factor = 0.35 + splint_factor = 0.7 + burn_cleanliness_bonus = 0.35 merge_type = /obj/item/stack/medical/gauze var/gauze_type = /datum/bodypart_aid/gauze //SKYRAT EDIT ADDITION - MEDICAL @@ -200,6 +201,8 @@ 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 = 6 SECONDS other_delay = 3 SECONDS + splint_factor = 0.85 + burn_cleanliness_bonus = 0.7 absorption_rate = 0.075 absorption_capacity = 4 merge_type = /obj/item/stack/medical/gauze/improvised diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index c25435e2dcc..c3bcb3dfc15 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -33,6 +33,8 @@ // 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 + /// Like splint_factor but for burns instead of bone wounds. This is a multiplier used to speed up burn recoveries + var/burn_cleanliness_bonus /// 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 seconds is thus absorption_capacity/absorption_rate, or until the cut heals, whichever comes first diff --git a/code/game/objects/items/stacks/tape.dm b/code/game/objects/items/stacks/tape.dm index 5e34b1accd4..0a131668b4c 100644 --- a/code/game/objects/items/stacks/tape.dm +++ b/code/game/objects/items/stacks/tape.dm @@ -12,7 +12,7 @@ max_amount = 5 resistance_flags = FLAMMABLE grind_results = list(/datum/reagent/cellulose = 5) - splint_factor = 0.8 + splint_factor = 0.65 merge_type = /obj/item/stack/sticky_tape var/list/conferred_embed = EMBED_HARMLESS @@ -75,7 +75,7 @@ icon_state = "tape_y" prefix = "super sticky" conferred_embed = EMBED_HARMLESS_SUPERIOR - splint_factor = 0.6 + splint_factor = 0.4 merge_type = /obj/item/stack/sticky_tape/super /obj/item/stack/sticky_tape/pointy @@ -103,6 +103,6 @@ //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 + splint_factor = 0.5 custom_price = PAYCHECK_MEDIUM merge_type = /obj/item/stack/sticky_tape/surgical diff --git a/code/modules/surgery/bodyparts/_bodyparts.dm b/code/modules/surgery/bodyparts/_bodyparts.dm index e3ad9a19888..0609652ff21 100644 --- a/code/modules/surgery/bodyparts/_bodyparts.dm +++ b/code/modules/surgery/bodyparts/_bodyparts.dm @@ -1006,7 +1006,7 @@ /* if(!LAZYLEN(wounds) && current_gauze && !replaced) // no more wounds = no need for the gauze anymore - owner.visible_message(span_notice("\The [current_gauze] on [owner]'s [name] falls away."), span_notice("The [current_gauze] on your [name] falls away.")) + owner.visible_message(span_notice("\The [current_gauze.name] on [owner]'s [name] falls away."), span_notice("The [current_gauze.name] on your [name] falls away.")) QDEL_NULL(current_gauze) */ @@ -1082,7 +1082,7 @@ return current_gauze.absorption_capacity -= seep_amt if(current_gauze.absorption_capacity <= 0) - owner.visible_message(span_danger("\The [current_gauze] on [owner]'s [name] falls away in rags."), span_warning("\The [current_gauze] on your [name] falls away in rags."), vision_distance=COMBAT_MESSAGE_RANGE) + owner.visible_message(span_danger("\The [current_gauze.name] on [owner]'s [name] falls away in rags."), span_warning("\The [current_gauze.name] on your [name] falls away in rags."), vision_distance=COMBAT_MESSAGE_RANGE) QDEL_NULL(current_gauze) SEND_SIGNAL(src, COMSIG_BODYPART_GAUZE_DESTROYED) */