Allow light color cubes to be painted as well

master
Wuzzy 2016-07-03 22:20:28 +02:00
parent f4464096f3
commit 7bc79bf3e4
2 changed files with 13 additions and 9 deletions

View File

@ -19,8 +19,9 @@ The following block types are available:
* Light color cubes: These blocks emit light
### Light color cubes
There are 13 lamps. There aren't lamps for all colors. Each lamp has a different
brightness, depending on its color. The available lamp colors are, sorted by brightness:
There are 13 light color cubes. Each light color cube has a different
brightness, depending on its color. The available colors for light color
cubes are, sorted by brightness:
1. White
2. Yellow
@ -88,8 +89,8 @@ This yields one concentric color cube of the same color.
## Coloring
This mod supports the Paint Roller mod [`paint_roller`].
All color cubes except the light color cubes can be painted
to change their color.
All color cubes can be painted to change their color,
provided the color is available.
This mod is supported by the Color Machine mod [`colormachine`]
for repainting most of the blocks in this mod.

View File

@ -70,15 +70,18 @@ for i=1,#cc.colors do
light_source = light_level,
}
minetest.register_node("colorcubes:"..c.."_light", nodedef_light)
if(minetest.get_modpath("paint_roller") ~= nil) then
paint_roller.register_one("colorcubes:"..c.."_light", d, "light color cubes" )
end
light_level = light_level - 1
end
--[[ If the paint_roller mod is installed, register the nodes to it ]]
if(minetest.get_modpath("paint_roller") ~= nil) then
paint_roller.register_one("colorcubes:"..c.."_single", d, "Simple Abstract Blocks" )
paint_roller.register_one("colorcubes:"..c.."_tiled", d, "Tiled Abstract Blocks" )
paint_roller.register_one("colorcubes:"..c.."_inward", d, "Inwardly-Patterend Abstract Blocks" )
paint_roller.register_one("colorcubes:"..c.."_window", d, "Abstract Window Block" )
paint_roller.register_one("colorcubes:"..c.."_single", d, "basic color cubes" )
paint_roller.register_one("colorcubes:"..c.."_tiled", d, "tiled color cubes" )
paint_roller.register_one("colorcubes:"..c.."_inward", d, "concentric color cubes" )
paint_roller.register_one("colorcubes:"..c.."_window", d, "window color cubes" )
end
-- Register various crafting recipes for convenience
@ -151,5 +154,5 @@ for i=1,#complementary do
tiled block so that it becomes a 2-color block. Thus, we use minor hack by using
a fake dye group called none to make sure there is no dye to turn a tiled block
into a 2-color tiled block. ]]
paint_roller.register_one(nodeid, "none", "Tiled Abstract Blocks" )
paint_roller.register_one(nodeid, "none", "tiled color cubes" )
end