mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-13 09:05:11 +01:00
Merge remote-tracking branch 'tgstation/master' into upstream-2025-11-29
# Conflicts: # _maps/RandomRuins/SpaceRuins/derelict_sulaco.dmm # _maps/RandomRuins/SpaceRuins/garbagetruck2.dmm # _maps/map_files/CatwalkStation/CatwalkStation_2023.dmm # _maps/map_files/tramstation/tramstation.dmm # code/_onclick/hud/new_player.dm # code/datums/components/squashable.dm # code/datums/diseases/advance/symptoms/heal.dm # code/datums/diseases/chronic_illness.dm # code/datums/status_effects/buffs.dm # code/datums/status_effects/debuffs/drunk.dm # code/datums/status_effects/debuffs/stamcrit.dm # code/game/machinery/computer/crew.dm # code/game/objects/items/devices/scanners/health_analyzer.dm # code/game/objects/items/wall_mounted.dm # code/game/turfs/closed/indestructible.dm # code/modules/admin/view_variables/filterrific.dm # code/modules/antagonists/heretic/influences.dm # code/modules/cargo/orderconsole.dm # code/modules/client/preferences.dm # code/modules/events/space_vines/vine_mutations.dm # code/modules/mob/dead/new_player/new_player.dm # code/modules/mob/living/carbon/human/death.dm # code/modules/mob/living/carbon/human/species_types/jellypeople.dm # code/modules/mob/living/damage_procs.dm # code/modules/mob/living/living.dm # code/modules/mob_spawn/ghost_roles/mining_roles.dm # code/modules/mob_spawn/mob_spawn.dm # code/modules/projectiles/ammunition/energy/laser.dm # code/modules/projectiles/guns/ballistic/launchers.dm # code/modules/projectiles/guns/energy/laser.dm # code/modules/reagents/chemistry/machinery/chem_dispenser.dm # code/modules/reagents/chemistry/reagents/cat2_medicine_reagents.dm # code/modules/reagents/chemistry/reagents/drinks/alcohol_reagents.dm # code/modules/reagents/chemistry/reagents/medicine_reagents.dm # code/modules/surgery/healing.dm # code/modules/unit_tests/designs.dm # icons/mob/inhands/items_lefthand.dmi # icons/mob/inhands/items_righthand.dmi # tgui/packages/tgui/interfaces/ChemDispenser.tsx
This commit is contained in:
@@ -63,8 +63,6 @@
|
||||
|
||||
/// 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
|
||||
/// Any tools with any of the flags in this list will be usable to try directly treating this wound
|
||||
var/list/treatable_tools
|
||||
/// How long it will take to treat this wound with a standard effective tool, assuming it doesn't need surgery
|
||||
@@ -269,6 +267,7 @@
|
||||
UnregisterSignal(victim, COMSIG_QDELETING)
|
||||
UnregisterSignal(victim, COMSIG_MOB_SWAP_HANDS)
|
||||
UnregisterSignal(victim, COMSIG_CARBON_POST_REMOVE_LIMB)
|
||||
UnregisterSignal(victim, COMSIG_ATOM_ITEM_INTERACTION)
|
||||
if (actionspeed_mod)
|
||||
victim.remove_actionspeed_modifier(actionspeed_mod) // no need to qdelete it, just remove it from our victim
|
||||
|
||||
@@ -277,7 +276,7 @@
|
||||
if(victim)
|
||||
RegisterSignal(victim, COMSIG_QDELETING, PROC_REF(null_victim))
|
||||
RegisterSignals(victim, list(COMSIG_MOB_SWAP_HANDS, COMSIG_CARBON_POST_REMOVE_LIMB, COMSIG_CARBON_POST_ATTACH_LIMB), PROC_REF(add_or_remove_actionspeed_mod))
|
||||
|
||||
RegisterSignal(victim, COMSIG_ATOM_ITEM_INTERACTION, PROC_REF(interact_try_treating))
|
||||
if (limb)
|
||||
start_limping_if_we_should() // the status effect already handles removing itself
|
||||
add_or_remove_actionspeed_mod()
|
||||
@@ -459,69 +458,90 @@
|
||||
if(WOUND_SEVERITY_LOSS)
|
||||
victim.reagents.add_reagent(/datum/reagent/determination, WOUND_DETERMINATION_LOSS)
|
||||
|
||||
/datum/wound/proc/interact_try_treating(datum/source, mob/living/user, obj/item/tool, ...)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
return try_treating(tool, user)
|
||||
|
||||
/**
|
||||
* try_treating() is an intercept run from [/mob/living/carbon/proc/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.
|
||||
* Attempt to treat the wound with the given item/tool by the given user
|
||||
* This proc leads into [/datum/wound/proc/treat]
|
||||
*
|
||||
* 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().
|
||||
* 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)
|
||||
return FALSE
|
||||
/datum/wound/proc/try_treating(obj/item/tool, mob/living/user)
|
||||
SHOULD_NOT_OVERRIDE(TRUE)
|
||||
|
||||
if(isliving(user))
|
||||
var/mob/living/tendee = user
|
||||
if(I.force && tendee.combat_mode)
|
||||
return FALSE
|
||||
if(limb.body_zone != user.zone_selected)
|
||||
return NONE
|
||||
|
||||
if(!item_can_treat(I, user))
|
||||
return FALSE
|
||||
if(user.combat_mode && tool.force)
|
||||
return NONE
|
||||
|
||||
// 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 or if their part is obscured
|
||||
if(!item_can_treat(tool, user))
|
||||
return NONE
|
||||
|
||||
// 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 or if their part is obscured
|
||||
if(DOING_INTERACTION_WITH_TARGET(user, victim))
|
||||
to_chat(user, span_warning("You're already interacting with [victim]!"))
|
||||
return TRUE
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
|
||||
// next we check if the bodypart in actually accessible (not under thick clothing). We skip the species trait check since skellies
|
||||
// & such may need to use bone gel but may be wearing a space suit for..... whatever reason a skeleton would wear a space suit for
|
||||
if(ishuman(victim))
|
||||
var/mob/living/carbon/human/victim_human = victim
|
||||
if(!victim_human.try_inject(user, injection_flags = INJECT_CHECK_IGNORE_SPECIES | INJECT_TRY_SHOW_ERROR_MESSAGE))
|
||||
return TRUE
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
|
||||
// lastly, treat them
|
||||
return treat(I, user) // we allow treat to return a value so it can control if the item does its normal interaction or not
|
||||
INVOKE_ASYNC(src, PROC_REF(treat), tool, user)
|
||||
return ITEM_INTERACT_SUCCESS
|
||||
|
||||
/// Returns TRUE if the item can be used to treat our wounds. Hooks into treat() - only things that return TRUE here may be used there.
|
||||
/datum/wound/proc/item_can_treat(obj/item/potential_treater, mob/user)
|
||||
// surgeries take priority
|
||||
for(var/datum/surgery/operation as anything in victim.surgeries)
|
||||
if(isnull(operation.operated_bodypart) || operation.operated_bodypart != limb)
|
||||
continue
|
||||
var/datum/surgery_step/next_step = operation.get_surgery_next_step()
|
||||
if(isnull(next_step))
|
||||
continue
|
||||
if(potential_treater.tool_behaviour in next_step.implements)
|
||||
return FALSE
|
||||
if(is_type_in_list(potential_treater, next_step.implements))
|
||||
return FALSE
|
||||
|
||||
// check if we have a valid treatable tool
|
||||
if(potential_treater.tool_behaviour in treatable_tools)
|
||||
return TRUE
|
||||
if((TOOL_CAUTERY in treatable_tools) && potential_treater.get_temperature() && (user == victim)) // allow improvised cauterization on yourself without an aggro grab
|
||||
return TRUE
|
||||
// failing that, see if we're aggro grabbing them and if we have an item that works for aggro grabs only
|
||||
if(user.pulling == victim && user.grab_state >= GRAB_AGGRESSIVE && check_grab_treatments(potential_treater, user))
|
||||
if((user == victim || (user.pulling == victim && user.grab_state >= GRAB_AGGRESSIVE)) && check_grab_treatments(potential_treater, user))
|
||||
return TRUE
|
||||
// failing THAT, we check if we have a generally allowed item
|
||||
for(var/allowed_type in treatable_by)
|
||||
if(istype(potential_treater, allowed_type))
|
||||
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)
|
||||
if(is_type_in_list(potential_treater, treatable_by))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/// Like try_treating() but for unhanded interactions, used by joint dislocations for manual bodypart chiropractice for example. Ignores thick material checks since you can pop an arm into place through a thick suit unlike using sutures
|
||||
/// 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/tool, mob/user)
|
||||
return FALSE
|
||||
|
||||
/// Like try_treating() but for unhanded interactions, used by joint dislocations for manual bodypart chiropractice for example.
|
||||
/// Ignores thick material checks since you can pop an arm into place through a thick suit unlike using sutures
|
||||
/datum/wound/proc/try_handling(mob/living/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)
|
||||
/datum/wound/proc/treat(obj/item/tool, mob/user)
|
||||
return
|
||||
|
||||
/// If var/processing is TRUE, this is run on each life tick
|
||||
|
||||
+12
-13
@@ -100,7 +100,7 @@
|
||||
|
||||
if(!is_bone_limb && SPT_PROB(severity * 1.5, seconds_per_tick))
|
||||
victim.take_bodypart_damage(rand(1, severity * 2), wound_bonus=CANT_WOUND)
|
||||
victim.adjustStaminaLoss(rand(2, severity * 2.5))
|
||||
victim.adjust_stamina_loss(rand(2, severity * 2.5))
|
||||
if(prob(33))
|
||||
to_chat(victim, span_danger("You feel a sharp pain in your body as your bones are reforming!"))
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
if(!victim || wounding_dmg < WOUND_MINIMUM_DAMAGE || !victim.can_bleed())
|
||||
return
|
||||
|
||||
if(limb.body_zone == BODY_ZONE_CHEST && victim.blood_volume && prob(internal_bleeding_chance + wounding_dmg))
|
||||
if(limb.body_zone == BODY_ZONE_CHEST && victim.get_blood_volume() && prob(internal_bleeding_chance + 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)
|
||||
@@ -337,19 +337,19 @@
|
||||
victim.apply_damage(10, BRUTE, limb, wound_bonus = CANT_WOUND)
|
||||
malpractice(user)
|
||||
|
||||
/datum/wound/blunt/bone/moderate/treat(obj/item/I, mob/user)
|
||||
/datum/wound/blunt/bone/moderate/treat(obj/item/tool, mob/user)
|
||||
var/scanned = HAS_TRAIT(src, TRAIT_WOUND_SCANNED)
|
||||
var/self_penalty_mult = user == victim ? 1.5 : 1
|
||||
var/scanned_mult = scanned ? 0.5 : 1
|
||||
var/treatment_delay = base_treat_time * self_penalty_mult * scanned_mult
|
||||
|
||||
if(victim == user)
|
||||
victim.visible_message(span_danger("[user] begins [scanned ? "expertly" : ""] resetting [victim.p_their()] [limb.plaintext_zone] with [I]."), span_warning("You begin resetting your [limb.plaintext_zone] with [I][scanned ? ", keeping the holo-image's indications in mind" : ""]..."))
|
||||
victim.visible_message(span_danger("[user] begins [scanned ? "expertly" : ""] resetting [victim.p_their()] [limb.plaintext_zone] with [tool]."), span_warning("You begin resetting your [limb.plaintext_zone] with [tool][scanned ? ", keeping the holo-image's indications in mind" : ""]..."))
|
||||
else
|
||||
user.visible_message(span_danger("[user] begins [scanned ? "expertly" : ""] resetting [victim]'s [limb.plaintext_zone] with [I]."), span_notice("You begin resetting [victim]'s [limb.plaintext_zone] with [I][scanned ? ", keeping the holo-image's indications in mind" : ""]..."))
|
||||
user.visible_message(span_danger("[user] begins [scanned ? "expertly" : ""] resetting [victim]'s [limb.plaintext_zone] with [tool]."), span_notice("You begin resetting [victim]'s [limb.plaintext_zone] with [tool][scanned ? ", keeping the holo-image's indications in mind" : ""]..."))
|
||||
|
||||
if(!do_after(user, treatment_delay, target = victim, extra_checks=CALLBACK(src, PROC_REF(still_exists))))
|
||||
return TRUE
|
||||
return
|
||||
|
||||
if(victim == user)
|
||||
victim.apply_damage(15, BRUTE, limb, wound_bonus = CANT_WOUND)
|
||||
@@ -361,7 +361,6 @@
|
||||
|
||||
victim.emote("scream")
|
||||
qdel(src)
|
||||
return TRUE
|
||||
|
||||
/*
|
||||
Severe (Hairline Fracture)
|
||||
@@ -532,11 +531,11 @@
|
||||
processes = TRUE
|
||||
return TRUE
|
||||
|
||||
/datum/wound/blunt/bone/treat(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/stack/medical/bone_gel))
|
||||
return gel(I, user)
|
||||
else if(istype(I, /obj/item/stack/sticky_tape/surgical))
|
||||
return tape(I, user)
|
||||
/datum/wound/blunt/bone/treat(obj/item/tool, mob/user)
|
||||
if(istype(tool, /obj/item/stack/medical/bone_gel))
|
||||
gel(tool, user)
|
||||
if(istype(tool, /obj/item/stack/sticky_tape/surgical))
|
||||
tape(tool, user)
|
||||
|
||||
/datum/wound/blunt/bone/get_scanner_description(mob/user)
|
||||
. = ..()
|
||||
@@ -559,6 +558,6 @@
|
||||
|
||||
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)
|
||||
else if(limb.body_zone == BODY_ZONE_CHEST && CAN_HAVE_BLOOD(victim))
|
||||
. += "Ribcage Trauma Detected: Further trauma to chest is likely to worsen internal bleeding until bone is repaired."
|
||||
. += "</div>"
|
||||
|
||||
+12
-15
@@ -17,8 +17,6 @@
|
||||
|
||||
default_scar_file = FLESH_SCAR_FILE
|
||||
|
||||
treatable_by = list(/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 infection reach 0, the wound is considered healed
|
||||
var/flesh_damage = 5
|
||||
@@ -43,7 +41,7 @@
|
||||
|
||||
. = ..()
|
||||
if(strikes_to_lose_limb <= 0) // we've already hit sepsis, nothing more to do
|
||||
victim.adjustToxLoss(0.25 * seconds_per_tick)
|
||||
victim.adjust_tox_loss(0.25 * seconds_per_tick)
|
||||
if(SPT_PROB(0.5, seconds_per_tick))
|
||||
victim.visible_message(span_danger("The infection on the remnants of [victim]'s [limb.plaintext_zone] shift and bubble nauseatingly!"), span_warning("You can feel the infection on the remnants of your [limb.plaintext_zone] coursing through your veins!"), vision_distance = COMBAT_MESSAGE_RANGE)
|
||||
return
|
||||
@@ -91,7 +89,7 @@
|
||||
|
||||
if(WOUND_INFECTION_MODERATE to WOUND_INFECTION_SEVERE)
|
||||
if(SPT_PROB(15, seconds_per_tick))
|
||||
victim.adjustToxLoss(0.2)
|
||||
victim.adjust_tox_loss(0.2)
|
||||
if(prob(6))
|
||||
to_chat(victim, span_warning("The blisters on your [limb.plaintext_zone] ooze a strange pus..."))
|
||||
if(WOUND_INFECTION_SEVERE to WOUND_INFECTION_CRITICAL)
|
||||
@@ -106,7 +104,7 @@
|
||||
return
|
||||
|
||||
if(SPT_PROB(10, seconds_per_tick))
|
||||
victim.adjustToxLoss(0.5)
|
||||
victim.adjust_tox_loss(0.5)
|
||||
|
||||
if(WOUND_INFECTION_CRITICAL to WOUND_INFECTION_SEPTIC)
|
||||
if(!disabling)
|
||||
@@ -122,9 +120,9 @@
|
||||
if(SPT_PROB(2.48, seconds_per_tick))
|
||||
if(prob(20))
|
||||
to_chat(victim, span_warning("You contemplate life without your [limb.plaintext_zone]..."))
|
||||
victim.adjustToxLoss(0.75)
|
||||
victim.adjust_tox_loss(0.75)
|
||||
else
|
||||
victim.adjustToxLoss(1)
|
||||
victim.adjust_tox_loss(1)
|
||||
|
||||
if(WOUND_INFECTION_SEPTIC to INFINITY)
|
||||
if(SPT_PROB(0.5 * infection, seconds_per_tick))
|
||||
@@ -239,19 +237,18 @@
|
||||
/datum/wound/burn/flesh/proc/uv(obj/item/flashlight/pen/paramedic/I, mob/user)
|
||||
if(!COOLDOWN_FINISHED(I, uv_cooldown))
|
||||
to_chat(user, span_notice("[I] is still recharging!"))
|
||||
return TRUE
|
||||
return
|
||||
if(infection <= 0 || infection < sanitization)
|
||||
to_chat(user, span_notice("There's no infection to treat on [victim]'s [limb.plaintext_zone]!"))
|
||||
return TRUE
|
||||
return
|
||||
|
||||
user.visible_message(span_notice("[user] flashes the burns on [victim]'s [limb] with [I]."), span_notice("You flash the burns on [user == victim ? "your" : "[victim]'s"] [limb.plaintext_zone] with [I]."), vision_distance=COMBAT_MESSAGE_RANGE)
|
||||
sanitization += I.uv_power
|
||||
COOLDOWN_START(I, uv_cooldown, I.uv_cooldown_length)
|
||||
return TRUE
|
||||
|
||||
/datum/wound/burn/flesh/treat(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/flashlight/pen/paramedic))
|
||||
return uv(I, user)
|
||||
/datum/wound/burn/flesh/treat(obj/item/tool, mob/user)
|
||||
if(istype(tool, /obj/item/flashlight/pen/paramedic))
|
||||
uv(tool, user)
|
||||
|
||||
// people complained about burns not healing on stasis beds, so in addition to checking if it's cured, they also get the special ability to very slowly heal on stasis beds if they have the healing effects stored
|
||||
/datum/wound/burn/flesh/on_stasis(seconds_per_tick, times_fired)
|
||||
@@ -323,7 +320,7 @@
|
||||
damage_multiplier_penalty = 1.2
|
||||
series_threshold_penalty = 40
|
||||
status_effect_type = /datum/status_effect/wound/burn/flesh/severe
|
||||
treatable_by = list(/obj/item/flashlight/pen/paramedic, /obj/item/stack/medical/ointment, /obj/item/stack/medical/mesh)
|
||||
treatable_by = list(/obj/item/flashlight/pen/paramedic)
|
||||
infection_rate = 0.07 // appx 9 minutes to reach sepsis without any treatment
|
||||
flesh_damage = 12.5
|
||||
scar_keyword = "burnsevere"
|
||||
@@ -354,7 +351,7 @@
|
||||
sound_effect = 'sound/effects/wounds/sizzle2.ogg'
|
||||
threshold_penalty = 25
|
||||
status_effect_type = /datum/status_effect/wound/burn/flesh/critical
|
||||
treatable_by = list(/obj/item/flashlight/pen/paramedic, /obj/item/stack/medical/ointment, /obj/item/stack/medical/mesh)
|
||||
treatable_by = list(/obj/item/flashlight/pen/paramedic)
|
||||
infection_rate = 0.075 // appx 4.33 minutes to reach sepsis without any treatment
|
||||
flesh_damage = 20
|
||||
scar_keyword = "burncritical"
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
set_limb(dismembered_part)
|
||||
second_wind()
|
||||
log_wound(victim, src)
|
||||
if(dismembered_part.can_bleed() && wounding_type != WOUND_BURN && victim.blood_volume)
|
||||
if(dismembered_part.can_bleed() && wounding_type != WOUND_BURN && victim.get_blood_volume())
|
||||
victim.spray_blood(attack_direction, severity)
|
||||
dismembered_part.dismember(wounding_type == WOUND_BURN ? BURN : BRUTE, wounding_type = wounding_type)
|
||||
qdel(src)
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
name = "Piercing Wound"
|
||||
sound_effect = 'sound/items/weapons/slice.ogg'
|
||||
processes = TRUE
|
||||
treatable_by = list(/obj/item/stack/medical/suture)
|
||||
treatable_tools = list(TOOL_CAUTERY)
|
||||
base_treat_time = 3 SECONDS
|
||||
wound_flags = (ACCEPTS_GAUZE | CAN_BE_GRASPED)
|
||||
@@ -45,13 +44,13 @@
|
||||
|
||||
/datum/wound/pierce/bleed/wound_injury(datum/wound/old_wound = null, attack_direction = null)
|
||||
set_blood_flow(initial_flow)
|
||||
if(limb.can_bleed() && attack_direction && victim.blood_volume > BLOOD_VOLUME_OKAY)
|
||||
if(limb.can_bleed() && attack_direction && victim.get_blood_volume() > BLOOD_VOLUME_OKAY)
|
||||
victim.spray_blood(attack_direction, severity)
|
||||
|
||||
return ..()
|
||||
|
||||
/datum/wound/pierce/bleed/receive_damage(wounding_type, wounding_dmg, wound_bonus)
|
||||
if(victim.stat == DEAD || (wounding_dmg < 5) || !limb.can_bleed() || !victim.blood_volume || !prob(internal_bleeding_chance + wounding_dmg))
|
||||
if(victim.stat == DEAD || (wounding_dmg < 5) || !limb.can_bleed() || !victim.get_blood_volume() || !prob(internal_bleeding_chance + wounding_dmg))
|
||||
return
|
||||
if(limb.current_gauze?.splint_factor)
|
||||
wounding_dmg *= (1 - limb.current_gauze.splint_factor)
|
||||
@@ -131,13 +130,14 @@
|
||||
to_chat(victim, span_green("The holes on your [limb.plaintext_zone] have [!limb.can_bleed() ? "healed up" : "stopped bleeding"]!"))
|
||||
qdel(src)
|
||||
|
||||
/datum/wound/pierce/bleed/check_grab_treatments(obj/item/I, mob/user)
|
||||
if(I.get_temperature()) // if we're using something hot but not a cautery, we need to be aggro grabbing them first, so we don't try treating someone we're eswording
|
||||
return TRUE
|
||||
/datum/wound/pierce/bleed/check_grab_treatments(obj/item/tool, mob/user)
|
||||
// if we're using something hot but not a cautery, we need to be aggro grabbing them first,
|
||||
// so we don't try treating someone we're eswording
|
||||
return tool.get_temperature()
|
||||
|
||||
/datum/wound/pierce/bleed/treat(obj/item/I, mob/user)
|
||||
if(I.tool_behaviour == TOOL_CAUTERY || I.get_temperature())
|
||||
return tool_cauterize(I, user)
|
||||
/datum/wound/pierce/bleed/treat(obj/item/tool, mob/user)
|
||||
if(tool.tool_behaviour == TOOL_CAUTERY || tool.get_temperature())
|
||||
tool_cauterize(tool, user)
|
||||
|
||||
/datum/wound/pierce/bleed/on_xadone(power)
|
||||
. = ..()
|
||||
@@ -179,8 +179,7 @@
|
||||
adjust_blood_flow(-blood_cauterized)
|
||||
|
||||
if(blood_flow > 0)
|
||||
return try_treating(I, user)
|
||||
return TRUE
|
||||
try_treating(I, user)
|
||||
|
||||
/datum/wound_pregen_data/flesh_pierce
|
||||
abstract = TRUE
|
||||
|
||||
+13
-16
@@ -34,8 +34,6 @@
|
||||
name = "Slashing (Cut) Flesh Wound"
|
||||
threshold_penalty = 5
|
||||
processes = TRUE
|
||||
treatable_by = list(/obj/item/stack/medical/suture)
|
||||
treatable_by_grabbed = list(/obj/item/gun/energy/laser)
|
||||
treatable_tools = list(TOOL_CAUTERY)
|
||||
base_treat_time = 3 SECONDS
|
||||
wound_flags = (ACCEPTS_GAUZE|CAN_BE_GRASPED)
|
||||
@@ -68,7 +66,7 @@
|
||||
old_wound.clear_highest_scar()
|
||||
else
|
||||
set_blood_flow(initial_flow)
|
||||
if(limb.can_bleed() && attack_direction && victim.blood_volume > BLOOD_VOLUME_OKAY)
|
||||
if(limb.can_bleed() && attack_direction && victim.get_blood_volume() > BLOOD_VOLUME_OKAY)
|
||||
victim.spray_blood(attack_direction, severity)
|
||||
|
||||
if(!highest_scar)
|
||||
@@ -166,17 +164,18 @@
|
||||
|
||||
/* 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/slash/flesh/check_grab_treatments(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/gun/energy/laser))
|
||||
/datum/wound/slash/flesh/check_grab_treatments(obj/item/tool, mob/user)
|
||||
if(istype(tool, /obj/item/gun/energy/laser))
|
||||
return TRUE
|
||||
if(I.get_temperature()) // if we're using something hot but not a cautery, we need to be aggro grabbing them first, so we don't try treating someone we're eswording
|
||||
if(tool.get_temperature()) // if we're using something hot but not a cautery, we need to be aggro grabbing them first, so we don't try treating someone we're eswording
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/datum/wound/slash/flesh/treat(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/gun/energy/laser))
|
||||
return las_cauterize(I, user)
|
||||
else if(I.tool_behaviour == TOOL_CAUTERY || I.get_temperature())
|
||||
return tool_cauterize(I, user)
|
||||
/datum/wound/slash/flesh/treat(obj/item/tool, mob/user)
|
||||
if(istype(tool, /obj/item/gun/energy/laser))
|
||||
las_cauterize(tool, user)
|
||||
else if(tool.tool_behaviour == TOOL_CAUTERY || tool.get_temperature())
|
||||
tool_cauterize(tool, user)
|
||||
|
||||
/datum/wound/slash/flesh/try_handling(mob/living/user)
|
||||
if(user.pulling != victim || !HAS_TRAIT(user, TRAIT_WOUND_LICKER) || !victim.try_inject(user, injection_flags = INJECT_TRY_SHOW_ERROR_MESSAGE))
|
||||
@@ -253,9 +252,8 @@
|
||||
if(!lasgun.process_fire(victim, victim, TRUE, null, limb.body_zone))
|
||||
return
|
||||
victim.emote("scream")
|
||||
adjust_blood_flow(-1 * (damage / (5 * self_penalty_mult))) // 20 / 5 = 4 bloodflow removed, p good
|
||||
victim.visible_message(span_warning("The cuts on [victim]'s [limb.plaintext_zone] scar over!"))
|
||||
return TRUE
|
||||
adjust_blood_flow(-1 * (damage / (5 * self_penalty_mult))) // 20 / 5 = 4 bloodflow removed, p good
|
||||
|
||||
/// If someone is using either a cautery tool or something with heat to cauterize this cut
|
||||
/datum/wound/slash/flesh/proc/tool_cauterize(obj/item/I, mob/user)
|
||||
@@ -287,11 +285,10 @@
|
||||
adjust_blood_flow(-blood_cauterized)
|
||||
|
||||
if(blood_flow > minimum_flow)
|
||||
return try_treating(I, user)
|
||||
try_treating(I, user)
|
||||
|
||||
else if(demotes_to)
|
||||
to_chat(user, span_green("You successfully lower the severity of [user == victim_stored ? "your" : "[victim_stored]'s"] cuts."))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/datum/wound/slash/get_limb_examine_description()
|
||||
return span_warning("The flesh on this limb appears badly lacerated.")
|
||||
|
||||
Reference in New Issue
Block a user