summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVanessa Dannenberg <vanessa.e.dannenberg@gmail.com>2018-08-25 00:53:44 -0400
committerVanessa Dannenberg <vanessa.e.dannenberg@gmail.com>2018-08-25 01:18:22 -0400
commit63ce3e8112d652648daec1700a03080e5b9daefc (patch)
tree34843dbd0a217a1543e80db75c90fcd281438d79
parenta4e9783f7082827e3af572780ea45a82a12226b0 (diff)
downloadunifiedmesecons-63ce3e8112d652648daec1700a03080e5b9daefc.tar
unifiedmesecons-63ce3e8112d652648daec1700a03080e5b9daefc.tar.gz
unifiedmesecons-63ce3e8112d652648daec1700a03080e5b9daefc.tar.bz2
unifiedmesecons-63ce3e8112d652648daec1700a03080e5b9daefc.tar.xz
unifiedmesecons-63ce3e8112d652648daec1700a03080e5b9daefc.zip
add the other colors in the standar minetest_game dyes palette
use white as the neutral color
-rw-r--r--init.lua80
1 files changed, 48 insertions, 32 deletions
diff --git a/init.lua b/init.lua
index 3a36823..2ddb4ba 100644
--- a/init.lua
+++ b/init.lua
@@ -11,7 +11,13 @@ local hues = {
"violet",
"magenta",
"redviolet",
- "grey"
+ "pink",
+ "dark_green",
+ "brown",
+ "black",
+ "dark_grey",
+ "grey",
+ "white",
}
local function insulated_wire_get_rules(node)
@@ -55,11 +61,21 @@ minetest.unregister_item("mesecons_extrawires:corner_on")
minetest.unregister_item("mesecons_extrawires:tjunction_off")
minetest.unregister_item("mesecons_extrawires:tjunction_on")
-minetest.register_alias("mesecons_insulated:insulated_off", "mesecons_insulated:insulated_grey_off")
-minetest.register_alias("mesecons_extrawires:corner_off", "mesecons_extrawires:insulated_corner_grey_off")
-minetest.register_alias("mesecons_extrawires:tjunction_off", "mesecons_extrawires:insulated_tjunction_grey_off")
+minetest.register_alias("mesecons_insulated:insulated_off", "mesecons_insulated:insulated_white_off")
+minetest.register_alias("mesecons_extrawires:corner_off", "mesecons_extrawires:insulated_corner_white_off")
+minetest.register_alias("mesecons_extrawires:tjunction_off", "mesecons_extrawires:insulated_tjunction_white_off")
for _,color in pairs(hues) do
+ local palettecolor = color
+ if color == "black" or string.find(color, "grey") or color == "white" then
+ palettecolor = "grey"
+ elseif color == "pink" then
+ palettecolor = "red"
+ elseif color == "dark_green" then
+ palettecolor = "green"
+ elseif color == "brown" then
+ palettecolor = "orange"
+ end
mesecon.register_node(":mesecons_insulated:insulated_"..color, {
drawtype = "nodebox",
description = "Insulated Mesecon",
@@ -68,8 +84,8 @@ for _,color in pairs(hues) do
walkable = false,
sunlight_propagates = true,
on_place = minetest.rotate_node,
- drop = "mesecons_insulated:insulated_grey_off",
- palette = "unifieddyes_palette_"..color.."s.png",
+ drop = "mesecons_insulated:insulated_white_off",
+ palette = "unifieddyes_palette_"..palettecolor.."s.png",
selection_box = {
type = "fixed",
fixed = { -16/32-0.001, -18/32, -7/32, 16/32+0.001, -12/32, 7/32 }
@@ -80,7 +96,7 @@ for _,color in pairs(hues) do
},
},
{
- groups = {dig_immediate = 3,not_in_creative_inventory = (color~="grey" and 1 or nil)},
+ groups = {dig_immediate = 3,not_in_creative_inventory = (color~="white" and 1 or nil)},
mesecons = {conductor = {
state = mesecon.state.off,
onstate = "mesecons_insulated:insulated_"..color.."_on",
@@ -119,8 +135,8 @@ for _,color in pairs(hues) do
walkable = false,
sunlight_propagates = true,
on_place = minetest.rotate_node,
- drop = "mesecons_extrawires:insulated_corner_grey_off",
- palette = "unifieddyes_palette_"..color.."s.png",
+ drop = "mesecons_extrawires:insulated_corner_white_off",
+ palette = "unifieddyes_palette_"..palettecolor.."s.png",
selection_box = {
type = "fixed",
fixed = { -16/32-0.001, -18/32, -16/32, 5/32, -12/32, 5/32 },
@@ -132,7 +148,7 @@ for _,color in pairs(hues) do
},
},
{
- groups = {dig_immediate = 3,not_in_creative_inventory = (color~="grey" and 1 or nil)},
+ groups = {dig_immediate = 3,not_in_creative_inventory = (color~="white" and 1 or nil)},
mesecons = {conductor = {
state = mesecon.state.off,
onstate = "mesecons_extrawires:insulated_corner_"..color.."_on",
@@ -171,8 +187,8 @@ for _,color in pairs(hues) do
walkable = false,
sunlight_propagates = true,
on_place = minetest.rotate_node,
- drop = "mesecons_extrawires:insulated_tjunction_grey_off",
- palette = "unifieddyes_palette_"..color.."s.png",
+ drop = "mesecons_extrawires:insulated_tjunction_white_off",
+ palette = "unifieddyes_palette_"..palettecolor.."s.png",
node_box = {
type = "fixed",
fixed = {{ -16/32-0.001, -17/32, -3/32, 16/32+0.001, -13/32, 3/32 },
@@ -184,7 +200,7 @@ for _,color in pairs(hues) do
},
},
{
- groups = {dig_immediate = 3,not_in_creative_inventory = (color~="grey" and 1 or nil)},
+ groups = {dig_immediate = 3,not_in_creative_inventory = (color~="white" and 1 or nil)},
mesecons = {conductor = {
state = mesecon.state.off,
onstate = "mesecons_extrawires:insulated_tjunction_"..color.."_on",
@@ -284,25 +300,25 @@ minetest.register_lbm({
})
minetest.register_craft({
- output = "mesecons_extrawires:insulated_corner_grey_off 3",
+ output = "mesecons_extrawires:insulated_corner_white_off 3",
recipe = {
{"", "", ""},
- {"mesecons_insulated:insulated_grey_off", "mesecons_insulated:insulated_grey_off", ""},
- {"", "mesecons_insulated:insulated_grey_off", ""},
+ {"mesecons_insulated:insulated_white_off", "mesecons_insulated:insulated_white_off", ""},
+ {"", "mesecons_insulated:insulated_white_off", ""},
}
})
minetest.register_craft({
- output = "mesecons_extrawires:insulated_tjunction_grey_off 3",
+ output = "mesecons_extrawires:insulated_tjunction_white_off 3",
recipe = {
{"", "", ""},
- {"mesecons_insulated:insulated_grey_off", "mesecons_insulated:insulated_grey_off", "mesecons_insulated:insulated_grey_off"},
- {"", "mesecons_insulated:insulated_grey_off", ""},
+ {"mesecons_insulated:insulated_white_off", "mesecons_insulated:insulated_white_off", "mesecons_insulated:insulated_white_off"},
+ {"", "mesecons_insulated:insulated_white_off", ""},
}
})
minetest.register_craft({
- output = "mesecons_insulated:insulated_grey_off 3",
+ output = "mesecons_insulated:insulated_white_off 3",
recipe = {
{"mesecons_materials:fiber", "mesecons_materials:fiber", "mesecons_materials:fiber"},
{"mesecons:wire_00000000_off", "mesecons:wire_00000000_off", "mesecons:wire_00000000_off"},
@@ -314,14 +330,14 @@ minetest.register_craft({
type = "shapeless",
output = "mesecons_extrawires:crossover_off",
recipe = {
- "mesecons_insulated:insulated_grey_off",
- "mesecons_insulated:insulated_grey_off",
+ "mesecons_insulated:insulated_white_off",
+ "mesecons_insulated:insulated_white_off",
},
})
minetest.register_craft({
type = "shapeless",
- output = "mesecons_insulated:insulated_grey_off 2",
+ output = "mesecons_insulated:insulated_white_off 2",
recipe = {
"mesecons_extrawires:crossover_off",
},
@@ -332,14 +348,14 @@ if minetest.get_modpath("digilines") then
output = 'digilines:wire_std_00000000 2',
recipe = {
{'mesecons_materials:fiber', 'mesecons_materials:fiber', 'mesecons_materials:fiber'},
- {'mesecons_insulated:insulated_grey_off', 'mesecons_insulated:insulated_grey_off', 'default:gold_ingot'},
+ {'mesecons_insulated:insulated_white_off', 'mesecons_insulated:insulated_white_off', 'default:gold_ingot'},
{'mesecons_materials:fiber', 'mesecons_materials:fiber', 'mesecons_materials:fiber'},
}
})
end
for _,color in pairs(hues) do
- if color ~= "grey" then
+ if color ~= "white" then
local dye = "dye:"..color
minetest.register_craft({
output = unifieddyes.make_colored_itemstack(
@@ -348,8 +364,8 @@ for _,color in pairs(hues) do
dye),
recipe = {
{"", dye, ""},
- {"mesecons_insulated:insulated_grey_off", "mesecons_insulated:insulated_grey_off", ""},
- {"", "mesecons_insulated:insulated_grey_off", ""},
+ {"mesecons_insulated:insulated_white_off", "mesecons_insulated:insulated_white_off", ""},
+ {"", "mesecons_insulated:insulated_white_off", ""},
}
})
@@ -360,8 +376,8 @@ for _,color in pairs(hues) do
dye),
recipe = {
{"", dye, ""},
- {"mesecons_insulated:insulated_grey_off", "mesecons_insulated:insulated_grey_off", "mesecons_insulated:insulated_grey_off"},
- {"", "mesecons_insulated:insulated_grey_off", ""},
+ {"mesecons_insulated:insulated_white_off", "mesecons_insulated:insulated_white_off", "mesecons_insulated:insulated_white_off"},
+ {"", "mesecons_insulated:insulated_white_off", ""},
}
})
@@ -373,7 +389,7 @@ for _,color in pairs(hues) do
dye),
recipe = {
dye,
- "mesecons_insulated:insulated_grey_off",
+ "mesecons_insulated:insulated_white_off",
},
})
@@ -385,7 +401,7 @@ for _,color in pairs(hues) do
type = "shapeless",
recipe = {
dye,
- "mesecons_extrawires:insulated_corner_grey_off"
+ "mesecons_extrawires:insulated_corner_white_off"
}
})
@@ -397,7 +413,7 @@ for _,color in pairs(hues) do
type = "shapeless",
recipe = {
dye,
- "mesecons_extrawires:insulated_tjunction_grey_off"
+ "mesecons_extrawires:insulated_tjunction_white_off"
}
})
end