From 7dcd63be81cfcec3695941e6cb55b43bfc13b196 Mon Sep 17 00:00:00 2001 From: osmarks Date: Wed, 15 Aug 2018 21:06:34 +0100 Subject: [PATCH] oops --- backend-chests.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend-chests.lua b/backend-chests.lua index e508783..2852c15 100644 --- a/backend-chests.lua +++ b/backend-chests.lua @@ -146,6 +146,8 @@ local function server(command) table.insert(stacks, stack_to_pull) items_moved_from_storage = items_moved_from_storage + fetch_by_location(stack_to_pull.location, command.quantity) + + local location = stack_to_pull.location index[location.inventory][location.slot].count = index[location.inventory][location.slot].count - items_moved_from_storage if index[location.inventory][location.slot].count == 0 then index[location.inventory][location.slot] = nil elseif index[location.inventory][location.slot].count < 0 then error "Index inconsistency error." end