mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-01-16 02:47:48 +02:00
Merge pull request #151 from ComfyFactory/autostash_fix_for_chest_mixing
fix for misaligned chest indexes in filtered chests
This commit is contained in:
commit
a89a2a6288
@ -462,8 +462,8 @@ local function auto_stash(player, event)
|
||||
local filtered_chests = {chest = {}, inventory = {}}
|
||||
for index, e in pairs(chests.chest) do
|
||||
if chest_is_valid(e) then
|
||||
filtered_chests.chest[#filtered_chests.chest + 1] = e
|
||||
filtered_chests.inventory[#filtered_chests.inventory + 1] = chests.inventory[index]
|
||||
filtered_chests.chest[index] = e
|
||||
filtered_chests.inventory[index] = chests.inventory[index]
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user