Add color lamps in various densities
20
init.lua
|
@ -1,7 +1,9 @@
|
|||
local cc = {}
|
||||
cc.colors = { "yellow", "orange", "brown", "red", "pink", "magenta", "violet", "redviolet", "blue", "cyan", "green", "dark_green", "white", "light_gray", "dark_gray", "black", "lime", "aqua", "skyblue"}
|
||||
cc.dyecolors = { "unicolor_yellow", "unicolor_orange", "unicolor_dark_orange", "unicolor_red", "unicolor_light_red", "unicolor_magenta", "unicolor_violet", "unicolor_red_violet", "unicolor_blue", "unicolor_cyan", "unicolor_green", "unicolor_dark_green", "unicolor_white", "unicolor_grey", "unicolor_darkgrey", "unicolor_black", "unicolor_lime", "unicolor_aqua", "unicolor_sky_blue"}
|
||||
cc.human_colors = { "yellow", "orange", "brown", "red", "pink", "magenta", "violet", "red-violet", "blue", "cyan", "green", "dark green", "white", "light gray", "dark gray", "black", "lime", "aqua", "skyblue"}
|
||||
cc.colors = { "white", "yellow", "orange", "red", "redviolet", "magenta", "violet", "blue", "skyblue", "cyan", "aqua", "green", "lime", "pink", "brown", "dark_green", "light_gray", "dark_gray", "black" }
|
||||
cc.dyecolors = { "unicolor_white", "unicolor_yellow", "unicolor_orange", "unicolor_red", "unicolor_red_violet", "unicolor_magenta", "unicolor_violet", "unicolor_blue", "unicolor_sky_blue", "unicolor_cyan", "unicolor_aqua", "unicolor_green", "unicolor_lime", "unicolor_light_red", "unicolor_dark_orange", "unicolor_dark_green", "unicolor_grey", "unicolor_darkgrey", "unicolor_black" }
|
||||
cc.human_colors = { "white", "yellow", "orange", "red", "red-violet", "magenta", "violet", "blue", "skyblue", "cyan", "aqua", "green", "lime", "pink", "brown", "dark green", "light gray", "dark gray", "black" }
|
||||
|
||||
local light_level = 14
|
||||
|
||||
for i=1,#cc.colors do
|
||||
local c = cc.colors[i]
|
||||
|
@ -34,6 +36,18 @@ for i=1,#cc.colors do
|
|||
groups = { dig_immediate = 2 },
|
||||
sounds = { footstep = { name = "colorcubes_block_footstep", gain = 0.5 } }
|
||||
}
|
||||
if light_level > 1 then
|
||||
local nodedef_light = {
|
||||
description = h.." abstract lamp",
|
||||
tiles = { "colorcubes_light_"..c..".png" },
|
||||
groups = { dig_immediate = 2 },
|
||||
sounds = { footstep = { name = "colorcubes_block_footstep", gain = 0.5 } },
|
||||
light_source = light_level,
|
||||
}
|
||||
minetest.register_node("colorcubes:"..c.."_light", nodedef_light)
|
||||
light_level = light_level - 1
|
||||
end
|
||||
|
||||
minetest.register_node("colorcubes:"..c.."_single", nodedef1)
|
||||
minetest.register_node("colorcubes:"..c.."_window", nodedef_window)
|
||||
minetest.register_node("colorcubes:"..c.."_tiled", nodedef4)
|
||||
|
|
After Width: | Height: | Size: 470 B |
After Width: | Height: | Size: 456 B |
After Width: | Height: | Size: 465 B |
After Width: | Height: | Size: 467 B |
After Width: | Height: | Size: 467 B |
After Width: | Height: | Size: 447 B |
After Width: | Height: | Size: 490 B |
After Width: | Height: | Size: 424 B |
After Width: | Height: | Size: 432 B |
After Width: | Height: | Size: 445 B |
After Width: | Height: | Size: 461 B |
After Width: | Height: | Size: 270 B |
After Width: | Height: | Size: 466 B |