Underground Storage Tank

by fgardt

Adds a large buried storage tank with a capacity of 250k (configurable). Since they are mostly underground you can easily walk / drive over them. Additionally you can select if you want the more vanilla looking opaque top with fill indicator, completely closed top or a transparent one with custom internal fluid animation by changing a startup setting.

Content
10 months ago
1.1 - 2.0
6.27K
Logistics Fluids

g [DONE] Runtime scripts

4 months ago

I have what may be a bit of an odd question, but: Why does this mod use runtime scripts at all? I only noticed this when troubleshooting performance for another mod entirely, but Underground Storage Tanks are eating about 0.1ms on average in lua time. Isn't this just a storage tank? Looking at control.lua, I'm not entire sure what the on_nth_tick checks even do. Is it just for the sake of animation?

4 months ago

Since the transparent top animation is done with LuaRendering it needs to be updated during runtime. If you are concerned about performance you can use the mod map settings to change the update rate or switch to one of the other 2 graphic variants that don't have the transparent top.

The fill indicators of storage tanks don't support more than the simple vertical bar so for anything else like the transparent top some runtime code is required. Tho it should never really be a performance issue (if it is then you placed a lot of tanks / have a high update rate set).

4 months ago

Yeah, I did switch to the "fill bar" version and the lua time went down to essentially nothing.

It's not so much that I'm concerned about performance (though I am :) ), as I was just not really sure why a Fluid Tank would need runtime scripts at all. I did look through the prototypes, though, and you're right. Storage Tanks don't support animations at all - just pictures if I recall. So fair enough.

New response