summaryrefslogtreecommitdiff
path: root/unifiedbricks
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-02-26 11:11:19 -0500
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-02-26 11:11:19 -0500
commit2b5664c0004b2f4ed8c712b8b6f75d9d3294c829 (patch)
tree2d1f641ae5a98fafcc8564670bd9e0077da900d2 /unifiedbricks
parent7315a13c3a5369688fffef20ab6a5877f506a459 (diff)
downloaddreambuilder_modpack-2b5664c0004b2f4ed8c712b8b6f75d9d3294c829.tar
dreambuilder_modpack-2b5664c0004b2f4ed8c712b8b6f75d9d3294c829.tar.gz
dreambuilder_modpack-2b5664c0004b2f4ed8c712b8b6f75d9d3294c829.tar.bz2
dreambuilder_modpack-2b5664c0004b2f4ed8c712b8b6f75d9d3294c829.tar.xz
dreambuilder_modpack-2b5664c0004b2f4ed8c712b8b6f75d9d3294c829.zip
updated lots of mods:
blox, bobblocks, homedecor, coloredwood, gloopblocks, moreblocks, plasticbox, replacer, solidcolor, stained_glass, technic, unifiedbricks, and unifieddyes (in most of these, it's to upgrade to the Unified Dyes "extended" palette)
Diffstat (limited to 'unifiedbricks')
-rw-r--r--unifiedbricks/init.lua47
1 files changed, 35 insertions, 12 deletions
diff --git a/unifiedbricks/init.lua b/unifiedbricks/init.lua
index a4c9758..e3d37d7 100644
--- a/unifiedbricks/init.lua
+++ b/unifiedbricks/init.lua
@@ -102,7 +102,8 @@ minetest.register_node("unifiedbricks:brickblock", {
mesh = "unifiedbricks_brick_block.obj",
paramtype = "light",
paramtype2 = "color",
- palette = "unifieddyes_palette.png",
+ palette = "unifieddyes_palette_extended.png",
+ place_param2 = 240,
is_ground_content = true,
groups = {cracky=3, not_in_creative_inventory=1, ud_param2_colorable = 1},
sounds = default.node_sound_stone_defaults(),
@@ -122,7 +123,8 @@ minetest.register_node("unifiedbricks:clayblock", {
},
paramtype = "light",
paramtype2 = "color",
- palette = "unifieddyes_palette.png",
+ palette = "unifieddyes_palette_extended.png",
+ place_param2 = 240,
is_ground_content = true,
groups = {crumbly=3, not_in_creative_inventory=1, ud_param2_colorable = 1},
sounds = default.node_sound_dirt_defaults({
@@ -147,7 +149,8 @@ minetest.register_node("unifiedbricks:brickblock_multicolor_dark", {
mesh = "unifiedbricks_brick_block.obj",
paramtype = "light",
paramtype2 = "color",
- palette = "unifieddyes_palette.png",
+ palette = "unifieddyes_palette_extended.png",
+ place_param2 = 240,
is_ground_content = true,
groups = {cracky=3, ud_param2_colorable = 1},
sounds = default.node_sound_stone_defaults(),
@@ -164,7 +167,8 @@ minetest.register_node("unifiedbricks:brickblock_multicolor_medium", {
mesh = "unifiedbricks_brick_block.obj",
paramtype = "light",
paramtype2 = "color",
- palette = "unifieddyes_palette.png",
+ palette = "unifieddyes_palette_extended.png",
+ place_param2 = 240,
is_ground_content = true,
groups = {cracky=3, ud_param2_colorable = 1},
sounds = default.node_sound_stone_defaults(),
@@ -181,7 +185,8 @@ minetest.register_node("unifiedbricks:brickblock_multicolor_light", {
mesh = "unifiedbricks_brick_block.obj",
paramtype = "light",
paramtype2 = "color",
- palette = "unifieddyes_palette.png",
+ palette = "unifieddyes_palette_extended.png",
+ place_param2 = 240,
is_ground_content = true,
groups = {cracky=3, ud_param2_colorable = 1},
sounds = default.node_sound_stone_defaults(),
@@ -292,7 +297,7 @@ minetest.register_lbm({
local color2 = string.gsub(color1, "grey", "_grey")
if color2 == "_grey" then color2 = "grey" end
- local paletteidx, hue = unifieddyes.getpaletteidx("unifieddyes:"..color2)
+ local paletteidx, hue = unifieddyes.getpaletteidx("unifieddyes:"..color2, "extended")
if string.find(type, "multicolor") then
@@ -312,16 +317,34 @@ minetest.register_lbm({
end
minetest.set_node(pos, { name = "unifiedbricks:brickblock_multicolor_"..shade, param2 = newpalette })
- local meta = minetest.get_meta(pos)
- meta:set_string("dye", "unifieddyes:"..color1)
+
elseif string.find(type, "brickblock") then
minetest.set_node(pos, { name = "unifiedbricks:brickblock", param2 = paletteidx })
- local meta = minetest.get_meta(pos)
- meta:set_string("dye", "unifieddyes:"..color1)
elseif string.find(type, "clayblock") then
minetest.set_node(pos, { name = "unifiedbricks:clayblock", param2 = paletteidx })
- local meta = minetest.get_meta(pos)
- meta:set_string("dye", "unifieddyes:"..color1)
+ end
+ local meta = minetest.get_meta(pos)
+ meta:set_string("dye", "unifieddyes:"..color1)
+ meta:set_string("palette", "ext")
+ end
+})
+
+minetest.register_lbm({
+ name = "unifiedbricks:recolor_bricks",
+ label = "Convert 89-color bricks to use UD extended palette",
+ run_at_every_load = false,
+ nodenames = {
+ "unifiedbricks:clayblock",
+ "unifiedbricks:brickblock",
+ "unifiedbricks:brickblock_multicolor_dark",
+ "unifiedbricks:brickblock_multicolor_medium",
+ "unifiedbricks:brickblock_multicolor_light",
+ },
+ action = function(pos, node)
+ local meta = minetest.get_meta(pos)
+ if meta:get_string("palette") ~= "ext" then
+ minetest.swap_node(pos, { name = node.name, param2 = unifieddyes.convert_classic_palette[node.param2] })
+ meta:set_string("palette", "ext")
end
end
})