My features are now toggleable

Now obeys the config file
This commit is contained in:
opfromthestart 2022-08-10 21:35:37 -04:00
parent 6ac7659551
commit 8a538c2414
5 changed files with 17 additions and 1 deletions

View File

@ -45,3 +45,7 @@ dedicated_server_step = 0.05 #tick rate
enable_client_modding = true
csm_restriction_flags = 0
enable_mod_channels = true
# Optional features
autocraft = true
breakers = true

View File

@ -4,6 +4,10 @@ local C = minetest.colorize
local text_color = "#313131"
local itemslot_bg = mcl_formspec.get_itemslot_bg
if not minetest.settings:get_bool("autocraft") then
return
end
mcl_auto_crafter = {}
mcl_auto_crafter_formspec =

View File

@ -9,6 +9,10 @@ are so many weird tables below.
]]
local S = minetest.get_translator(minetest.get_current_modname())
if not minetest.settings:get_bool("breakers") then
return
end
-- For after_place_node
local function setup_breaker(pos)
-- Set formspec and inventory

View File

@ -234,7 +234,7 @@ local dispenserdef = {
dodrop = false
inv:set_stack("main", stack_id, stack)
end
elseif stackdef.on_place and not minetest.registered_nodes[iname] then
elseif stackdef.on_place and not minetest.registered_nodes[iname] and not minetest.settings:get_bool("breakers") then
-- This is a fake player object that the dispenser will use
-- It may break during testing

View File

@ -9,6 +9,10 @@ are so many weird tables below.
]]
local S = minetest.get_translator(minetest.get_current_modname())
if not minetest.settings:get_bool("breakers") then
return
end
-- For after_place_node
local function setup_placer(pos)
-- Set formspec and inventory