diff --git a/code/game/machinery/kitchen/smartfridge.dm b/code/game/machinery/kitchen/smartfridge.dm index 69dc3787a11..d02e5fd4f46 100644 --- a/code/game/machinery/kitchen/smartfridge.dm +++ b/code/game/machinery/kitchen/smartfridge.dm @@ -84,24 +84,25 @@ "You add \the [O] to \the [src].") else if(istype(O, /obj/item/weapon/storage/bag/plants)) + var/obj/item/weapon/storage/bag/plants/P = O var/plants_loaded = 0 - for(var/obj/G in O.contents) + for(var/obj/G in P.contents) if(accept_check(G)) if(contents.len >= max_n_of_items) user << "\The [src] is full." return 1 else - O.contents -= G - G.loc = src + P.remove_from_storage(G,src) if(item_quants[G.name]) item_quants[G.name]++ else item_quants[G.name] = 1 plants_loaded++ if(plants_loaded) - user.visible_message("[user] loads \the [src] with \the [O].", \ - "You load \the [src] with \the [O].") - if(O.contents.len > 0) + + user.visible_message("[user] loads \the [src] with \the [P].", \ + "You load \the [src] with \the [P].") + if(P.contents.len > 0) user << "Some items are refused." else diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm index 982be4d0819..c6dbead8911 100644 --- a/code/game/objects/items/weapons/storage/storage.dm +++ b/code/game/objects/items/weapons/storage/storage.dm @@ -269,9 +269,9 @@ F.update_icon(1) for(var/mob/M in range(1, src.loc)) - if (M.s_active == src.loc) + if (M.s_active == src) if (M.client) - M.client.screen -= src + M.client.screen -= W if(new_location) if(ismob(loc)) diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index e1fb5fd9503..bfdea52409a 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -92,11 +92,11 @@ return if(istype(I, /obj/item/weapon/storage/bag/trash)) + var/obj/item/weapon/storage/bag/trash/T = I user << "\blue You empty the bag." - for(var/obj/item/O in I.contents) - O.loc = src - I.contents -= O - I.update_icon() + for(var/obj/item/O in T.contents) + T.remove_from_storage(O,src) + T.update_icon() update() return