diff options
Diffstat (limited to 'lavalamp')
-rw-r--r-- | lavalamp/init.lua | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/lavalamp/init.lua b/lavalamp/init.lua index 54909cb..b37f651 100644 --- a/lavalamp/init.lua +++ b/lavalamp/init.lua @@ -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 = { |