Page 1 of 1

Hide the electricity tooltip when buffer size is zero

Posted: Sun Feb 02, 2025 5:36 pm
by half a cat
Some modded items do not use electricity, but still have an energy buffer because the game engine requires it. To make the UI look nicer, please hide the tooltip for ElectricEnergySource when buffer_capacity and drain are 0.
What?
In this example, I would like the game to hide the part of the tooltip that shows Energy, Max input, Max output. This equipment, although it is defined with BatteryEquipmentPrototype, isn't intended to function as a battery.
Battery-tooltip.png
Battery-tooltip.png (57.13 KiB) Viewed 152 times
Why?
For mods to provide special equipment types. The game's equipment prototypes all implement specific gameplay functions (solar power, inventory bonus, etc.). Mods have to use one of these prototypes for special equipment. When the original gameplay function is not relevant to the mod, the tooltip information is distracting. This particular ElectricEnergySource setting is useless, so it would be natural to hide it, and it would also be helpful to mods.