mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-01-26 03:52:22 +02:00
Merge pull request #147 from ComfyFactory/mtn_v3_icw
Mtn v3 - ICW fix weird bug
This commit is contained in:
commit
737e09d2f6
@ -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
|
request_stacks[stack.name] = 10 * prototypes[stack.name].stack_size
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
if wagon_inventory.supports_bar() then
|
||||||
for i = 1, wagon_inventory.get_bar() - 1, 1 do
|
for i = 1, wagon_inventory.get_bar() - 1, 1 do
|
||||||
if free_slots <= 0 then
|
if free_slots <= 0 then
|
||||||
return
|
return
|
||||||
@ -195,6 +196,7 @@ local function input_filtered(wagon_inventory, chest, chest_inventory, free_slot
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local remove_lights_token =
|
local remove_lights_token =
|
||||||
Token.register(
|
Token.register(
|
||||||
@ -303,17 +305,20 @@ local function input_cargo(wagon, chest)
|
|||||||
|
|
||||||
local chest_inventory = chest.get_inventory(defines.inventory.chest)
|
local chest_inventory = chest.get_inventory(defines.inventory.chest)
|
||||||
local free_slots = 0
|
local free_slots = 0
|
||||||
|
if chest_inventory.supports_bar() then
|
||||||
for i = 1, chest_inventory.get_bar() - 1, 1 do
|
for i = 1, chest_inventory.get_bar() - 1, 1 do
|
||||||
if not chest_inventory[i].valid_for_read then
|
if not chest_inventory[i].valid_for_read then
|
||||||
free_slots = free_slots + 1
|
free_slots = free_slots + 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
if chest.get_request_slot(1) then
|
if chest.get_request_slot(1) then
|
||||||
input_filtered(wagon_inventory, chest, chest_inventory, free_slots)
|
input_filtered(wagon_inventory, chest, chest_inventory, free_slots)
|
||||||
goto continue
|
goto continue
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if wagon_inventory.supports_bar() then
|
||||||
for i = 1, wagon_inventory.get_bar() - 1, 1 do
|
for i = 1, wagon_inventory.get_bar() - 1, 1 do
|
||||||
if free_slots <= 0 then
|
if free_slots <= 0 then
|
||||||
goto continue
|
goto continue
|
||||||
@ -324,6 +329,7 @@ local function input_cargo(wagon, chest)
|
|||||||
free_slots = free_slots - 1
|
free_slots = free_slots - 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
::continue::
|
::continue::
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user