get_signal_last_tick() for all control behaviors

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
Xorimuth
Filter Inserter
Filter Inserter
Posts: 624
Joined: Sat Mar 02, 2019 9:39 pm
Contact:

get_signal_last_tick() for all control behaviors

Post by Xorimuth »

I'm writing a tool to search all entities for their output signals, but the current API doesn't allow this. Going off the list of control behaviors (https://lua-api.factorio.com/latest/def ... avior.type), I've come up with a list of which entities allow the reading of their output signals.

Container - no
Generic - no
Inserter - no
[Lamp - no, doesn't output signals]
Logistic Container - no
Roboport - partial (yes for robot stats, no for logistic network contents)
Storage tank - no
Train stop - partial (yes for stopped train and train count, no for train contents)
Decider/arith combinator - yes (via combinator control)
Constant combinator - yes (get_signal)
Accumulator - yes (output_signal)
Rail signal - yes (red_signal, orange_signal, green_signal)
Chain signal - yes (red_signal, orange_signal, green_signal, blue_signal)
Wall signal - yes (output_signal)
Mining drill - no

In general, entities don't support reading of arbitrary signals (e.g. inventory contents), only pre-specified signals. The exception to this is decider and arithmetic combinators, which both have get_signal_last_tick. Would it be possible to add this to all control behaviours, or would that have a significant performance impact?
My mods
Content: Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Remote Configuration | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings

Post Reply

Return to “Modding interface requests”