From f3ec1452cdf73d62f38b0222dcbf8bc78293206d Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Fri, 1 Jun 2012 19:03:09 +0300 Subject: [PATCH] Random node metadata things --- builtin/item.lua | 6 ------ doc/lua_api.txt | 1 - games/minimal/mods/default/init.lua | 6 ++++++ 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/builtin/item.lua b/builtin/item.lua index 129a12cf..d30b439a 100644 --- a/builtin/item.lua +++ b/builtin/item.lua @@ -158,11 +158,6 @@ function minetest.item_place_node(itemstack, placer, pointed_thing) -- Add node and update minetest.env:add_node(pos, newnode) - -- Set metadata owner - if def.metadata_name ~= "" then - minetest.env:get_meta(pos):set_owner(placer:get_player_name()) - end - -- Run script hook local _, callback for _, callback in ipairs(minetest.registered_on_placenodes) do @@ -319,7 +314,6 @@ minetest.nodedef_default = { diggable = true, climbable = false, buildable_to = false, - metadata_name = "", liquidtype = "none", liquid_alternative_flowing = "", liquid_alternative_source = "", diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 734171d0..58c26042 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -1009,7 +1009,6 @@ Node definition (register_node) buildable_to = false, drop = "", -- alternatively drop = { max_items = ..., items = { ... } } - metadata_name = "", liquidtype = "none", liquid_alternative_flowing = "", liquid_alternative_source = "", diff --git a/games/minimal/mods/default/init.lua b/games/minimal/mods/default/init.lua index 516968f3..ed16e6a3 100644 --- a/games/minimal/mods/default/init.lua +++ b/games/minimal/mods/default/init.lua @@ -1112,6 +1112,12 @@ minetest.register_node("default:sign_wall", { groups = {choppy=2,dig_immediate=2}, legacy_wallmounted = true, sounds = default.node_sound_defaults(), + on_construct = function(pos) + --local n = minetest.env:get_node(pos) + local meta = minetest.env:get_meta(pos) + meta:set_string("formspec", "hack:sign_text_input") + meta:set_string("infotext", "\"${text}\"") + end, }) minetest.register_node("default:chest", { -- 2.30.2