Page 1 of 1

[MOD API] Expand the EnergySource with a 'solar' type

Posted: Wed Jan 22, 2020 1:51 pm
by everything-narrative
TL;DR
Add a 'solar' type to the EnergySource prototype, allowing for entitties that generate free power with the same intensity curve/duty cycle pattern as vanilla solar panels.
What ?
Currently there is no way to define custom solar-powered entities without resorting to silly Lua-based workarounds. The proposed EnergySource type would basically be a 'void' energy source with that same day-night intensity curve (70% duty-cycle) as vanilla solar panels.
Why ?
There are currently several mods implementing various kinds of solar-powered entities which do not fall under the SolarPanel prototype, which all have to work around this shortcoming of the EnergySource interface.

Re: [MOD API] Expand the EnergySource with a 'solar' type

Posted: Thu Jul 23, 2020 3:35 am
by kizrak
I would really love to see this too ! 🧡

Thanks!
-Kizrak

Re: [MOD API] Expand the EnergySource with a 'solar' type

Posted: Tue Sep 07, 2021 8:11 pm
by Impatient
Having studdied the EnergySource prototype, I also +10 this request. Factorio API does not allow for a solar energy boiler. This is, ... well incomprehsnible to me, as all the mechanics for it are available in the game.

I know the Lua prototypes most likely are wrappers for the internal c++ classes or structs or functions libraries or whatever you use to keep track of a gazillion entities. And these are well optimizedfor sure. Providing a separate solar energy source module like the other energy sources might be an opportunity to further enable modders though.