From 33c045fafb0789152bcdc1dc494609d03e6a33a7 Mon Sep 17 00:00:00 2001 From: Niklp Date: Sat, 29 Jun 2024 17:16:22 +0200 Subject: [PATCH] Replace deprecated `meta:set_string(*, nil)` calls --- icta_controller/controller.lua | 1 - logic/button.lua | 2 +- logic/programmer.lua | 4 ++-- logic/terminal.lua | 2 +- move_controller/doorblock.lua | 2 +- move_controller/gateblock.lua | 2 +- 6 files changed, 6 insertions(+), 7 deletions(-) diff --git a/icta_controller/controller.lua b/icta_controller/controller.lua index 6c75af8..e076354 100644 --- a/icta_controller/controller.lua +++ b/icta_controller/controller.lua @@ -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, diff --git a/logic/button.lua b/logic/button.lua index be8b094..3a26194 100644 --- a/logic/button.lua +++ b/logic/button.lua @@ -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)) diff --git a/logic/programmer.lua b/logic/programmer.lua index c119720..0c02947 100644 --- a/logic/programmer.lua +++ b/logic/programmer.lua @@ -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!")) diff --git a/logic/terminal.lua b/logic/terminal.lua index cf6887e..1008ac3 100644 --- a/logic/terminal.lua +++ b/logic/terminal.lua @@ -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, }) diff --git a/move_controller/doorblock.lua b/move_controller/doorblock.lua index f0b215b..6874479 100644 --- a/move_controller/doorblock.lua +++ b/move_controller/doorblock.lua @@ -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 diff --git a/move_controller/gateblock.lua b/move_controller/gateblock.lua index e0a764c..57f6826 100644 --- a/move_controller/gateblock.lua +++ b/move_controller/gateblock.lua @@ -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