Files
Bubberstation/code/modules/mining/machine_unloading.dm
SteelSlayer b391baeb74 Republish - Machinery processing refactor (#49307)
* initial

small thing

* improvements

1. Removes loops for picking up items. its now an item by item basis unless there is an ore box involved
2. Removed pickup_rate and ore_buffer var for the ORM, they aren't needed anymore
3. Fixed conveyors not moving items that get created on top of them (New / Initialize), by sending signals when atoms are created.

* renames the registered signal proc name so travis doesn't throw a fit

* signal improvement

* forgot to update other proc names

* ninjanomnom review changes

replace NEVER_PROCESS with START_PROCESSING_MANUALLY

default_unfasten_wrench override for ORM

50 -> 5 SECONDS

I totally didn't mispell anything

* makes a new signal: COMSIG_ATOM_CREATED

* more review changes

* duh

* even more review improvements

* switch >= to >

* reverts conveyors back to using process() for moving stuff

* various touch ups, adds documentation

* rebase to fix map conflicts with forgottenship.dmm

Co-authored-by: SteelSlayer <SteelSlayer@users.noreply.github.com>
2020-03-31 01:52:25 -03:00

22 lines
704 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, atom/oldLoc)
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)