mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-10 09:42:29 +00:00
Enter(), Entered(), Exit() and Exited() all passed the old loc forward, but everything except a single a case cared about the direction of the movement more than about the specific source. Since moving multi-tile objects will have multiple sources of movement but a single direction, this change makes it easier to track their movement. Cleaned up a lot of code around and made proc inputs compatible. I'll add opacity support for multi-tile objects in a different PR after this is merged, as this has grown large enough and I don't want to compromise the reviewability. Tested this locally and as expected it didn't impair movement nor produced any runtimes.
24 lines
712 B
Plaintext
24 lines
712 B
Plaintext
/**********************Unloading unit**************************/
|
|
|
|
|
|
/obj/machinery/mineral/unloading_machine
|
|
name = "unloading machine"
|
|
icon = 'icons/obj/machines/mining_machines.dmi'
|
|
icon_state = "unloader"
|
|
density = TRUE
|
|
input_dir = WEST
|
|
output_dir = EAST
|
|
needs_item_input = TRUE
|
|
processing_flags = START_PROCESSING_MANUALLY
|
|
|
|
/obj/machinery/mineral/unloading_machine/pickup_item(datum/source, atom/movable/target, direction)
|
|
if(QDELETED(target))
|
|
return
|
|
if(istype(target, /obj/structure/ore_box))
|
|
var/obj/structure/ore_box/box = target
|
|
for(var/obj/item/stack/ore/O in box)
|
|
unload_mineral(O)
|
|
else if(istype(target, /obj/item/stack/ore))
|
|
var/obj/item/stack/ore/O = target
|
|
unload_mineral(O)
|