Handle overridden tank nodes

This commit is contained in:
Evert Prants 2018-06-21 13:09:55 +03:00
parent 8719488563
commit 162bda4336
Signed by: evert
GPG Key ID: 1688DA83D222D0B5
1 changed files with 5 additions and 0 deletions

View File

@ -73,6 +73,11 @@ local function tank_on_timer(pos, elapsed)
meta:set_string("buffer_fluid", "")
end
if node_name:match("^:") ~= nil then
node_name = node_name:sub(2)
ndef = minetest.registered_nodes[node_name]
end
-- Update infotext
meta:set_string("infotext", ("%s\nContents: %s"):format(ndef.description,
fluid_lib.buffer_to_string(buffer)))