[MOD 0.15] Fluid Temperature Combinator

Topics and discussion about specific mods
Post Reply
User avatar
theRustyKnife
Filter Inserter
Filter Inserter
Posts: 259
Joined: Thu Feb 26, 2015 9:26 pm
Contact:

[MOD 0.15] Fluid Temperature Combinator

Post by theRustyKnife »

Fluid Temperature Combinator

Description:

Allows you to read the temperature of fluid in a tank and other things.

Details:

This thread is meant for questions and discussion only - please post bugs and suggestions on the mod portal or GitHub. Thanks


Downloads on the mod portal

Changelog
Last edited by theRustyKnife on Mon Apr 24, 2017 7:15 pm, edited 6 times in total.

Speadge
Fast Inserter
Fast Inserter
Posts: 130
Joined: Tue Mar 29, 2016 10:01 am
Contact:

Re: [MOD 0.14] Fluid Temperature Combinator

Post by Speadge »

Thank you so much! Really cool that u made one.

User avatar
theRustyKnife
Filter Inserter
Filter Inserter
Posts: 259
Joined: Thu Feb 26, 2015 9:26 pm
Contact:

Re: [MOD 0.14] Fluid Temperature Combinator

Post by theRustyKnife »

Speadge wrote:Thank you so much! Really cool that u made one.

You're welcome, if you have any more ideas, I'd be glad to implement them too ;)

Speadge
Fast Inserter
Fast Inserter
Posts: 130
Joined: Tue Mar 29, 2016 10:01 am
Contact:

Re: [MOD 0.14] Fluid Temperature Combinator

Post by Speadge »

theRustyKnife wrote:
Speadge wrote:Thank you so much! Really cool that u made one.

You're welcome, if you have any more ideas, I'd be glad to implement them too ;)
here we go:
just trying myself to implement a check on boilers as well.... but since i have no clue about lua, im struggling with how to extend

Code: Select all

return entity.surface.find_entities_filtered{area = area, type = "storage-tank"}[1]
with

Code: Select all

type =="boiler"
any hint?
I already edited the other 2 if-checks..
Or doesnt it have to be edited at all? i Have absolutely NO IDEA whats happening in there

User avatar
theRustyKnife
Filter Inserter
Filter Inserter
Posts: 259
Joined: Thu Feb 26, 2015 9:26 pm
Contact:

Re: [MOD 0.14] Fluid Temperature Combinator

Post by theRustyKnife »

Speadge wrote:
Quote
It does have to be edited. To be honest, I was thinking 'what about pipes and other stuff with fluids?' when I was making the mod, but I was coding it at school in the middle of a lesson so I just went with the quick and dirty approach and hoped nobody will need those other things :D.

You got the checks right, though a more robust way would be to make a table with the type strings and then just check in that table.
I suppose the best way to find the entities would be to replace entity.surface.find_entities_filtered with entity.surface.find_entities and then filter them 'by hand'. Or perhaps only check for boilers if no tanks are found or something like that.
It would be nice though if specifying multiple types in there would be possible...

I'm kinda feeling like it would be better to just implement it than ramble about it here, so stay tuned, update incoming ;)

Speadge
Fast Inserter
Fast Inserter
Posts: 130
Joined: Tue Mar 29, 2016 10:01 am
Contact:

Re: [MOD 0.14] Fluid Temperature Combinator

Post by Speadge »

theRustyKnife wrote:
Quote
ehm... yo.. sounds great :D
the "sensor" in the old mod "smarter circuitry" did the same - even more, since it gave even train contents and stuff like that.
viewtopic.php?f=91&t=14824&p=218068&hil ... y+#p218068

User avatar
theRustyKnife
Filter Inserter
Filter Inserter
Posts: 259
Joined: Thu Feb 26, 2015 9:26 pm
Contact:

Re: [MOD 0.14] Fluid Temperature Combinator

Post by theRustyKnife »

Speadge wrote:
theRustyKnife wrote:
Quote
ehm... yo.. sounds great :D
the "sensor" in the old mod "smarter circuitry" did the same - even more, since it gave even train contents and stuff like that.
viewtopic.php?f=91&t=14824&p=218068&hil ... y+#p218068
Done. I hope it works well for you.
If you're interested in what changes were made, it's on GitHub.

And yea, now it's two mods but hey, it works for now. I'll talk with Optera about integrating it into Inventory Sensor since it does fit in there pretty well ;)

Cheers TRK

Speadge
Fast Inserter
Fast Inserter
Posts: 130
Joined: Tue Mar 29, 2016 10:01 am
Contact:

Re: [MOD 0.14] Fluid Temperature Combinator

Post by Speadge »

checking right now. thanks again :):):)
works great - even better than my quick-n-dirty version i tried out :D

Speadge
Fast Inserter
Fast Inserter
Posts: 130
Joined: Tue Mar 29, 2016 10:01 am
Contact:

Re: [MOD 0.14] Fluid Temperature Combinator

Post by Speadge »

So with 0.1.2 i get '9820' instead of 98?
Is this precision needed/relevant?

User avatar
theRustyKnife
Filter Inserter
Filter Inserter
Posts: 259
Joined: Thu Feb 26, 2015 9:26 pm
Contact:

Re: [MOD 0.14] Fluid Temperature Combinator

Post by theRustyKnife »

Speadge wrote:So with 0.1.2 i get '9820' instead of 98?
Precisely.
Speadge wrote:Is this precision needed?
Good point.
I was actually thinking the same and found that eventhough I can't come up with a use for it (I haven't exactly played Factorio a ton lately), someone else might.
It would probably be smart to make it possible to switch between two modes or something. That'll have to wait for the next release tho. I'll try to make it asap, but there are other things I have to do too :?

If it's too annoying, just stick with 0.1.1, it's exactly the same besides this change.

Cheers TRK

EDIT: Also I talked with Optera about the integration and we decided to keep the mods seperate for now. It probably makes more sense this way.

Speadge
Fast Inserter
Fast Inserter
Posts: 130
Joined: Tue Mar 29, 2016 10:01 am
Contact:

Re: [MOD 0.14] Fluid Temperature Combinator

Post by Speadge »

Thanks for ur reply. No hurry in updating. I was just surprised of it ;)

Thanks again for spending ur time!

User avatar
theRustyKnife
Filter Inserter
Filter Inserter
Posts: 259
Joined: Thu Feb 26, 2015 9:26 pm
Contact:

Re: [MOD 0.14] Fluid Temperature Combinator

Post by theRustyKnife »

New version is out adding the toggle. Default is off as it's probably what most people would use.
A thing that would be nice to have is copy-paste this setting. If that works out, I think I'll consider it a 1.0 release ;)

Speadge
Fast Inserter
Fast Inserter
Posts: 130
Joined: Tue Mar 29, 2016 10:01 am
Contact:

Re: [MOD 0.14] Fluid Temperature Combinator

Post by Speadge »

me again :D

just came up with the idea, since u are getting the information of the entity anyway, the combinator also could output the content in addition / optional.

for most tanks / pumps not needed, but there are some edge scenarios where it might come in handy.

i.e.: content of pipes / content of rail-tanker...

just a thought.

Edit: could u also add steam-engine support?

User avatar
theRustyKnife
Filter Inserter
Filter Inserter
Posts: 259
Joined: Thu Feb 26, 2015 9:26 pm
Contact:

Re: [MOD 0.14] Fluid Temperature Combinator

Post by theRustyKnife »

Speadge wrote:me again :D
Hi!
Speadge wrote:just came up with the idea, since u are getting the information of the entity anyway, the combinator also could output the content in addition / optional.

for most tanks / pumps not needed, but there are some edge scenarios where it might come in handy.

i.e.: content of pipes / content of rail-tanker...

just a thought.
Great idea! Aaand done.
Speadge wrote:Edit: could u also add steam-engine support?
Sure ;)

Speadge
Fast Inserter
Fast Inserter
Posts: 130
Joined: Tue Mar 29, 2016 10:01 am
Contact:

Re: [MOD 0.14] Fluid Temperature Combinator

Post by Speadge »

great. thank you so much!

User avatar
theRustyKnife
Filter Inserter
Filter Inserter
Posts: 259
Joined: Thu Feb 26, 2015 9:26 pm
Contact:

Re: [MOD 0.15] Fluid Temperature Combinator

Post by theRustyKnife »

Version 0.3.0 released.
Changes:
* Updated for Factorio 0.15

Post Reply

Return to “Mods”