The new fluid_energy_source_prototype API is ideal for most entities. Unfortunately, it doesn't seem to work for generators because generators always have an electric energy source. The entity prototype already has fluid_usage_per_tick, maximum_temperature, and effectivity for generators, but it's lacking burns_fluid, scale_fluid_usage, and max_power_output. Would it be possible to expose this information somehow?
This information is useful for mods that want to calculate a generator's actual or theoretical fluid consumption and power output. The simplest example is a mod like MaxRateCalculator where you drag a box around a group of entities, and it lists the input rates, output rates, and power consumed/produced.
More info for fluid generators
Re: More info for fluid generators
Hello,
I find myself in need of the same information mentioned by vamaelo (burns_fluid, scale_fluid_usage) on the LuaEntityPrototype; planners like Helmod (tyvm Helfima, btw) lack this for correct fluid usage calculations on the generator entity prototypes.
First idea would be to introduces the mentioned properties on the LuaEntityPrototype; naturally, this increases the complexity of the interface (for this need, which is rather specific).
Second idea would be to take the same approach as for the burner_prototype; introduce a new class LuaGeneratorPrototype which would contain the above-mentioned properties, accessible through LuaEntityPrototype via a generator_prototype property.
Do let us know if there's another way to access the needed information - we thank you kindly, in advance.
I find myself in need of the same information mentioned by vamaelo (burns_fluid, scale_fluid_usage) on the LuaEntityPrototype; planners like Helmod (tyvm Helfima, btw) lack this for correct fluid usage calculations on the generator entity prototypes.
First idea would be to introduces the mentioned properties on the LuaEntityPrototype; naturally, this increases the complexity of the interface (for this need, which is rather specific).
Second idea would be to take the same approach as for the burner_prototype; introduce a new class LuaGeneratorPrototype which would contain the above-mentioned properties, accessible through LuaEntityPrototype via a generator_prototype property.
Do let us know if there's another way to access the needed information - we thank you kindly, in advance.
Re: More info for fluid generators
Is it possible for a LuaEntityPrototype to have a fluid_energy_source_prototype as well as an electric_energy_source_prototype? If so, then there would be no addition to the API.
I'm working on a PR for Helmod and am a bit stuck without being able to access this information.
This is a request for an expansion on an implemented request: viewtopic.php?f=65&t=78211
I'm working on a PR for Helmod and am a bit stuck without being able to access this information.
This is a request for an expansion on an implemented request: viewtopic.php?f=65&t=78211
Dev for Bob's mods, Angel's mods, Helmod, Sea Block, Circuit Processing, Science Cost Tweaker.
Buy me a coffee
Buy me a coffee
Re: More info for fluid generators
Another option would be to add burns_fluid to LuaEntityPrototype. Currently there is no way to differentiate at control stage between a steam engine and a fluid burning generator.
Dev for Bob's mods, Angel's mods, Helmod, Sea Block, Circuit Processing, Science Cost Tweaker.
Buy me a coffee
Buy me a coffee
Re: More info for fluid generators
Nexela told me the other day that he PRed it.
Re: More info for fluid generators
Really? That would be great!
Dev for Bob's mods, Angel's mods, Helmod, Sea Block, Circuit Processing, Science Cost Tweaker.
Buy me a coffee
Buy me a coffee
Re: More info for fluid generators
This has been added in the next release (1.1.57).
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Re: More info for fluid generators
Seems that this was missed from the changelog
Dev for Bob's mods, Angel's mods, Helmod, Sea Block, Circuit Processing, Science Cost Tweaker.
Buy me a coffee
Buy me a coffee
Re: More info for fluid generators
A lot of Nexela's PRs didn't make it to the changelog, AFAICT.
Re: More info for fluid generators
That is incorrect, only the changelog for this forum thread was forgotten. The changelog line would have been:curiosity wrote: Wed Mar 30, 2022 7:07 pm A lot of Nexela's PRs didn't make it to the changelog, AFAICT.
Added LuaEntityPrototoype::burns_fluid, scale_fluid_usage, destroy_non_fuel_fluid, and max_power_output read.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.