summaryrefslogtreecommitdiff
path: root/asphaltstairs
diff options
context:
space:
mode:
Diffstat (limited to 'asphaltstairs')
-rw-r--r--asphaltstairs/init.lua237
1 files changed, 224 insertions, 13 deletions
diff --git a/asphaltstairs/init.lua b/asphaltstairs/init.lua
index 1e206ab..f3e2a1f 100644
--- a/asphaltstairs/init.lua
+++ b/asphaltstairs/init.lua
@@ -1,15 +1,226 @@
--[[
- StreetsMod: These stairs are just a workaround until stairs/stairs+ and circular_saw
- can work together without problems. This definetly needs an API!
+ StreetsMod: Asphalt stairs
]]
-if streets.extendedBy.stairs == false then return end
---
-dofile(minetest.get_modpath(minetest.get_current_modname()).."/function.lua")
-
--- Asphalt
-streets.register_stair_and_slab("asphalt","Asphalt",{"streets_asphalt.png"},"streets:asphalt")
-minetest.register_alias("streets:asphalt_stairs","streets:asphalt_stair")
--- Asphalt with solid line:
-streets.register_stair_and_slab("asphalt_solid_line","Asphalt with solid line",{"streets_asphalt.png^streets_asphalt_solid_line.png","streets_asphalt.png","streets_asphalt.png","streets_asphalt.png","streets_asphalt.png","streets_asphalt.png^streets_asphalt_solid_line.png"},"streets:asphalt_solid_line")
--- Asphalt with dashed line:
-streets.register_stair_and_slab("asphalt_dashed_line","Asphalt with dashed line",{"streets_asphalt.png^streets_asphalt_dashed_line.png","streets_asphalt.png","streets_asphalt.png","streets_asphalt.png","streets_asphalt.png","streets_asphalt.png^streets_asphalt_dashed_line.png"},"streets:asphalt_dashed_line")
+if streets.extendedBy.moreblocks then
+ -- Asphalt
+ register_stair_slab_panel_micro("streets", "asphalt", "streets:asphalt", {cracky=3}, {"streets_asphalt.png"}, "Asphalt", "asphalt", nil)
+ table.insert(circular_saw.known_stairs,"streets:asphalt")
+ -- Asphalt solid line
+ -- Stair
+ minetest.register_node(":streets:asphalt_solid_line_stair",{
+ description = "Asphalt stair",
+ tiles = {"streets_asphalt.png^streets_asphalt_solid_line.png","streets_asphalt.png","streets_asphalt.png","streets_asphalt.png","streets_asphalt.png","streets_asphalt.png^streets_asphalt_solid_line.png"},
+ groups = {cracky = 3},
+ paramtype = "light",
+ paramtype2 = "facedir",
+ drawtype = "nodebox",
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {-0.5,-0.5,-0.5,0.5,0.0,0.5},
+ {-0.5, 0.0, 0.0, 0.5, 0.5, 0.5}
+ }
+ }
+ })
+ minetest.register_craft({
+ output = "streets:asphalt_solid_line_stair",
+ recipe = {
+ {"","","streets:asphalt_solid_line"},
+ {"","streets:asphalt_solid_line","streets:asphalt_solid_line"},
+ {"streets:asphalt_solid_line","streets:asphalt_solid_line","streets:asphalt_solid_line"}
+ }
+ })
+ minetest.register_craft({
+ output = "streets:asphalt_solid_line_stair",
+ recipe = {
+ {"streets:asphalt_solid_line","",""},
+ {"streets:asphalt_solid_line","streets:asphalt_solid_line",""},
+ {"streets:asphalt_solid_line","streets:asphalt_solid_line","streets:asphalt_solid_line"}
+ }
+ })
+ -- Slab
+ minetest.register_node(":streets:asphalt_solid_line_slab",{
+ description = "Asphalt slab",
+ tiles = {"streets_asphalt.png^streets_asphalt_solid_line.png","streets_asphalt.png","streets_asphalt.png","streets_asphalt.png","streets_asphalt.png","streets_asphalt.png^streets_asphalt_solid_line.png"},
+ groups = {cracky = 3},
+ paramtype = "light",
+ paramtype2 = "facedir",
+ drawtype = "nodebox",
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {-0.5,-0.5,-0.5,0.5,0.0,0.5}
+ }
+ }
+ })
+ minetest.register_craft({
+ output = "streets:asphalt_solid_line_slab",
+ recipe = {
+ {"","",""},
+ {"","",""},
+ {"streets:asphalt_solid_line","streets:asphalt_solid_line","streets:asphalt_solid_line"}
+ }
+ })
+ ------------------------------------------------------------
+ -- Asphalt dashed line
+ -- Stair
+ minetest.register_node(":streets:asphalt_dashed_line_stair",{
+ description = "Asphalt stair",
+ tiles = {"streets_asphalt.png^streets_asphalt_dashed_line.png","streets_asphalt.png","streets_asphalt.png","streets_asphalt.png","streets_asphalt.png","streets_asphalt.png^streets_asphalt_dashed_line.png"},
+ groups = {cracky = 3},
+ paramtype = "light",
+ paramtype2 = "facedir",
+ drawtype = "nodebox",
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {-0.5,-0.5,-0.5,0.5,0.0,0.5},
+ {-0.5, 0.0, 0.0, 0.5, 0.5, 0.5}
+ }
+ }
+ })
+ minetest.register_craft({
+ output = "streets:asphalt_dashed_line_stair",
+ recipe = {
+ {"","","streets:asphalt_dashed_line"},
+ {"","streets:asphalt_dashed_line","streets:asphalt_dashed_line"},
+ {"streets:asphalt_dashed_line","streets:asphalt_dashed_line","streets:asphalt_dashed_line"}
+ }
+ })
+ minetest.register_craft({
+ output = "streets:asphalt_dashed_line_stair",
+ recipe = {
+ {"streets:asphalt_dashed_line","",""},
+ {"streets:asphalt_dashed_line","streets:asphalt_dashed_line",""},
+ {"streets:asphalt_dashed_line","streets:asphalt_dashed_line","streets:asphalt_dashed_line"}
+ }
+ })
+ -- Slab
+ minetest.register_node(":streets:asphalt_dashed_line_slab",{
+ description = "Asphalt slab",
+ tiles = {"streets_asphalt.png^streets_asphalt_dashed_line.png","streets_asphalt.png","streets_asphalt.png","streets_asphalt.png","streets_asphalt.png","streets_asphalt.png^streets_asphalt_dashed_line.png"},
+ groups = {cracky = 3},
+ paramtype = "light",
+ paramtype2 = "facedir",
+ drawtype = "nodebox",
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {-0.5,-0.5,-0.5,0.5,0.0,0.5}
+ }
+ }
+ })
+ minetest.register_craft({
+ output = "streets:asphalt_dashed_line_slab",
+ recipe = {
+ {"","",""},
+ {"","",""},
+ {"streets:asphalt_dashed_line","streets:asphalt_dashed_line","streets:asphalt_dashed_line"}
+ }
+ })
+ -- Asphalt outer line
+ minetest.register_node(":streets:asphalt_side_stair_l",{
+ description = "Asphalt stair",
+ tiles = {"streets_asphalt.png^streets_asphalt_side.png","streets_asphalt.png","streets_asphalt.png","streets_asphalt.png","streets_asphalt.png","streets_asphalt.png^streets_asphalt_side.png"},
+ groups = {cracky = 3},
+ paramtype = "light",
+ paramtype2 = "facedir",
+ drawtype = "nodebox",
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {-0.5,-0.5,-0.5,0.5,0.0,0.5},
+ {-0.5, 0.0, 0.0, 0.5, 0.5, 0.5}
+ }
+ }
+ })
+ minetest.register_node(":streets:asphalt_side_stair_r",{
+ description = "Asphalt stair",
+ tiles = {"streets_asphalt.png^streets_asphalt_side_r.png","streets_asphalt.png","streets_asphalt.png","streets_asphalt.png","streets_asphalt.png","streets_asphalt.png^streets_asphalt_side_r.png"},
+ groups = {cracky = 3},
+ paramtype = "light",
+ paramtype2 = "facedir",
+ drawtype = "nodebox",
+ drop = "streets:asphalt_side_stair_l",
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {-0.5,-0.5,-0.5,0.5,0.0,0.5},
+ {-0.5, 0.0, 0.0, 0.5, 0.5, 0.5}
+ }
+ }
+ })
+ minetest.register_craft({
+ output = "streets:asphalt_side_stair_l",
+ recipe = {
+ {"","","streets:asphalt_side"},
+ {"","streets:asphalt_side","streets:asphalt_side"},
+ {"streets:asphalt_side","streets:asphalt_side","streets:asphalt_side"}
+ }
+ })
+ minetest.register_craft({
+ output = "streets:asphalt_side_stair_l",
+ recipe = {
+ {"streets:asphalt_side","",""},
+ {"streets:asphalt_side","streets:asphalt_side",""},
+ {"streets:asphalt_side","streets:asphalt_side","streets:asphalt_side"}
+ }
+ })
+ minetest.register_craft({
+ type = "shapeless",
+ output = "streets:asphalt_side_stair_r",
+ recipe = {"streets:asphalt_side_stair_l"}
+ })
+ minetest.register_craft({
+ type = "shapeless",
+ output = "streets:asphalt_side_stair_l",
+ recipe = {"streets:asphalt_side_stair_r"}
+ })
+ ---------------------------------------------------------------------
+ minetest.register_node(":streets:asphalt_side_slab_l",{
+ description = "Asphalt slab",
+ tiles = {"streets_asphalt.png^streets_asphalt_side.png","streets_asphalt.png","streets_asphalt.png","streets_asphalt.png","streets_asphalt.png","streets_asphalt.png^streets_asphalt_side.png"},
+ groups = {cracky = 3},
+ paramtype = "light",
+ paramtype2 = "facedir",
+ drawtype = "nodebox",
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {-0.5,-0.5,-0.5,0.5,0.0,0.5}
+ }
+ }
+ })
+ minetest.register_node(":streets:asphalt_side_slab_r",{
+ description = "Asphalt slab",
+ tiles = {"streets_asphalt.png^streets_asphalt_side_r.png","streets_asphalt.png","streets_asphalt.png","streets_asphalt.png","streets_asphalt.png","streets_asphalt.png^streets_asphalt_side_r.png"},
+ groups = {cracky = 3},
+ paramtype = "light",
+ paramtype2 = "facedir",
+ drawtype = "nodebox",
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {-0.5,-0.5,-0.5,0.5,0.0,0.5}
+ }
+ }
+ })
+ minetest.register_craft({
+ output = "streets:asphalt_side_slab_l",
+ recipe = {
+ {"","",""},
+ {"","",""},
+ {"streets:asphalt_side","streets:asphalt_side","streets:asphalt_side"}
+ }
+ })
+ minetest.register_craft({
+ type = "shapeless",
+ output = "streets:asphalt_side_r",
+ recipe = {"streets:asphalt_side_l"}
+ })
+ minetest.register_craft({
+ type = "shapeless",
+ output = "streets:asphalt_side_l",
+ recipe = {"streets:asphalt_side_r"}
+ })
+end \ No newline at end of file