Replace deprecated meta:set_string(*, nil) calls

This commit is contained in:
Niklp 2024-06-29 17:16:22 +02:00
parent 653e76c165
commit 33c045fafb
No known key found for this signature in database
GPG Key ID: 05D6F5035E66267A
6 changed files with 6 additions and 7 deletions

View File

@ -379,7 +379,6 @@ minetest.register_node("techage:ta4_icta_controller", {
meta:set_string("number", number)
meta:set_int("state", techage.STOPPED)
meta:set_string("formspec", techage.formspecRules(meta, fs_data, sOUTPUT))
--meta:set_string("formspec", techage.cond_formspec(1, 1, nil))
meta:set_string("infotext", "TA4 ICTA Controller "..number..": stopped")
end,

View File

@ -202,7 +202,7 @@ local function on_receive_fields(pos, formname, fields, player)
local meta = M(pos)
logic.infotext(meta, NDEF(pos).description)
if fields.exit then
meta:set_string("formspec", nil)
meta:set_string("formspec", "")
meta:set_string("fixed" , "true")
else
meta:set_string("formspec", formspec(meta))

View File

@ -25,7 +25,7 @@ local function join_to_string(tbl)
end
local function reset_programmer(itemstack, user, pointed_thing)
user:get_meta():set_string("techage_prog_numbers", nil)
user:get_meta():set_string("techage_prog_numbers", "")
minetest.chat_send_player(user:get_player_name(), S("[TechAge Programmer] programmer reset"))
return itemstack
end
@ -53,7 +53,7 @@ local function program_numbers(itemstack, placer, pointed_thing)
if pos then
local meta = M(pos)
local numbers = minetest.deserialize(placer:get_meta():get_string("techage_prog_numbers")) or {}
placer:get_meta():set_string("techage_prog_numbers", nil)
placer:get_meta():set_string("techage_prog_numbers", "")
local player_name = placer:get_player_name()
if meta and meta:get_string("owner") ~= player_name then
minetest.chat_send_player(player_name, S("[TechAge Programmer] foreign or unknown node!"))

View File

@ -429,7 +429,7 @@ techage.register_node({"techage:terminal2"}, {
local number = meta:get_string("number") or ""
if number ~= "" then
meta:set_string("node_number", number)
meta:set_string("number", nil)
meta:set_string("number", "")
end
end,
})

View File

@ -75,7 +75,7 @@ for idx,pgn in ipairs(tPgns) do
minetest.swap_node(pos, node)
end
if fields.exit then
meta:set_string("formspec", nil)
meta:set_string("formspec", "")
local number = techage.add_node(pos, node.name)
meta:set_string("infotext", S("TechAge Door Block").." "..number)
end

View File

@ -61,7 +61,7 @@ for idx,pgn in ipairs(tPgns) do
minetest.swap_node(pos, node)
end
if fields.exit then
meta:set_string("formspec", nil)
meta:set_string("formspec", "")
local number = techage.add_node(pos, node.name)
meta:set_string("infotext", S("TechAge Gate Block").." "..number)
end