mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-05-29 18:16:27 -04:00
Fix infotext for steel door/trapdoor
This commit is contained in:
parent
b1b5ffa68f
commit
7477bf4969
2 changed files with 3 additions and 3 deletions
|
@ -2601,7 +2601,7 @@ local function register_sign(material, desc, def)
|
|||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("text", text)
|
||||
|
||||
if string.len(text) > 0 then
|
||||
if #text > 0 then
|
||||
meta:set_string("infotext", '"' .. text .. '"')
|
||||
else
|
||||
meta:set_string("infotext", '')
|
||||
|
|
|
@ -333,7 +333,7 @@ function doors.register(name, def)
|
|||
|
||||
if def.protected then
|
||||
meta:set_string("owner", pn)
|
||||
meta:set_string("infotext", S("Steel Door\nOwned by @1", pn))
|
||||
meta:set_string("infotext", S("Steel Door") .. "\n" .. S("Owned by @1", pn))
|
||||
end
|
||||
|
||||
if not (creative and creative.is_enabled_for and creative.is_enabled_for(pn)) then
|
||||
|
@ -586,7 +586,7 @@ function doors.register_trapdoor(name, def)
|
|||
local pn = placer:get_player_name()
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("owner", pn)
|
||||
meta:set_string("infotext", S("Steel Trapdoor\nOwned by @1", pn))
|
||||
meta:set_string("infotext", S("Steel Trapdoor") .. "\n" .. S("Owned by @1", pn))
|
||||
|
||||
return (creative and creative.is_enabled_for and creative.is_enabled_for(pn))
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue