Expose `fluid-turret` mandatory properties as read-only in LuaEntityPrototype

User avatar
Muppet9010
Filter Inserter
Filter Inserter
Posts: 283
Joined: Sat Dec 09, 2017 6:01 pm
Contact:

Expose `fluid-turret` mandatory properties as read-only in LuaEntityPrototype

Post by Muppet9010 »

At present there isn't a way via the API to check on the amount of fluid needed in a fluid-turret for it to activate. I wanted to do this as a check during an RCON command by Streamers to create and fill up fluid-turrets. To alert them if they were putting in less fluid than the turret required to activate.

This would require exposing the

Code: Select all

fluid_buffer_size
and

Code: Select all

activation_buffer_ratio
properties of a fluid-turret as read only in LuaEntityPrototype.
https://wiki.factorio.com/Prototype/Flu ... uffer_size

However, with these 2 being added there seems no reason not to also add the other mandatory property that may be wanted via runtime API;

Code: Select all

fluid_buffer_input_flow
as another read only field on LuaEntityPrototype.
Bilka
Factorio Staff
Factorio Staff
Posts: 3615
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Expose `fluid-turret` mandatory properties as read-only in LuaEntityPrototype

Post by Bilka »

Okay, added LuaEntityPrototype::fluid_buffer_size, activation_buffer_ratio and fluid_buffer_input_flow read for 2.0.67.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Post Reply

Return to “Implemented mod requests”