forceload tile bugfix

This commit is contained in:
Joachim Stolberg 2020-05-01 16:53:16 +02:00
parent ac09955dfe
commit 5a86ecdec0
2 changed files with 2 additions and 2 deletions

View File

@ -258,7 +258,7 @@ minetest.register_on_joinplayer(function(player)
local lPos = {} local lPos = {}
for _,pos in ipairs(get_pos_list(player)) do for _,pos in ipairs(get_pos_list(player)) do
local node = techage.get_node_lvm(pos) local node = techage.get_node_lvm(pos)
if node.name == "techage:forceload" then if node.name == "techage:forceload" or node.name == "techage:forceloadtile" then
minetest.forceload_block(pos, true) minetest.forceload_block(pos, true)
lPos[#lPos+1] = pos lPos[#lPos+1] = pos
end end

View File

@ -148,7 +148,7 @@ local function command(pos, command, player)
end end
return return
end end
local bttn_num, label, cmnd = command:match('^set%s+([1-9])%s+(%w+)%s+(.+)$') local bttn_num, label, cmnd = command:match('^set%s+([1-9])%s+([%w_]+)%s+(.+)$')
if bttn_num and label and cmnd then if bttn_num and label and cmnd then
meta:set_string("bttn_text"..bttn_num, label) meta:set_string("bttn_text"..bttn_num, label)
meta:set_string("bttn_cmnd"..bttn_num, cmnd) meta:set_string("bttn_cmnd"..bttn_num, cmnd)