added support for danduncombe's prefab_concrete mod

master
Christian Danscheid 2013-08-15 12:05:39 +02:00
parent cea35d5c50
commit a568333805
3 changed files with 69 additions and 12 deletions

View File

@ -1,6 +1,9 @@
--[[ --[[
StreetsMod: Concrete stairs (not compatible to circular_saw 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) 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 end

View File

@ -1,8 +1,8 @@
--[[ --[[
StreetsMod: Concrete, Concrete wall (flat), Concrete wall (full) StreetsMod: Concrete, Concrete wall (flat), Concrete wall (full)
]] ]]
minetest.register_alias("streets:concrete","technic:concrete")
if streets.extendedBy.technic == true then if streets.extendedBy.technic == true then
minetest.register_alias("streets:concrete","technic:concrete")
-- Use technic's concrete block for the seperating wall -- Use technic's concrete block for the seperating wall
minetest.register_node(":streets:concrete_wall",{ minetest.register_node(":streets:concrete_wall",{
description = "Conrete wall", description = "Conrete wall",
@ -20,7 +20,7 @@ if streets.extendedBy.technic == true then
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = "streets:concrete_wall", output = "streets:concrete_wall 3",
recipe = { recipe = {
{"","technic:conrete",""}, {"","technic:conrete",""},
{"","technic:concrete",""}, {"","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 else
-- Register technic's concrete block with streets's texture and then the seperating wall -- Register concrete block with streets' texture and then the seperating wall
minetest.register_node(":technic:concrete",{ minetest.register_node(":streets:concrete",{
description = "Concrete", description = "Concrete",
tiles = {"streets_concrete.png"}, tiles = {"streets_concrete.png"},
groups = {cracky=2} groups = {cracky=2}
@ -72,11 +119,11 @@ else
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = "streets:concrete_wall 5", output = "streets:concrete_wall 3",
recipe = { recipe = {
{"","technic:concrete",""}, {"","streets:concrete",""},
{"","technic:concrete",""}, {"","streets:concrete",""},
{"technic:concrete","technic:concrete","technic:concrete"} {"streets:concrete","streets:concrete","streets:concrete"}
} }
}) })
minetest.register_node(":streets:concrete_wall_flat",{ minetest.register_node(":streets:concrete_wall_flat",{
@ -96,14 +143,14 @@ else
minetest.register_craft({ minetest.register_craft({
output = "streets:concrete_wall_flat 3", output = "streets:concrete_wall_flat 3",
recipe = { recipe = {
{"","technic:concrete",""}, {"","streets:concrete",""},
{"","technic:concrete",""}, {"","streets:concrete",""},
{"","",""} {"","",""}
} }
}) })
minetest.register_craft({ minetest.register_craft({
type = "shapeless", type = "shapeless",
output = "technic:concrete", output = "streets:concrete",
recipe = {"default:stone"} recipe = {"default:stone"}
}) })
end end

View File

@ -56,6 +56,13 @@
print("'Digilines' not installed \n\t => No trafficlight, sorry.") print("'Digilines' not installed \n\t => No trafficlight, sorry.")
streets.extendedBy.digilines = false streets.extendedBy.digilines = false
end 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 -- Done
print("Streets: Setup completed, have fun with StreetsMod ".. streets.version .."!") print("Streets: Setup completed, have fun with StreetsMod ".. streets.version .."!")