only remove near-beacon fly

This commit is contained in:
BuckarooBanzay 2020-02-21 08:14:21 +01:00
parent 5ca2f2f866
commit 0e8cf7eedf

17
fly.lua
View File

@ -1,19 +1,8 @@
local has_beacon_mod = minetest.get_modpath("beacon")
local use_player_monoids = minetest.global_exists("player_monoids")
local fly_near = {} -- [{ name="", distance=0 }]
local storage = minetest.get_mod_storage()
local global_fly_enabled = storage:get_int("global_fly") == 1
if has_beacon_mod then
table.insert(fly_near, {
name="beacon:greenbase",
distance=20
})
end
local player_can_fly = function(player)
local pos = player:get_pos()
for _, box in pairs(skybox.list) do
@ -29,12 +18,6 @@ local player_can_fly = function(player)
end
end
for _, def in pairs(fly_near) do
if minetest.find_node_near(pos, def.distance, def.name) then
return true
end
end
return global_fly_enabled
end