From 4a05fc299f71dfe9c36d43b783e2d8eba482935b Mon Sep 17 00:00:00 2001 From: Moose1002 <33578674+Moose1002@users.noreply.github.com> Date: Sun, 17 Jul 2022 00:47:40 -0400 Subject: [PATCH] Dispenser shells can be bulk filled from storage bags (#68302) --- code/modules/wiremod/shell/dispenser.dm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/code/modules/wiremod/shell/dispenser.dm b/code/modules/wiremod/shell/dispenser.dm index a6aaeb4070e..2454641ddfb 100644 --- a/code/modules/wiremod/shell/dispenser.dm +++ b/code/modules/wiremod/shell/dispenser.dm @@ -65,7 +65,7 @@ if(user.combat_mode || .) return - if(item.w_class > max_weight) + if(item.w_class > max_weight && !istype(item, /obj/item/storage/bag)) balloon_alert(user, "item too big!") return @@ -73,8 +73,14 @@ balloon_alert(user, "at maximum capacity!") return - add_item(item) + if(istype(item, /obj/item/storage/bag)) + for(var/obj/item/bag_item in item.contents) + if(length(stored_items) >= capacity) + break + add_item(bag_item) + return + add_item(item) /obj/structure/dispenser_bot/wrench_act(mob/living/user, obj/item/tool) if(locked)