Modify Solar Panel's (Entity) energy production
Posted: Mon Jul 06, 2020 8:59 pm
I want to have a mod which scales Solar Panel's maximum energy production based on pollution in the chunk in which they are located (based on this research https://www.iflscience.com/environment/ ... SoLa_vqqig ![Smile :)](./images/smilies/icon_e_smile.gif)
So I want each entity to have different power output.
I tried LuaEntity.effects, but they are read-only (and I guess they don't work on Solar Panels?).
I also tried LuaEntity.productivity_bonus, but that's read-only aswell and probably wouldn't work anyway.
I also tried LuaEntity.power_production, but it says that solar-panel is not ElectricEnergyInterface (not sure what that is).
I could not find a way to do this without creating dozens of entities, like solar-panel with 59kW, solar-panel with 58kW etc. which is a disgusting hack and I want to avoid it (viewtopic.php?f=28&t=81892&p=483901&hil ... cA#p483901).
Am I missing something?
If not, would it be possible to implement some mechanic for this?
Thanks
Esso
![Smile :)](./images/smilies/icon_e_smile.gif)
So I want each entity to have different power output.
I tried LuaEntity.effects, but they are read-only (and I guess they don't work on Solar Panels?).
I also tried LuaEntity.productivity_bonus, but that's read-only aswell and probably wouldn't work anyway.
I also tried LuaEntity.power_production, but it says that solar-panel is not ElectricEnergyInterface (not sure what that is).
I could not find a way to do this without creating dozens of entities, like solar-panel with 59kW, solar-panel with 58kW etc. which is a disgusting hack and I want to avoid it (viewtopic.php?f=28&t=81892&p=483901&hil ... cA#p483901).
Am I missing something?
If not, would it be possible to implement some mechanic for this?
Thanks
Esso