summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-02-16 20:48:28 -0500
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-02-16 20:48:28 -0500
commit4fe97dc222f34431a2134bb7bee303df3313185f (patch)
tree2ef7f6f9638a9a8bf3549250ebf5eeb110d7b06f
parentc9bbb69485c5cdb9f88dece7c953989837660200 (diff)
downloaddreambuilder_modpack-4fe97dc222f34431a2134bb7bee303df3313185f.tar
dreambuilder_modpack-4fe97dc222f34431a2134bb7bee303df3313185f.tar.gz
dreambuilder_modpack-4fe97dc222f34431a2134bb7bee303df3313185f.tar.bz2
dreambuilder_modpack-4fe97dc222f34431a2134bb7bee303df3313185f.tar.xz
dreambuilder_modpack-4fe97dc222f34431a2134bb7bee303df3313185f.zip
update blox and coloredwood
-rw-r--r--blox/depends.txt2
-rw-r--r--blox/init.lua259
-rw-r--r--coloredwood/init.lua35
3 files changed, 178 insertions, 118 deletions
diff --git a/blox/depends.txt b/blox/depends.txt
index 784823a..ad9eeb0 100644
--- a/blox/depends.txt
+++ b/blox/depends.txt
@@ -1,2 +1,4 @@
default
unifieddyes
+moreblocks?
+coloredwood?
diff --git a/blox/init.lua b/blox/init.lua
index 81009ca..763bbb3 100644
--- a/blox/init.lua
+++ b/blox/init.lua
@@ -8,22 +8,8 @@ by blert2112
***********
--]]
--- Remove Blox from creative inventory if colormachine mod is installed
-
blox = {}
-local creative = 0
-
-if (minetest.get_modpath("colormachine")) then
- creative = 1
-end
-
--- Uncomment the line below to remove most nodes from creative inventory regardless of colormachine mod.
-
--- local creative = 1
-
--- Uncomment the line above and change value to 0 to keep nodes in creative inventory when colormachine is installed.
-
local version = "0.8"
local BloxColours = {
@@ -54,6 +40,8 @@ local NodeMaterial = {
"cobble",
}
+local moreblocks = minetest.get_modpath("moreblocks")
+
-- Nodes
minetest.register_node("blox:glowstone", {
@@ -123,7 +111,7 @@ for _, nodeclass in ipairs(NodeClass) do
paramtype = "light",
paramtype2 = "color",
is_ground_content = true,
- groups = {cracky=3, not_in_creative_inventory=creative, ud_param2_colorable = 1},
+ groups = {cracky=3, ud_param2_colorable = 1},
sounds = default.node_sound_stone_defaults(),
after_dig_node = unifieddyes.after_dig_node
})
@@ -140,7 +128,7 @@ for _, nodeclass in ipairs(NodeClass) do
paramtype = "light",
paramtype2 = "color",
is_ground_content = true,
- groups = {cracky=3, not_in_creative_inventory=creative, ud_param2_colorable = 1},
+ groups = {cracky=3, ud_param2_colorable = 1},
sounds = default.node_sound_stone_defaults(),
after_dig_node = unifieddyes.after_dig_node
})
@@ -157,7 +145,7 @@ for _, nodeclass in ipairs(NodeClass) do
paramtype = "light",
paramtype2 = "color",
is_ground_content = true,
- groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_creative_inventory=creative, ud_param2_colorable = 1},
+ groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3, ud_param2_colorable = 1},
sounds = default.node_sound_wood_defaults(),
after_dig_node = unifieddyes.after_dig_node
})
@@ -172,11 +160,22 @@ minetest.register_node("blox:wood_tinted", {
paramtype = "light",
paramtype2 = "color",
is_ground_content = true,
- groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_creative_inventory=creative, ud_param2_colorable = 1},
+ groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3, ud_param2_colorable = 1},
sounds = default.node_sound_wood_defaults(),
after_dig_node = unifieddyes.after_dig_node
})
+minetest.register_node("blox:stone_square", {
+ description = "Blox stone square",
+ tiles = { "blox_stone_square.png" },
+ palette = "unifieddyes_palette.png",
+ paramtype = "light",
+ paramtype2 = "color",
+ 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(),
+ after_dig_node = unifieddyes.after_dig_node
+})
minetest.register_node("blox:cobble_tinted", {
description = "Blox tinted cobble",
@@ -185,9 +184,10 @@ minetest.register_node("blox:cobble_tinted", {
paramtype = "light",
paramtype2 = "color",
is_ground_content = true,
- groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_creative_inventory=creative, ud_param2_colorable = 1},
+ 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(),
- after_dig_node = unifieddyes.after_dig_node
+ after_dig_node = unifieddyes.after_dig_node,
+ drop = "default:cobble"
})
minetest.register_node("blox:stone_tinted", {
@@ -197,23 +197,113 @@ minetest.register_node("blox:stone_tinted", {
paramtype = "light",
paramtype2 = "color",
is_ground_content = true,
- groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_creative_inventory=creative, ud_param2_colorable = 1},
+ 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(),
- after_dig_node = unifieddyes.after_dig_node
+ after_dig_node = unifieddyes.after_dig_node,
+ drop = "default:cobble"
})
-minetest.register_node("blox:stone_square", {
- description = "Blox stone square",
- tiles = { "blox_stone_square.png" },
+-- Override default stone and default cobble
+
+minetest.override_item("default:stone", {
+ paramtype2 = "color",
palette = "unifieddyes_palette.png",
- paramtype = "light",
+ ud_replacement_node = "blox:stone_tinted",
+ groups = {cracky = 3, stone = 1, ud_param2_colorable = 1},
+})
+
+minetest.override_item("default:cobble", {
paramtype2 = "color",
- is_ground_content = true,
- groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_creative_inventory=creative, ud_param2_colorable = 1},
- sounds = default.node_sound_wood_defaults(),
- after_dig_node = unifieddyes.after_dig_node
+ palette = "unifieddyes_palette.png",
+ ud_replacement_node = "blox:cobble_tinted",
+ groups = {cracky = 3, stone = 2, ud_param2_colorable = 1},
})
+local dye_color = "unifieddyes:white"
+
+if moreblocks then
+ minetest.override_item("moreblocks:stone_tile", {
+ paramtype2 = "color",
+ palette = "unifieddyes_palette.png",
+ ud_replacement_node = "blox:stone_square",
+ groups = {cracky = 3, ud_param2_colorable = 1},
+ })
+ minetest.override_item("blox:stone_square", {
+ drop = "moreblocks:stone_tile",
+ groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_creative_inventory = 1, ud_param2_colorable = 1},
+ })
+
+ minetest.override_item("moreblocks:circle_stone_bricks", {
+ paramtype2 = "color",
+ palette = "unifieddyes_palette.png",
+ ud_replacement_node = "blox:stone_loop",
+ groups = {cracky = 3, ud_param2_colorable = 1},
+ })
+ minetest.override_item("blox:stone_loop", {
+ drop = "moreblocks:circle_stone_bricks",
+ groups = {cracky = 3, not_in_creative_inventory = 1, ud_param2_colorable = 1},
+ })
+
+ minetest.override_item("moreblocks:iron_checker", {
+ paramtype2 = "color",
+ palette = "unifieddyes_palette.png",
+ ud_replacement_node = "blox:stone_checker",
+ groups = {cracky = 3, ud_param2_colorable = 1},
+ })
+ minetest.override_item("blox:stone_checker", {
+ drop = "moreblocks:iron_checker",
+ groups = {cracky = 3, not_in_creative_inventory = 1, ud_param2_colorable = 1},
+ })
+
+ minetest.override_item("moreblocks:wood_tile", {
+ paramtype2 = "color",
+ palette = "unifieddyes_palette.png",
+ ud_replacement_node = "blox:wood_quarter",
+ groups = {wood = 1, snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, ud_param2_colorable = 1},
+ })
+ minetest.override_item("blox:wood_quarter", {
+ drop = "moreblocks:wood_tile",
+ groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_creative_inventory = 1, ud_param2_colorable = 1},
+ })
+
+ minetest.override_item("moreblocks:wood_tile_flipped", {
+ paramtype2 = "color",
+ palette = "unifieddyes_palette.png",
+ ud_replacement_node = "blox:wood_quarter",
+ groups = {wood = 1, snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, ud_param2_colorable = 1},
+ })
+else
+ minetest.register_craft({
+ output = "blox:stone_square 6",
+ recipe = {
+ { dye_color, "default:stone", "default:stone" },
+ { "default:stone", dye_color, "default:stone" },
+ { "default:stone", "default:stone", dye_color },
+ }
+ })
+end
+
+if minetest.get_modpath("coloredwood") then
+ minetest.register_craft({
+ output = "blox:wood_tinted 6",
+ recipe = {
+ { "", "default:wood", "" },
+ { "default:wood", dye_color, "default:wood" },
+ { "", "default:wood", "" },
+ }
+ })
+else
+ minetest.override_item("default:wood", {
+ paramtype2 = "color",
+ ud_replacement_node = "blox:wood_tinted",
+ groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1, ud_param2_colorable = 1},
+ })
+ minetest.override_item("blox:wood_tinted", {
+ drop = "default:wood",
+ groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_creative_inventory = 1, ud_param2_colorable = 1},
+ })
+end
+
-- Crafting
minetest.register_craft({
@@ -225,8 +315,6 @@ minetest.register_craft({
}
})
-local dye_color = "unifieddyes:white"
-
for _, material in ipairs(NodeMaterial) do
local def_mat = "default:"..material
@@ -240,13 +328,15 @@ for _, material in ipairs(NodeMaterial) do
}
})
- minetest.register_craft({
- output = "blox:"..material.."_quarter 4",
- recipe = {
- { dye_color, def_mat },
- { def_mat, dye_color },
- }
- })
+ if not (moreblocks and material == "wood") then
+ minetest.register_craft({
+ output = "blox:"..material.."_quarter 4",
+ recipe = {
+ { dye_color, def_mat },
+ { def_mat, dye_color },
+ }
+ })
+ end
minetest.register_craft({
output = "blox:"..material.."_cross 4",
@@ -258,24 +348,6 @@ for _, material in ipairs(NodeMaterial) do
})
minetest.register_craft({
- output = "blox:"..material.."_checker 6",
- recipe = {
- { def_mat, dye_color, def_mat },
- { dye_color, def_mat, dye_color },
- { def_mat, dye_color, def_mat },
- }
- })
-
- minetest.register_craft({
- output = "blox:"..material.."_checker 8",
- recipe = {
- { dye_color, def_mat, dye_color },
- { def_mat, dye_color, def_mat },
- { dye_color, def_mat, dye_color },
- }
- })
-
- minetest.register_craft({
output = "blox:"..material.."_corner 4",
recipe = {
{ dye_color, "", dye_color },
@@ -284,51 +356,36 @@ for _, material in ipairs(NodeMaterial) do
}
})
- minetest.register_craft({
- output = "blox:"..material.."_loop 6",
- recipe = {
- { def_mat, def_mat, def_mat },
- { def_mat, dye_color, def_mat },
- { def_mat, def_mat, def_mat },
- }
- })
-end
-
-minetest.register_craft({
- output = "blox:stone_square 6",
- recipe = {
- { dye_color, "default:stone", "default:stone" },
- { "default:stone", dye_color, "default:stone" },
- { "default:stone", "default:stone", dye_color },
- }
-})
-
-minetest.register_craft({
- output = "blox:stone_tinted 6",
- recipe = {
- { "", "default:stone", "" },
- { "default:stone", dye_color, "default:stone" },
- { "", "default:stone", "" },
- }
-})
-
-minetest.register_craft({
- output = "blox:wood_tinted 6",
- recipe = {
- { "", "default:wood", "" },
- { "default:wood", dye_color, "default:wood" },
- { "", "default:wood", "" },
- }
-})
+ if not (moreblocks and material == "stone") then
-minetest.register_craft({
- output = "blox:cobble_tinted 6",
- recipe = {
- { "", "default:cobble", "" },
- { "default:cobble", dye_color, "default:cobble" },
- { "", "default:cobble", "" },
- }
-})
+ minetest.register_craft({
+ output = "blox:"..material.."_checker 6",
+ recipe = {
+ { def_mat, dye_color, def_mat },
+ { dye_color, def_mat, dye_color },
+ { def_mat, dye_color, def_mat },
+ }
+ })
+
+ minetest.register_craft({
+ output = "blox:"..material.."_checker 8",
+ recipe = {
+ { dye_color, def_mat, dye_color },
+ { def_mat, dye_color, def_mat },
+ { dye_color, def_mat, dye_color },
+ }
+ })
+
+ minetest.register_craft({
+ output = "blox:"..material.."_loop 6",
+ recipe = {
+ { def_mat, def_mat, def_mat },
+ { def_mat, dye_color, def_mat },
+ { def_mat, def_mat, def_mat },
+ }
+ })
+ end
+end
--Fuel
diff --git a/coloredwood/init.lua b/coloredwood/init.lua
index 05a513d..c3e966c 100644
--- a/coloredwood/init.lua
+++ b/coloredwood/init.lua
@@ -269,26 +269,27 @@ for _, shade in ipairs(coloredwood.greys) do
table.insert(coloredwood.old_static_nodes, "coloredwood:fence_"..shade)
end
--- add all of the stairsplus nodes
-
-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)
+-- 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
- 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)
+ 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