airutils/init.lua

24 lines
541 B
Lua
Raw Normal View History

2021-05-19 18:01:39 +00:00
-- Minetest 5.4.1 : airutils
2021-05-19 17:37:40 +00:00
2021-05-19 18:01:39 +00:00
airutils = {}
2021-05-19 17:37:40 +00:00
2021-05-22 17:22:24 +00:00
dofile(minetest.get_modpath("airutils") .. DIR_DELIM .. "airutils_papi.lua")
dofile(minetest.get_modpath("airutils") .. DIR_DELIM .. "airutils_tug.lua")
2021-05-19 17:37:40 +00:00
2021-05-19 18:01:39 +00:00
function airutils.remove(pos)
2021-05-19 17:37:40 +00:00
local meta = core.get_meta(pos)
if meta:get_string("dont_destroy") == "true" then
-- when swapping it
return
end
end
2021-05-19 18:01:39 +00:00
function airutils.canDig(pos, player)
2021-05-19 17:37:40 +00: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 18:38:34 +00:00
2021-05-19 17:37:40 +00:00