forked from mtcontrib/homedecor_modpack
switch to colored itemstacks
with full crafting recipes (requires Unified Dyes commit 2a816534 or later) known issues: standing lamp bypasses vertical stack check bed expansion changes the color of the first-placed bed to match the second when creating a king bed.
This commit is contained in:
@ -28,7 +28,6 @@ minetest.register_node("lavalamp:lavalamp", {
|
||||
paramtype = "light",
|
||||
paramtype2 = "color",
|
||||
palette = "unifieddyes_palette_extended.png",
|
||||
place_param2 = 240,
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
light_source = 14,
|
||||
@ -39,8 +38,6 @@ 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_place_node = unifieddyes.recolor_on_place,
|
||||
after_dig_node = unifieddyes.after_dig_node,
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
node.name = "lavalamp:lavalamp_off"
|
||||
minetest.swap_node(pos, node)
|
||||
@ -59,7 +56,6 @@ minetest.register_node("lavalamp:lavalamp_off", {
|
||||
paramtype = "light",
|
||||
paramtype2 = "color",
|
||||
palette = "unifieddyes_palette_extended.png",
|
||||
place_param2 = 240,
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
@ -70,13 +66,16 @@ minetest.register_node("lavalamp:lavalamp_off", {
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
drop = "lavalamp:lavalamp",
|
||||
on_construct = unifieddyes.on_construct,
|
||||
after_place_node = unifieddyes.recolor_on_place,
|
||||
after_dig_node = unifieddyes.after_dig_node,
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
node.name = "lavalamp:lavalamp"
|
||||
minetest.swap_node(pos, node)
|
||||
return itemstack
|
||||
end,
|
||||
drop = {
|
||||
items = {
|
||||
{items = {"lavalamp:lavalamp"}, inherit_color = true },
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
@ -88,6 +87,17 @@ minetest.register_craft({
|
||||
}
|
||||
})
|
||||
|
||||
unifieddyes.register_color_craft({
|
||||
output = "lavalamp:lavalamp",
|
||||
palette = "extended",
|
||||
type = "shapeless",
|
||||
neutral_node = "lavalamp:lavalamp",
|
||||
recipe = {
|
||||
"NEUTRAL_NODE",
|
||||
"MAIN_DYE"
|
||||
}
|
||||
})
|
||||
|
||||
-- convert to param2 coloring
|
||||
|
||||
local colors = {
|
||||
|
Reference in New Issue
Block a user