For example, right now, I'm trying to make an entity that is a cross between an Arithmetic Combinator, and a Constant Combinator. It has Inputs, and based on some data, it will have different outputs depending on what is happening. Right now, with everyone that I've talked to, there is no way to currently show custom "Ouput Signals:" in the overlay/tooltip on entity hover.
Thinking about this for a while, I think the best way IMO is to create an overridable function that will return values for custom entities. There are a few ways to go about doing this:
1. get_tooltip_blocks() // Returns something similar to:
Code: Select all
{
block_type: 'electricity',
label: 'Electricity'
}
{
block_type: 'wire_reach',
label: 'Wire reach'
}
{
block_type: 'simple',
name: 'Testing',
value: 'Some random value'
}
{
block_type: 'signal',
label: 'Input Signals:',
signals: [] // Array of signals
}
2. An alternate would be to provide an override to specific functionality regarding tooltip generation. For example, for combinators, it would be nice to have a `get_signals_for_tooltip()` function that let's us override what the user sees.
IDK, there may be some better solutions, these were just the few that I came up with.