Page 1 of 1

[MOD 0.15] Fluid Temperature Combinator

Posted: Tue Oct 25, 2016 6:59 am
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

Re: [MOD 0.14] Fluid Temperature Combinator

Posted: Tue Oct 25, 2016 8:09 am
by Speadge
Thank you so much! Really cool that u made one.

Re: [MOD 0.14] Fluid Temperature Combinator

Posted: Tue Oct 25, 2016 9:40 am
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 ;)

Re: [MOD 0.14] Fluid Temperature Combinator

Posted: Tue Oct 25, 2016 3:27 pm
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

Re: [MOD 0.14] Fluid Temperature Combinator

Posted: Tue Oct 25, 2016 3:54 pm
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 ;)

Re: [MOD 0.14] Fluid Temperature Combinator

Posted: Tue Oct 25, 2016 3:59 pm
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

Re: [MOD 0.14] Fluid Temperature Combinator

Posted: Tue Oct 25, 2016 4:29 pm
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

Re: [MOD 0.14] Fluid Temperature Combinator

Posted: Tue Oct 25, 2016 4:41 pm
by Speadge
checking right now. thanks again :):):)
works great - even better than my quick-n-dirty version i tried out :D

Re: [MOD 0.14] Fluid Temperature Combinator

Posted: Wed Oct 26, 2016 10:36 am
by Speadge
So with 0.1.2 i get '9820' instead of 98?
Is this precision needed/relevant?

Re: [MOD 0.14] Fluid Temperature Combinator

Posted: Wed Oct 26, 2016 10:50 am
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.

Re: [MOD 0.14] Fluid Temperature Combinator

Posted: Wed Oct 26, 2016 1:13 pm
by Speadge
Thanks for ur reply. No hurry in updating. I was just surprised of it ;)

Thanks again for spending ur time!

Re: [MOD 0.14] Fluid Temperature Combinator

Posted: Wed Nov 02, 2016 7:43 am
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 ;)

Re: [MOD 0.14] Fluid Temperature Combinator

Posted: Wed Nov 09, 2016 8:03 pm
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?

Re: [MOD 0.14] Fluid Temperature Combinator

Posted: Thu Nov 10, 2016 7:23 am
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 ;)

Re: [MOD 0.14] Fluid Temperature Combinator

Posted: Thu Nov 10, 2016 2:55 pm
by Speadge
great. thank you so much!

Re: [MOD 0.15] Fluid Temperature Combinator

Posted: Mon Apr 24, 2017 7:16 pm
by theRustyKnife
Version 0.3.0 released.
Changes:
* Updated for Factorio 0.15