2021-05-19 15:01:39 -03:00
|
|
|
-- Minetest 5.4.1 : airutils
|
2021-05-19 14:37:40 -03:00
|
|
|
|
2021-05-19 15:01:39 -03:00
|
|
|
airutils = {}
|
2021-05-19 14:37:40 -03:00
|
|
|
|
2021-05-22 14:22:24 -03:00
|
|
|
dofile(minetest.get_modpath("airutils") .. DIR_DELIM .. "airutils_papi.lua")
|
|
|
|
dofile(minetest.get_modpath("airutils") .. DIR_DELIM .. "airutils_tug.lua")
|
2021-05-19 14:37:40 -03:00
|
|
|
|
2021-05-19 15:01:39 -03:00
|
|
|
function airutils.remove(pos)
|
2021-05-19 14:37:40 -03:00
|
|
|
local meta = core.get_meta(pos)
|
|
|
|
if meta:get_string("dont_destroy") == "true" then
|
|
|
|
-- when swapping it
|
|
|
|
return
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2021-05-19 15:01:39 -03:00
|
|
|
function airutils.canDig(pos, player)
|
2021-05-19 14:37:40 -03:00
|
|
|
local meta = core.get_meta(pos)
|
|
|
|
return meta:get_string("dont_destroy") ~= "true"
|
|
|
|
and player:get_player_name() == meta:get_string("owner")
|
|
|
|
end
|
|
|
|
|
2021-05-20 15:38:34 -03:00
|
|
|
|
2021-05-19 14:37:40 -03:00
|
|
|
|