Code: Select all
set_signal(1, { signal = { type = "item", name = "powerSat" }, count = count })
Now constant combinators use the logistic groups and I can't seem to get them to work. When I place a new combinator, I set that signal to 0:
Code: Select all
local behaviour = _entity.get_or_create_control_behavior()
if (behaviour.sections_count == 0) then behaviour.add_section() end
local section = behaviour.get_section(1)
section.set_slot(1, { value = { name = "powerSat", type="item" }, min = 0, max = 0 })
Code: Select all
local behaviour = v.get_or_create_control_behavior()
local section = behaviour.get_section(1)
local slot = section.get_slot(1)
slot.min = count
slot.max = count
section.set_slot(1, slot)
Is this the right way to do it, or did I miss some other way of setting constant combinator values via script?