Attention those using glass nodes as liquid tanks

User avatar
paramat
Developer
 
Posts: 3254
Joined: Sun Oct 28, 2012 00:05
Location: UK
GitHub: paramat
IRC: paramat

Attention those using glass nodes as liquid tanks

by paramat » Thu Mar 30, 2017 06:29

Image

The 2 drawtypes 'glasslike_framed' and 'glasslike_framed_optional' have the ability to act as hollow tanks of liquid containing a liquid level with 64 levels defined by param2. This has until now been completely undocumented and was missing a 'paramtype2' for that use of param2.

I have now fixed this, but this means that nodes being used as liquid tanks now need to have this line added to their node definitions:

Code: Select all
paramtype2 = "glasslikeliquidlevel",
Attachments
screenshot_20170329_050909.png
(321.7 KiB) Not downloaded yet
 

User avatar
Jordach
Member
 
Posts: 4518
Joined: Mon Oct 03, 2011 17:58
Location: Blender Scene
GitHub: Jordach
IRC: Jordach
In-game: Jordach

Re: Attention those using glass nodes as liquid tanks

by Jordach » Sat Apr 01, 2017 00:17

Okay then; how do we use this?

Examples for how to set fill level in 1/16ths.

Examples for settings textures to liquid and glass node.

If you don't tell us how to use it, then it's a useless feature as there's no documentation in useful terms.
viewtopic.php?f=10&t=19056 Solar Plains Dev Server
 

User avatar
paramat
Developer
 
Posts: 3254
Joined: Sun Oct 28, 2012 00:05
Location: UK
GitHub: paramat
IRC: paramat

Re: Attention those using glass nodes as liquid tanks

by paramat » Sat Apr 01, 2017 03:48

I added some documentation in my commit https://github.com/minetest/minetest/commit/ea549bbae3650d246db7b70a2b07485a4b404409

Code: Select all
    paramtype2 == "glasslikeliquidlevel"
    ^ Only valid for "glasslike_framed" or "glasslike_framed_optional" drawtypes.
      param2 defines 64 levels of internal liquid.
      Liquid texture is defined using `special_tiles = {"modname_tilename.png"},`

Param2 values 0 to 63 define 64 levels, so for 1/16ths use values 0, 3, 7, 11 ...
Glass and frame textures are as standard glaslike_framed.
 

User avatar
azekill_DIABLO
Member
 
Posts: 7461
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO
 

User avatar
Jordach
Member
 
Posts: 4518
Joined: Mon Oct 03, 2011 17:58
Location: Blender Scene
GitHub: Jordach
IRC: Jordach
In-game: Jordach

Re: Attention those using glass nodes as liquid tanks

by Jordach » Sat Apr 01, 2017 13:33

paramat wrote:I added some documentation in my commit https://github.com/minetest/minetest/commit/ea549bbae3650d246db7b70a2b07485a4b404409

Code: Select all
    paramtype2 == "glasslikeliquidlevel"
    ^ Only valid for "glasslike_framed" or "glasslike_framed_optional" drawtypes.
      param2 defines 64 levels of internal liquid.
      Liquid texture is defined using `special_tiles = {"modname_tilename.png"},`

Param2 values 0 to 63 define 64 levels, so for 1/16ths use values 0, 3, 7, 11 ...
Glass and frame textures are as standard glaslike_framed.

~~Is it using param2 = 0-63 or 0-127?~~

^ Ignore that.

Absolutely fabulous.
viewtopic.php?f=10&t=19056 Solar Plains Dev Server
 

ABJ
Member
 
Posts: 3015
Joined: Sun Jan 18, 2015 13:02
Location: In Earth orbit, with a perigee of 1048 km and an apogee of 1337 km and an inclination of 69 degrees.
GitHub: ABJ-MV
In-game: ABJ
 

User avatar
azekill_DIABLO
Member
 
Posts: 7461
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO
 

User avatar
GreenDimond
Member
 
Posts: 1197
Joined: Wed Oct 28, 2015 01:26
Location: A place
GitHub: GreenXenith
IRC: GreenDimond
In-game: GreenDimond

Re: Attention those using glass nodes as liquid tanks

by GreenDimond » Sun Apr 02, 2017 18:02

azekill_DIABLO wrote:Does this mean we can fill mutiple windows like if it was only one big window?

That is an interesting idea. How does this interact with glass_like_framed?
My YuTube channel | I moderate the HOMETOWN Server. | Click here to see my (5) mods!
 

User avatar
paramat
Developer
 
Posts: 3254
Joined: Sun Oct 28, 2012 00:05
Location: UK
GitHub: paramat
IRC: paramat

Re: Attention those using glass nodes as liquid tanks

by paramat » Mon Apr 03, 2017 04:38

To be clear, a liquid tank only supports 64 levels, with 64 being 'full', and param2 values 0 to 63 control the level.
So 1/2 full is 31, 1/4 full is 15, 1/8 full is 7 etc.
 

User avatar
paramat
Developer
 
Posts: 3254
Joined: Sun Oct 28, 2012 00:05
Location: UK
GitHub: paramat
IRC: paramat

Re: Attention those using glass nodes as liquid tanks

by paramat » Mon Apr 03, 2017 04:50

Image

Connected tanks work horizontally only.
Attachments
screenshot_20170403_054707.png
(566.09 KiB) Not downloaded yet
 

ABJ
Member
 
Posts: 3015
Joined: Sun Jan 18, 2015 13:02
Location: In Earth orbit, with a perigee of 1048 km and an apogee of 1337 km and an inclination of 69 degrees.
GitHub: ABJ-MV
In-game: ABJ

Re: Attention those using glass nodes as liquid tanks

by ABJ » Mon Apr 03, 2017 09:00

So how do I place water inside glass? Do I need to edit the mods?
 

User avatar
MineYoshi
Member
 
Posts: 5357
Joined: Wed Jul 08, 2015 13:20

Re: Attention those using glass nodes as liquid tanks

by MineYoshi » Mon Apr 03, 2017 23:42

Good Work developers and you Paramat +10
nire patata zurea da, kide :-)
 

wilkgr76
Member
 
Posts: 831
Joined: Wed Feb 18, 2015 02:44
GitHub: wilkgr76
 

User avatar
maikerumine
Member
 
Posts: 1345
Joined: Mon Aug 04, 2014 14:27
GitHub: maikerumine
In-game: maikerumine
 

wilkgr76
Member
 
Posts: 831
Joined: Wed Feb 18, 2015 02:44
GitHub: wilkgr76
 

User avatar
ExeterDad
Member
 
Posts: 1717
Joined: Sun Jun 01, 2014 20:00
Location: New Hampshire U.S.A
In-game: ExeterDad
 

User avatar
paramat
Developer
 
Posts: 3254
Joined: Sun Oct 28, 2012 00:05
Location: UK
GitHub: paramat
IRC: paramat

Re: Attention those using glass nodes as liquid tanks

by paramat » Sat May 20, 2017 12:34

Erm, there are questions in this thread that are all answered in the 3rd post.
Not a prank, it was a feature added by RealBadAngel years ago and never properly documented.
 

wilkgr76
Member
 
Posts: 831
Joined: Wed Feb 18, 2015 02:44
GitHub: wilkgr76
 

User avatar
azekill_DIABLO
Member
 
Posts: 7461
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO
 

User avatar
texmex
Member
 
Posts: 1066
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

Re: Attention those using glass nodes as liquid tanks

by texmex » Tue May 23, 2017 09:20

paramat, is it possible to make connected tanks work vertically too, eventually?
 

wilkgr76
Member
 
Posts: 831
Joined: Wed Feb 18, 2015 02:44
GitHub: wilkgr76

Re: Attention those using glass nodes as liquid tanks

by wilkgr76 » Tue May 23, 2017 09:34

texmex, you can set the bottom ones to full and the top ones to empty, which would result in the same result, I'm guessing
N/A
 

twoelk
Member
 
Posts: 1258
Joined: Fri Apr 19, 2013 16:19
Location: northern Germany
GitHub: twoelk
IRC: twoelk
In-game: twoelk
 

User avatar
texmex
Member
 
Posts: 1066
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex
 

hajo
Member
 
Posts: 596
Joined: Thu Oct 13, 2016 10:45
Location: DE

Re: Attention those using glass nodes as liquid tanks

by hajo » Wed May 24, 2017 04:29

paramat wrote:The 2 drawtypes 'glasslike_framed' and 'glasslike_framed_optional' have the ability
to act as hollow tanks of liquid containing a liquid level with 64 levels defined by param2.

Can it use negative numbers too, to reverse the placement,
i.e. put the 'liquid' on top, growing down ?

Then it could be used for a window-shade.

And if the liquid could be placed on the left edge, growing to the right,
we could have an ingame-progressbar.
 

User avatar
paramat
Developer
 
Posts: 3254
Joined: Sun Oct 28, 2012 00:05
Location: UK
GitHub: paramat
IRC: paramat

Re: Attention those using glass nodes as liquid tanks

by paramat » Thu May 25, 2017 18:27

> paramat, is it possible to make connected tanks work vertically too, eventually?

That would be quite complex as you need to search up and down and detect vertical dimensions. Horizontally naturally works with almost no effort.
You could do this with Lua code in a mod setting param2 according to position in the stacked nodes.
 

Next

Return to News



Who is online

Users browsing this forum: No registered users and 3 guests