mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-01-04 00:15:45 +02:00
mtn v3 - icw
Fix weird bug
This commit is contained in:
parent
0545b5c99a
commit
e7061ce2c4
@ -180,6 +180,7 @@ local function input_filtered(wagon_inventory, chest, chest_inventory, free_slot
|
||||
request_stacks[stack.name] = 10 * prototypes[stack.name].stack_size
|
||||
end
|
||||
end
|
||||
if wagon_inventory.supports_bar() then
|
||||
for i = 1, wagon_inventory.get_bar() - 1, 1 do
|
||||
if free_slots <= 0 then
|
||||
return
|
||||
@ -195,6 +196,7 @@ local function input_filtered(wagon_inventory, chest, chest_inventory, free_slot
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local remove_lights_token =
|
||||
Token.register(
|
||||
@ -303,17 +305,20 @@ local function input_cargo(wagon, chest)
|
||||
|
||||
local chest_inventory = chest.get_inventory(defines.inventory.chest)
|
||||
local free_slots = 0
|
||||
if chest_inventory.supports_bar() then
|
||||
for i = 1, chest_inventory.get_bar() - 1, 1 do
|
||||
if not chest_inventory[i].valid_for_read then
|
||||
free_slots = free_slots + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if chest.get_request_slot(1) then
|
||||
input_filtered(wagon_inventory, chest, chest_inventory, free_slots)
|
||||
goto continue
|
||||
end
|
||||
|
||||
if wagon_inventory.supports_bar() then
|
||||
for i = 1, wagon_inventory.get_bar() - 1, 1 do
|
||||
if free_slots <= 0 then
|
||||
goto continue
|
||||
@ -324,6 +329,7 @@ local function input_cargo(wagon, chest)
|
||||
free_slots = free_slots - 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
::continue::
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user