Add initial code
15
README.txt
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
Coloured Stone Bricks
|
||||||
|
=====================
|
||||||
|
|
||||||
|
|
||||||
|
This mod adds coloured stone bricks! These are decorative blocks which would look nice on any building or creation.
|
||||||
|
|
||||||
|
Crafting
|
||||||
|
--------
|
||||||
|
You can craft the blocks by placing a stone brick and a coloured dye in the craft grid:
|
||||||
|
|
||||||
|
Depends: default, dye
|
||||||
|
Licence: Code and textures, CC BY-SA 4.0
|
||||||
|
Installation: Unzip the file and rename it to "colouredstonebricks". Then move it to the mod directory.
|
||||||
|
|
||||||
|
More information and discussion:
|
2
depends.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
default
|
||||||
|
dye
|
61
init.lua
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
local COLOURS = {
|
||||||
|
"Black",
|
||||||
|
"Cyan",
|
||||||
|
"Brown",
|
||||||
|
"Dark Blue",
|
||||||
|
"Dark Green",
|
||||||
|
"Dark Grey",
|
||||||
|
"Dark Pink",
|
||||||
|
"Green",
|
||||||
|
"Grey",
|
||||||
|
"Orange",
|
||||||
|
"Pink",
|
||||||
|
"Purple",
|
||||||
|
"Red",
|
||||||
|
"White",
|
||||||
|
"Yellow"
|
||||||
|
}
|
||||||
|
|
||||||
|
local COLOURS2 = {
|
||||||
|
"black",
|
||||||
|
"cyan",
|
||||||
|
"brown",
|
||||||
|
"dark_blue",
|
||||||
|
"dark_green",
|
||||||
|
"dark_grey",
|
||||||
|
"dark_pink",
|
||||||
|
"green",
|
||||||
|
"grey",
|
||||||
|
"orange",
|
||||||
|
"pink",
|
||||||
|
"purple",
|
||||||
|
"red",
|
||||||
|
"white",
|
||||||
|
"yellow"
|
||||||
|
}
|
||||||
|
|
||||||
|
for number = 1, 15 do
|
||||||
|
|
||||||
|
local colour = COLOURS[number]
|
||||||
|
local colour2 = COLOURS2[number]
|
||||||
|
|
||||||
|
minetest.register_node("colouredstonebricks:"..colour2, {
|
||||||
|
description = colour.." Stone Brick",
|
||||||
|
tiles = {"colouredstonebricks_"..colour2..".png"},
|
||||||
|
groups = {cracky=3},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "shapeless",
|
||||||
|
output = 'colouredstonebricks:'..colour2,
|
||||||
|
recipe = {
|
||||||
|
'dye:'..colour2, 'default:stonebrick',
|
||||||
|
}
|
||||||
|
})
|
||||||
|
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!")
|
BIN
screenshot.png
Normal file
After Width: | Height: | Size: 191 KiB |
BIN
textures/colouredstonebricks_black.png
Normal file
After Width: | Height: | Size: 310 B |
BIN
textures/colouredstonebricks_brown.png
Normal file
After Width: | Height: | Size: 391 B |
BIN
textures/colouredstonebricks_cyan.png
Normal file
After Width: | Height: | Size: 440 B |
BIN
textures/colouredstonebricks_dark_blue.png
Normal file
After Width: | Height: | Size: 440 B |
BIN
textures/colouredstonebricks_dark_green.png
Normal file
After Width: | Height: | Size: 438 B |
BIN
textures/colouredstonebricks_dark_grey.png
Normal file
After Width: | Height: | Size: 383 B |
BIN
textures/colouredstonebricks_dark_pink.png
Normal file
After Width: | Height: | Size: 440 B |
BIN
textures/colouredstonebricks_green.png
Normal file
After Width: | Height: | Size: 448 B |
BIN
textures/colouredstonebricks_grey.png
Normal file
After Width: | Height: | Size: 377 B |
BIN
textures/colouredstonebricks_orange.png
Normal file
After Width: | Height: | Size: 450 B |
BIN
textures/colouredstonebricks_pink.png
Normal file
After Width: | Height: | Size: 428 B |
BIN
textures/colouredstonebricks_purple.png
Normal file
After Width: | Height: | Size: 444 B |
BIN
textures/colouredstonebricks_red.png
Normal file
After Width: | Height: | Size: 440 B |
BIN
textures/colouredstonebricks_white.png
Normal file
After Width: | Height: | Size: 361 B |
BIN
textures/colouredstonebricks_yellow.png
Normal file
After Width: | Height: | Size: 437 B |