2016-04-01 20:02:19 -04:00
|
|
|
--[[
|
|
|
|
More Blocks: configuration handling
|
|
|
|
|
2018-12-01 09:06:00 -05:00
|
|
|
Copyright (c) 2011-2018 Hugo Locurcio and contributors.
|
2016-04-01 20:02:19 -04:00
|
|
|
Licensed under the zlib license. See LICENSE.md for more information.
|
|
|
|
--]]
|
|
|
|
|
|
|
|
moreblocks.config = {}
|
|
|
|
|
|
|
|
local function getbool_default(setting, default)
|
update castles modpack, boost_cart, homedecor, currency, farming redo,
framed glass, gloopblocks, mesecons, moreblocks, pipeworks, signs_lib,
technic, unified mesecons, and worldedit
created a new tag for this release (this will be standard procedure from
now on)
2017-09-26 00:11:57 -04:00
|
|
|
local value = minetest.settings:get_bool(setting)
|
2016-04-01 20:02:19 -04:00
|
|
|
if value == nil then
|
|
|
|
value = default
|
|
|
|
end
|
|
|
|
return value
|
|
|
|
end
|
|
|
|
|
|
|
|
local function setting(settingtype, name, default)
|
|
|
|
if settingtype == "bool" then
|
|
|
|
moreblocks.config[name] =
|
|
|
|
getbool_default("moreblocks." .. name, default)
|
|
|
|
else
|
|
|
|
moreblocks.config[name] =
|
update castles modpack, boost_cart, homedecor, currency, farming redo,
framed glass, gloopblocks, mesecons, moreblocks, pipeworks, signs_lib,
technic, unified mesecons, and worldedit
created a new tag for this release (this will be standard procedure from
now on)
2017-09-26 00:11:57 -04:00
|
|
|
minetest.settings:get("moreblocks." .. name) or default
|
2016-04-01 20:02:19 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
-- Show stairs/slabs/panels/microblocks in creative inventory (true or false):
|
|
|
|
setting("bool", "stairsplus_in_creative_inventory", false)
|