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 .
Read out origin of steam
Re: Read out origin of steam
We are need to have some steam recipe.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 .
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: Read out origin of steam
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
We really aredarkfrei wrote:We are need to have some steam recipe.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 .
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?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.
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: Read out origin of steam
I think that's just one of those things you'll need to pre-program into your script.
- eradicator
- Smart Inserter
- Posts: 5206
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Read out origin of steam
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.