From 7414e274afb9768df70f6f42cf35ac978132c9db Mon Sep 17 00:00:00 2001 From: flux <25628292+fluxionary@users.noreply.github.com> Date: Thu, 22 Sep 2022 08:28:55 -0700 Subject: [PATCH] add option to disable crafting schemata --- settingtypes.txt | 3 +++ stairsplus/craft_schemas/other.lua | 1 - stairsplus/init.lua | 5 ++++- stairsplus/settings.lua | 2 ++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/settingtypes.txt b/settingtypes.txt index bb3d102..134ed37 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -42,6 +42,9 @@ stairsplus.legacy_mode (legacy mode) bool true # automatically try to rotate nodes when placed. the mechanic is sometimes confusing. stairsplus.legacy_place_mechanic (use legacy place mecahnic) bool true +# allows crafting shaped nodes in addition to cutting them +stairsplus.crafting_schemata_enabled (enable crafting schemata) bool true + # enable registering stairsplus nodes for basic_materials stairsplus_legacy.basic_materials () bool true diff --git a/stairsplus/craft_schemas/other.lua b/stairsplus/craft_schemas/other.lua index 9038b44..662d1f0 100644 --- a/stairsplus/craft_schemas/other.lua +++ b/stairsplus/craft_schemas/other.lua @@ -1,7 +1,6 @@ local api = stairsplus.api local register_craft_schema = api.register_craft_schema - ---- panel_8 register_craft_schema({ diff --git a/stairsplus/init.lua b/stairsplus/init.lua index f6f8da8..7a73b67 100644 --- a/stairsplus/init.lua +++ b/stairsplus/init.lua @@ -35,7 +35,10 @@ stairsplus.dofile("api", "init") stairsplus.dofile("shapes", "init") stairsplus.dofile("groups", "init") -stairsplus.dofile("craft_schemas", "init") + +if stairsplus.settings.crafting_schemata_enabled then + stairsplus.dofile("craft_schemas", "init") +end stairsplus.dofile("resources", "init") stairsplus.dofile("circular_saw") diff --git a/stairsplus/settings.lua b/stairsplus/settings.lua index 7d404c4..3f27a01 100644 --- a/stairsplus/settings.lua +++ b/stairsplus/settings.lua @@ -26,4 +26,6 @@ stairsplus.settings = { legacy_mode = s:get_bool("stairsplus.legacy_mode", true), legacy_place_mechanic = s:get_bool("stairsplus.legacy_place_mechanic", true), + + crafting_schemata_enabled = s:get_bool("stairsplus.crafting_schemata_enabled", true), }