Handle overridden tank nodes

This commit is contained in:
Evert Prants 2018-06-21 13:09:55 +03:00
parent 8719488563
commit 162bda4336
No known key found for this signature in database
GPG Key ID: 1688DA83D222D0B5

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