Page 1 of 1

API: Add PrototypeFilter for type="signal"

Posted: Wed Oct 20, 2021 6:05 pm
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 2566 times
LTN Combinator using a choose-elem-button type=signal
ltn.png
ltn.png (316.09 KiB) Viewed 2566 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.

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

Posted: Wed Oct 20, 2021 8:12 pm
by curiosity
Potentially related: viewtopic.php?f=28&t=97127

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

Posted: Sun Oct 24, 2021 3:27 pm
by meifray
and this is why Improved Combinator just faked the signal selection screen himself.


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

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

Posted: Fri Oct 20, 2023 9:46 pm
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