diff --git a/modular_skyrat/modules/medical/code/wounds/synth/blunt/robotic_blunt_T3.dm b/modular_skyrat/modules/medical/code/wounds/synth/blunt/robotic_blunt_T3.dm index aa85498108a..14f6f30a2af 100644 --- a/modular_skyrat/modules/medical/code/wounds/synth/blunt/robotic_blunt_T3.dm +++ b/modular_skyrat/modules/medical/code/wounds/synth/blunt/robotic_blunt_T3.dm @@ -242,7 +242,8 @@ var/has_enough_matter = (treating_rcd.get_matter(user) > ROBOTIC_T3_BLUNT_WOUND_RCD_COST) var/silo_has_enough_materials = (treating_rcd.get_silo_iron() > ROBOTIC_T3_BLUNT_WOUND_RCD_SILO_COST) - if (!silo_has_enough_materials && has_enough_matter) + if (!silo_has_enough_materials && !has_enough_matter) // neither the silo, nor the rcd, has enough + user?.balloon_alert(user, "not enough matter!") return TRUE var/their_or_other = (user == victim ? "[user.p_their()]" : "[victim]'s") @@ -291,7 +292,8 @@ set_superstructure_status(TRUE) var/use_amount = (silo_has_enough_materials ? ROBOTIC_T3_BLUNT_WOUND_RCD_SILO_COST : ROBOTIC_T3_BLUNT_WOUND_RCD_COST) - treating_rcd.useResource(use_amount, user) + if (!treating_rcd.useResource(use_amount, user)) + return TRUE if (user) var/misused_text = (misused ? ", though it replaced a bit more than it should've..." : "!") @@ -383,3 +385,14 @@ /datum/wound/blunt/robotic/secures_internals/critical/proc/set_superstructure_status(remedied) superstructure_remedied = remedied ready_to_secure_internals = remedied + +/datum/wound/blunt/robotic/secures_internals/critical/get_wound_step_info() + . = ..() + + if (!superstructure_remedied) + . = "The superstructure must be reformed." + if (!limb_malleable()) + . += " The limb must be heated to thermal overload, then manually molded with a firm grasp" + else + . += " The limb has been sufficiently heated, and can be manually molded with a firm grasp/repeated application of a low-force object" + . += " - OR an RCD may be used with little risk." diff --git a/modular_skyrat/modules/medical/code/wounds/synth/blunt/secures_internals.dm b/modular_skyrat/modules/medical/code/wounds/synth/blunt/secures_internals.dm index 9dd515813ef..e9e9ce3cb68 100644 --- a/modular_skyrat/modules/medical/code/wounds/synth/blunt/secures_internals.dm +++ b/modular_skyrat/modules/medical/code/wounds/synth/blunt/secures_internals.dm @@ -160,7 +160,9 @@ var/their_or_other = (user == victim ? "[user.p_their()]" : "[victim]'s") var/your_or_other = (user == victim ? "your" : "[victim]'s") - var/self_message = span_warning("You start prying open [your_or_other] [limb.plaintext_zone] with [crowbarring_item]...") + var/limb_can_shock_pre_sleep = (victim.stat != DEAD && limb.biological_state & BIO_WIRED) + var/shock_or_not = (limb_can_shock_pre_sleep ? ", risking electrocution" : "") + var/self_message = span_warning("You start prying open [your_or_other] [limb.plaintext_zone] with [crowbarring_item][shock_or_not]...") user?.visible_message(span_bolddanger("[user] starts prying open [their_or_other] [limb.plaintext_zone] with [crowbarring_item]!"), self_message, ignored_mobs = list(victim)) @@ -175,7 +177,7 @@ if (!crowbarring_item.use_tool(target = victim, user = user, delay = (7 SECONDS * delay_mult), volume = 50, extra_checks = CALLBACK(src, PROC_REF(still_exists)))) return TRUE - var/limb_can_shock = (victim.stat != DEAD && limb.biological_state & BIO_WIRED) + var/limb_can_shock = (victim.stat != DEAD && limb.biological_state & BIO_WIRED) // re-define the previous shock variable because we slept var/stunned = FALSE var/message @@ -386,3 +388,29 @@ span_notice("You finish re-soldering [your_or_other] [limb.plaintext_zone]!")) remove_wound() return TRUE + +/// Returns a string with our current treatment step for use in health analyzers. +/datum/wound/blunt/robotic/secures_internals/proc/get_wound_step_info() + var/string + + if (ready_to_resolder) + string = "Apply a welder/cautery to the limb to finalize repairs." + else if (ready_to_secure_internals) + string = "Use a screwdriver/wrench to secure the internals of the limb. This step is best performed by a qualified technician. \ + In absence of one, bone gel or a crowbar may be used." + + return string + +/datum/wound/blunt/robotic/secures_internals/get_scanner_description(mob/user) + . = ..() + + var/wound_step = get_wound_step_info() + if (wound_step) + . += "\n\nCurrent step: [span_notice(wound_step)]" + +/datum/wound/blunt/robotic/secures_internals/get_simple_scanner_description(mob/user) + . = ..() + + var/wound_step = get_wound_step_info() + if (wound_step) + . += "\n\nCurrent step: [span_notice(wound_step)]"