API: Add PrototypeFilter for type="signal"

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
kryojenik
Inserter
Inserter
Posts: 27
Joined: Fri Jun 26, 2020 8:18 pm
Contact:

API: Add PrototypeFilter for type="signal"

Post by kryojenik »

TL;DR; Desire to filter / limit the signals presented by the "choose-elem-button" LuaGuiElement type.

Specifically in the case of implementing an extension to a constant combinator (e.g. https://mods.factorio.com/mod/LTN_Combinator_Modernized) the special signals (signal-each, signal-anything, signal-everything) don't make sense. The in game constant combinator has these signals filtered out in its "choose-elem-button" panel. In fact, if they are selected in a mod an applied to the underlying constant combinator entity it crashes the game. I'm working to trap for these selections in the mod, but ideally it would be best to not present invalid selections to begin with.

Crash report
Constant combinator: invalid signal in parameters: signal-anything

Vanilla Constant Combinator
const.png
const.png (346.9 KiB) Viewed 2549 times
LTN Combinator using a choose-elem-button type=signal
ltn.png
ltn.png (316.09 KiB) Viewed 2549 times
These signals were added to the "choose-elem-button" panel after a bug report in 0.18.24. via viewtopic.php?f=11&t=84877.

curiosity
Filter Inserter
Filter Inserter
Posts: 459
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

Re: API: Add PrototypeFilter for type="signal"

Post by curiosity »

Potentially related: viewtopic.php?f=28&t=97127

meifray
Long Handed Inserter
Long Handed Inserter
Posts: 61
Joined: Sat May 29, 2021 6:12 pm
Contact:

Re: API: Add PrototypeFilter for type="signal"

Post by meifray »

and this is why Improved Combinator just faked the signal selection screen himself.


guimeme.png
guimeme.png (447.3 KiB) Viewed 2481 times

BinarySpike
Burner Inserter
Burner Inserter
Posts: 16
Joined: Tue Jun 28, 2016 2:15 am
Contact:

Re: API: Add PrototypeFilter for type="signal"

Post by BinarySpike »

+1 because it seems train fluid conditions already have something like this implemented and it would make my mod look much nicer:
Image

Post Reply

Return to “Modding interface requests”