From f74bdd224f9f1ad4972f9132939a2b86901b7e3b Mon Sep 17 00:00:00 2001 From: Vanessa Dannenberg Date: Wed, 22 Aug 2018 06:41:06 -0400 Subject: [PATCH 01/23] switch to colored itemstacks with full crafting recipes (requires Unified Dyes commit d2512952 or later) --- init.lua | 113 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 58 insertions(+), 55 deletions(-) diff --git a/init.lua b/init.lua index 765938b..e139c31 100644 --- a/init.lua +++ b/init.lua @@ -117,8 +117,9 @@ table.insert(coloredwood.hues_plus_greys, "grey") 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. + -- "coloredwood:$CLASS_wood_$COLOR_$SHAPE" + -- where $CLASS is "slab", "stair", etc., $SHAPE is "three quarter", "alt", etc., + -- and $COLOR is one of the 13 color sets (counting "grey") local a = string.find(name, ":") local b = string.find(name, "_") @@ -126,6 +127,7 @@ local function is_stairsplus(name, colorized) local class = string.sub(name, a+1, b-1) -- from colon to underscore is the class local shape = "" local rest + local colorshape if class == "stair" or class == "slab" @@ -153,14 +155,10 @@ minetest.register_node("coloredwood:wood_block", { 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 @@ -182,74 +180,60 @@ for _, color in ipairs(coloredwood.hues_plus_greys) do 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 +local coloredwood_cuts = {} - if coloredwood.enable_stairsplus then +-- force settings for stairsplus default wood stair/slab/etc nodes +-- and fix other stuff for colored versions of stairsplus nodes + +if coloredwood.enable_stairsplus then for _, i in pairs(minetest.registered_nodes) do - if string.find(i.name, "moreblocks:stair_wood") + + 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 + or string.find(i.name, "moreblocks:slope_wood")) + and not string.find(i.name, "wood_tile") then - -- fix drops and other stuff for colored versions of stairsplus nodes + table.insert(coloredwood_cuts, i.name) - 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 + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1, not_in_creative_inventory=1, ud_param2_colorable = 1}, }) end end end +-- "coloredwood:slope_wood_outer_half_raised" + +for _, mname in ipairs(coloredwood_cuts) do + + local class, shape = is_stairsplus(mname, nil) + + unifieddyes.register_color_craft({ + output_prefix = "coloredwood:"..class.."_wood_", + output_suffix = shape, + palette = true, + type = "shapeless", + neutral_node = mname, + recipe = { + "NEUTRAL_NODE", + "MAIN_DYE" + } + }) +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}, }) @@ -260,19 +244,38 @@ default.register_fence("coloredwood:fence", { 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} }) +-- Crafts + +unifieddyes.register_color_craft({ + output = "coloredwood:wood_block", + palette = "extended", + type = "shapeless", + neutral_node = "default:wood", + recipe = { + "NEUTRAL_NODE", + "MAIN_DYE" + } +}) + +unifieddyes.register_color_craft({ + output = "coloredwood:fence", + palette = "extended", + type = "shapeless", + neutral_node = "default:fence_wood", + recipe = { + "NEUTRAL_NODE", + "MAIN_DYE" + } +}) + -- ============================ -- convert the old static nodes From 882a332c5929bf8bd878c107036e1279fc8d5abd Mon Sep 17 00:00:00 2001 From: Vanessa Dannenberg Date: Sun, 26 Aug 2018 07:24:24 -0400 Subject: [PATCH 02/23] replace default:wood with "wood block" on airbrush --- init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/init.lua b/init.lua index e139c31..09f466a 100644 --- a/init.lua +++ b/init.lua @@ -234,6 +234,7 @@ end minetest.override_item("default:wood", { palette = "unifieddyes_palette_extended.png", + airbrush_replacement_node = "coloredwood:wood_block", groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1, ud_param2_colorable = 1}, }) From 3686422613843ab7556479ea4f667087f425c81d Mon Sep 17 00:00:00 2001 From: Vanessa Dannenberg Date: Sat, 8 Sep 2018 11:51:55 -0400 Subject: [PATCH 03/23] got rid of the old conversion LBMs. They've served their purpose Anyway, UD doesn't support the old all-in-one 89-color palette anymore, just the "split" version. Also, adjusted for UD changing from `true` to `"split"` for the split palette type. --- init.lua | 109 +------------------------------------------------------ 1 file changed, 1 insertion(+), 108 deletions(-) diff --git a/init.lua b/init.lua index 09f466a..50c6c02 100644 --- a/init.lua +++ b/init.lua @@ -222,7 +222,7 @@ for _, mname in ipairs(coloredwood_cuts) do unifieddyes.register_color_craft({ output_prefix = "coloredwood:"..class.."_wood_", output_suffix = shape, - palette = true, + palette = "split", type = "shapeless", neutral_node = mname, recipe = { @@ -326,111 +326,4 @@ if coloredwood.enable_stairsplus then 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!") From 3b60c6eeee21abc0e401c3c4d9f0dbf543918f3f Mon Sep 17 00:00:00 2001 From: Vanessa Dannenberg Date: Wed, 12 Sep 2018 16:17:27 -0400 Subject: [PATCH 04/23] remove a bunch of cruft leftover from the since-deleted LBMs --- init.lua | 116 ------------------------------------------------------- 1 file changed, 116 deletions(-) diff --git a/init.lua b/init.lua index 50c6c02..91b6f51 100644 --- a/init.lua +++ b/init.lua @@ -22,34 +22,6 @@ if minetest.settings:get_bool("coloredwood_enable_stairsplus") == false or not m coloredwood.enable_stairsplus = false end -coloredwood.shades = { - "dark_", - "medium_", - "" -- represents "no special shade name", e.g. full. -} - -coloredwood.shades2 = { - "Dark ", - "Medium ", - "" -- represents "no special shade name", e.g. full. -} - -coloredwood.default_hues = { - "white", - "grey", - "dark_grey", - "black", - "violet", - "blue", - "cyan", - "dark_green", - "green", - "yellow", - "orange", - "red", - "magenta" -} - coloredwood.hues = { "red", "orange", @@ -65,45 +37,6 @@ coloredwood.hues = { "redviolet" } -coloredwood.hues2 = { - "Red ", - "Orange ", - "Yellow ", - "Lime ", - "Green ", - "Aqua ", - "Cyan ", - "Sky Blue ", - "Blue ", - "Violet ", - "Magenta ", - "Red-violet " -} - -coloredwood.greys = { - "black", - "darkgrey", - "grey", - "lightgrey", - "white" -} - -coloredwood.greys2 = { - "Black ", - "Dark Grey ", - "Medium Grey ", - "Light Grey ", - "White " -} - -coloredwood.greys3 = { - "dye:black", - "dye:dark_grey", - "dye:grey", - "dye:light_grey", - "dye:white" -} - coloredwood.hues_plus_greys = {} for _, hue in ipairs(coloredwood.hues) do @@ -277,53 +210,4 @@ unifieddyes.register_color_craft({ } }) --- ============================ --- 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 - print("[Colored Wood] Loaded!") From 34de518802902fef56bdaa835b3fb2a11996d068 Mon Sep 17 00:00:00 2001 From: Vanessa Dannenberg Date: Wed, 12 Sep 2018 16:23:39 -0400 Subject: [PATCH 05/23] use official Unified Dyes hue+grey table, not local copies --- init.lua | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/init.lua b/init.lua index 91b6f51..386f374 100644 --- a/init.lua +++ b/init.lua @@ -22,29 +22,6 @@ if minetest.settings:get_bool("coloredwood_enable_stairsplus") == false or not m coloredwood.enable_stairsplus = false end -coloredwood.hues = { - "red", - "orange", - "yellow", - "lime", - "green", - "aqua", - "cyan", - "skyblue", - "blue", - "violet", - "magenta", - "redviolet" -} - -coloredwood.hues_plus_greys = {} - -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) @@ -94,7 +71,7 @@ minetest.register_node("coloredwood:wood_block", { sounds = default.node_sound_wood_defaults(), }) -for _, color in ipairs(coloredwood.hues_plus_greys) do +for _, color in ipairs(unifieddyes.HUES_WITH_GREY) do -- moreblocks/stairsplus support From c9fdb82c477fe847d50754dc59c5ade55b69a6e4 Mon Sep 17 00:00:00 2001 From: Vanessa Dannenberg Date: Wed, 12 Sep 2018 16:25:13 -0400 Subject: [PATCH 06/23] remove outdated comment --- init.lua | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/init.lua b/init.lua index 386f374..5c9a2ae 100644 --- a/init.lua +++ b/init.lua @@ -9,11 +9,7 @@ -- 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"), --- and 33% ("dark"). + coloredwood = {} From 5d3ca897ddc47c66b9d41d77ee1c65a7085b9103 Mon Sep 17 00:00:00 2001 From: Vanessa Dannenberg Date: Wed, 12 Sep 2018 16:25:42 -0400 Subject: [PATCH 07/23] fix my name --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 5c9a2ae..8c6ad17 100644 --- a/init.lua +++ b/init.lua @@ -1,4 +1,4 @@ --- Colored Wood mod by Vanessa Ezekowitz +-- Colored Wood mod by Vanessa "VanessaE" Dannenberg -- based on my unifieddyes template. -- -- License: WTFPL From cd24616e9d6213b6dcafdfc3658550dd056152f8 Mon Sep 17 00:00:00 2001 From: Vanessa Dannenberg Date: Wed, 12 Sep 2018 17:15:58 -0400 Subject: [PATCH 08/23] assign a proper paramtype2 and airbrush replacement node to cut slabs etc --- init.lua | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/init.lua b/init.lua index 8c6ad17..d2ffd1d 100644 --- a/init.lua +++ b/init.lua @@ -103,17 +103,29 @@ 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")) + local chk = string.sub(i.name, 1, 21) + + if chk == "moreblocks:stair_woo" + or chk == "moreblocks:slab_wood" + or chk == "moreblocks:panel_woo" + or chk == "moreblocks:micro_woo" + or chk == "moreblocks:slope_woo" and not string.find(i.name, "wood_tile") then + local class = string.sub(i.name, 12, 15) + local shape = string.sub(i.name, 22) + table.insert(coloredwood_cuts, i.name) + if chk ~= "moreblocks:slab_wood" then + class = string.sub(i.name, 12, 16) + shape = string.sub(i.name, 23) + end + minetest.override_item(i.name, { groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1, not_in_creative_inventory=1, ud_param2_colorable = 1}, + paramtype2 = "colorfacedir", + airbrush_replacement_node = "coloredwood:"..class.."_wood_grey"..shape }) end end From ec415e4e37d0a9ee07ed0f574d00809346456896 Mon Sep 17 00:00:00 2001 From: Vanessa Dannenberg Date: Wed, 12 Sep 2018 17:15:58 -0400 Subject: [PATCH 09/23] assign a proper paramtype2 and replacement node to cut slabs etc so that airbrush works --- init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index d2ffd1d..0af56c3 100644 --- a/init.lua +++ b/init.lua @@ -103,7 +103,7 @@ if coloredwood.enable_stairsplus then for _, i in pairs(minetest.registered_nodes) do - local chk = string.sub(i.name, 1, 21) + local chk = string.sub(i.name, 1, 20) if chk == "moreblocks:stair_woo" or chk == "moreblocks:slab_wood" @@ -125,7 +125,7 @@ if coloredwood.enable_stairsplus then minetest.override_item(i.name, { groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1, not_in_creative_inventory=1, ud_param2_colorable = 1}, paramtype2 = "colorfacedir", - airbrush_replacement_node = "coloredwood:"..class.."_wood_grey"..shape + airbrush_replacement_node = "coloredwood:"..class.."_wood_grey_"..shape }) end end From e7ef0cf91eba9d1d99a864308a19f4f77f828c34 Mon Sep 17 00:00:00 2001 From: Vanessa Dannenberg Date: Thu, 13 Sep 2018 22:33:11 -0400 Subject: [PATCH 10/23] add palette to cut stairsplus nodes --- init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/init.lua b/init.lua index 0af56c3..4a62435 100644 --- a/init.lua +++ b/init.lua @@ -125,6 +125,7 @@ if coloredwood.enable_stairsplus then minetest.override_item(i.name, { groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1, not_in_creative_inventory=1, ud_param2_colorable = 1}, paramtype2 = "colorfacedir", + palette = "unifieddyes_palette_greys.png", airbrush_replacement_node = "coloredwood:"..class.."_wood_grey_"..shape }) end From 6e838d422bafd7c87f4bec9d673e92384032a69a Mon Sep 17 00:00:00 2001 From: Vanessa Dannenberg Date: Thu, 11 Oct 2018 03:59:44 -0400 Subject: [PATCH 11/23] fix crafting of fences (default wood + default sticks should produce default fences, not coloredwood fences. conversely, colored wood blocks + default sticks should - gives you a white fence though.) also made it possible to re-dye a colored fence --- init.lua | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 4a62435..6581e6a 100644 --- a/init.lua +++ b/init.lua @@ -164,7 +164,7 @@ default.register_fence("coloredwood:fence", { 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(), - material = "default:wood" + material = "coloredwood:wood_block" }) minetest.override_item("default:fence_wood", { @@ -196,4 +196,15 @@ unifieddyes.register_color_craft({ } }) +unifieddyes.register_color_craft({ + output = "coloredwood:fence", + palette = "extended", + type = "shapeless", + neutral_node = "coloredwood:fence", + recipe = { + "NEUTRAL_NODE", + "MAIN_DYE" + } +}) + print("[Colored Wood] Loaded!") From ed60bc17196a5866b462b4ed7b4ce0ece9a815e6 Mon Sep 17 00:00:00 2001 From: Vanessa Dannenberg Date: Thu, 8 Nov 2018 19:00:30 -0500 Subject: [PATCH 12/23] license fixups: use LGPL 3.0 for code, CC-by-SA 4.0 for media and everything else --- LICENSE | 454 +++++++++++++++++++++++++++++++++++++++++++++++++------ init.lua | 2 - 2 files changed, 407 insertions(+), 49 deletions(-) diff --git a/LICENSE b/LICENSE index 72ed5e0..c5885ae 100644 --- a/LICENSE +++ b/LICENSE @@ -1,9 +1,12 @@ -For the code: +License for code: LGPL 3.0 +License for media and all other assets: CC-by-SA 4.0 + +############################################################################### GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 - Copyright (C) 2007 Free Software Foundation, Inc. + Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -166,75 +169,432 @@ apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library. ----------- +############################################################################### -For the textures: +Attribution-ShareAlike 4.0 International -Creative Commons Legal Code +======================================================================= -Attribution-ShareAlike 2.0 -CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE. +Creative Commons Corporation ("Creative Commons") is not a law firm and +does not provide legal services or legal advice. Distribution of +Creative Commons public licenses does not create a lawyer-client or +other relationship. Creative Commons makes its licenses and related +information available on an "as-is" basis. Creative Commons gives no +warranties regarding its licenses, any material licensed under their +terms and conditions, or any related information. Creative Commons +disclaims all liability for damages resulting from their use to the +fullest extent possible. +Using Creative Commons Public Licenses + +Creative Commons public licenses provide a standard set of terms and +conditions that creators and other rights holders may use to share +original works of authorship and other material subject to copyright +and certain other rights specified in the public license below. The +following considerations are for informational purposes only, are not +exhaustive, and do not form part of our licenses. + + Considerations for licensors: Our public licenses are + intended for use by those authorized to give the public + permission to use material in ways otherwise restricted by + copyright and certain other rights. Our licenses are + irrevocable. Licensors should read and understand the terms + and conditions of the license they choose before applying it. + Licensors should also secure all rights necessary before + applying our licenses so that the public can reuse the + material as expected. Licensors should clearly mark any + material not subject to the license. This includes other CC- + licensed material, or material used under an exception or + limitation to copyright. More considerations for licensors: + wiki.creativecommons.org/Considerations_for_licensors + + Considerations for the public: By using one of our public + licenses, a licensor grants the public permission to use the + licensed material under specified terms and conditions. If + the licensor's permission is not necessary for any reason--for + example, because of any applicable exception or limitation to + copyright--then that use is not regulated by the license. Our + licenses grant only permissions under copyright and certain + other rights that a licensor has authority to grant. Use of + the licensed material may still be restricted for other + reasons, including because others have copyright or other + rights in the material. A licensor may make special requests, + such as asking that all changes be marked or described. + Although not required by our licenses, you are encouraged to + respect those requests where reasonable. More considerations + for the public: + wiki.creativecommons.org/Considerations_for_licensees + +======================================================================= + +Creative Commons Attribution-ShareAlike 4.0 International Public License -THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. +By exercising the Licensed Rights (defined below), You accept and agree +to be bound by the terms and conditions of this Creative Commons +Attribution-ShareAlike 4.0 International Public License ("Public +License"). To the extent this Public License may be interpreted as a +contract, You are granted the Licensed Rights in consideration of Your +acceptance of these terms and conditions, and the Licensor grants You +such rights in consideration of benefits the Licensor receives from +making the Licensed Material available under these terms and +conditions. -BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. -1. Definitions +Section 1 -- Definitions. - "Collective Work" means a work, such as a periodical issue, anthology or encyclopedia, in which the Work in its entirety in unmodified form, along with a number of other contributions, constituting separate and independent works in themselves, are assembled into a collective whole. A work that constitutes a Collective Work will not be considered a Derivative Work (as defined below) for the purposes of this License. - "Derivative Work" means a work based upon the Work or upon the Work and other pre-existing works, such as a translation, musical arrangement, dramatization, fictionalization, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which the Work may be recast, transformed, or adapted, except that a work that constitutes a Collective Work will not be considered a Derivative Work for the purpose of this License. For the avoidance of doubt, where the Work is a musical composition or sound recording, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered a Derivative Work for the purpose of this License. - "Licensor" means the individual or entity that offers the Work under the terms of this License. - "Original Author" means the individual or entity who created the Work. - "Work" means the copyrightable work of authorship offered under the terms of this License. - "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. - "License Elements" means the following high-level license attributes as selected by Licensor and indicated in the title of this License: Attribution, ShareAlike. + a. Adapted Material means material subject to Copyright and Similar + Rights that is derived from or based upon the Licensed Material + and in which the Licensed Material is translated, altered, + arranged, transformed, or otherwise modified in a manner requiring + permission under the Copyright and Similar Rights held by the + Licensor. For purposes of this Public License, where the Licensed + Material is a musical work, performance, or sound recording, + Adapted Material is always produced where the Licensed Material is + synched in timed relation with a moving image. -2. Fair Use Rights. Nothing in this license is intended to reduce, limit, or restrict any rights arising from fair use, first sale or other limitations on the exclusive rights of the copyright owner under copyright law or other applicable laws. + b. Adapter's License means the license You apply to Your Copyright + and Similar Rights in Your contributions to Adapted Material in + accordance with the terms and conditions of this Public License. -3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: + c. BY-SA Compatible License means a license listed at + creativecommons.org/compatiblelicenses, approved by Creative + Commons as essentially the equivalent of this Public License. - to reproduce the Work, to incorporate the Work into one or more Collective Works, and to reproduce the Work as incorporated in the Collective Works; - to create and reproduce Derivative Works; - to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission the Work including as incorporated in Collective Works; - to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission Derivative Works. + d. Copyright and Similar Rights means copyright and/or similar rights + closely related to copyright including, without limitation, + performance, broadcast, sound recording, and Sui Generis Database + Rights, without regard to how the rights are labeled or + categorized. For purposes of this Public License, the rights + specified in Section 2(b)(1)-(2) are not Copyright and Similar + Rights. - For the avoidance of doubt, where the work is a musical composition: - Performance Royalties Under Blanket Licenses. Licensor waives the exclusive right to collect, whether individually or via a performance rights society (e.g. ASCAP, BMI, SESAC), royalties for the public performance or public digital performance (e.g. webcast) of the Work. - Mechanical Rights and Statutory Royalties. Licensor waives the exclusive right to collect, whether individually or via a music rights society or designated agent (e.g. Harry Fox Agency), royalties for any phonorecord You create from the Work ("cover version") and distribute, subject to the compulsory license created by 17 USC Section 115 of the US Copyright Act (or the equivalent in other jurisdictions). - Webcasting Rights and Statutory Royalties. For the avoidance of doubt, where the Work is a sound recording, Licensor waives the exclusive right to collect, whether individually or via a performance-rights society (e.g. SoundExchange), royalties for the public digital performance (e.g. webcast) of the Work, subject to the compulsory license created by 17 USC Section 114 of the US Copyright Act (or the equivalent in other jurisdictions). + e. Effective Technological Measures means those measures that, in the + absence of proper authority, may not be circumvented under laws + fulfilling obligations under Article 11 of the WIPO Copyright + Treaty adopted on December 20, 1996, and/or similar international + agreements. -The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. All rights not expressly granted by Licensor are hereby reserved. + f. Exceptions and Limitations means fair use, fair dealing, and/or + any other exception or limitation to Copyright and Similar Rights + that applies to Your use of the Licensed Material. -4. Restrictions.The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: + g. License Elements means the license attributes listed in the name + of a Creative Commons Public License. The License Elements of this + Public License are Attribution and ShareAlike. - You may distribute, publicly display, publicly perform, or publicly digitally perform the Work only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy or phonorecord of the Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Work that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Work itself to be made subject to the terms of this License. If You create a Collective Work, upon notice from any Licensor You must, to the extent practicable, remove from the Collective Work any reference to such Licensor or the Original Author, as requested. If You create a Derivative Work, upon notice from any Licensor You must, to the extent practicable, remove from the Derivative Work any reference to such Licensor or the Original Author, as requested. - You may distribute, publicly display, publicly perform, or publicly digitally perform a Derivative Work only under the terms of this License, a later version of this License with the same License Elements as this License, or a Creative Commons iCommons license that contains the same License Elements as this License (e.g. Attribution-ShareAlike 2.0 Japan). You must include a copy of, or the Uniform Resource Identifier for, this License or other license specified in the previous sentence with every copy or phonorecord of each Derivative Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Derivative Works that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder, and You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Derivative Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Derivative Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Derivative Work itself to be made subject to the terms of this License. - If you distribute, publicly display, publicly perform, or publicly digitally perform the Work or any Derivative Works or Collective Works, You must keep intact all copyright notices for the Work and give the Original Author credit reasonable to the medium or means You are utilizing by conveying the name (or pseudonym if applicable) of the Original Author if supplied; the title of the Work if supplied; to the extent reasonably practicable, the Uniform Resource Identifier, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and in the case of a Derivative Work, a credit identifying the use of the Work in the Derivative Work (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). Such credit may be implemented in any reasonable manner; provided, however, that in the case of a Derivative Work or Collective Work, at a minimum such credit will appear where any other comparable authorship credit appears and in a manner at least as prominent as such other comparable authorship credit. + h. Licensed Material means the artistic or literary work, database, + or other material to which the Licensor applied this Public + License. -5. Representations, Warranties and Disclaimer + i. Licensed Rights means the rights granted to You subject to the + terms and conditions of this Public License, which are limited to + all Copyright and Similar Rights that apply to Your use of the + Licensed Material and that the Licensor has authority to license. -UNLESS OTHERWISE AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE MATERIALS, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. + j. Licensor means the individual(s) or entity(ies) granting rights + under this Public License. -6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + k. Share means to provide material to the public by any means or + process that requires permission under the Licensed Rights, such + as reproduction, public display, public performance, distribution, + dissemination, communication, or importation, and to make material + available to the public including in ways that members of the + public may access the material from a place and at a time + individually chosen by them. -7. Termination + l. Sui Generis Database Rights means rights other than copyright + resulting from Directive 96/9/EC of the European Parliament and of + the Council of 11 March 1996 on the legal protection of databases, + as amended and/or succeeded, as well as other essentially + equivalent rights anywhere in the world. - This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Derivative Works or Collective Works from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. - Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. + m. You means the individual or entity exercising the Licensed Rights + under this Public License. Your has a corresponding meaning. -8. Miscellaneous - Each time You distribute or publicly digitally perform the Work or a Collective Work, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. - Each time You distribute or publicly digitally perform a Derivative Work, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License. - If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. - No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. - This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. +Section 2 -- Scope. -Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor. + a. License grant. -Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, neither party will use the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. + 1. Subject to the terms and conditions of this Public License, + the Licensor hereby grants You a worldwide, royalty-free, + non-sublicensable, non-exclusive, irrevocable license to + exercise the Licensed Rights in the Licensed Material to: -Creative Commons may be contacted at http://creativecommons.org/. + a. reproduce and Share the Licensed Material, in whole or + in part; and + b. produce, reproduce, and Share Adapted Material. + + 2. Exceptions and Limitations. For the avoidance of doubt, where + Exceptions and Limitations apply to Your use, this Public + License does not apply, and You do not need to comply with + its terms and conditions. + + 3. Term. The term of this Public License is specified in Section + 6(a). + + 4. Media and formats; technical modifications allowed. The + Licensor authorizes You to exercise the Licensed Rights in + all media and formats whether now known or hereafter created, + and to make technical modifications necessary to do so. The + Licensor waives and/or agrees not to assert any right or + authority to forbid You from making technical modifications + necessary to exercise the Licensed Rights, including + technical modifications necessary to circumvent Effective + Technological Measures. For purposes of this Public License, + simply making modifications authorized by this Section 2(a) + (4) never produces Adapted Material. + + 5. Downstream recipients. + + a. Offer from the Licensor -- Licensed Material. Every + recipient of the Licensed Material automatically + receives an offer from the Licensor to exercise the + Licensed Rights under the terms and conditions of this + Public License. + + b. Additional offer from the Licensor -- Adapted Material. + Every recipient of Adapted Material from You + automatically receives an offer from the Licensor to + exercise the Licensed Rights in the Adapted Material + under the conditions of the Adapter's License You apply. + + c. No downstream restrictions. You may not offer or impose + any additional or different terms or conditions on, or + apply any Effective Technological Measures to, the + Licensed Material if doing so restricts exercise of the + Licensed Rights by any recipient of the Licensed + Material. + + 6. No endorsement. Nothing in this Public License constitutes or + may be construed as permission to assert or imply that You + are, or that Your use of the Licensed Material is, connected + with, or sponsored, endorsed, or granted official status by, + the Licensor or others designated to receive attribution as + provided in Section 3(a)(1)(A)(i). + + b. Other rights. + + 1. Moral rights, such as the right of integrity, are not + licensed under this Public License, nor are publicity, + privacy, and/or other similar personality rights; however, to + the extent possible, the Licensor waives and/or agrees not to + assert any such rights held by the Licensor to the limited + extent necessary to allow You to exercise the Licensed + Rights, but not otherwise. + + 2. Patent and trademark rights are not licensed under this + Public License. + + 3. To the extent possible, the Licensor waives any right to + collect royalties from You for the exercise of the Licensed + Rights, whether directly or through a collecting society + under any voluntary or waivable statutory or compulsory + licensing scheme. In all other cases the Licensor expressly + reserves any right to collect such royalties. + + +Section 3 -- License Conditions. + +Your exercise of the Licensed Rights is expressly made subject to the +following conditions. + + a. Attribution. + + 1. If You Share the Licensed Material (including in modified + form), You must: + + a. retain the following if it is supplied by the Licensor + with the Licensed Material: + + i. identification of the creator(s) of the Licensed + Material and any others designated to receive + attribution, in any reasonable manner requested by + the Licensor (including by pseudonym if + designated); + + ii. a copyright notice; + + iii. a notice that refers to this Public License; + + iv. a notice that refers to the disclaimer of + warranties; + + v. a URI or hyperlink to the Licensed Material to the + extent reasonably practicable; + + b. indicate if You modified the Licensed Material and + retain an indication of any previous modifications; and + + c. indicate the Licensed Material is licensed under this + Public License, and include the text of, or the URI or + hyperlink to, this Public License. + + 2. You may satisfy the conditions in Section 3(a)(1) in any + reasonable manner based on the medium, means, and context in + which You Share the Licensed Material. For example, it may be + reasonable to satisfy the conditions by providing a URI or + hyperlink to a resource that includes the required + information. + + 3. If requested by the Licensor, You must remove any of the + information required by Section 3(a)(1)(A) to the extent + reasonably practicable. + + b. ShareAlike. + + In addition to the conditions in Section 3(a), if You Share + Adapted Material You produce, the following conditions also apply. + + 1. The Adapter's License You apply must be a Creative Commons + license with the same License Elements, this version or + later, or a BY-SA Compatible License. + + 2. You must include the text of, or the URI or hyperlink to, the + Adapter's License You apply. You may satisfy this condition + in any reasonable manner based on the medium, means, and + context in which You Share Adapted Material. + + 3. You may not offer or impose any additional or different terms + or conditions on, or apply any Effective Technological + Measures to, Adapted Material that restrict exercise of the + rights granted under the Adapter's License You apply. + + +Section 4 -- Sui Generis Database Rights. + +Where the Licensed Rights include Sui Generis Database Rights that +apply to Your use of the Licensed Material: + + a. for the avoidance of doubt, Section 2(a)(1) grants You the right + to extract, reuse, reproduce, and Share all or a substantial + portion of the contents of the database; + + b. if You include all or a substantial portion of the database + contents in a database in which You have Sui Generis Database + Rights, then the database in which You have Sui Generis Database + Rights (but not its individual contents) is Adapted Material, + + including for purposes of Section 3(b); and + c. You must comply with the conditions in Section 3(a) if You Share + all or a substantial portion of the contents of the database. + +For the avoidance of doubt, this Section 4 supplements and does not +replace Your obligations under this Public License where the Licensed +Rights include other Copyright and Similar Rights. + + +Section 5 -- Disclaimer of Warranties and Limitation of Liability. + + a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE + EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS + AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF + ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, + IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, + WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR + PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, + ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT + KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT + ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. + + b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE + TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, + NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, + INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, + COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR + USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN + ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR + DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR + IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. + + c. The disclaimer of warranties and limitation of liability provided + above shall be interpreted in a manner that, to the extent + possible, most closely approximates an absolute disclaimer and + waiver of all liability. + + +Section 6 -- Term and Termination. + + a. This Public License applies for the term of the Copyright and + Similar Rights licensed here. However, if You fail to comply with + this Public License, then Your rights under this Public License + terminate automatically. + + b. Where Your right to use the Licensed Material has terminated under + Section 6(a), it reinstates: + + 1. automatically as of the date the violation is cured, provided + it is cured within 30 days of Your discovery of the + violation; or + + 2. upon express reinstatement by the Licensor. + + For the avoidance of doubt, this Section 6(b) does not affect any + right the Licensor may have to seek remedies for Your violations + of this Public License. + + c. For the avoidance of doubt, the Licensor may also offer the + Licensed Material under separate terms or conditions or stop + distributing the Licensed Material at any time; however, doing so + will not terminate this Public License. + + d. Sections 1, 5, 6, 7, and 8 survive termination of this Public + License. + + +Section 7 -- Other Terms and Conditions. + + a. The Licensor shall not be bound by any additional or different + terms or conditions communicated by You unless expressly agreed. + + b. Any arrangements, understandings, or agreements regarding the + Licensed Material not stated herein are separate from and + independent of the terms and conditions of this Public License. + + +Section 8 -- Interpretation. + + a. For the avoidance of doubt, this Public License does not, and + shall not be interpreted to, reduce, limit, restrict, or impose + conditions on any use of the Licensed Material that could lawfully + be made without permission under this Public License. + + b. To the extent possible, if any provision of this Public License is + deemed unenforceable, it shall be automatically reformed to the + minimum extent necessary to make it enforceable. If the provision + cannot be reformed, it shall be severed from this Public License + without affecting the enforceability of the remaining terms and + conditions. + + c. No term or condition of this Public License will be waived and no + failure to comply consented to unless expressly agreed to by the + Licensor. + + d. Nothing in this Public License constitutes or may be interpreted + as a limitation upon, or waiver of, any privileges and immunities + that apply to the Licensor or You, including from the legal + processes of any jurisdiction or authority. + + +======================================================================= + +Creative Commons is not a party to its public +licenses. Notwithstanding, Creative Commons may elect to apply one of +its public licenses to material it publishes and in those instances +will be considered the “Licensor.” The text of the Creative Commons +public licenses is dedicated to the public domain under the CC0 Public +Domain Dedication. Except for the limited purpose of indicating that +material is shared under a Creative Commons public license or as +otherwise permitted by the Creative Commons policies published at +creativecommons.org/policies, Creative Commons does not authorize the +use of the trademark "Creative Commons" or any other trademark or logo +of Creative Commons without its prior written consent including, +without limitation, in connection with any unauthorized modifications +to any of its public licenses or any other arrangements, +understandings, or agreements concerning use of licensed material. For +the avoidance of doubt, this paragraph does not form part of the +public licenses. + +Creative Commons may be contacted at creativecommons.org. diff --git a/init.lua b/init.lua index 6581e6a..02b441d 100644 --- a/init.lua +++ b/init.lua @@ -1,8 +1,6 @@ -- Colored Wood mod by Vanessa "VanessaE" Dannenberg -- based on my unifieddyes template. -- --- License: WTFPL --- -- This mod provides 89 colors of wood, fences, and sticks, and enough -- cross-compatible recipes to make everything fit together naturally. -- From a9ea79a85c481d2aa8ef7f38bb99d87f8e5ba7b0 Mon Sep 17 00:00:00 2001 From: Vanessa Dannenberg Date: Thu, 8 Nov 2018 19:05:57 -0500 Subject: [PATCH 13/23] init.lua comment fixups --- init.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/init.lua b/init.lua index 02b441d..da0e859 100644 --- a/init.lua +++ b/init.lua @@ -1,11 +1,9 @@ -- Colored Wood mod by Vanessa "VanessaE" Dannenberg -- based on my unifieddyes template. -- --- This mod provides 89 colors of wood, fences, and sticks, and enough --- cross-compatible recipes to make everything fit together naturally. +-- This mod provides many colors of wood and fences, with crafting recipes +-- as appropriate. Works with the airbrush, too. -- --- 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. From ab7797651272793607c1a62d7738ca08a542bac1 Mon Sep 17 00:00:00 2001 From: Vanessa Dannenberg Date: Tue, 14 May 2019 12:42:53 -0400 Subject: [PATCH 14/23] remove colored fence from creative inv --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index da0e859..6d85c01 100644 --- a/init.lua +++ b/init.lua @@ -158,7 +158,7 @@ default.register_fence("coloredwood: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}, + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, ud_param2_colorable = 1, not_in_creative_inventory=1}, sounds = default.node_sound_wood_defaults(), material = "coloredwood:wood_block" }) From e60c24c7bca14e35a6546cabf9f489f832d2e748 Mon Sep 17 00:00:00 2001 From: Vanessa Dannenberg Date: Tue, 14 May 2019 12:44:36 -0400 Subject: [PATCH 15/23] fix airbrush not working --- init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/init.lua b/init.lua index 6d85c01..d8ee327 100644 --- a/init.lua +++ b/init.lua @@ -165,6 +165,7 @@ default.register_fence("coloredwood:fence", { minetest.override_item("default:fence_wood", { palette = "unifieddyes_palette_extended.png", + airbrush_replacement_node = "coloredwood:fence", groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, ud_param2_colorable = 1} }) From cbb407e863ac31b5641dc9926695f8c0dcac3847 Mon Sep 17 00:00:00 2001 From: Vanessa Dannenberg Date: Fri, 31 May 2019 14:52:06 -0400 Subject: [PATCH 16/23] fix groups handling to avoid excees redefs --- init.lua | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index d8ee327..a1d8a1a 100644 --- a/init.lua +++ b/init.lua @@ -51,6 +51,10 @@ end -- the actual nodes! +local groups = table.copy(minetest.registered_items["default:wood"].groups) +groups.ud_param2_colorable = 1 +groups.not_in_creative_inventory=1 + minetest.register_node("coloredwood:wood_block", { description = "Colored wooden planks", tiles = { "coloredwood_base.png" }, @@ -59,7 +63,7 @@ minetest.register_node("coloredwood:wood_block", { palette = "unifieddyes_palette_extended.png", 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}, + groups = groups, sounds = default.node_sound_wood_defaults(), }) @@ -147,10 +151,13 @@ for _, mname in ipairs(coloredwood_cuts) do }) end +groups = table.copy(minetest.registered_items["default:wood"].groups) +groups.ud_param2_colorable = 1 + minetest.override_item("default:wood", { palette = "unifieddyes_palette_extended.png", airbrush_replacement_node = "coloredwood:wood_block", - groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1, ud_param2_colorable = 1}, + groups = groups, }) default.register_fence("coloredwood:fence", { @@ -163,10 +170,13 @@ default.register_fence("coloredwood:fence", { material = "coloredwood:wood_block" }) +groups = table.copy(minetest.registered_items["default:fence_wood"].groups) +groups.ud_param2_colorable = 1 + minetest.override_item("default:fence_wood", { palette = "unifieddyes_palette_extended.png", airbrush_replacement_node = "coloredwood:fence", - groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, ud_param2_colorable = 1} + groups = groups }) -- Crafts From f2f5e5f73ebf40b4d79b893fcb52f1001c24cfe6 Mon Sep 17 00:00:00 2001 From: Vanessa Dannenberg Date: Thu, 18 Jul 2019 02:22:52 -0400 Subject: [PATCH 17/23] use Unified Dyes on_dig where needed - requires Unified Dyes commit 9ff40a7f or later --- init.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index a1d8a1a..50954cc 100644 --- a/init.lua +++ b/init.lua @@ -88,6 +88,7 @@ for _, color in ipairs(unifieddyes.HUES_WITH_GREY) do after_place_node = function(pos, placer, itemstack, pointed_thing) minetest.rotate_node(itemstack, placer, pointed_thing) end, + on_dig = unifieddyes.on_dig, groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=2, not_in_creative_inventory=1, ud_param2_colorable = 1}, } ) @@ -167,7 +168,8 @@ default.register_fence("coloredwood:fence", { palette = "unifieddyes_palette_extended.png", groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, ud_param2_colorable = 1, not_in_creative_inventory=1}, sounds = default.node_sound_wood_defaults(), - material = "coloredwood:wood_block" + material = "coloredwood:wood_block", + on_dig = unifieddyes.on_dig, }) groups = table.copy(minetest.registered_items["default:fence_wood"].groups) From 08fde44bb893007529ae88c50965e290ae2dbf13 Mon Sep 17 00:00:00 2001 From: Vanessa Dannenberg Date: Wed, 11 Sep 2019 12:28:26 -0400 Subject: [PATCH 18/23] update to use new signs_lib API -- requires signs_lib commit 4ff54c9a and above --- depends.txt | 1 + init.lua | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/depends.txt b/depends.txt index f727feb..3ab55ba 100644 --- a/depends.txt +++ b/depends.txt @@ -1,3 +1,4 @@ default unifieddyes moreblocks? +signs_lib? diff --git a/init.lua b/init.lua index 50954cc..c67b965 100644 --- a/init.lua +++ b/init.lua @@ -216,4 +216,8 @@ unifieddyes.register_color_craft({ } }) +if minetest.get_modpath("signs_lib") then + signs_lib.allowed_poles["coloredwood:fence"] = true +end + print("[Colored Wood] Loaded!") From cd5e026e31c10b14f2feaad9092dd876e8a264cb Mon Sep 17 00:00:00 2001 From: Vanessa Dannenberg Date: Tue, 17 Sep 2019 12:41:39 -0400 Subject: [PATCH 19/23] directly copy, modify default:wood groups (instead of hard-coding the groups list) fixes a wood -> slabs -> sticks -> wood multiplyier loop --- init.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index c67b965..b79285a 100644 --- a/init.lua +++ b/init.lua @@ -102,6 +102,11 @@ local coloredwood_cuts = {} if coloredwood.enable_stairsplus then + local groups2 = table.copy(minetest.registered_items["default:wood"].groups) + groups2.wood = nil + groups2.ud_param2_colorable = 1 + groups2.not_in_creative_inventory=1 + for _, i in pairs(minetest.registered_nodes) do local chk = string.sub(i.name, 1, 20) @@ -124,7 +129,7 @@ if coloredwood.enable_stairsplus then end minetest.override_item(i.name, { - groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1, not_in_creative_inventory=1, ud_param2_colorable = 1}, + groups = groups2, paramtype2 = "colorfacedir", palette = "unifieddyes_palette_greys.png", airbrush_replacement_node = "coloredwood:"..class.."_wood_grey_"..shape From 9c6fe5206b96e28a00c2f80d6c85d264524a4d8b Mon Sep 17 00:00:00 2001 From: Vanessa Dannenberg Date: Sun, 22 Sep 2019 03:22:34 -0400 Subject: [PATCH 20/23] use signs_lib's custom pole check callback feature requires signs_lib from commit dcdee22 or later, if present --- init.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index b79285a..54aa708 100644 --- a/init.lua +++ b/init.lua @@ -222,7 +222,9 @@ unifieddyes.register_color_craft({ }) if minetest.get_modpath("signs_lib") then - signs_lib.allowed_poles["coloredwood:fence"] = true + minetest.override_item("coloredwood:fence", { + check_for_pole = true + }) end print("[Colored Wood] Loaded!") From be4df6fc889419155bed8638bbb752493e78cbd5 Mon Sep 17 00:00:00 2001 From: VanessaE Date: Wed, 3 Jun 2020 13:00:05 -0400 Subject: [PATCH 21/23] add minimum minetest version key for contentdb --- mod.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/mod.conf b/mod.conf index dc263d8..f8b9671 100644 --- a/mod.conf +++ b/mod.conf @@ -1 +1,2 @@ name = coloredwood +min_minetest_version = 5.2.0 From 042d2867f717ccddafbda6a1dfbe2272b0a91347 Mon Sep 17 00:00:00 2001 From: sys4 Date: Thu, 18 Jun 2020 00:20:24 +0200 Subject: [PATCH 22/23] Fix stack division with moreblocks items --- init.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/init.lua b/init.lua index 54aa708..6345c59 100644 --- a/init.lua +++ b/init.lua @@ -128,11 +128,13 @@ if coloredwood.enable_stairsplus then shape = string.sub(i.name, 23) end + local s1, s2 = is_stairsplus(i.name, false) minetest.override_item(i.name, { groups = groups2, paramtype2 = "colorfacedir", palette = "unifieddyes_palette_greys.png", airbrush_replacement_node = "coloredwood:"..class.."_wood_grey_"..shape + drop = "moreblocks:"..s1.."_wood"..s2 -- NALC: Fix stack division with moreblocks }) end end From 63f8499203eb7d3239efca5d9929e5c24aae1aff Mon Sep 17 00:00:00 2001 From: sys4 Date: Sat, 20 Jun 2020 15:11:28 +0200 Subject: [PATCH 23/23] =?UTF-8?q?Corrige=20crash=20au=20d=C3=A9marrage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 6345c59..dd684eb 100644 --- a/init.lua +++ b/init.lua @@ -133,7 +133,7 @@ if coloredwood.enable_stairsplus then groups = groups2, paramtype2 = "colorfacedir", palette = "unifieddyes_palette_greys.png", - airbrush_replacement_node = "coloredwood:"..class.."_wood_grey_"..shape + airbrush_replacement_node = "coloredwood:"..class.."_wood_grey_"..shape, drop = "moreblocks:"..s1.."_wood"..s2 -- NALC: Fix stack division with moreblocks }) end