Compare commits
5 Commits
9eadebe6de
...
ea3f8ad7a5
Author | SHA1 | Date |
---|---|---|
Vanessa Dannenberg | ea3f8ad7a5 | |
cheapie | 10cb913a78 | |
cheapie | 49d7dc52f7 | |
Vanessa Dannenberg | 586fe3a7c7 | |
Vanessa Dannenberg | 271f59bbac |
|
@ -1,3 +1,2 @@
|
|||
homedecor
|
||||
moreblocks?
|
||||
unifieddyes
|
||||
|
|
50
init.lua
50
init.lua
|
@ -6,10 +6,8 @@ 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,
|
||||
after_place_node = unifieddyes.recolor_on_place,
|
||||
on_dig = unifieddyes.on_dig,
|
||||
})
|
||||
|
||||
if minetest.global_exists("stairsplus") then
|
||||
|
@ -24,12 +22,35 @@ end
|
|||
minetest.register_craft( {
|
||||
output = "plasticbox:plasticbox 4",
|
||||
recipe = {
|
||||
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting" },
|
||||
{ "homedecor:plastic_sheeting", "", "homedecor:plastic_sheeting" },
|
||||
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting" }
|
||||
{ "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" }
|
||||
},
|
||||
})
|
||||
|
||||
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",
|
||||
|
@ -76,20 +97,3 @@ 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
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue