Add mod settings.

master
David G 2021-08-14 11:22:47 -07:00
parent 930af27e22
commit 373bc6cde8
2 changed files with 22 additions and 4 deletions

View File

@ -1,9 +1,13 @@
-- Cave Tools [cavetools]
dofile(minetest.get_modpath("cavetools").."/depth_finder.lua")
dofile(minetest.get_modpath("cavetools").."/flash_lamps.lua")
if minetest.get_modpath("default") ~= nil then
if minetest.settings:get_bool("cavetool_flashlamps", true) then
dofile(minetest.get_modpath("cavetools").."/flash_lamps.lua")
end
if minetest.settings:get_bool("cavetool_depthfinders", true) then
dofile(minetest.get_modpath("cavetools").."/depth_finder.lua")
end
if minetest.get_modpath("default") ~= nil and
minetest.settings:get_bool("cavetool_ladders", true) then
dofile(minetest.get_modpath("cavetools").."/ladder_overrides.lua")
end

14
settingtypes.txt Normal file
View File

@ -0,0 +1,14 @@
# This file contains settings of cavetools that can be changed in
# minetest.conf
# Include flashlamps by default
# (default = true)
cavetool_flashlamps (Include flashlamps) bool true
# Include depthfinders by default
# (default = true)
cavetool_depthfinders (Include depthfinders) bool true
# Include ladder extensions by default
# (default = true)
cavetool_ladders (Include ladder extensions) bool true