Compare commits

..

No commits in common. "ea3f8ad7a5ad08e74e52ab25ca966969de7e080e" and "9eadebe6de71c43812ce053e37e6efc5bf69346c" have entirely different histories.

2 changed files with 24 additions and 27 deletions

View File

@ -1,2 +1,3 @@
homedecor
moreblocks?
unifieddyes

View File

@ -6,8 +6,10 @@ minetest.register_node("plasticbox:plasticbox", {
sounds = default.node_sound_stone_defaults(),
paramtype2 = "color",
palette = "unifieddyes_palette_extended.png",
after_dig_node = unifieddyes.after_dig_node,
place_param2 = 240,
on_construct = unifieddyes.on_construct,
on_dig = unifieddyes.on_dig,
after_place_node = unifieddyes.recolor_on_place,
})
if minetest.global_exists("stairsplus") then
@ -22,35 +24,12 @@ end
minetest.register_craft( {
output = "plasticbox:plasticbox 4",
recipe = {
{ "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" },
{ "basic_materials:plastic_sheet", "", "basic_materials:plastic_sheet" },
{ "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" }
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting" },
{ "homedecor:plastic_sheeting", "", "homedecor:plastic_sheeting" },
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting" }
},
})
unifieddyes.register_color_craft({
output = "plasticbox:plasticbox 4",
palette = "extended",
neutral_node = "basic_materials:plastic_sheet",
recipe = {
{ "NEUTRAL_NODE", "NEUTRAL_NODE", "NEUTRAL_NODE" },
{ "NEUTRAL_NODE", "MAIN_DYE", "NEUTRAL_NODE" },
{ "NEUTRAL_NODE", "NEUTRAL_NODE", "NEUTRAL_NODE" },
}
})
unifieddyes.register_color_craft({
output = "plasticbox:plasticbox",
palette = "extended",
type = "shapeless",
neutral_node = "plasticbox:plasticbox",
recipe = {
"NEUTRAL_NODE",
"MAIN_DYE"
}
})
minetest.register_lbm({
name = "plasticbox:convert_colors",
label = "Convert plastic boxes to use param2 color",
@ -97,3 +76,20 @@ minetest.register_lbm({
end,
})
minetest.register_lbm({
name = "plasticbox:recolor",
label = "Convert to new palette",
nodenames = {"plasticbox:plasticbox"},
action = function(pos, node)
local meta = minetest.get_meta(pos)
if meta:get_string("palette") ~= "ext" then
if node.param2 == 0 then
node.param2 = 240
else
node.param2 = unifieddyes.convert_classic_palette[node.param2]
end
minetest.swap_node(pos,node)
meta:set_string("palette", "ext")
end
end
})