From 97141c23cf2dabd85e28d620effb6b1762777cdb Mon Sep 17 00:00:00 2001 From: SmArtKar <44720187+SmArtKar@users.noreply.github.com> Date: Sun, 29 Sep 2024 15:14:58 +0200 Subject: [PATCH] Fixed VV DNA infusion tool (#86931) ## About The Pull Request Insert() does not return anything, replace_into relied on that so the tool ended up just cutting out all the organs it was supposed to insert after putting them in ## Changelog :cl: admin: Fixed VV DNA infusion tool /:cl: --- code/modules/admin/verbs/grant_dna_infusion.dm | 5 +++-- code/modules/surgery/organs/_organ.dm | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/code/modules/admin/verbs/grant_dna_infusion.dm b/code/modules/admin/verbs/grant_dna_infusion.dm index 06cfa8110d6..2e087a16057 100644 --- a/code/modules/admin/verbs/grant_dna_infusion.dm +++ b/code/modules/admin/verbs/grant_dna_infusion.dm @@ -19,7 +19,7 @@ // This is necessary because list propererties are not defined until initialization picked_infusion = infusions[picked_infusion] - picked_infusion = new picked_infusion + picked_infusion = new picked_infusion() if(!length(picked_infusion.output_organs)) return FALSE @@ -27,7 +27,8 @@ . = picked_infusion for(var/obj/item/organ/infusion_organ as anything in picked_infusion.output_organs) var/obj/item/organ/new_organ = new infusion_organ() - if(!new_organ.replace_into(target)) + new_organ.replace_into(target) + if(new_organ.owner != target) to_chat(usr, span_notice("[target] is unable to carry [new_organ]!")) qdel(new_organ) . = FALSE diff --git a/code/modules/surgery/organs/_organ.dm b/code/modules/surgery/organs/_organ.dm index 3e67b5c4379..6a5dabc112f 100644 --- a/code/modules/surgery/organs/_organ.dm +++ b/code/modules/surgery/organs/_organ.dm @@ -356,7 +356,7 @@ INITIALIZE_IMMEDIATE(/obj/item/organ) /// Tries to replace the existing organ on the passed mob with this one, with special handling for replacing a brain without ghosting target /obj/item/organ/proc/replace_into(mob/living/carbon/new_owner) - return Insert(new_owner, special = TRUE, movement_flags = DELETE_IF_REPLACED) + Insert(new_owner, special = TRUE, movement_flags = DELETE_IF_REPLACED) /// Get all possible organ slots by checking every organ, and then store it and give it whenever needed