summaryrefslogtreecommitdiff
path: root/asphaltstairs/function.lua
diff options
context:
space:
mode:
Diffstat (limited to 'asphaltstairs/function.lua')
-rw-r--r--asphaltstairs/function.lua56
1 files changed, 56 insertions, 0 deletions
diff --git a/asphaltstairs/function.lua b/asphaltstairs/function.lua
new file mode 100644
index 0000000..9879d4c
--- /dev/null
+++ b/asphaltstairs/function.lua
@@ -0,0 +1,56 @@
+-- StreetsMod needs a special slab definition, so it needs its own register_stair_and_slab
+streets.register_stair_and_slab = function(node,desc,tile,item)
+ minetest.register_node(":streets:"..node.."_stair",{
+ description = desc.."stair",
+ groups = {cracky = 3},
+ tiles = tile,
+ paramtype = "light",
+ paramtype2 = "facedir",
+ drawtype = "nodebox",
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
+ {-0.5, 0, 0, 0.5, 0.5, 0.5}
+ }
+ }
+ })
+ minetest.register_node(":streets:"..node.."_slab",{
+ description = desc.." slab",
+ groups = {cracky = 3},
+ tiles = tile,
+ paramtype = "light",
+ paramtype2 = "facedir",
+ drawtype = "nodebox",
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
+ }
+ }
+ })
+ minetest.register_craft({
+ output = "streets:"..node.."_stair 4",
+ recipe = {
+ {"","",item},
+ {"",item,item},
+ {item,item,item}
+ }
+ })
+ minetest.register_craft({
+ output = "streets:"..node.."_stair 4",
+ recipe = {
+ {item,"",""},
+ {item,item,""},
+ {item,item,item}
+ }
+ })
+ minetest.register_craft({
+ output = "streets:"..node.."_slab 3",
+ recipe = {
+ {"","",""},
+ {"","",""},
+ {item,item,item}
+ }
+ })
+end \ No newline at end of file