Page 1 of 1

Read out origin of steam

Posted: Mon May 21, 2018 1:48 pm
by Eineiiger
Hello there!

So I've been thinking about a way to read out that steam originates from water. The only way to produce steam in a vanilla game is by adding fuel to a boiler and supply it with water (as you all know), but either I am overseeing something or it is quite hard to read this out from the possibilities of LuaGamescript .

Re: Read out origin of steam

Posted: Mon May 21, 2018 6:52 pm
by darkfrei
Eineiiger wrote:Hello there!

So I've been thinking about a way to read out that steam originates from water. The only way to produce steam in a vanilla game is by adding fuel to a boiler and supply it with water (as you all know), but either I am overseeing something or it is quite hard to read this out from the possibilities of LuaGamescript .
We are need to have some steam recipe.

Re: Read out origin of steam

Posted: Tue May 22, 2018 8:58 am
by bobingabout
It's defined on the boiler itself. input fluid box has the filter "water" set, and output fluid box has the filter "steam" set. The input filter means "This is the only fluid that can enter this fluid box", but the output fluid box filter is more of a "this is the fluid that comes out", not quite intuitive, but, that's how you get it.

Re: Read out origin of steam

Posted: Tue May 22, 2018 5:44 pm
by Eineiiger
darkfrei wrote:
Eineiiger wrote:Hello there!

So I've been thinking about a way to read out that steam originates from water. The only way to produce steam in a vanilla game is by adding fuel to a boiler and supply it with water (as you all know), but either I am overseeing something or it is quite hard to read this out from the possibilities of LuaGamescript .
We are need to have some steam recipe.
We really are :roll:
bobingabout wrote:It's defined on the boiler itself. input fluid box has the filter "water" set, and output fluid box has the filter "steam" set. The input filter means "This is the only fluid that can enter this fluid box", but the output fluid box filter is more of a "this is the fluid that comes out", not quite intuitive, but, that's how you get it.
But do I see correctly that the fluidbox is related to an entity but not an entity_prototype? Can you imagine a way to read it out from any game prototypes?

Re: Read out origin of steam

Posted: Wed May 23, 2018 9:25 am
by bobingabout
I think that's just one of those things you'll need to pre-program into your script.

Re: Read out origin of steam

Posted: Sat May 26, 2018 8:23 pm
by eradicator
You can iterate over game.entity_prototypes to get the boiler prototypes as LuaEntityPrototype but it looks like there's currently no access to the fluid_box definition, so you'll have to file a request. Also there is access to the fluid produced by offshore pumps, which you'll also need to check to make sure nothing else produces the target fluid.