diff --git a/code/game/turfs/simulated/floor/asteroid_floors.dm b/code/game/turfs/simulated/floor/asteroid_floors.dm index d4f98500c54..44021a067a0 100644 --- a/code/game/turfs/simulated/floor/asteroid_floors.dm +++ b/code/game/turfs/simulated/floor/asteroid_floors.dm @@ -58,6 +58,15 @@ if(1) getDug() +/turf/simulated/floor/plating/asteroid/proc/attempt_ore_pickup(obj/item/storage/bag/ore/S, mob/user) + if(!istype(S)) + return + + if(S.pickup_all_on_tile) + for(var/obj/item/stack/ore/O in contents) + O.attackby(S, user) + return + /turf/simulated/floor/plating/asteroid/attackby(obj/item/I, mob/user, params) //note that this proc does not call ..() if(!I|| !user) @@ -82,11 +91,7 @@ return TRUE else if(istype(I, /obj/item/storage/bag/ore)) - var/obj/item/storage/bag/ore/S = I - if(S.pickup_all_on_tile) - for(var/obj/item/stack/ore/O in contents) - O.attackby(I, user) - return + attempt_ore_pickup(I, user) else if(istype(I, /obj/item/stack/tile)) var/obj/item/stack/tile/Z = I diff --git a/code/modules/mining/ores_coins.dm b/code/modules/mining/ores_coins.dm index fd4b2a3885e..f4f0ed7cae9 100644 --- a/code/modules/mining/ores_coins.dm +++ b/code/modules/mining/ores_coins.dm @@ -51,7 +51,8 @@ OB = thing break if(OB && istype(F, /turf/simulated/floor/plating/asteroid)) - F.attackby(OB, AM) + var/turf/simulated/floor/plating/asteroid/FA = F + FA.attempt_ore_pickup(OB, AM) // Then, if the user is dragging an ore box, empty the satchel // into the box. var/mob/living/L = AM diff --git a/code/modules/mining/satchel_ore_boxdm.dm b/code/modules/mining/satchel_ore_boxdm.dm index 92ed05e83c2..3ff5be8c1a1 100644 --- a/code/modules/mining/satchel_ore_boxdm.dm +++ b/code/modules/mining/satchel_ore_boxdm.dm @@ -19,7 +19,6 @@ S.hide_from(usr) for(var/obj/item/stack/ore/O in S.contents) S.remove_from_storage(O, src) //This will move the item to this item's contents - CHECK_TICK to_chat(user, "You empty the satchel into the box.") else return ..()