summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-03-14 02:21:47 -0400
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-03-14 02:21:47 -0400
commitb9beea1673c9948f07646f31d4ab5d53d6e56184 (patch)
tree80296cdcaa7c32f39c827477fd55590eb71e04cf
parent6885943d0491db83268f8bb4743bfd82ed725ea2 (diff)
downloaddreambuilder_modpack-b9beea1673c9948f07646f31d4ab5d53d6e56184.tar
dreambuilder_modpack-b9beea1673c9948f07646f31d4ab5d53d6e56184.tar.gz
dreambuilder_modpack-b9beea1673c9948f07646f31d4ab5d53d6e56184.tar.bz2
dreambuilder_modpack-b9beea1673c9948f07646f31d4ab5d53d6e56184.tar.xz
dreambuilder_modpack-b9beea1673c9948f07646f31d4ab5d53d6e56184.zip
update blocs, bobblocks, coloredwood, technic, homedecor, plasticbox,
solidcolor, stainedglass, unifiedbricks, and unified dyes
-rw-r--r--blox/init.lua7
-rw-r--r--bobblocks/blocks.lua7
-rw-r--r--coloredwood/init.lua1
-rw-r--r--extranodes/depends.txt2
-rw-r--r--extranodes/init.lua141
-rw-r--r--homedecor/bathroom_furniture.lua3
-rw-r--r--homedecor/lighting.lua2
-rw-r--r--lavalamp/init.lua2
-rw-r--r--plasticbox/init.lua1
-rw-r--r--solidcolor/init.lua1
-rw-r--r--stained_glass/init.lua2
-rw-r--r--unifiedbricks/init.lua5
-rw-r--r--unifieddyes/init.lua10
13 files changed, 114 insertions, 70 deletions
diff --git a/blox/init.lua b/blox/init.lua
index 919a714..dee170e 100644
--- a/blox/init.lua
+++ b/blox/init.lua
@@ -116,6 +116,7 @@ for _, nodeclass in ipairs(NodeClass) do
is_ground_content = true,
groups = {cracky=3, ud_param2_colorable = 1},
sounds = default.node_sound_stone_defaults(),
+ on_construct = unifieddyes.on_construct,
after_dig_node = unifieddyes.after_dig_node
})
@@ -134,6 +135,7 @@ for _, nodeclass in ipairs(NodeClass) do
is_ground_content = true,
groups = {cracky=3, ud_param2_colorable = 1},
sounds = default.node_sound_stone_defaults(),
+ on_construct = unifieddyes.on_construct,
after_dig_node = unifieddyes.after_dig_node
})
@@ -152,6 +154,7 @@ for _, nodeclass in ipairs(NodeClass) do
is_ground_content = true,
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3, ud_param2_colorable = 1},
sounds = default.node_sound_wood_defaults(),
+ on_construct = unifieddyes.on_construct,
after_dig_node = unifieddyes.after_dig_node
})
@@ -172,6 +175,7 @@ minetest.register_node("blox:wood_tinted", {
is_ground_content = true,
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3, ud_param2_colorable = 1},
sounds = default.node_sound_wood_defaults(),
+ on_construct = unifieddyes.on_construct,
after_dig_node = unifieddyes.after_dig_node
})
@@ -185,6 +189,7 @@ minetest.register_node("blox:stone_square", {
is_ground_content = true,
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3, ud_param2_colorable = 1},
sounds = default.node_sound_wood_defaults(),
+ on_construct = unifieddyes.on_construct,
after_dig_node = unifieddyes.after_dig_node
})
@@ -198,6 +203,7 @@ minetest.register_node("blox:cobble_tinted", {
is_ground_content = true,
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_creative_inventory = 1, ud_param2_colorable = 1},
sounds = default.node_sound_wood_defaults(),
+ on_construct = unifieddyes.on_construct,
after_dig_node = unifieddyes.after_dig_node,
drop = "default:cobble"
})
@@ -212,6 +218,7 @@ minetest.register_node("blox:stone_tinted", {
is_ground_content = true,
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_creative_inventory = 1, ud_param2_colorable = 1},
sounds = default.node_sound_wood_defaults(),
+ on_construct = unifieddyes.on_construct,
after_dig_node = unifieddyes.after_dig_node,
drop = "default:cobble"
})
diff --git a/bobblocks/blocks.lua b/bobblocks/blocks.lua
index e5c9af0..21d8709 100644
--- a/bobblocks/blocks.lua
+++ b/bobblocks/blocks.lua
@@ -52,6 +52,7 @@ minetest.register_node("bobblocks:block", {
}
},
on_rightclick = bobblocks.update_bobblock,
+ on_construct = unifieddyes.on_construct,
after_dig_node = unifieddyes.after_dig_node
})
@@ -72,6 +73,7 @@ minetest.register_node("bobblocks:block_off", {
}
},
on_rightclick = bobblocks.update_bobblock,
+ on_construct = unifieddyes.on_construct,
after_dig_node = unifieddyes.after_dig_node
})
@@ -96,6 +98,7 @@ minetest.register_node("bobblocks:pole", {
}
},
on_rightclick = bobblocks.update_bobblock,
+ on_construct = unifieddyes.on_construct,
after_dig_node = unifieddyes.after_dig_node
})
@@ -120,6 +123,7 @@ minetest.register_node("bobblocks:pole_off", {
}
},
on_rightclick = bobblocks.update_bobblock,
+ on_construct = unifieddyes.on_construct,
after_dig_node = unifieddyes.after_dig_node
})
@@ -155,6 +159,7 @@ minetest.register_node("bobblocks:wavyblock", {
}
},
on_rightclick = bobblocks.update_bobblock,
+ on_construct = unifieddyes.on_construct,
after_dig_node = unifieddyes.after_dig_node
})
@@ -176,6 +181,7 @@ minetest.register_node("bobblocks:wavyblock_off", {
}
},
on_rightclick = bobblocks.update_bobblock,
+ on_construct = unifieddyes.on_construct,
after_dig_node = unifieddyes.after_dig_node
})
@@ -192,6 +198,7 @@ minetest.register_node("bobblocks:wavypole", {
is_ground_content = false,
sounds = default.node_sound_glass_defaults(),
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, ud_param2_colorable = 1},
+ on_construct = unifieddyes.on_construct,
after_dig_node = unifieddyes.after_dig_node,
--light_source = LIGHT_MAX-0,
})
diff --git a/coloredwood/init.lua b/coloredwood/init.lua
index 1e3b008..9a9f231 100644
--- a/coloredwood/init.lua
+++ b/coloredwood/init.lua
@@ -142,7 +142,6 @@ local function is_stairsplus(name, colorized)
shape = string.sub(name, b+5) -- everything after "_wood_" is the shape
end
end
- print(name, class, shape)
return class, shape
end
diff --git a/extranodes/depends.txt b/extranodes/depends.txt
index 3f123b0..15b9ef5 100644
--- a/extranodes/depends.txt
+++ b/extranodes/depends.txt
@@ -1,6 +1,6 @@
default
technic_worldgen
concrete
-unifieddyes
+unifieddyes?
intllib?
moreblocks?
diff --git a/extranodes/init.lua b/extranodes/init.lua
index 74fb028..7dda22f 100644
--- a/extranodes/init.lua
+++ b/extranodes/init.lua
@@ -102,72 +102,77 @@ if minetest.get_modpath("moreblocks") then
end
-minetest.register_node(":technic:insulator_clip", {
- description = "Insulator/cable clip",
- drawtype = "mesh",
- mesh = "technic_insulator_clip.obj",
- tiles = {"technic_insulator_clip.png"},
- is_ground_content = false,
- groups = {choppy=1, snappy=1, oddly_breakable_by_hand=1, ud_param2_colorable = 1},
- sounds = default.node_sound_stone_defaults(),
- paramtype2 = "colorwallmounted",
- palette = "unifieddyes_palette_colorwallmounted.png",
- after_place_node = unifieddyes.fix_rotation,
- after_dig_node = unifieddyes.after_dig_node,
-})
-
-minetest.register_node(":technic:insulator_clip_fencepost", {
- description = "Insulator/cable clip",
- tiles = {"technic_insulator_clip.png"},
- is_ground_content = false,
- paramtype = "light",
- paramtype2 = "color",
- palette = "unifieddyes_palette_extended.png",
- after_dig_node = unifieddyes.after_dig_node,
- drawtype = "nodebox",
- node_box = {
- type = "connected",
- fixed = {
- { -0.25, 0.75, -0.25, 0.25, 1.25, 0.25 }, -- the clip on top
- { -0.125, 0.6875, -0.125, 0.125, 0.75, 0.125 },
- { -0.1875, 0.625, -0.1875, 0.1875, 0.6875, 0.1875 },
- { -0.125, 0.5625, -0.125, 0.125, 0.625, 0.125 },
- { -0.1875, 0.5, -0.1875, 0.1875, 0.5625, 0.1875 },
- { -0.125, 0.4375, -0.125, 0.125, 0.5, 0.125 },
- { -0.1875, 0.375, -0.1875, 0.1875, 0.4375, 0.1875 },
- { -0.125, -0.5, -0.125, 0.125, 0.375, 0.125 }, -- the post, slightly short
+if minetest.get_modpath("unifieddyes") then
+
+ minetest.register_node(":technic:insulator_clip", {
+ description = "Insulator/cable clip",
+ drawtype = "mesh",
+ mesh = "technic_insulator_clip.obj",
+ tiles = {"technic_insulator_clip.png"},
+ is_ground_content = false,
+ groups = {choppy=1, snappy=1, oddly_breakable_by_hand=1, ud_param2_colorable = 1},
+ sounds = default.node_sound_stone_defaults(),
+ paramtype2 = "colorwallmounted",
+ palette = "unifieddyes_palette_colorwallmounted.png",
+ after_place_node = unifieddyes.fix_rotation,
+ after_dig_node = unifieddyes.after_dig_node,
+ })
+
+ minetest.register_node(":technic:insulator_clip_fencepost", {
+ description = "Insulator/cable clip",
+ tiles = {"technic_insulator_clip.png"},
+ is_ground_content = false,
+ paramtype = "light",
+ paramtype2 = "color",
+ palette = "unifieddyes_palette_extended.png",
+ on_construct = unifieddyes.on_construct,
+ after_dig_node = unifieddyes.after_dig_node,
+ drawtype = "nodebox",
+ node_box = {
+ type = "connected",
+ fixed = {
+ { -0.25, 0.75, -0.25, 0.25, 1.25, 0.25 }, -- the clip on top
+ { -0.125, 0.6875, -0.125, 0.125, 0.75, 0.125 },
+ { -0.1875, 0.625, -0.1875, 0.1875, 0.6875, 0.1875 },
+ { -0.125, 0.5625, -0.125, 0.125, 0.625, 0.125 },
+ { -0.1875, 0.5, -0.1875, 0.1875, 0.5625, 0.1875 },
+ { -0.125, 0.4375, -0.125, 0.125, 0.5, 0.125 },
+ { -0.1875, 0.375, -0.1875, 0.1875, 0.4375, 0.1875 },
+ { -0.125, -0.5, -0.125, 0.125, 0.375, 0.125 }, -- the post, slightly short
+ },
+ -- connect_top =
+ -- connect_bottom =
+ connect_front = {{-1/16,3/16,-1/2,1/16,5/16,-1/8},
+ {-1/16,-5/16,-1/2,1/16,-3/16,-1/8}},
+ connect_left = {{-1/2,3/16,-1/16,-1/8,5/16,1/16},
+ {-1/2,-5/16,-1/16,-1/8,-3/16,1/16}},
+ connect_back = {{-1/16,3/16,1/8,1/16,5/16,1/2},
+ {-1/16,-5/16,1/8,1/16,-3/16,1/2}},
+ connect_right = {{1/8,3/16,-1/16,1/2,5/16,1/16},
+ {1/8,-5/16,-1/16,1/2,-3/16,1/16}},
},
- -- connect_top =
- -- connect_bottom =
- connect_front = {{-1/16,3/16,-1/2,1/16,5/16,-1/8},
- {-1/16,-5/16,-1/2,1/16,-3/16,-1/8}},
- connect_left = {{-1/2,3/16,-1/16,-1/8,5/16,1/16},
- {-1/2,-5/16,-1/16,-1/8,-3/16,1/16}},
- connect_back = {{-1/16,3/16,1/8,1/16,5/16,1/2},
- {-1/16,-5/16,1/8,1/16,-3/16,1/2}},
- connect_right = {{1/8,3/16,-1/16,1/2,5/16,1/16},
- {1/8,-5/16,-1/16,1/2,-3/16,1/16}},
- },
- connects_to = {"group:fence", "group:wood", "group:tree"},
- groups = {fence=1, choppy=1, snappy=1, oddly_breakable_by_hand=1, ud_param2_colorable = 1},
- sounds = default.node_sound_stone_defaults(),
- place_param2 = 171 -- medium amber, low saturation, closest color to default:wood
-})
-
-minetest.register_craft({
- output = "technic:insulator_clip",
- recipe = {
- { "", "dye:white", ""},
- { "", "technic:raw_latex", ""},
- { "technic:raw_latex", "default:stone", "technic:raw_latex"},
- }
-})
-
-minetest.register_craft({
- output = "technic:insulator_clip_fencepost 2",
- recipe = {
- { "", "dye:white", ""},
- { "", "technic:raw_latex", ""},
- { "technic:raw_latex", "default:fence_wood", "technic:raw_latex"},
- }
-})
+ connects_to = {"group:fence", "group:wood", "group:tree"},
+ groups = {fence=1, choppy=1, snappy=1, oddly_breakable_by_hand=1, ud_param2_colorable = 1},
+ sounds = default.node_sound_stone_defaults(),
+ place_param2 = 171 -- medium amber, low saturation, closest color to default:wood
+ })
+
+ minetest.register_craft({
+ output = "technic:insulator_clip",
+ recipe = {
+ { "", "dye:white", ""},
+ { "", "technic:raw_latex", ""},
+ { "technic:raw_latex", "default:stone", "technic:raw_latex"},
+ }
+ })
+
+ minetest.register_craft({
+ output = "technic:insulator_clip_fencepost 2",
+ recipe = {
+ { "", "dye:white", ""},
+ { "", "technic:raw_latex", ""},
+ { "technic:raw_latex", "default:fence_wood", "technic:raw_latex"},
+ }
+ })
+
+end
diff --git a/homedecor/bathroom_furniture.lua b/homedecor/bathroom_furniture.lua
index d7cd0c6..100ea88 100644
--- a/homedecor/bathroom_furniture.lua
+++ b/homedecor/bathroom_furniture.lua
@@ -15,6 +15,7 @@ minetest.register_node("homedecor:bathroom_tiles_dark", {
place_param2 = 240,
groups = {cracky=3, ud_param2_colorable = 1},
sounds = default.node_sound_stone_defaults(),
+ on_construct = unifieddyes.on_construct,
after_dig_node = unifieddyes.after_dig_node
})
@@ -32,6 +33,7 @@ minetest.register_node("homedecor:bathroom_tiles_medium", {
place_param2 = 240,
groups = {cracky=3, ud_param2_colorable = 1},
sounds = default.node_sound_stone_defaults(),
+ on_construct = unifieddyes.on_construct,
after_dig_node = unifieddyes.after_dig_node
})
@@ -49,6 +51,7 @@ minetest.register_node("homedecor:bathroom_tiles_light", {
place_param2 = 240,
groups = {cracky=3, ud_param2_colorable = 1},
sounds = default.node_sound_stone_defaults(),
+ on_construct = unifieddyes.on_construct,
after_dig_node = unifieddyes.after_dig_node
})
diff --git a/homedecor/lighting.lua b/homedecor/lighting.lua
index 776bc93..ea1e166 100644
--- a/homedecor/lighting.lua
+++ b/homedecor/lighting.lua
@@ -428,6 +428,7 @@ local function reg_lamp(suffix, nxt, light, brightness)
node.name = "homedecor:table_lamp_"..repl[suffix]
minetest.set_node(pos, node)
end,
+ on_construct = unifieddyes.on_construct,
after_dig_node = unifieddyes.after_dig_node
})
@@ -457,6 +458,7 @@ local function reg_lamp(suffix, nxt, light, brightness)
node.name = "homedecor:standing_lamp_"..repl[suffix]
minetest.set_node(pos, node)
end,
+ on_construct = unifieddyes.on_construct,
after_dig_node = unifieddyes.after_dig_node,
expand = { top="placeholder" },
})
diff --git a/lavalamp/init.lua b/lavalamp/init.lua
index 5a90074..3fd1278 100644
--- a/lavalamp/init.lua
+++ b/lavalamp/init.lua
@@ -33,6 +33,7 @@ minetest.register_node("lavalamp:lavalamp", {
},
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, ud_param2_colorable = 1},
sounds = default.node_sound_glass_defaults(),
+ on_construct = unifieddyes.on_construct,
after_dig_node = unifieddyes.after_dig_node,
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
node.name = "lavalamp:lavalamp_off"
@@ -62,6 +63,7 @@ minetest.register_node("lavalamp:lavalamp_off", {
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, not_in_creative_inventory=1},
sounds = default.node_sound_glass_defaults(),
drop = "lavalamp:lavalamp",
+ on_construct = unifieddyes.on_construct,
after_dig_node = unifieddyes.after_dig_node,
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
node.name = "lavalamp:lavalamp"
diff --git a/plasticbox/init.lua b/plasticbox/init.lua
index afbeed8..a82e123 100644
--- a/plasticbox/init.lua
+++ b/plasticbox/init.lua
@@ -8,6 +8,7 @@ minetest.register_node("plasticbox:plasticbox", {
palette = "unifieddyes_palette_extended.png",
after_dig_node = unifieddyes.after_dig_node,
place_param2 = 240,
+ on_construct = unifieddyes.on_construct,
})
stairsplus:register_all("plasticbox", "plasticbox", "plasticbox:plasticbox", {
diff --git a/solidcolor/init.lua b/solidcolor/init.lua
index 407fc61..f232abf 100644
--- a/solidcolor/init.lua
+++ b/solidcolor/init.lua
@@ -8,6 +8,7 @@ minetest.register_node("solidcolor:block", {
palette = "unifieddyes_palette_extended.png",
after_dig_node = unifieddyes.after_dig_node,
place_param2 = 240,
+ on_construct = unifieddyes.on_construct,
})
minetest.register_craft( {
diff --git a/stained_glass/init.lua b/stained_glass/init.lua
index 8e62123..214b7a9 100644
--- a/stained_glass/init.lua
+++ b/stained_glass/init.lua
@@ -55,6 +55,7 @@ minetest.register_node("stained_glass:stained_glass", {
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, not_in_creative_inventory=1, ud_param2_colorable = 1},
sounds = default.node_sound_glass_defaults(),
drop = "moreblocks:super_glow_glass",
+ on_construct = unifieddyes.on_construct,
after_dig_node = unifieddyes.after_dig_node,
drop = "moreblocks:super_glow_glass"
})
@@ -84,6 +85,7 @@ minetest.register_node("stained_glass:stained_trap_glass", {
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, not_in_creative_inventory=1, ud_param2_colorable = 1},
sounds = default.node_sound_glass_defaults(),
drop = "moreblocks:trap_super_glow_glass",
+ on_construct = unifieddyes.on_construct,
after_dig_node = unifieddyes.after_dig_node,
drop = "moreblocks:trap_super_glow_glass"
})
diff --git a/unifiedbricks/init.lua b/unifiedbricks/init.lua
index a089a5c..00964f0 100644
--- a/unifiedbricks/init.lua
+++ b/unifiedbricks/init.lua
@@ -107,6 +107,7 @@ minetest.register_node("unifiedbricks:brickblock", {
is_ground_content = true,
groups = {cracky=3, not_in_creative_inventory=1, ud_param2_colorable = 1},
sounds = default.node_sound_stone_defaults(),
+ on_construct = unifieddyes.on_construct,
after_dig_node = unifieddyes.after_dig_node,
drop = "default:brick"
})
@@ -131,6 +132,7 @@ minetest.register_node("unifiedbricks:clayblock", {
sounds = default.node_sound_dirt_defaults({
footstep = "",
}),
+ on_construct = unifieddyes.on_construct,
after_dig_node = unifieddyes.after_dig_node,
drop = "default:clay"
})
@@ -156,6 +158,7 @@ minetest.register_node("unifiedbricks:brickblock_multicolor_dark", {
is_ground_content = true,
groups = {cracky=3, ud_param2_colorable = 1},
sounds = default.node_sound_stone_defaults(),
+ on_construct = unifieddyes.on_construct,
after_dig_node = unifieddyes.after_dig_node,
})
@@ -174,6 +177,7 @@ minetest.register_node("unifiedbricks:brickblock_multicolor_medium", {
is_ground_content = true,
groups = {cracky=3, ud_param2_colorable = 1},
sounds = default.node_sound_stone_defaults(),
+ on_construct = unifieddyes.on_construct,
after_dig_node = unifieddyes.after_dig_node,
})
@@ -192,6 +196,7 @@ minetest.register_node("unifiedbricks:brickblock_multicolor_light", {
is_ground_content = true,
groups = {cracky=3, ud_param2_colorable = 1},
sounds = default.node_sound_stone_defaults(),
+ on_construct = unifieddyes.on_construct,
after_dig_node = unifieddyes.after_dig_node,
})
diff --git a/unifieddyes/init.lua b/unifieddyes/init.lua
index a713c45..cfce06b 100644
--- a/unifieddyes/init.lua
+++ b/unifieddyes/init.lua
@@ -473,6 +473,16 @@ function unifieddyes.getpaletteidx(color, palette_type)
end
end
+-- if your node was once 89-color and uses an LBM to convert to the 256-color palette,
+-- call this in that node def's on_construct:
+
+function unifieddyes.on_construct(pos)
+ local meta = minetest.get_meta(pos)
+ meta:set_string("palette", "ext")
+end
+
+-- call this in your node's after_dig_node to get the last-used dye back.
+
function unifieddyes.after_dig_node(pos, oldnode, oldmetadata, digger)
local prevdye