typod, again
This commit is contained in:
parent
2cc6793588
commit
8b42df7e8d
@ -137,7 +137,7 @@ end
|
||||
local function update_slot(inv, slot, by)
|
||||
index[inv][slot].count = index[inv][slot].count - by
|
||||
if index[inv][slot].count == 0 then index[inv][slot] = nil
|
||||
elseif index[inv][lot].count < 0 then os.queueEvent "reindex" error "Index inconsistency error." end
|
||||
elseif index[inv][slot].count < 0 then os.queueEvent "reindex" error "Index inconsistency error." end
|
||||
end
|
||||
|
||||
local function server(command)
|
||||
@ -193,7 +193,9 @@ local function server(command)
|
||||
local moved = 0
|
||||
|
||||
for _, loc in pairs(space_locations) do
|
||||
moved = moved + peripheral.call(conf.buffer_internal, "pushItems", loc.inventory, BUFFER_IN_SLOT, 64, loc.slot) -- push from buffer to free space
|
||||
local moved_now = peripheral.call(conf.buffer_internal, "pushItems", loc.inventory, BUFFER_IN_SLOT, 64, loc.slot) -- push from buffer to free space
|
||||
update_slot(loc.inventory, loc.slot, -moved_now)
|
||||
moved = moved + moved_now
|
||||
end
|
||||
|
||||
return { moved = moved }
|
||||
|
Loading…
x
Reference in New Issue
Block a user