Add stairsplus support

This commit is contained in:
Craig 2014-06-12 17:56:46 +01:00
parent 5a7e4b2140
commit ef658b2fed
1 changed files with 78 additions and 65 deletions

143
init.lua
View File

@ -1,65 +1,78 @@
--------------------------------------------- ---------------------------------------------
-- Coloured Stone Bricks Mod by CraigyDavi -- -- Coloured Stone Bricks Mod by CraigyDavi --
--------------------------------------------- ---------------------------------------------
local COLOURS = { local COLOURS = {
"Black", "Black",
"Cyan", "Cyan",
"Brown", "Brown",
"Dark Blue", "Dark Blue",
"Dark Green", "Dark Green",
"Dark Grey", "Dark Grey",
"Dark Pink", "Dark Pink",
"Green", "Green",
"Grey", "Grey",
"Orange", "Orange",
"Pink", "Pink",
"Purple", "Purple",
"Red", "Red",
"White", "White",
"Yellow" "Yellow"
} }
local COLOURS2 = { local COLOURS2 = {
"black", "black",
"cyan", "cyan",
"brown", "brown",
"dark_blue", "dark_blue",
"dark_green", "dark_green",
"dark_grey", "dark_grey",
"dark_pink", "dark_pink",
"green", "green",
"grey", "grey",
"orange", "orange",
"pink", "pink",
"purple", "purple",
"red", "red",
"white", "white",
"yellow" "yellow"
} }
for number = 1, 15 do for number = 1, 15 do
local colour = COLOURS[number] local colour = COLOURS[number]
local colour2 = COLOURS2[number] local colour2 = COLOURS2[number]
minetest.register_node("colouredstonebricks:"..colour2, { minetest.register_node("colouredstonebricks:"..colour2, {
description = colour.." Stone Brick", description = colour.." Stone Brick",
tiles = {"colouredstonebricks_"..colour2..".png"}, tiles = {"colouredstonebricks_"..colour2..".png"},
groups = {cracky=3}, groups = {cracky=3},
}) sounds = default.node_sound_defaults(),
})
minetest.register_craft({
type = "shapeless", minetest.register_craft({
output = 'colouredstonebricks:'..colour2, type = "shapeless",
recipe = { output = 'colouredstonebricks:'..colour2,
'dye:'..colour2, 'default:stonebrick', recipe = {
} 'dye:'..colour2, 'default:stonebrick',
}) }
end })
minetest.register_alias("dye:dark_blue","dye:blue") -- Stairs
minetest.register_alias("dye:dark_pink","dye:magenta")
minetest.register_alias("dye:purple","dye:violet") stairsplus:register_all("colouredstonebricks", colour2, "colouredstonebricks:"..colour2, {
description = colour.." Stone Brick",
print ("Coloured Stone Bricks [colouredstonebricks] has loaded!") tiles = {"colouredstonebricks_"..colour2..".png"},
groups = {cracky=3},
sounds = default.node_sound_defaults(),
sunlight_propagates = true,
})
end
minetest.register_alias("dye:dark_blue","dye:blue")
minetest.register_alias("dye:dark_pink","dye:magenta")
minetest.register_alias("dye:purple","dye:violet")
print ("Coloured Stone Bricks [colouredstonebricks] has loaded!")