diff options
author | Christian Danscheid <Christian_D_97@gmx.de> | 2013-08-15 12:05:39 +0200 |
---|---|---|
committer | Christian Danscheid <Christian_D_97@gmx.de> | 2013-08-15 12:05:39 +0200 |
commit | a56833380523d900dad8cdc9c6361182ea8b0f9e (patch) | |
tree | 4aba32c0cd1c148400cae0fe7747cf073333de6a | |
parent | cea35d5c50a68247fc5b281261c3539eb690bfde (diff) | |
download | roads-a56833380523d900dad8cdc9c6361182ea8b0f9e.tar roads-a56833380523d900dad8cdc9c6361182ea8b0f9e.tar.gz roads-a56833380523d900dad8cdc9c6361182ea8b0f9e.tar.bz2 roads-a56833380523d900dad8cdc9c6361182ea8b0f9e.tar.xz roads-a56833380523d900dad8cdc9c6361182ea8b0f9e.zip |
added support for danduncombe's prefab_concrete mod
-rw-r--r-- | concretestairs/init.lua | 5 | ||||
-rw-r--r-- | streetsconcrete/init.lua | 69 | ||||
-rw-r--r-- | streetsmod/init.lua | 7 |
3 files changed, 69 insertions, 12 deletions
diff --git a/concretestairs/init.lua b/concretestairs/init.lua index 7de66f5..44126a5 100644 --- a/concretestairs/init.lua +++ b/concretestairs/init.lua @@ -1,6 +1,9 @@ --[[ StreetsMod: Concrete stairs (not compatible to circular_saw ]] -if streets.extendedBy.stairs == true then +if streets.extendedBy.stairs == true and streets.extendedBy.prefab == false then stairs.register_stair_and_slab("concrete", "streets:concrete", {cracky = 2, level = 2}, {"streets_concrete.png"}, "Concrete stair", "Concrete slab", nil) +else + minetest.register_alias("stairs:stair_concrete","prefab:concrete_stair") + minetest.register_alias("stairs:slab_concrete","prefab:concrete_slab") end
\ No newline at end of file diff --git a/streetsconcrete/init.lua b/streetsconcrete/init.lua index ffb826a..42f9ce3 100644 --- a/streetsconcrete/init.lua +++ b/streetsconcrete/init.lua @@ -1,8 +1,8 @@ --[[ StreetsMod: Concrete, Concrete wall (flat), Concrete wall (full) ]] -minetest.register_alias("streets:concrete","technic:concrete") if streets.extendedBy.technic == true then + minetest.register_alias("streets:concrete","technic:concrete") -- Use technic's concrete block for the seperating wall minetest.register_node(":streets:concrete_wall",{ description = "Conrete wall", @@ -20,7 +20,7 @@ if streets.extendedBy.technic == true then } }) minetest.register_craft({ - output = "streets:concrete_wall", + output = "streets:concrete_wall 3", recipe = { {"","technic:conrete",""}, {"","technic:concrete",""}, @@ -49,9 +49,56 @@ if streets.extendedBy.technic == true then {"","",""} } }) +elseif streets.extendedBy.prefab then + minetest.register_alias("streets:concrete","prefab:concrete") + minetest.register_node(":streets:concrete_wall",{ + description = "Conrete wall", + tiles = {"prefab_concrete.png"}, + groups = {cracky=2}, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + node_box = { + type = "fixed", + fixed = { + {-0.4, -0.5, -0.5, 0.4, -0.4, 0.5}, + {-0.1, -0.4, -0.5, 0.1, 0.5, 0.5} + } + } + }) + minetest.register_craft({ + output = "streets:concrete_wall 3", + recipe = { + {"","streets:concrete",""}, + {"","streets:concrete",""}, + {"streets:concrete","streets:concrete","streets:concrete"} + } + }) + minetest.register_node(":streets:concrete_wall_flat",{ + description = "Conrete wall", + tiles = {"prefab_concrete.png"}, + groups = {cracky=2}, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + node_box = { + type = "fixed", + fixed = { + {-0.1, -0.5, -0.5, 0.1, 0.5, 0.5} + } + } + }) + minetest.register_craft({ + output = "streets:concrete_wall_flat 3", + recipe = { + {"","streets:concrete",""}, + {"","streets:concrete",""}, + {"","",""} + } + }) else - -- Register technic's concrete block with streets's texture and then the seperating wall - minetest.register_node(":technic:concrete",{ + -- Register concrete block with streets' texture and then the seperating wall + minetest.register_node(":streets:concrete",{ description = "Concrete", tiles = {"streets_concrete.png"}, groups = {cracky=2} @@ -72,11 +119,11 @@ else } }) minetest.register_craft({ - output = "streets:concrete_wall 5", + output = "streets:concrete_wall 3", recipe = { - {"","technic:concrete",""}, - {"","technic:concrete",""}, - {"technic:concrete","technic:concrete","technic:concrete"} + {"","streets:concrete",""}, + {"","streets:concrete",""}, + {"streets:concrete","streets:concrete","streets:concrete"} } }) minetest.register_node(":streets:concrete_wall_flat",{ @@ -96,14 +143,14 @@ else minetest.register_craft({ output = "streets:concrete_wall_flat 3", recipe = { - {"","technic:concrete",""}, - {"","technic:concrete",""}, + {"","streets:concrete",""}, + {"","streets:concrete",""}, {"","",""} } }) minetest.register_craft({ type = "shapeless", - output = "technic:concrete", + output = "streets:concrete", recipe = {"default:stone"} }) end
\ No newline at end of file diff --git a/streetsmod/init.lua b/streetsmod/init.lua index 3a94f6f..aeb2784 100644 --- a/streetsmod/init.lua +++ b/streetsmod/init.lua @@ -56,6 +56,13 @@ print("'Digilines' not installed \n\t => No trafficlight, sorry.") streets.extendedBy.digilines = false end + if minetest.get_modpath("prefab") then + print("'Prefab concrete' is installed \n\t => Use its concrete block for streets' crafting recipes.") + streets.extendedBy.prefab = true + else + print("'Prefab concrete' not installed \n\t => Streets will register its own concrete block.") + streets.extendedBy.prefab = false + end -- Done print("Streets: Setup completed, have fun with StreetsMod ".. streets.version .."!")
\ No newline at end of file |