From 96d4bf69c2866b7e726a235ebc456358a7c64e21 Mon Sep 17 00:00:00 2001 From: Casper3667 <8396443+Casper3667@users.noreply.github.com> Date: Wed, 10 Jun 2026 18:09:57 +0200 Subject: [PATCH] Fixes that plants lose their harvest if the harvesting action is interrupted (#22675) The early return caused the tray to lose the harvest status without giving anything. This fixes that. Who thought it was a good idea to split the harvest status from the plant it is harvested from? --- code/modules/hydroponics/seed.dm | 7 ++++--- code/modules/hydroponics/trays/tray.dm | 3 ++- html/changelogs/HydroFix.yml | 6 ++++++ 3 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 html/changelogs/HydroFix.yml diff --git a/code/modules/hydroponics/seed.dm b/code/modules/hydroponics/seed.dm index 55b442566f5..348fb9eb0d1 100644 --- a/code/modules/hydroponics/seed.dm +++ b/code/modules/hydroponics/seed.dm @@ -787,12 +787,12 @@ // And check if any components on the plant wish to modify the harvest. SEND_SIGNAL(src, COMSIG_PLANT_HARVESTED, user, &total_yield, &cancelled, &doafter) if (cancelled) - return + return FALSE user.visible_message(SPAN_WARNING("[user] starts harvesting \the [display_name]")) if (doafter > 0 && !do_after(user, doafter)) to_chat(user, SPAN_DANGER("You were interrupted while trying to harvest \the [display_name]")) - return + return FALSE if(!force_amount && GET_SEED_TRAIT(src, TRAIT_YIELD) == 0 && !harvest_sample) to_chat(user, SPAN_DANGER("You fail to harvest anything useful.")) @@ -809,7 +809,7 @@ var/obj/item/seeds/seeds = new(get_turf(user)) seeds.seed_type = name seeds.update_seed() - return + return TRUE if(!isnull(force_amount)) total_yield = force_amount @@ -828,6 +828,7 @@ for(var/i = 0;i