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
🆑
admin: Fixed VV DNA infusion tool
/🆑
This commit is contained in:
SmArtKar
2024-09-29 15:14:58 +02:00
committed by GitHub
parent 17d0e4771d
commit 97141c23cf
2 changed files with 4 additions and 3 deletions
@@ -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
+1 -1
View File
@@ -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