Skip to content

Commit

Permalink
Merge pull request #21 from Niklp09/master
Browse files Browse the repository at this point in the history
Replace deprecated `meta:set_string(*, nil)` calls
  • Loading branch information
joe7575 authored Jul 3, 2024
2 parents 030a588 + a1a4fdf commit 29edfd6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
2 changes: 0 additions & 2 deletions description.txt

This file was deleted.

4 changes: 2 additions & 2 deletions internal1.lua
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ end
function Tube:store_teleport_data(pos, peer_pos)
local meta = M(pos)
meta:set_string("tele_pos", P2S(peer_pos))
meta:set_string("channel", nil)
meta:set_string("formspec", nil)
meta:set_string("channel", "")
meta:set_string("formspec", "")
meta:set_string("infotext", S("Paired with @1", P2S(peer_pos)))
return meta:get_int("tube_dir")
end
Expand Down
4 changes: 2 additions & 2 deletions internal2.lua
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,8 @@ end
function Tube:store_teleport_data(pos, peer_pos)
local meta = M(pos)
meta:set_string("tele_pos", P2S(peer_pos))
meta:set_string("channel", nil)
meta:set_string("formspec", nil)
meta:set_string("channel", "")
meta:set_string("formspec", "")
meta:set_string("infotext", S("Connected to @1", P2S(peer_pos)))
return meta:get_int("tube_dir")
end
Expand Down
6 changes: 3 additions & 3 deletions tube_api.lua
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ function Tube:prepare_pairing(pos, tube_dir, sFormspec)
meta:set_int("tube_dir", tube_dir)
elseif tube_dir then
meta:set_int("tube_dir", tube_dir)
meta:set_string("channel", nil)
meta:set_string("channel", "")
meta:set_string("infotext", S("Pairing is missing"))
meta:set_string("formspec", sFormspec)
else
Expand Down Expand Up @@ -489,8 +489,8 @@ function Tube:stop_pairing(pos, oldmetadata, sFormspec)
local peer_meta = M(tele_pos)
if peer_meta then
self:after_dig_node(tele_pos, {peer_meta:get_int("tube_dir")})
peer_meta:set_string("channel", nil)
peer_meta:set_string("tele_pos", nil)
peer_meta:set_string("channel", "")
peer_meta:set_string("tele_pos", "")
peer_meta:set_string("formspec", sFormspec)
peer_meta:set_string("infotext", S("Pairing is missing"))
end
Expand Down

0 comments on commit 29edfd6

Please sign in to comment.