mirror of
https://github.com/Xevion/project-cybersyn.git
synced 2025-12-10 08:08:14 -06:00
minor fixes
This commit is contained in:
@@ -102,7 +102,7 @@ local function set_comb2(map_data, station)
|
|||||||
for item_name, count in pairs(deliveries) do
|
for item_name, count in pairs(deliveries) do
|
||||||
local i = #signals + 1
|
local i = #signals + 1
|
||||||
local item_type = game.item_prototypes[item_name].type
|
local item_type = game.item_prototypes[item_name].type
|
||||||
signals[i] = {index = i, signal = {type = item_type, name = item_name}, count = count}
|
signals[i] = {index = i, signal = {type = item_type, name = item_name}, count = -count}
|
||||||
end
|
end
|
||||||
set_combinator_output(map_data, station.entity_comb2, signals)
|
set_combinator_output(map_data, station.entity_comb2, signals)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -242,7 +242,8 @@ function set_r_wagon_combs(map_data, station, train)
|
|||||||
local signals = {}
|
local signals = {}
|
||||||
|
|
||||||
local inv = carriage.get_inventory(defines.inventory.cargo_wagon)
|
local inv = carriage.get_inventory(defines.inventory.cargo_wagon)
|
||||||
for stack_i, stack in ipairs(inv) do
|
for stack_i = 1, #inv do
|
||||||
|
local stack = inv[stack_i]
|
||||||
if stack.valid_for_read then
|
if stack.valid_for_read then
|
||||||
local i = #signals + 1
|
local i = #signals + 1
|
||||||
--TODO: does this work or do we need to aggregate signals?
|
--TODO: does this work or do we need to aggregate signals?
|
||||||
|
|||||||
Reference in New Issue
Block a user