Hello,I came across a couple of areas in your code that I think could benefit from small adjustments.
- Research-signal value greater than 1000
If a research signal is set higher than 1000, research control no longer works correctly.
In control.lua, line 35 currently reads:
local min_value = 1000
Changing it to
local min_value = math.huge
lets the tower handle research signals above 1000 without issues.
- Duplicate on_research_finished handlers
Lines 215–216 and 238–239 both register the same event:
script.on_event(defines.events.on_research_finished, process_tower)
script.on_event(defines.events.on_research_finished, update_combinators)
When script.on_event is called twice for the same event, Factorio keeps only the last handler, so process_tower never runs. Although research restarts when the combinators refresh every 60 ticks, this probably isn’t what you intended. A simple fix is to wrap both calls in a single handler:
local function on_research_finished()
process_tower()
update_combinators()
end
script.on_event(defines.events.on_research_finished, on_research_finished)
Thank you for the mod. I've been using it and it’s been very helpful.