From 4888c40464d227fbea61be250cd2975133e7d1ce Mon Sep 17 00:00:00 2001
From: Jat15 <jinan15@hotmail.com>
Date: Mon, 2 Apr 2018 18:27:16 +0200
Subject: [PATCH] Fix condition for new typo of setting (#89)

* Fix condition for new typo of setting
* Add moreblocks in depends
---
 depends.txt               | 1 +
 handlers/registration.lua | 6 ++++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/depends.txt b/depends.txt
index 35aa8a6..49669a2 100644
--- a/depends.txt
+++ b/depends.txt
@@ -5,3 +5,4 @@ stairs
 xpanes
 fire?
 oresplus?
+moreblocks?
\ No newline at end of file
diff --git a/handlers/registration.lua b/handlers/registration.lua
index f0db4fa..cbeabdb 100644
--- a/handlers/registration.lua
+++ b/handlers/registration.lua
@@ -122,8 +122,10 @@ function xdecor.register(name, def)
 
 	minetest.register_node("xdecor:"..name, def)
 
-	if minetest.settings:get_bool("disable_xdecor_workbench") and 
-	  (minetest.get_modpath("moreblocks") or minetest.get_modpath("stairs")) then
+	local workbench = minetest.settings:get_bool("enable_xdecor_workbench")
+
+	if workbench == false and
+	   (minetest.get_modpath("moreblocks") or minetest.get_modpath("stairs")) then
 		if xdecor.stairs_valid_def(def) then
 			xdecor_stairs_alternative("xdecor:"..name, def)
 		end
-- 
GitLab