From 98f6a8a5e61905102d0ee8cfaba46842013e25c1 Mon Sep 17 00:00:00 2001 From: Crowtastrophe <97719613+VickiMorris@users.noreply.github.com> Date: Fri, 22 Sep 2023 09:52:43 -0500 Subject: [PATCH] Logging for Inserting & Removing Things Surgically (#9873) * Logging for Inserting & Removing Surgically Adds logging for inserting new organs via Organ Manipulation. Adds logging for extracting implants from people. Adds logging for storing or removing items surgically using a cavity implant. * Logs Surgery Attempts, Removes Surgery Intent Adds an additional log for when someone attempts to implant/remove organs, implant/remove cavity items, and remove/check for implants. Removed user intent for surgical steps, as they can only be done on help, or disarm (Intentional Failure) which causes a combat log anyway. --- code/modules/surgery/cavity_implant.dm | 7 +++++++ code/modules/surgery/implant_removal.dm | 7 +++++++ code/modules/surgery/organ_manipulation.dm | 5 ++++- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/code/modules/surgery/cavity_implant.dm b/code/modules/surgery/cavity_implant.dm index d5b7bfd060ba3..48eb59d579fdf 100644 --- a/code/modules/surgery/cavity_implant.dm +++ b/code/modules/surgery/cavity_implant.dm @@ -29,10 +29,13 @@ display_results(user, target, "You begin to insert [tool] into [target]'s [target_zone]...", "[user] begins to insert [tool] into [target]'s [target_zone].", "[user] begins to insert [tool.w_class > WEIGHT_CLASS_SMALL ? tool : "something"] into [target]'s [target_zone].") + //Incase they are interupted mid-insert, log it; shows intent to implant + log_combat(user, target, "tried to cavity implant [tool.name] into") else display_results(user, target, "You check for items in [target]'s [target_zone]...", "[user] checks for items in [target]'s [target_zone].", "[user] looks for something in [target]'s [target_zone].") + log_combat(user, target, "searched for cavity item [IC ? "([IC.name])" : null] in") /datum/surgery_step/handle_cavity/success(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool, datum/surgery/surgery) var/obj/item/bodypart/chest/CH = target.get_bodypart(BODY_ZONE_CHEST) @@ -46,6 +49,8 @@ "[user] stuffs [tool.w_class > WEIGHT_CLASS_SMALL ? tool : "something"] into [target]'s [target_zone].") user.transferItemToLoc(tool, target, TRUE) CH.cavity_item = tool + //Logs stowing items in a cavity, similar to organ manipulation + log_combat(user, target, "cavity implanted [tool.name] into") return 1 else if(IC) @@ -54,6 +59,8 @@ "[user] pulls [IC.w_class > WEIGHT_CLASS_SMALL ? IC : "something"] out of [target]'s [target_zone].") user.put_in_hands(IC) CH.cavity_item = null + //Log when cavity items are surgically removed, we don't care about it popping out from gibbing + log_combat(user, target, "extracted [IC.name] from cavity in") return 1 else to_chat(user, "You don't find anything in [target]'s [target_zone].") diff --git a/code/modules/surgery/implant_removal.dm b/code/modules/surgery/implant_removal.dm index 2e6d07950ef84..4929098adc550 100644 --- a/code/modules/surgery/implant_removal.dm +++ b/code/modules/surgery/implant_removal.dm @@ -20,10 +20,14 @@ display_results(user, target, "You begin to extract [I] from [target]'s [target_zone]...", "[user] begins to extract [I] from [target]'s [target_zone].", "[user] begins to extract something from [target]'s [target_zone].") + //Incase they are interupted mid-extraction, log it + log_combat(user, target, "tried to extract [I.name] from") else display_results(user, target, "You look for an implant in [target]'s [target_zone]...", "[user] looks for an implant in [target]'s [target_zone].", "[user] looks for something in [target]'s [target_zone].") + //Doesn't matter if they finish or not, defaults to this if there are no implants + log_combat(user, target, "implant checked") /datum/surgery_step/extract_implant/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) if(I) @@ -32,6 +36,9 @@ "[user] successfully removes something from [target]'s [target_zone]!") I.removed(target) + //Logs removal of implants, similar to removal of organs during organ manipulation + log_combat(user, target, "surgically extracted [I.name] from") + var/obj/item/implantcase/case for(var/obj/item/implantcase/ic in user.held_items) case = ic diff --git a/code/modules/surgery/organ_manipulation.dm b/code/modules/surgery/organ_manipulation.dm index bb273281aa0af..704d94a0ab68b 100644 --- a/code/modules/surgery/organ_manipulation.dm +++ b/code/modules/surgery/organ_manipulation.dm @@ -115,6 +115,7 @@ display_results(user, target, "You begin to insert [tool] into [target]'s [parse_zone(target_zone)]...", "[user] begins to insert [tool] into [target]'s [parse_zone(target_zone)].", "[user] begins to insert something into [target]'s [parse_zone(target_zone)].") + log_combat(user, target, "tried to insert [I.name] into") else if(implement_type in implements_extract) current_type = "extract" @@ -136,6 +137,7 @@ display_results(user, target, "You begin to extract [I] from [target]'s [parse_zone(target_zone)]...", "[user] begins to extract [I] from [target]'s [parse_zone(target_zone)].", "[user] begins to extract something from [target]'s [parse_zone(target_zone)].") + log_combat(user, target, "tried to extract [I.name] from") else return -1 @@ -154,13 +156,14 @@ display_results(user, target, "You insert [tool] into [target]'s [parse_zone(target_zone)].", "[user] inserts [tool] into [target]'s [parse_zone(target_zone)]!", "[user] inserts something into [target]'s [parse_zone(target_zone)]!") + log_combat(user, target, "surgically installed [I.name] into") else if(current_type == "extract") if(I && I.owner == target) display_results(user, target, "You successfully extract [I] from [target]'s [parse_zone(target_zone)].", "[user] successfully extracts [I] from [target]'s [parse_zone(target_zone)]!", "[user] successfully extracts something from [target]'s [parse_zone(target_zone)]!") - log_combat(user, target, "surgically removed [I.name] from", addition="INTENT: [uppertext(user.a_intent)]") + log_combat(user, target, "surgically removed [I.name] from") I.Remove(target) I.forceMove(get_turf(target)) else