Random node metadata things

This commit is contained in:
Perttu Ahola 2012-06-01 19:03:09 +03:00
parent 29f03756bd
commit f3ec1452cd
3 changed files with 6 additions and 7 deletions

@ -158,11 +158,6 @@ function minetest.item_place_node(itemstack, placer, pointed_thing)
-- Add node and update -- Add node and update
minetest.env:add_node(pos, newnode) 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 -- Run script hook
local _, callback local _, callback
for _, callback in ipairs(minetest.registered_on_placenodes) do for _, callback in ipairs(minetest.registered_on_placenodes) do
@ -319,7 +314,6 @@ minetest.nodedef_default = {
diggable = true, diggable = true,
climbable = false, climbable = false,
buildable_to = false, buildable_to = false,
metadata_name = "",
liquidtype = "none", liquidtype = "none",
liquid_alternative_flowing = "", liquid_alternative_flowing = "",
liquid_alternative_source = "", liquid_alternative_source = "",

@ -1009,7 +1009,6 @@ Node definition (register_node)
buildable_to = false, buildable_to = false,
drop = "", drop = "",
-- alternatively drop = { max_items = ..., items = { ... } } -- alternatively drop = { max_items = ..., items = { ... } }
metadata_name = "",
liquidtype = "none", liquidtype = "none",
liquid_alternative_flowing = "", liquid_alternative_flowing = "",
liquid_alternative_source = "", liquid_alternative_source = "",

@ -1112,6 +1112,12 @@ minetest.register_node("default:sign_wall", {
groups = {choppy=2,dig_immediate=2}, groups = {choppy=2,dig_immediate=2},
legacy_wallmounted = true, legacy_wallmounted = true,
sounds = default.node_sound_defaults(), 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", { minetest.register_node("default:chest", {