Selector combinator option
Selector combinator option
I want to have functionality where i can do a min/max operation based on comparing the green and red source. Is it possible to extend the options of that combinator at all?
Re: Selector combinator option
It already has that option - select input with index 0 and sort descending is max and ascending is min.
Re: Selector combinator option
No, it is not possible to change the behavior of combinators in mods.
What you can do:
- define custom entities that look like combinators but process their inputs/outputs with lua, but this can cause performance issues as the code has to run every tick
- define custom entities that actually create a bunch of invisible regular combinators that are wired up a certain way, but this requires a lot of logic to correctly deal with creating these composite entities and handling blueprinting/deconstruction/etc.
Since you can implement min/max between green and red using two just deciders, it would be possible to do the latter here, but it would be a lot of fiddly work compared to just blueprinting the two deciders.
What you can do:
- define custom entities that look like combinators but process their inputs/outputs with lua, but this can cause performance issues as the code has to run every tick
- define custom entities that actually create a bunch of invisible regular combinators that are wired up a certain way, but this requires a lot of logic to correctly deal with creating these composite entities and handling blueprinting/deconstruction/etc.
Since you can implement min/max between green and red using two just deciders, it would be possible to do the latter here, but it would be a lot of fiddly work compared to just blueprinting the two deciders.