diff options
Diffstat (limited to 'default.lua')
-rw-r--r-- | default.lua | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/default.lua b/default.lua index 926da20..ab1d243 100644 --- a/default.lua +++ b/default.lua @@ -1,35 +1,9 @@ if minetest.get_modpath("default") then - minetest.register_node(":default:sign_wall", { - description = "Sign", - drawtype = "signlike", - tiles = {"default_sign_wall.png"}, - inventory_image = "default_sign_wall.png", - wield_image = "default_sign_wall.png", - paramtype = "light", - paramtype2 = "wallmounted", - sunlight_propagates = true, - walkable = false, - selection_box = { - type = "wallmounted", - --wall_top = <default> - --wall_bottom = <default> - --wall_side = <default> - }, - 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", "\"\"") - end, + minetest.override_item("default:sign_wall", { on_receive_fields = function(pos, formname, fields, sender) - --print("Sign at "..minetest.pos_to_string(pos).." got "..dump(fields)) local name = sender:get_player_name() if landrush.can_interact(pos, name) then - local meta = minetest.env:get_meta(pos) + local meta = minetest.get_meta(pos) fields.text = fields.text or "" print((name or "").." wrote \""..fields.text.. "\" to sign at "..minetest.pos_to_string(pos)) |