add an option to disable stair aliases

This commit is contained in:
Niklp09 2023-03-13 14:11:08 +01:00
parent 41b82454c4
commit 45357e2980
3 changed files with 12 additions and 4 deletions

View File

@ -57,6 +57,7 @@ techage.ore_rarity = tonumber(minetest.settings:get("techage_ore_rarity")) or 1
techage.modified_recipes_enabled = minetest.settings:get_bool("techage_modified_recipes_enabled") ~= false
techage.collider_min_depth = tonumber(minetest.settings:get("techage_collider_min_depth")) or -28
techage.recipe_checker_enabled = minetest.settings:get_bool("techage_recipe_checker_enabled") ~= false
techage.stair_aliases_enabled = minetest.settings:get_bool("techage_stair_aliases_enabled") ~= false
-- allow to load marshal and sqlite3
techage.IE = minetest.request_insecure_environment()

View File

@ -68,9 +68,11 @@ if(minetest.get_modpath("moreblocks")) then
ndef.sunlight_propagates = true
ndef.groups.not_in_creative_inventory = 1
stairsplus:register_all("techage", subname, name, ndef)
register_alias(subname)
if techage.stair_aliases_enabled then
register_alias(subname)
end
end
end
end
else
for _,name in ipairs(NodeNames) do
local ndef = minetest.registered_nodes[name]
@ -86,7 +88,9 @@ else
ndef.sound,
false
)
register_alias(subname)
if techage.stair_aliases_enabled then
register_alias(subname)
end
end
end
end

View File

@ -40,4 +40,7 @@ techage_collider_min_depth (Min. depth to build a TA4 Collider) int -30
techage_expoint_rate_in_min (average waiting time for one expoint) int 60
# For testing purpuses only
techage_recipe_checker_enabled (test techage recipes) bool false
techage_recipe_checker_enabled (test techage recipes) bool false
# Enables stair aliases (to prevent unknown nodes)
techage_stair_aliases_enabled (Enable stair aliases) bool false