diff options
author | Christian Danscheid <Christian_D_97@gmx.de> | 2013-08-10 19:23:52 +0200 |
---|---|---|
committer | Christian Danscheid <Christian_D_97@gmx.de> | 2013-08-10 19:23:52 +0200 |
commit | 7bda846ea7f8c3ad127b167e6c7a797bfd46f73f (patch) | |
tree | 37c4d4cc80cb2b11452d24df057e485c54687eb4 /asphaltstairs | |
download | roads-7bda846ea7f8c3ad127b167e6c7a797bfd46f73f.tar roads-7bda846ea7f8c3ad127b167e6c7a797bfd46f73f.tar.gz roads-7bda846ea7f8c3ad127b167e6c7a797bfd46f73f.tar.bz2 roads-7bda846ea7f8c3ad127b167e6c7a797bfd46f73f.tar.xz roads-7bda846ea7f8c3ad127b167e6c7a797bfd46f73f.zip |
Initial commit
Diffstat (limited to 'asphaltstairs')
-rw-r--r-- | asphaltstairs/depends.txt | 2 | ||||
-rw-r--r-- | asphaltstairs/function.lua | 56 | ||||
-rw-r--r-- | asphaltstairs/init.lua | 15 |
3 files changed, 73 insertions, 0 deletions
diff --git a/asphaltstairs/depends.txt b/asphaltstairs/depends.txt new file mode 100644 index 0000000..48ef5e1 --- /dev/null +++ b/asphaltstairs/depends.txt @@ -0,0 +1,2 @@ +default +streetsmod
\ No newline at end of file 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 diff --git a/asphaltstairs/init.lua b/asphaltstairs/init.lua new file mode 100644 index 0000000..1e206ab --- /dev/null +++ b/asphaltstairs/init.lua @@ -0,0 +1,15 @@ +--[[ + StreetsMod: These stairs are just a workaround until stairs/stairs+ and circular_saw + can work together without problems. This definetly needs an API! +]] +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") |