diff options
author | h-v-smacker <hans-von-smacker+github@gmail.com> | 2018-07-15 02:09:07 +0300 |
---|---|---|
committer | h-v-smacker <hans-von-smacker+github@gmail.com> | 2018-07-15 02:09:07 +0300 |
commit | 0539c2123cdb75610d8d6c4d8ac35491b1dd480e (patch) | |
tree | faf9acea3f7a66ee4dd21ed7b89f0f00942acf5f | |
parent | 9d348c39f413c66973991c1dc51f695d58e33565 (diff) |
infostrings
-rw-r--r-- | nodes_barrel.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/nodes_barrel.lua b/nodes_barrel.lua index a1f7e94..e591bcf 100644 --- a/nodes_barrel.lua +++ b/nodes_barrel.lua @@ -76,7 +76,7 @@ barrel.on_construct = function( pos ) inv:set_size("output", 1); -- to extract liquid meta:set_string('formspec', barrel.prepare_formspec()) - + meta:set_string('infotext', S("Empty barrel")) end @@ -157,6 +157,7 @@ barrel.on_metadata_inventory_put = function( pos, listname, index, stack, player meta:set_string('formspec', barrel.prepare_formspec(level, l)) if level == 1 then minetest.swap_node(pos, {name = node.name:gsub("_open$",""), param2 = node.param2}) + meta:set_string('infotext', S("Barrel with ") .. d.name) end break end @@ -171,6 +172,7 @@ barrel.on_metadata_inventory_put = function( pos, listname, index, stack, player local level = meta:get_int("liquid_level") - 1 if level == 0 then minetest.swap_node(pos, {name = node.name .. "_open", param2 = node.param2}) + meta:set_string('infotext', S("Empty barrel")) meta:set_string("liquid_type", "") meta:set_int("liquid_level", 0) lt = nil |