forked from mtcontrib/arrow_signs
Minetest.env: deprecated.
This commit is contained in:
parent
0af83277f9
commit
de70260127
18
init.lua
18
init.lua
@ -12,7 +12,7 @@ arrow_signs={}
|
|||||||
minetest.chat_send_player(sender:get_player_name(), "error: you don't have permission to edit the sign. you need the interact priv")
|
minetest.chat_send_player(sender:get_player_name(), "error: you don't have permission to edit the sign. you need the interact priv")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local meta = minetest.env:get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
fields.text = fields.text or ""
|
fields.text = fields.text or ""
|
||||||
print((sender:get_player_name() or "").." wrote \""..fields.text..
|
print((sender:get_player_name() or "").." wrote \""..fields.text..
|
||||||
"\" to sign at "..minetest.pos_to_string(pos))
|
"\" to sign at "..minetest.pos_to_string(pos))
|
||||||
@ -89,8 +89,8 @@ minetest.register_node("arrow_signs:wall_right", {
|
|||||||
legacy_wallmounted = true,
|
legacy_wallmounted = true,
|
||||||
sounds = default.node_sound_defaults(),
|
sounds = default.node_sound_defaults(),
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
--local n = minetest.env:get_node(pos)
|
--local n = minetest.get_node(pos)
|
||||||
local meta = minetest.env:get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
meta:set_string("formspec", "hack:sign_text_input")
|
meta:set_string("formspec", "hack:sign_text_input")
|
||||||
meta:set_string("infotext", "\"\"")
|
meta:set_string("infotext", "\"\"")
|
||||||
end,
|
end,
|
||||||
@ -121,8 +121,8 @@ minetest.register_node("arrow_signs:wall_left", {
|
|||||||
legacy_wallmounted = true,
|
legacy_wallmounted = true,
|
||||||
sounds = default.node_sound_defaults(),
|
sounds = default.node_sound_defaults(),
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
--local n = minetest.env:get_node(pos)
|
--local n = minetest.get_node(pos)
|
||||||
local meta = minetest.env:get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
meta:set_string("formspec", "hack:sign_text_input")
|
meta:set_string("formspec", "hack:sign_text_input")
|
||||||
meta:set_string("infotext", "\"\"")
|
meta:set_string("infotext", "\"\"")
|
||||||
end,
|
end,
|
||||||
@ -152,8 +152,8 @@ minetest.register_node("arrow_signs:wall_up", {
|
|||||||
legacy_wallmounted = true,
|
legacy_wallmounted = true,
|
||||||
sounds = default.node_sound_defaults(),
|
sounds = default.node_sound_defaults(),
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
--local n = minetest.env:get_node(pos)
|
--local n = minetest.get_node(pos)
|
||||||
local meta = minetest.env:get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
meta:set_string("formspec", "hack:sign_text_input")
|
meta:set_string("formspec", "hack:sign_text_input")
|
||||||
meta:set_string("infotext", "\"\"")
|
meta:set_string("infotext", "\"\"")
|
||||||
end,
|
end,
|
||||||
@ -183,8 +183,8 @@ minetest.register_node("arrow_signs:wall_down", {
|
|||||||
legacy_wallmounted = true,
|
legacy_wallmounted = true,
|
||||||
sounds = default.node_sound_defaults(),
|
sounds = default.node_sound_defaults(),
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
--local n = minetest.env:get_node(pos)
|
--local n = minetest.get_node(pos)
|
||||||
local meta = minetest.env:get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
meta:set_string("formspec", "hack:sign_text_input")
|
meta:set_string("formspec", "hack:sign_text_input")
|
||||||
meta:set_string("infotext", "\"\"")
|
meta:set_string("infotext", "\"\"")
|
||||||
end,
|
end,
|
||||||
|
@ -19,7 +19,7 @@ minetest.register_node("arrow_signs:shared_locked_right", {
|
|||||||
|
|
||||||
|
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
local meta = minetest.env:get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
-- prepare the lock of the sign
|
-- prepare the lock of the sign
|
||||||
locks:lock_init( pos,
|
locks:lock_init( pos,
|
||||||
"size[8,4]"..
|
"size[8,4]"..
|
||||||
@ -46,7 +46,7 @@ minetest.register_node("arrow_signs:shared_locked_right", {
|
|||||||
and locks:lock_allow_use( pos, sender )) then
|
and locks:lock_allow_use( pos, sender )) then
|
||||||
|
|
||||||
--print("Sign at "..minetest.pos_to_string(pos).." got "..dump(fields))
|
--print("Sign at "..minetest.pos_to_string(pos).." got "..dump(fields))
|
||||||
local meta = minetest.env:get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
fields.text = fields.text or "";
|
fields.text = fields.text or "";
|
||||||
print((sender:get_player_name() or "").." wrote \""..fields.text..
|
print((sender:get_player_name() or "").." wrote \""..fields.text..
|
||||||
"\" to sign at "..minetest.pos_to_string(pos));
|
"\" to sign at "..minetest.pos_to_string(pos));
|
||||||
@ -81,7 +81,7 @@ minetest.register_node("arrow_signs:shared_locked_right", {
|
|||||||
|
|
||||||
|
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
local meta = minetest.env:get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
-- prepare the lock of the sign
|
-- prepare the lock of the sign
|
||||||
locks:lock_init( pos,
|
locks:lock_init( pos,
|
||||||
"size[8,4]"..
|
"size[8,4]"..
|
||||||
@ -108,7 +108,7 @@ minetest.register_node("arrow_signs:shared_locked_right", {
|
|||||||
and locks:lock_allow_use( pos, sender )) then
|
and locks:lock_allow_use( pos, sender )) then
|
||||||
|
|
||||||
--print("Sign at "..minetest.pos_to_string(pos).." got "..dump(fields))
|
--print("Sign at "..minetest.pos_to_string(pos).." got "..dump(fields))
|
||||||
local meta = minetest.env:get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
fields.text = fields.text or "";
|
fields.text = fields.text or "";
|
||||||
print((sender:get_player_name() or "").." wrote \""..fields.text..
|
print((sender:get_player_name() or "").." wrote \""..fields.text..
|
||||||
"\" to sign at "..minetest.pos_to_string(pos));
|
"\" to sign at "..minetest.pos_to_string(pos));
|
||||||
@ -143,7 +143,7 @@ minetest.register_node("arrow_signs:shared_locked_right", {
|
|||||||
|
|
||||||
|
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
local meta = minetest.env:get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
-- prepare the lock of the sign
|
-- prepare the lock of the sign
|
||||||
locks:lock_init( pos,
|
locks:lock_init( pos,
|
||||||
"size[8,4]"..
|
"size[8,4]"..
|
||||||
@ -170,7 +170,7 @@ minetest.register_node("arrow_signs:shared_locked_right", {
|
|||||||
and locks:lock_allow_use( pos, sender )) then
|
and locks:lock_allow_use( pos, sender )) then
|
||||||
|
|
||||||
--print("Sign at "..minetest.pos_to_string(pos).." got "..dump(fields))
|
--print("Sign at "..minetest.pos_to_string(pos).." got "..dump(fields))
|
||||||
local meta = minetest.env:get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
fields.text = fields.text or "";
|
fields.text = fields.text or "";
|
||||||
print((sender:get_player_name() or "").." wrote \""..fields.text..
|
print((sender:get_player_name() or "").." wrote \""..fields.text..
|
||||||
"\" to sign at "..minetest.pos_to_string(pos));
|
"\" to sign at "..minetest.pos_to_string(pos));
|
||||||
@ -205,7 +205,7 @@ minetest.register_node("arrow_signs:shared_locked_right", {
|
|||||||
|
|
||||||
|
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
local meta = minetest.env:get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
-- prepare the lock of the sign
|
-- prepare the lock of the sign
|
||||||
locks:lock_init( pos,
|
locks:lock_init( pos,
|
||||||
"size[8,4]"..
|
"size[8,4]"..
|
||||||
@ -232,7 +232,7 @@ minetest.register_node("arrow_signs:shared_locked_right", {
|
|||||||
and locks:lock_allow_use( pos, sender )) then
|
and locks:lock_allow_use( pos, sender )) then
|
||||||
|
|
||||||
--print("Sign at "..minetest.pos_to_string(pos).." got "..dump(fields))
|
--print("Sign at "..minetest.pos_to_string(pos).." got "..dump(fields))
|
||||||
local meta = minetest.env:get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
fields.text = fields.text or "";
|
fields.text = fields.text or "";
|
||||||
print((sender:get_player_name() or "").." wrote \""..fields.text..
|
print((sender:get_player_name() or "").." wrote \""..fields.text..
|
||||||
"\" to sign at "..minetest.pos_to_string(pos));
|
"\" to sign at "..minetest.pos_to_string(pos));
|
||||||
|
Loading…
Reference in New Issue
Block a user