1
0
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:
hanakocz 2021-11-05 23:29:10 +01:00 committed by GitHub
commit a89a2a6288
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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