mirror of
https://github.com/APercy/airutils.git
synced 2025-03-15 08:01:22 +00:00
add settings, define table for namespace
This commit is contained in:
parent
64e672a1c7
commit
c2bab6fd07
3 changed files with 23 additions and 7 deletions
13
init.lua
13
init.lua
|
@ -1,8 +1,7 @@
|
|||
-- Minetest 5.4.1 : airutils
|
||||
airutils = {}
|
||||
|
||||
airutils = {
|
||||
storage = minetest.get_mod_storage()
|
||||
}
|
||||
airutils.storage = minetest.get_mod_storage()
|
||||
|
||||
local storage = airutils.storage
|
||||
|
||||
|
@ -36,13 +35,15 @@ airutils.fuel = {['biofuel:biofuel'] = 1,['biofuel:bottle_fuel'] = 1,
|
|||
['biofuel:phial_fuel'] = 0.25, ['biofuel:fuel_can'] = 10,
|
||||
['airutils:biofuel'] = 1,}
|
||||
|
||||
if not minetest.settings:get_bool('airutils.disable_papi') then
|
||||
airutils.protect_in_areas = minetest.settings:get_bool('airutils_protect_in_areas')
|
||||
|
||||
if not minetest.settings:get_bool('airutils_disable_papi') then
|
||||
dofile(minetest.get_modpath("airutils") .. DIR_DELIM .. "airutils_papi.lua")
|
||||
end
|
||||
if not minetest.settings:get_bool('airutils.disable_tug') then
|
||||
if not minetest.settings:get_bool('airutils_disable_tug') then
|
||||
dofile(minetest.get_modpath("airutils") .. DIR_DELIM .. "airutils_tug.lua")
|
||||
end
|
||||
if not minetest.settings:get_bool('airutils.disable_repair') then
|
||||
if not minetest.settings:get_bool('airutils_disable_repair') then
|
||||
dofile(minetest.get_modpath("airutils") .. DIR_DELIM .. "airutils_repair.lua")
|
||||
end
|
||||
|
||||
|
|
|
@ -641,7 +641,8 @@ function airutils.on_punch(self, puncher, ttime, toolcaps, dir, damage)
|
|||
if (puncher:is_player()) then
|
||||
name = puncher:get_player_name()
|
||||
ppos = puncher:get_pos()
|
||||
if (minetest.is_protected(ppos, name)) then
|
||||
if (minetest.is_protected(ppos, name) and
|
||||
airutils.protect_in_areas) then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
|
14
settingtypes.txt
Normal file
14
settingtypes.txt
Normal file
|
@ -0,0 +1,14 @@
|
|||
# all settings for client menu or in minetest.conf on servers
|
||||
|
||||
|
||||
# protect airplanes from player damage in protected areas
|
||||
airutils_protect_in_areas (protect in area) bool true
|
||||
|
||||
# disable PAPI (Precision Approach Path Indicator)
|
||||
airutils_disable_papi (disable PAPI) bool false
|
||||
|
||||
# disable tug tool (reposition of not owning planes)
|
||||
airutils_disable_tug (disable tug tool) bool false
|
||||
|
||||
# disable repair tool for planes
|
||||
airutils_disable_repair (planes cannot be repaired) bool false
|
Loading…
Add table
Reference in a new issue