From 7e8eebc57e51a0daa7ea65ce253ff657120b2f06 Mon Sep 17 00:00:00 2001 From: DreamySkrell <107256943+DreamySkrell@users.noreply.github.com> Date: Tue, 24 Dec 2024 13:42:25 +0100 Subject: [PATCH] Fortune Cookie Fix (#20286) . Co-authored-by: DreamySkrell <> --- code/modules/reagents/reagent_containers/food.dm | 13 ++++++++----- html/changelogs/DreamySkrell-fortune-cookie-fix.yml | 7 +++++++ 2 files changed, 15 insertions(+), 5 deletions(-) create mode 100644 html/changelogs/DreamySkrell-fortune-cookie-fix.yml diff --git a/code/modules/reagents/reagent_containers/food.dm b/code/modules/reagents/reagent_containers/food.dm index e2d009f545b..7a3caa515e8 100644 --- a/code/modules/reagents/reagent_containers/food.dm +++ b/code/modules/reagents/reagent_containers/food.dm @@ -33,13 +33,16 @@ else target.visible_message("[target] finishes [is_liquid ? "drinking" : "eating"] \the [src].", SPAN_NOTICE("You finish [is_liquid ? "drinking" : "eating"] \the [src].")) if(trash) + // get or create the trash item + var/obj/item/trash_item = trash + if(ispath(trash_item)) + trash_item = new trash_item() + // and put it in active hand, or on the floor if(slot) - user.drop_from_inventory(src) //so trash actually stays in the active hand. - var/obj/item/TrashItem = new trash(user) - user.put_in_hands(TrashItem) + user.drop_from_inventory(src) + user.put_in_hands(trash_item) else - var/obj/item/TrashItem = new trash(user) - TrashItem.forceMove(get_turf(src)) + trash_item.forceMove(get_turf(src)) if(istype(loc, /obj/item/reagent_containers/bowl/plate)) var/obj/item/reagent_containers/bowl/plate/P = loc if(P.holding == src) diff --git a/html/changelogs/DreamySkrell-fortune-cookie-fix.yml b/html/changelogs/DreamySkrell-fortune-cookie-fix.yml new file mode 100644 index 00000000000..b19f8607830 --- /dev/null +++ b/html/changelogs/DreamySkrell-fortune-cookie-fix.yml @@ -0,0 +1,7 @@ + +author: DreamySkrell + +delete-after: True + +changes: + - bugfix: "Fortune cookie fix."