mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-01-26 03:52:22 +02:00
autostash fix
This commit is contained in:
parent
c2a33b08e0
commit
45127336a0
@ -233,10 +233,12 @@ local function insert_item_into_chest(player_inventory, chests, filtered_chests,
|
||||
return
|
||||
end
|
||||
local chest_inventory = chest.get_inventory(defines.inventory.chest)
|
||||
if chest_inventory.can_insert({name = name, count = amount}) then
|
||||
local inserted_count = chest_inventory.insert({name = name, count = amount})
|
||||
player_inventory.remove({name = name, count = inserted_count})
|
||||
create_floaty_text(chest.surface, chest.position, name, inserted_count)
|
||||
if chest_inventory then
|
||||
if chest_inventory.can_insert({name = name, count = amount}) then
|
||||
local inserted_count = chest_inventory.insert({name = name, count = amount})
|
||||
player_inventory.remove({name = name, count = inserted_count})
|
||||
create_floaty_text(chest.surface, chest.position, name, inserted_count)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user