diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index 8c6be59f71..58ebfb38ab 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -398,7 +398,7 @@ imp += "[I] implanted:" else unknown_body++ - if(unknown_body || e.hidden) + if(unknown_body) imp += "Unknown body present:" if(!AN && !open && !infected & !imp) diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index 82259f1bb4..09a25fbee4 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -281,8 +281,9 @@ if(ishuman(holder)) var/mob/living/carbon/human/H = holder for(var/obj/item/organ/external/affecting in H.organs) - if(affecting.hidden == card) + if(card in affecting.implants) affecting.take_damage(rand(30,50)) + affecting.implants -= card H.visible_message("\The [src] explodes out of \the [H]'s [affecting.name] in shower of gore!") break holder.drop_from_inventory(card) diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 5434e98acc..f8f4a9bfff 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -39,7 +39,6 @@ var/cavity = 0 var/sabotaged = 0 // If a prosthetic limb is emagged, it will detonate when it fails. var/encased // Needs to be opened with a saw to access the organs. - var/obj/item/hidden = null var/list/implants = list() var/wound_update_accuracy = 1 // how often wounds should be updated, a higher number means less often var/joint = "joint" // Descriptive string used in dislocation. diff --git a/code/modules/surgery/implant.dm b/code/modules/surgery/implant.dm index 95980d5252..b20da362ca 100644 --- a/code/modules/surgery/implant.dm +++ b/code/modules/surgery/implant.dm @@ -45,7 +45,7 @@ can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if(..()) var/obj/item/organ/external/affected = target.get_organ(target_zone) - return affected && !affected.cavity && !affected.hidden + return affected && !affected.cavity begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) @@ -112,7 +112,15 @@ can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if(..()) var/obj/item/organ/external/affected = target.get_organ(target_zone) - return affected && !istype(user,/mob/living/silicon/robot) && !affected.hidden && affected.cavity && tool.w_class <= get_max_wclass(affected) + if(istype(user,/mob/living/silicon/robot)) + return + if(affected && affected.cavity) + var/total_volume = tool.w_class + for(var/obj/item/I in affected.implants) + if(istype(I,/obj/item/weapon/implant)) + continue + total_volume += I.w_class + return total_volume <= get_max_wclass(affected) begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) @@ -132,8 +140,8 @@ affected.wounds += I affected.owner.custom_pain("You feel something rip in your [affected.name]!", 1) user.drop_item() - affected.hidden = tool - tool.loc = target + affected.implants += tool + tool.loc = affected affected.cavity = 0 fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) @@ -174,7 +182,7 @@ if (affected.implants.len) - var/obj/item/obj = affected.implants[1] + var/obj/item/obj = pick(affected.implants) if(istype(obj,/obj/item/weapon/implant)) var/obj/item/weapon/implant/imp = obj @@ -201,6 +209,8 @@ worm.leave_host() else obj.loc = get_turf(target) + obj.add_blood(target) + obj.update_icon() if(istype(obj,/obj/item/weapon/implant)) var/obj/item/weapon/implant/imp = obj imp.imp_in = null @@ -208,16 +218,6 @@ else user.visible_message("\blue [user] removes \the [tool] from [target]'s [affected.name].", \ "\blue There's something inside [target]'s [affected.name], but you just missed it this time." ) - else if (affected.hidden) - user.visible_message("\blue [user] takes something out of incision on [target]'s [affected.name] with \the [tool].", \ - "\blue You take something out of incision on [target]'s [affected.name]s with \the [tool]." ) - affected.hidden.loc = get_turf(target) - if(!affected.hidden.blood_DNA) - affected.hidden.blood_DNA = list() - affected.hidden.blood_DNA[target.dna.unique_enzymes] = target.dna.b_type - affected.hidden.update_icon() - affected.hidden = null - else user.visible_message("\blue [user] could not find anything inside [target]'s [affected.name], and pulls \the [tool] out.", \ "\blue You could not find anything inside [target]'s [affected.name]." )