1
0
mirror of https://github.com/mt-mods/homedecor_modpack.git synced 2025-07-15 20:20:28 +02:00

use unified dyes auto-colorization feature

also fixed some bugs in bed handling
also got rid of the old, obsolete "placeholder" node, aliased it to air.
This commit is contained in:
Vanessa Ezekowitz
2017-03-18 05:51:46 -04:00
parent 27eae09d93
commit 1eb1e87f08
11 changed files with 100 additions and 41 deletions

View File

@ -35,7 +35,10 @@ minetest.register_node("homedecor:glowlight_half", {
groups = { snappy = 3, ud_param2_colorable = 1 },
light_source = default.LIGHT_MAX,
sounds = default.node_sound_glass_defaults(),
after_place_node = unifieddyes.fix_rotation,
after_place_node = function(pos, placer, itemstack, pointed_thing)
unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
end,
after_dig_node = unifieddyes.after_dig_node
})
@ -63,7 +66,10 @@ minetest.register_node("homedecor:glowlight_quarter", {
groups = { snappy = 3, ud_param2_colorable = 1 },
light_source = default.LIGHT_MAX-1,
sounds = default.node_sound_glass_defaults(),
after_place_node = unifieddyes.fix_rotation,
after_place_node = function(pos, placer, itemstack, pointed_thing)
unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
end,
after_dig_node = unifieddyes.after_dig_node
})
@ -91,7 +97,10 @@ minetest.register_node("homedecor:glowlight_small_cube", {
groups = { snappy = 3, ud_param2_colorable = 1 },
light_source = default.LIGHT_MAX-1,
sounds = default.node_sound_glass_defaults(),
after_place_node = unifieddyes.fix_rotation,
after_place_node = function(pos, placer, itemstack, pointed_thing)
unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
end,
after_dig_node = unifieddyes.after_dig_node
})
@ -429,6 +438,7 @@ local function reg_lamp(suffix, nxt, light, brightness)
minetest.set_node(pos, node)
end,
on_construct = unifieddyes.on_construct,
after_place_node = unifieddyes.recolor_on_place,
after_dig_node = unifieddyes.after_dig_node
})
@ -459,8 +469,9 @@ local function reg_lamp(suffix, nxt, light, brightness)
minetest.set_node(pos, node)
end,
on_construct = unifieddyes.on_construct,
after_place_node = unifieddyes.recolor_on_place,
after_dig_node = unifieddyes.after_dig_node,
expand = { top="placeholder" },
expand = { top="air" },
})
-- for old maps that had the original 3dforniture mod
@ -497,7 +508,10 @@ homedecor.register("desk_lamp", {
node_box = dlamp_cbox,
walkable = false,
groups = {snappy=3, ud_param2_colorable = 1},
after_place_node = unifieddyes.fix_rotation_nsew,
after_place_node = function(pos, placer, itemstack, pointed_thing)
unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)
unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
end,
after_dig_node = unifieddyes.after_dig_node,
on_rotate = unifieddyes.fix_after_screwdriver_nsew
})