pandorabox_custom/spacecannon.lua
2021-03-06 19:46:57 +02:00

7 lines
261 B
Lua

spacecannon.can_shoot = function(pos, playername)
local has_unrestricted_priv = playername and minetest.check_player_privs(playername, "spacecannon_unrestricted")
-- only allow shooting in space or with priv
return has_unrestricted_priv or pos.y > 1000
end