Page 1 of 1

Small Lightning Collector Requests

Posted: Thu Nov 28, 2024 6:09 am
by MaxAstro
1) It would be nice if the actual range of a specific lightning collector was directly available in the LuaEntity. Currently you have to get the prototype and quality and math out the range from those.

2) It would also be nice if lightning collectors being blocked from placement on planets without lightning was a boolean instead of hardcoded. This would allow for a mod to add, for example, a variant of a lightning collector that is scripted to spawn lightning around itself instead of needing lightning to already exist on the planet. It could also perhaps be useful if a mod wants to add a building that visually displays a range blob around itself during placement like collectors do, as a way of indicating the functional range of the building in some other context.

And finally 3) Considering that different lightning prototypes can be defined, I'm very surprised that it's not possible to then define which types of lightning a collector can actually collect. That seems like an obvious feature for any mod that wants to add other types of "lightning". If I add a planet with deadly firestorms and a building that shields from them, it would be odd for that building to also absorb lightning on Fulgora!

tl;dr:
Please add
LuaEntity.lightning_collector_range :: uint
LuaLightningAttractor.requires_lightning_to_place :: boolean
LuaLightningAttractor.collected_lightning_types :: array[LightningPrototype]