controller: Kick off sorting after pipeworks inserted an item (#40)

Controllers in unloaded/inactive areas would become jammed otherwise

Co-authored-by: BuckarooBanzay <39065740+BuckarooBanzay@users.noreply.github.com>
This commit is contained in:
Thomas Rudin 2020-02-14 17:40:49 +01:00 committed by GitHub
parent 4e99f7db71
commit 0fc267da84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -497,7 +497,12 @@ local function register_controller()
def.tube = {}
def.tube.insert_object = function(pos, node, stack, tubedir)
return core.get_meta(pos):get_inventory():add_item("src", stack)
-- add stack to inventory
local remaining_stack = core.get_meta(pos):get_inventory():add_item("src", stack)
-- kick off controller work
controller_node_timer(pos)
return remaining_stack
end
def.tube.can_insert = function(pos, node, stack, tubedir)