Skip to content

Commit

Permalink
[MIRROR] Fixes icecream vats eating borg beakers (#2564)
Browse files Browse the repository at this point in the history
* Fixes icecream vats eating borg beakers (#83279)

Fixes #83257

🆑 ShizCalev
fix: Icecream vats will no longer eat cyborg beakers.
/🆑

* Fixes icecream vats eating borg beakers

---------

Co-authored-by: Afevis <[email protected]>
Co-authored-by: NovaBot13 <[email protected]>
  • Loading branch information
3 people authored and StealsThePRs committed May 20, 2024
1 parent d2b918f commit b4c4a41
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions code/modules/food_and_drinks/machinery/icecream_vat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit b4c4a41

Please sign in to comment.