Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
ErdGinalD committed Sep 19, 2024
2 parents a031785 + 5f29576 commit f40e1d8
Show file tree
Hide file tree
Showing 15 changed files with 698 additions and 384 deletions.
15 changes: 10 additions & 5 deletions code/game/turfs/simulated/floor/asteroid_floors.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion code/modules/mining/ores_coins.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion code/modules/mining/satchel_ore_boxdm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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, "<span class='notice'>You empty the satchel into the box.</span>")
else
return ..()
Expand Down
Loading

0 comments on commit f40e1d8

Please sign in to comment.