Remove (broken) forceloading.

If this gets re-added, the position should be divided by 16 first.
This commit is contained in:
luk3yx 2020-04-15 09:55:17 +12:00
parent 2e31fe77f7
commit e69ce27af9
1 changed files with 3 additions and 9 deletions

View File

@ -69,7 +69,6 @@ digistuff.update_ts_formspec = function(pos, ...)
end end
if not any then if not any then
minetest.forceload_free_block(remote, true)
storage:set_string(spos, '') storage:set_string(spos, '')
elseif save then elseif save then
storage:set_string(spos, minetest.serialize(nodes)) storage:set_string(spos, minetest.serialize(nodes))
@ -95,12 +94,9 @@ wireless_touchscreens.on_receive_fields = function(pos,formname,fields,sender)
-- Forward fields onto digistuff if the touchscreen protection hasn't -- Forward fields onto digistuff if the touchscreen protection hasn't
-- changed -- changed
if remote and owner then if remote and owner then
minetest.forceload_block(remote, true)
local name = minetest.get_node(remote).name local name = minetest.get_node(remote).name
if minetest.is_protected(remote, owner) or not if minetest.is_protected(remote, owner) or not
wireless_touchscreens.parents[name] wireless_touchscreens.parents[name] then
then
minetest.forceload_free_block(remote, true)
storage:set_string(minetest.pos_to_string(remote), '') storage:set_string(minetest.pos_to_string(remote), '')
-- TODO: Make this close_formspec more specific. -- TODO: Make this close_formspec more specific.
minetest.close_formspec(victim, '') minetest.close_formspec(victim, '')
@ -127,14 +123,12 @@ wireless_touchscreens.on_receive_fields = function(pos,formname,fields,sender)
return minetest.chat_send_player(victim, 'Invalid position!') return minetest.chat_send_player(victim, 'Invalid position!')
end end
minetest.forceload_block(remote, true)
local name = minetest.get_node(remote).name local name = minetest.get_node(remote).name
if wireless_touchscreens.check_protection(remote, victim) then if wireless_touchscreens.check_protection(remote, victim) then
return minetest.forceload_free_block(remote, true) return
elseif not wireless_touchscreens.parents[name] then elseif not wireless_touchscreens.parents[name] then
minetest.chat_send_player(victim, 'That block is not a touchscreen!') minetest.chat_send_player(victim, 'That block is not a touchscreen!')
return minetest.forceload_free_block(remote, true) return
end end
local sremote = minetest.pos_to_string(remote) local sremote = minetest.pos_to_string(remote)