[coloredwood] Update to Git commit bd490be:

https://github.com/minetest-mods/coloredwood/tree/bd490be
master
AntumDeluge 2017-06-06 13:20:25 -07:00
parent dd8987f5c0
commit 4fd5be21ad
274 changed files with 333 additions and 721 deletions

View File

@ -112,7 +112,7 @@ The game includes the mods from the default [minetest_game](https://github.com/m
* [lightning][] ([LGPL / CC BY-SA][lic.lightning]) -- version: [39bd36c Git][ver.lightning] *2017-02-20*
* [snowdrift][] ([MIT][lic.snowdrift]) -- version: [fcb0537 Git][ver.snowdrift] *2017-04-15* ([patched][patch.snowdrift])
* wood/
* [coloredwood][] ([LGPL][lic.lgpl3.0]) -- version: [7b177f3 Git][ver.coloredwood] *2016-03-27*
* [coloredwood][] ([LGPL][lic.lgpl3.0]) -- version: [bd490be Git][ver.coloredwood] *2017-05-18*
* [mywoodslopes][] ([DWYWPL][lic.dwywpl]) -- version: [3a1b531 Git][ver.mywoodslopes] *2016-03-23*
* world/
* [bedrock2][] ([WTFPL][lic.wtfpl]) -- version [1.2.2 (5fe9e87 Git)][ver.bedrock2] *2016-11-21* ([patched][patch.bedrock2])
@ -415,7 +415,7 @@ The game includes the mods from the default [minetest_game](https://github.com/m
[ver.castle_weapons]: https://github.com/minetest-mods/castle_weapons/tree/fcfa716
[ver.christmas]: https://github.com/TheZenKitteh/minetest-christmas/tree/d3bd872
[ver.cme]: https://github.com/BlockMen/cme/tree/e3502a1
[ver.coloredwood]: https://github.com/minetest-mods/coloredwood/tree/7b177f3
[ver.coloredwood]: https://github.com/minetest-mods/coloredwood/tree/bd490be
[ver.compassgps]: https://github.com/Kilarin/compassgps/tree/96892a0
[ver.crafting_bench]: https://github.com/minetest-mods/crafting_bench/tree/3aa4cfb
[ver.craftguide]: https://github.com/minetest-mods/craftguide/tree/86a96c3

View File

@ -1,301 +0,0 @@
-- Fences portion of Colored Wood mod by Vanessa Ezekowitz ~~ 2012-07-17
-- based on my unified dyes modding template.
--
-- License: WTFPL
local colored_block_modname = "coloredwood"
local colored_block_description = "Wooden Fence"
local neutral_block = "default:fence_wood"
local colored_block_sunlight = "false"
local colored_block_walkable = "true"
local colored_block_groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=2, not_in_creative_inventory=1}
local colored_block_sound = "default.node_sound_wood_defaults()"
for shade = 1, 3 do
local shadename = coloredwood.shades[shade]
local shadename2 = coloredwood.shades2[shade]
for hue = 1, 12 do
local huename = coloredwood.hues[hue]
local huename2 = coloredwood.hues2[hue]
local colorname = colored_block_modname..":fence_"..shadename..huename
local pngnameinv = colored_block_modname.."_fence_"..shadename..huename..".png"
local pngname = colored_block_modname.."_wood_"..shadename..huename..".png"
local nodedesc = shadename2..huename2..colored_block_description
local stickname = colored_block_modname..":stick_"..shadename..huename
local s50colorname = colored_block_modname..":fence_"..shadename..huename.."_s50"
local s50pngname = colored_block_modname.."_wood_"..shadename..huename.."_s50.png"
local s50pngnameinv = colored_block_modname.."_fence_"..shadename..huename.."_s50.png"
local s50nodedesc = shadename2..huename2..colored_block_description.." (50% Saturation)"
local s50stickname = colored_block_modname..":stick_"..shadename..huename.."_s50"
minetest.register_node(colorname, {
drawtype = "fencelike",
description = nodedesc,
tiles = { pngname },
inventory_image = pngnameinv,
wield_image = pngnameinv,
sunlight_propagates = colored_block_sunlight,
paramtype = "light",
walkable = colored_block_walkable,
groups = colored_block_groups,
sounds = colored_block_sound,
selection_box = {
type = "fixed",
fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7},
},
})
minetest.register_node(s50colorname, {
drawtype = "fencelike",
description = s50nodedesc,
tiles = { s50pngname },
inventory_image = s50pngnameinv,
wield_image = s50pngnameinv,
sunlight_propagates = colored_block_sunlight,
paramtype = "light",
walkable = colored_block_walkable,
groups = colored_block_groups,
sounds = colored_block_sound,
selection_box = {
type = "fixed",
fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7},
},
})
minetest.register_craft({
type = "fuel",
recipe = colorname,
burntime = 7,
})
minetest.register_craft({
type = "fuel",
recipe = s50colorname,
burntime = 7,
})
minetest.register_craft({
output = colorname.." 2" ,
recipe = {
{stickname, stickname, stickname },
{stickname, stickname, stickname }
}
})
minetest.register_craft({
output = s50colorname.." 2",
recipe = {
{s50stickname, s50stickname, s50stickname },
{s50stickname, s50stickname, s50stickname }
}
})
minetest.register_craft({
output = colorname.." 2",
recipe = {
{ "unifieddyes:"..shadename..huename, "", "" },
{"group:stick", "group:stick", "group:stick"},
{"group:stick", "group:stick", "group:stick"},
},
})
minetest.register_craft({
output = s50colorname.." 2",
recipe = {
{ "unifieddyes:"..shadename..huename.."_s50", "", "" },
{"group:stick", "group:stick", "group:stick"},
{"group:stick", "group:stick", "group:stick"},
},
})
minetest.register_craft( {
type = "shapeless",
output = colorname.." 2",
recipe = {
neutral_block,
neutral_block,
"unifieddyes:"..shadename..huename
},
})
minetest.register_craft( {
type = "shapeless",
output = colorname.." 2",
recipe = {
neutral_block,
neutral_block,
"unifieddyes:"..shadename..huename.."_s50"
},
})
end
end
-- Generate the "light" shades separately, since they don"t have a low-sat version.
for hue = 1, 12 do
local huename = coloredwood.hues[hue]
local huename2 = coloredwood.hues2[hue]
local colorname = colored_block_modname..":fence_light_"..huename
local pngname = colored_block_modname.."_wood_light_"..huename..".png"
local pngnameinv = colored_block_modname.."_fence_light_"..huename..".png"
local nodedesc = "Light "..huename2..colored_block_description
local stickname = colored_block_modname..":stick_light_"..huename
minetest.register_node(colorname, {
drawtype = "fencelike",
description = nodedesc,
tiles = { pngname },
inventory_image = pngnameinv,
wield_image = pngnameinv,
sunlight_propagates = colored_block_sunlight,
paramtype = "light",
walkable = colored_block_walkable,
groups = colored_block_groups,
sounds = colored_block_sound,
selection_box = {
type = "fixed",
fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7},
},
})
minetest.register_craft({
type = "fuel",
recipe = colorname,
burntime = 7,
})
minetest.register_craft({
output = colorname.." 2",
recipe = {
{stickname, stickname, stickname },
{stickname, stickname, stickname }
}
})
minetest.register_craft({
output = colorname.." 2",
recipe = {
{ "unifieddyes:light_"..huename, "", "" },
{"group:stick", "group:stick", "group:stick"},
{"group:stick", "group:stick", "group:stick"},
},
})
minetest.register_craft( {
type = "shapeless",
output = colorname.." 2",
recipe = {
neutral_block,
neutral_block,
"unifieddyes:light_"..huename
},
})
end
-- extra recipes for default dye colors.
for _, color in ipairs(coloredwood.default_hues) do
minetest.register_craft({
output = "coloredwood:fence_"..color.." 2",
recipe = {
{ "dye:"..color, "", "" },
{"group:stick", "group:stick", "group:stick"},
{"group:stick", "group:stick", "group:stick"},
},
})
end
minetest.register_craft({
output = "coloredwood:fence_light_red 2",
recipe = {
{ "dye:pink", "", "" },
{"group:stick", "group:stick", "group:stick"},
{"group:stick", "group:stick", "group:stick"},
},
})
minetest.register_craft({
output = "coloredwood:fence_dark_orange 2",
recipe = {
{ "dye:brown", "", "" },
{"group:stick", "group:stick", "group:stick"},
{"group:stick", "group:stick", "group:stick"},
},
})
-- ============================================================
-- The 5 levels of greyscale.
--
-- Oficially these are 0, 25, 50, 75, and 100% relative to white,
-- but in practice, they"re actually 7.5%, 25%, 50%, 75%, and 95%.
-- (otherwise black and white would wash out).
for grey = 1,5 do
local greyname = coloredwood.greys[grey]
local greyname2 = coloredwood.greys2[grey]
local greyname3 = coloredwood.greys3[grey]
local greyshadename = colored_block_modname..":fence_"..greyname
local pngname = colored_block_modname.."_wood_"..greyname..".png"
local pngnameinv = colored_block_modname.."_fence_"..greyname..".png"
local nodedesc = greyname2..colored_block_description
local stickname = colored_block_modname..":stick_"..greyname
minetest.register_node(greyshadename, {
drawtype = "fencelike",
description = nodedesc,
tiles = { pngname },
inventory_image = pngnameinv,
wield_image = pngnameinv,
sunlight_propagates = colored_block_sunlight,
paramtype = "light",
walkable = colored_block_walkable,
groups = colored_block_groups,
sounds = colored_block_sound,
selection_box = {
type = "fixed",
fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7},
},
})
minetest.register_craft({
type = "fuel",
recipe = greyshadename,
burntime = 7,
})
minetest.register_craft({
output = greyshadename.." 2",
recipe = {
{stickname, stickname, stickname },
{stickname, stickname, stickname }
}
})
minetest.register_craft({
output = greyshadename.." 2",
recipe = {
{ greyname3, "", "" },
{"group:stick", "group:stick", "group:stick"},
{"group:stick", "group:stick", "group:stick"},
},
})
minetest.register_craft( {
type = "shapeless",
output = greyshadename.." 2",
recipe = {
neutral_block,
neutral_block,
greyname3
},
})
end

View File

@ -6,38 +6,10 @@
-- This mod provides 89 colors of wood, fences, and sticks, and enough
-- cross-compatible recipes to make everything fit together naturally.
--
-- Colored wood is crafted by putting two regular wood blocks into the
-- grid along with one dye color, in any order and position. The result
-- is two colored wood blocks.
--
-- Colored sticks are crafted from colored wood blocks only - one colored
-- wood block in any position yields 4 colored sticks as usual.
--
-- Uncolored sticks cannot be dyed separately, but they can still be used
-- to build colored wooden fences. These are crafted either by placing six
-- plain, uncolored sticks into the crafting grid in the usual manner, plus
-- one portion of dye in the upper-left corner of the grid
-- (D = dye, S = uncolored stick):
--
-- D - -
-- S S S
-- S S S
--
-- You can also craft a colored fence by using colored sticks derived from
-- colored wood. Just place six of them in the same manner as with plain
-- fences (CS = colored stick):
--
-- -- -- --
-- CS CS CS
-- CS CS CS
--
-- If you find yourself with too many colors of sticks and not enough,
-- ladders, you can use any color (as long as they"re all the same) to
-- create a ladder, but it"ll always result in a plain, uncolored ladder.
-- This practice isn"t recommended of course, since it wastes dye.
--
-- Colored wood is created by placing a regular wood block on the ground
-- and then right-clicking on it with some dye.
-- All materials are flammable and can be used as fuel.
--
-- Hues are on a 30 degree spacing starting at red = 0 degrees.
-- "s50" in a file/item name means "saturation: 50%".
-- Texture brightness levels for the colors are 100%, 66% ("medium"),
@ -45,6 +17,11 @@
coloredwood = {}
coloredwood.enable_stairsplus = true
if minetest.settings:get_bool("coloredwood_enable_stairsplus") == false or not minetest.get_modpath("moreblocks") then
coloredwood.enable_stairsplus = false
end
coloredwood.shades = {
"dark_",
"medium_",
@ -127,11 +104,329 @@ coloredwood.greys3 = {
"dye:white"
}
-- All of the actual code is contained in separate lua files:
coloredwood.hues_plus_greys = {}
dofile(minetest.get_modpath("coloredwood").."/wood.lua")
dofile(minetest.get_modpath("coloredwood").."/fence.lua")
dofile(minetest.get_modpath("coloredwood").."/stick.lua")
for _, hue in ipairs(coloredwood.hues) do
table.insert(coloredwood.hues_plus_greys, hue)
end
table.insert(coloredwood.hues_plus_greys, "grey")
-- helper functions
local function is_stairsplus(name, colorized)
-- the format of a coloredwood stairsplus node is:
-- moreblocks:class_wood_color_shape
-- where class is "slab", "stair", etc. and shape is "three quarter", "alt", etc.
local a = string.find(name, ":")
local b = string.find(name, "_")
local class = string.sub(name, a+1, b-1) -- from colon to underscore is the class
local shape = ""
local rest
if class == "stair"
or class == "slab"
or class == "panel"
or class == "micro"
or class == "slope" then
if colorized then
colorshape = string.sub(name, b+6)
local c = string.find(colorshape, "_") or 0 -- first word after "_wood_" is color
shape = string.sub(colorshape, c) -- everything after the color is the shape
if colorshape == shape then shape = "" end -- if there was no shape
else
shape = string.sub(name, b+5) -- everything after "_wood_" is the shape
end
end
return class, shape
end
-- the actual nodes!
minetest.register_node("coloredwood:wood_block", {
description = "Colored wooden planks",
tiles = { "coloredwood_base.png" },
paramtype = "light",
paramtype2 = "color",
palette = "unifieddyes_palette_extended.png",
place_param2 = 240,
walkable = true,
sunlight_propagates = false,
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=2, not_in_creative_inventory=1, ud_param2_colorable = 1},
sounds = default.node_sound_wood_defaults(),
after_place_node = unifieddyes.recolor_on_place,
after_dig_node = unifieddyes.after_dig_node,
drop = "default:wood"
})
for _, color in ipairs(coloredwood.hues_plus_greys) do
-- moreblocks/stairsplus support
if coloredwood.enable_stairsplus then
-- stairsplus:register_all(modname, subname, recipeitem, {fields})
stairsplus:register_all(
"coloredwood",
"wood_"..color,
"coloredwood:wood_"..color,
{
description = "Colored wood",
tiles = { "coloredwood_base.png" },
paramtype = "light",
paramtype2 = "colorfacedir",
palette = "unifieddyes_palette_"..color.."s.png",
after_place_node = function(pos, placer, itemstack, pointed_thing)
print("after_place_node on "..minetest.get_node(pos).name)
minetest.rotate_node(itemstack, placer, pointed_thing)
unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
end,
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=2, not_in_creative_inventory=1, ud_param2_colorable = 1},
after_dig_node = unifieddyes.after_dig_node
}
)
end
end
-- force replacement node type for stairsplus default wood stair/slab/etc nodes
if coloredwood.enable_stairsplus then
for _, i in pairs(minetest.registered_nodes) do
if string.find(i.name, "moreblocks:stair_wood")
or string.find(i.name, "moreblocks:slab_wood")
or string.find(i.name, "moreblocks:panel_wood")
or string.find(i.name, "moreblocks:micro_wood")
or string.find(i.name, "moreblocks:slope_wood") then
local a,b = string.find(i.name, "wood_tile")
if not a then
local s1, s2 = is_stairsplus(i.name, false)
minetest.override_item(i.name, {
ud_replacement_node = "coloredwood:"..s1.."_wood_grey"..s2,
paramtype2 = "colorfacedir",
after_place_node = function(pos, placer, itemstack, pointed_thing)
print("overridden after_place_node on "..i.name)
minetest.rotate_node(itemstack, placer, pointed_thing)
unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
end,
on_place = minetest.item_place,
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1, not_in_creative_inventory=1, ud_param2_colorable = 1},
})
end
end
end
-- fix drops and other stuff for colored versions of stairsplus nodes
for _, i in pairs(minetest.registered_nodes) do
if string.find(i.name, "coloredwood:stair_")
or string.find(i.name, "coloredwood:slab_")
or string.find(i.name, "coloredwood:panel_")
or string.find(i.name, "coloredwood:micro_")
or string.find(i.name, "coloredwood:slope_")
then
mname = string.gsub(i.name, "coloredwood:", "moreblocks:")
local s1, s2 = is_stairsplus(mname, true)
minetest.override_item(i.name, {
after_place_node = function(pos, placer, itemstack, pointed_thing)
print("overridden after_place_node on "..i.name)
minetest.rotate_node(itemstack, placer, pointed_thing)
unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
end,
on_place = minetest.item_place,
drop = "moreblocks:"..s1.."_wood"..s2
})
end
end
end
minetest.override_item("default:wood", {
palette = "unifieddyes_palette_extended.png",
ud_replacement_node = "coloredwood:wood_block",
after_place_node = unifieddyes.recolor_on_place,
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1, ud_param2_colorable = 1},
})
default.register_fence("coloredwood:fence", {
description = "Colored wooden fence",
texture = "coloredwood_fence_base.png",
paramtype2 = "color",
palette = "unifieddyes_palette_extended.png",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, ud_param2_colorable = 1},
sounds = default.node_sound_wood_defaults(),
after_place_node = unifieddyes.recolor_on_place,
after_dig_node = unifieddyes.after_dig_node,
drop = "default:fence_wood",
material = "default:wood"
})
minetest.override_item("default:fence_wood", {
palette = "unifieddyes_palette_extended.png",
ud_replacement_node = "coloredwood:fence",
after_place_node = unifieddyes.recolor_on_place,
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, ud_param2_colorable = 1}
})
-- ============================
-- convert the old static nodes
coloredwood.old_static_nodes = {}
coloredwood.old_13_color_nodes = {}
for _, hue in ipairs(coloredwood.hues) do
table.insert(coloredwood.old_13_color_nodes, "coloredwood:wood_"..hue)
for _, sat in ipairs({"", "_s50"}) do
for _, val in ipairs ({"dark_", "medium_", "light_", ""}) do
table.insert(coloredwood.old_static_nodes, "coloredwood:wood_"..val..hue..sat)
table.insert(coloredwood.old_static_nodes, "coloredwood:fence_"..val..hue..sat)
end
end
end
for _, shade in ipairs(coloredwood.greys) do
table.insert(coloredwood.old_static_nodes, "coloredwood:wood_"..shade)
table.insert(coloredwood.old_static_nodes, "coloredwood:fence_"..shade)
end
table.insert(coloredwood.old_13_color_nodes, "coloredwood:wood_grey")
-- add all of the stairsplus nodes, if moreblocks is installed.
if coloredwood.enable_stairsplus then
for _, shape in ipairs(circular_saw.names) do
local a = shape[1]
local b = shape[2]
for _, hue in ipairs(coloredwood.hues) do
for _, shade in ipairs(coloredwood.shades) do
table.insert(coloredwood.old_static_nodes, "coloredwood:"..a.."_wood_"..shade..hue..b)
table.insert(coloredwood.old_static_nodes, "coloredwood:"..a.."_wood_"..shade..hue.."_s50"..b)
end
table.insert(coloredwood.old_static_nodes, "coloredwood:"..a.."_wood_light_"..hue..b) -- light doesn't have extra shades or s50
end
end
for _, shape in ipairs(circular_saw.names) do
local a = shape[1]
local b = shape[2]
for _, hue in ipairs(coloredwood.greys) do
for _, shade in ipairs(coloredwood.shades) do
table.insert(coloredwood.old_static_nodes, "coloredwood:"..a.."_wood_"..hue..b)
end
end
end
end
local old_shades = {
"",
"",
"",
"light_",
"medium_",
"medium_",
"dark_",
"dark_"
}
local old_greys = {
"white",
"white",
"light_grey",
"grey",
"dark_grey",
"black",
"white",
"white"
}
minetest.register_lbm({
name = "coloredwood:convert",
label = "Convert wood blocks, fences, stairsplus stuff, etc to use param2 color",
run_at_every_load = false,
nodenames = coloredwood.old_static_nodes,
action = function(pos, node)
local meta = minetest.get_meta(pos)
local name = node.name
local hue, sat, val = unifieddyes.get_hsv(name)
local color = val..hue..sat
local s1, s2 = is_stairsplus(name, true)
if meta and (meta:get_string("dye") ~= "") then return end -- node has already been converted before.
if s1 then
if not s2 then print("impossible conversion request! name = "..node.name.." --> ".."coloredwood:"..s1.."_wood_"..hue.."*nil*") return end
local paletteidx, _ = unifieddyes.getpaletteidx("unifieddyes:"..color, true)
local cfdir = paletteidx + (node.param2 % 32)
local newname = "coloredwood:"..s1.."_wood_"..hue..s2
minetest.set_node(pos, { name = newname, param2 = cfdir })
local meta = minetest.get_meta(pos)
meta:set_string("dye", "unifieddyes:"..color)
elseif string.find(name, ":fence") then
local paletteidx, hue = unifieddyes.getpaletteidx("unifieddyes:"..color, "extended")
minetest.set_node(pos, { name = "coloredwood:fence", param2 = paletteidx })
meta:set_string("dye", "unifieddyes:"..color)
meta:set_string("palette", "ext")
else
if hue == "aqua" then
hue = "spring"
elseif hue == "skyblue" then
hue = "azure"
elseif hue == "redviolet" then
hue = "rose"
end
color = val..hue..sat
local paletteidx, hue = unifieddyes.getpaletteidx("unifieddyes:"..color, "extended")
minetest.set_node(pos, { name = "coloredwood:wood_block", param2 = paletteidx })
meta:set_string("dye", "unifieddyes:"..color)
meta:set_string("palette", "ext")
end
end
})
table.insert(coloredwood.old_13_color_nodes, "coloredwood:fence")
minetest.register_lbm({
name = "coloredwood:recolor_basics",
label = "Convert fences and base 13-color wood to use UD extended palette",
run_at_every_load = false,
nodenames = coloredwood.old_13_color_nodes,
action = function(pos, node)
local meta = minetest.get_meta(pos)
if meta:get_string("palette") ~= "ext" then
if node.name == "coloredwood:fence" then
minetest.swap_node(pos, { name = node.name, param2 = unifieddyes.convert_classic_palette[node.param2] })
else
local hue = string.sub(node.name, 18)
local shadenum = math.floor(node.param2/32) + 1
local shade = old_shades[shadenum]
local sat = ""
if hue == "grey" then
hue = old_greys[shadenum]
shade = ""
sat = ""
elseif shadenum == 3 or shadenum == 6 or shadenum == 8 then
sat = "_s50"
end
local newcolor = unifieddyes.convert_classic_palette[unifieddyes.getpaletteidx("unifieddyes:"..shade..hue..sat)]
minetest.swap_node(pos, { name = "coloredwood:wood_block", param2 = newcolor })
end
meta:set_string("palette", "ext")
end
end
})
print("[Colored Wood] Loaded!")

View File

@ -1,152 +0,0 @@
-- Sticks portion of Colored Wood mod by Vanessa Ezekowitz ~~ 2012-07-17
-- based on my unified dyes modding template.
--
-- License: WTFPL
local colored_block_modname = "coloredwood"
local colored_block_description = "Stick"
for shade = 1, 3 do
local shadename = coloredwood.shades[shade]
local shadename2 = coloredwood.shades2[shade]
for hue = 1, 12 do
local huename = coloredwood.hues[hue]
local huename2 = coloredwood.hues2[hue]
local colorname = colored_block_modname..":stick_"..shadename..huename
local pngname = colored_block_modname.."_stick_"..shadename..huename..".png"
local itemdesc = shadename2..huename2..colored_block_description
local woodname = colored_block_modname..":wood_"..shadename..huename
local s50colorname = colored_block_modname..":stick_"..shadename..huename.."_s50"
local s50pngname = colored_block_modname.."_stick_"..shadename..huename.."_s50.png"
local s50itemdesc = shadename2..huename2..colored_block_description.." (50% Saturation)"
local s50woodname = colored_block_modname..":wood_"..shadename..huename.."_s50"
minetest.register_craft({
type = "fuel",
recipe = colorname,
burntime = 7,
})
minetest.register_craft({
type = "fuel",
recipe = s50colorname,
burntime = 7,
})
minetest.register_craftitem(colorname, {
description = itemdesc,
inventory_image = pngname,
groups = { coloredsticks=1, not_in_creative_inventory=1, stick=1 }
})
minetest.register_craftitem(s50colorname, {
description = s50itemdesc,
inventory_image = s50pngname,
groups = { coloredsticks=1, not_in_creative_inventory=1, stick=1 }
})
minetest.register_craft( {
type = "shapeless",
output = colorname.." 4",
recipe = {
woodname
}
})
minetest.register_craft( {
type = "shapeless",
output = s50colorname.." 4",
recipe = {
s50woodname
}
})
end
end
-- Generate the "light" shades separately, since they don"t have a low-sat version.
for hue = 1, 12 do
local huename = coloredwood.hues[hue]
local huename2 = coloredwood.hues2[hue]
local colorname = colored_block_modname..":stick_light_"..huename
local pngname = colored_block_modname.."_stick_light_"..huename..".png"
local itemdesc = "Light "..huename2..colored_block_description
local woodname = colored_block_modname..":wood_light_"..huename
minetest.register_craftitem(colorname, {
description = itemdesc,
inventory_image = pngname,
groups = { coloredsticks=1, not_in_creative_inventory=1, stick=1 }
})
minetest.register_craft({
type = "fuel",
recipe = colorname,
burntime = 7,
})
minetest.register_craft( {
type = "shapeless",
output = colorname.." 4",
recipe = {
woodname
}
})
end
-- ============================================================
-- The 5 levels of greyscale.
--
-- Oficially these are 0, 25, 50, 75, and 100% relative to white,
-- but in practice, they"re actually 7.5%, 25%, 50%, 75%, and 95%.
-- (otherwise black and white would wash out).
for grey = 1,5 do
local greyname = coloredwood.greys[grey]
local greyname2 = coloredwood.greys2[grey]
local greyshadename = colored_block_modname..":stick_"..greyname
local pngname = colored_block_modname.."_stick_"..greyname..".png"
local itemdesc = greyname2..colored_block_description
local greywoodname = colored_block_modname..":wood_"..greyname
minetest.register_craftitem(greyshadename, {
description = itemdesc,
inventory_image = pngname,
groups = { coloredsticks=1, not_in_creative_inventory=1, stick=1 }
})
minetest.register_craft({
type = "fuel",
recipe = greyshadename,
burntime = 7,
})
minetest.register_craft( {
type = "shapeless",
output = greyshadename.." 4",
recipe = {
greywoodname
}
})
end
-- ====================================================================
-- This recipe causes all colored sticks to be usable to craft ladders.
minetest.register_craft({
output = "default:ladder 2" ,
recipe = {
{"group:coloredsticks", "" , "group:coloredsticks" },
{"group:coloredsticks", "group:coloredsticks", "group:coloredsticks" },
{"group:coloredsticks", "" , "group:coloredsticks" }
}
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 224 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 205 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 398 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 373 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 361 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 356 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 344 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 361 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 344 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 356 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 344 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 373 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 361 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 298 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 344 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 373 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 361 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 356 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 344 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 373 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 361 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 373 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 361 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 373 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 361 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 361 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 344 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 199 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 398 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 208 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 398 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 398 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 398 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 398 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 398 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 398 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 217 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 214 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 121 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 B

Some files were not shown because too many files have changed in this diff Show More