Page 1 of 1

Attention those using glass nodes as liquid tanks

PostPosted: Thu Mar 30, 2017 06:29
by paramat
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:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
paramtype2 = "glasslikeliquidlevel",

Re: Attention those using glass nodes as liquid tanks

PostPosted: Sat Apr 01, 2017 00:17
by Jordach
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.

Re: Attention those using glass nodes as liquid tanks

PostPosted: Sat Apr 01, 2017 03:48
by paramat
I added some documentation in my commit https://github.com/minetest/minetest/commit/ea549bbae3650d246db7b70a2b07485a4b404409

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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.

Re: Attention those using glass nodes as liquid tanks

PostPosted: Sat Apr 01, 2017 09:01
by azekill_DIABLO
wow this is awesome! it looks odd though with solid blue color.

Re: Attention those using glass nodes as liquid tanks

PostPosted: Sat Apr 01, 2017 13:33
by Jordach
paramat wrote:I added some documentation in my commit https://github.com/minetest/minetest/commit/ea549bbae3650d246db7b70a2b07485a4b404409

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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.

Re: Attention those using glass nodes as liquid tanks

PostPosted: Sun Apr 02, 2017 08:53
by ABJ
Does this mean we can fill a window with water?

Re: Attention those using glass nodes as liquid tanks

PostPosted: Sun Apr 02, 2017 09:06
by azekill_DIABLO
Does this mean we can fill mutiple windows like if it was only one big window?

Re: Attention those using glass nodes as liquid tanks

PostPosted: Sun Apr 02, 2017 18:02
by GreenDimond
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?