summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVanessa Dannenberg <vanessa.e.dannenberg@gmail.com>2019-04-24 23:33:14 -0400
committerVanessa Dannenberg <vanessa.e.dannenberg@gmail.com>2019-04-24 23:33:14 -0400
commitd17c01a297b70360cab3cd9379a695cad865c3b9 (patch)
tree6327d65f6fb7e51c34f9242b2f403c2ea5c804c0
parent9fd796dcbe2211a68a66a2a9cc5ce4ed33bf57ae (diff)
downloaddreambuilder_modpack-d17c01a297b70360cab3cd9379a695cad865c3b9.tar
dreambuilder_modpack-d17c01a297b70360cab3cd9379a695cad865c3b9.tar.gz
dreambuilder_modpack-d17c01a297b70360cab3cd9379a695cad865c3b9.tar.bz2
dreambuilder_modpack-d17c01a297b70360cab3cd9379a695cad865c3b9.tar.xz
dreambuilder_modpack-d17c01a297b70360cab3cd9379a695cad865c3b9.zip
added deezl's extra_stairsplus
makes caverealms nodes work with table saw again
-rw-r--r--extra_stairsplus/depends.txt3
-rw-r--r--extra_stairsplus/init.lua46
2 files changed, 49 insertions, 0 deletions
diff --git a/extra_stairsplus/depends.txt b/extra_stairsplus/depends.txt
new file mode 100644
index 0000000..c921aab
--- /dev/null
+++ b/extra_stairsplus/depends.txt
@@ -0,0 +1,3 @@
+default
+moreblocks
+caverealms
diff --git a/extra_stairsplus/init.lua b/extra_stairsplus/init.lua
new file mode 100644
index 0000000..c2baced
--- /dev/null
+++ b/extra_stairsplus/init.lua
@@ -0,0 +1,46 @@
+local cave_nodes = { -- Default stairs/slabs/panels/microblocks:
+ "caverealms:glow_crystal",
+ "caverealms:glow_emerald",
+ "caverealms:glow_mese",
+ "caverealms:glow_ore",
+ "caverealms:glow_emerald_ore",
+ "caverealms:glow_ruby",
+ "caverealms:glow_amethyst",
+ "caverealms:glow_ruby_ore",
+ "caverealms:salt_crystal",
+ "caverealms:stone_with_salt",
+ "caverealms:glow_obsidian"
+
+}
+
+
+ for _, name in pairs(cave_nodes) do
+ local nodename = "caverealms:"..name
+ local a,b = string.find(name, ":")
+ if b then
+ nodename = name
+ name = string.sub(name, b+1)
+ end
+ local ndef = minetest.registered_nodes[nodename]
+ if ndef then
+ local drop
+ if type(ndef.drop) == "string" then
+ drop = ndef.drop:sub((b or 8)+1)
+ end
+
+ local tiles = ndef.tiles
+ if #ndef.tiles > 1 and ndef.drawtype:find("glass") then
+ tiles = { ndef.tiles[1] }
+ end
+
+ stairsplus:register_all("caverealms", name, nodename, {
+ description = ndef.description,
+ drop = drop,
+ groups = ndef.groups,
+ sounds = ndef.sounds,
+ tiles = tiles,
+ sunlight_propagates = true,
+ light_source = ndef.light_source
+ })
+ end
+end