From b4c4a41410c286eac9e69874c111d91660325e21 Mon Sep 17 00:00:00 2001 From: NovaBot <154629622+NovaBot13@users.noreply.github.com> Date: Mon, 20 May 2024 01:36:34 -0400 Subject: [PATCH] [MIRROR] Fixes icecream vats eating borg beakers (#2564) * Fixes icecream vats eating borg beakers (#83279) Fixes #83257 :cl: ShizCalev fix: Icecream vats will no longer eat cyborg beakers. /:cl: * Fixes icecream vats eating borg beakers --------- Co-authored-by: Afevis Co-authored-by: NovaBot13 --- .../food_and_drinks/machinery/icecream_vat.dm | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/code/modules/food_and_drinks/machinery/icecream_vat.dm b/code/modules/food_and_drinks/machinery/icecream_vat.dm index cae1b260249..eba5ff63f3f 100644 --- a/code/modules/food_and_drinks/machinery/icecream_vat.dm +++ b/code/modules/food_and_drinks/machinery/icecream_vat.dm @@ -110,26 +110,27 @@ . = ..() if(.) return - if(!beaker || !istype(beaker) || !beaker.reagents || (beaker.item_flags & ABSTRACT) || !beaker.is_open_container()) + if(!istype(beaker) || !beaker.reagents || (beaker.item_flags & ABSTRACT) || !beaker.is_open_container()) return if(custom_ice_cream_beaker) - if(beaker.forceMove(src)) + if(user.transferItemToLoc(beaker, src)) try_put_in_hand(custom_ice_cream_beaker, user) balloon_alert(user, "beakers swapped") custom_ice_cream_beaker = beaker else balloon_alert(user, "beaker slot full!") return - if(beaker.forceMove(src)) - balloon_alert(user, "beaker inserted") - custom_ice_cream_beaker = beaker + if(!user.transferItemToLoc(beaker, src)) + return + balloon_alert(user, "beaker inserted") + custom_ice_cream_beaker = beaker /obj/machinery/icecream_vat/attackby_secondary(obj/item/reagent_containers/beaker, mob/user, params) . = ..() if(. == SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN) return - if(!beaker || !istype(beaker) || !beaker.reagents || (beaker.item_flags & ABSTRACT) || !beaker.is_open_container()) + if(!istype(beaker) || !beaker.reagents || (beaker.item_flags & ABSTRACT) || !beaker.is_open_container()) return SECONDARY_ATTACK_CONTINUE_CHAIN var/added_reagents = FALSE for(var/datum/reagent/beaker_reagents in beaker.reagents.reagent_list) @@ -211,9 +212,10 @@ return ice_cream_icon /obj/machinery/icecream_vat/on_deconstruction(disassembled = TRUE) - new /obj/item/stack/sheet/iron(loc, 4) - if(custom_ice_cream_beaker) - custom_ice_cream_beaker.forceMove(loc) + var/atom/drop_location = drop_location() + + new /obj/item/stack/sheet/iron(drop_location, 4) + custom_ice_cream_beaker?.forceMove(drop_location) ///Makes an ice cream cone of the make_type, using ingredients list as reagents used to make it. Puts in user's hand if possible. /obj/machinery/icecream_vat/proc/make_cone(mob/user, make_type, list/ingredients)