From 0dc68a332a652ed867145a6d44f091415fdf3c37 Mon Sep 17 00:00:00 2001
From: Luc <89928798+lewcc@users.noreply.github.com>
Date: Fri, 6 Jan 2023 11:06:28 -1000
Subject: [PATCH] Changes portable seed extractor to be alt-shift-clickable
(#20046)
* Make portable seed extractor use alt-click instead of a verb
* little bit more feedback never hurts
* Remove duplicate check
* alt-shift-click
* Should probably update the examine too
---
.../objects/items/weapons/storage/bags.dm | 27 ++++++++++++-------
1 file changed, 18 insertions(+), 9 deletions(-)
diff --git a/code/game/objects/items/weapons/storage/bags.dm b/code/game/objects/items/weapons/storage/bags.dm
index 3eab3870713..a9648063165 100644
--- a/code/game/objects/items/weapons/storage/bags.dm
+++ b/code/game/objects/items/weapons/storage/bags.dm
@@ -179,19 +179,28 @@
icon_state = "portaseeder"
origin_tech = "biotech=3;engineering=2"
-/obj/item/storage/bag/plants/portaseeder/verb/dissolve_contents()
- set name = "Activate Seed Extraction"
- set category = "Object"
- set desc = "Activate to convert your plants into plantable seeds."
+/obj/item/storage/bag/plants/portaseeder/examine(mob/user)
+ . = ..()
+ if(Adjacent(user))
+ . += "You can Alt-Shift-Click to convert the plants inside to seeds."
- if(usr.incapacitated())
+/obj/item/storage/bag/plants/portaseeder/proc/process_plants(mob/user)
+ if(!length(contents))
+ to_chat(user, "[src] has no seeds inside!")
return
+ var/had_anything = FALSE
for(var/obj/item/O in contents)
- seedify(O, 1)
- for(var/mob/M in range(1))
- if(M.s_active == src)
- close(M)
+ had_anything |= seedify(O, 1)
+ hide_from_all()
+ if(had_anything)
+ to_chat(user, "[src] whirrs a bit as it converts the plants inside to seeds.")
+ else
+ to_chat(user, "[src] whirrs a bit but stops. Doesn't seem like it could convert anything inside.")
+ playsound(user, "sound/machines/ding.ogg", 25)
+/obj/item/storage/bag/plants/portaseeder/AltShiftClick(mob/user)
+ if(Adjacent(user) && ishuman(user) && !user.incapacitated(FALSE, TRUE))
+ process_plants(user)
// -----------------------------
// Sheet Snatcher