mirror of
https://github.com/mt-mods/homedecor_modpack.git
synced 2024-12-22 08:00:18 +01:00
use Unified Dyes on_dig where needed - requires Unified Dyes commit 9ff40a7f or later
This commit is contained in:
parent
80352d69e1
commit
9dcc6c2b4d
@ -15,6 +15,7 @@ minetest.register_node(":homedecor:bathroom_tiles_dark", {
|
|||||||
groups = {cracky=3, ud_param2_colorable = 1},
|
groups = {cracky=3, ud_param2_colorable = 1},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
on_construct = unifieddyes.on_construct,
|
on_construct = unifieddyes.on_construct,
|
||||||
|
on_dig = unifieddyes.on_dig,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node(":homedecor:bathroom_tiles_medium", {
|
minetest.register_node(":homedecor:bathroom_tiles_medium", {
|
||||||
@ -31,6 +32,7 @@ minetest.register_node(":homedecor:bathroom_tiles_medium", {
|
|||||||
groups = {cracky=3, ud_param2_colorable = 1},
|
groups = {cracky=3, ud_param2_colorable = 1},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
on_construct = unifieddyes.on_construct,
|
on_construct = unifieddyes.on_construct,
|
||||||
|
on_dig = unifieddyes.on_dig,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node(":homedecor:bathroom_tiles_light", {
|
minetest.register_node(":homedecor:bathroom_tiles_light", {
|
||||||
@ -47,6 +49,7 @@ minetest.register_node(":homedecor:bathroom_tiles_light", {
|
|||||||
groups = {cracky=3, ud_param2_colorable = 1},
|
groups = {cracky=3, ud_param2_colorable = 1},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
on_construct = unifieddyes.on_construct,
|
on_construct = unifieddyes.on_construct,
|
||||||
|
on_dig = unifieddyes.on_dig,
|
||||||
})
|
})
|
||||||
|
|
||||||
local tr_cbox = {
|
local tr_cbox = {
|
||||||
|
@ -59,6 +59,7 @@ homedecor.register("bed_regular", {
|
|||||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||||
homedecor.unextend_bed(pos)
|
homedecor.unextend_bed(pos)
|
||||||
end,
|
end,
|
||||||
|
on_dig = unifieddyes.on_dig,
|
||||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||||
local itemname = itemstack:get_name()
|
local itemname = itemstack:get_name()
|
||||||
if itemname == "homedecor:bed_regular" then
|
if itemname == "homedecor:bed_regular" then
|
||||||
@ -92,6 +93,7 @@ homedecor.register("bed_extended", {
|
|||||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||||
homedecor.unextend_bed(pos)
|
homedecor.unextend_bed(pos)
|
||||||
end,
|
end,
|
||||||
|
on_dig = unifieddyes.on_dig,
|
||||||
-- on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
-- on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||||
-- homedecor.beds_on_rightclick(pos, node, clicker)
|
-- homedecor.beds_on_rightclick(pos, node, clicker)
|
||||||
-- return itemstack
|
-- return itemstack
|
||||||
@ -128,6 +130,7 @@ homedecor.register("bed_kingsize", {
|
|||||||
inv:add_item("main", "homedecor:bed_regular 2")
|
inv:add_item("main", "homedecor:bed_regular 2")
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
on_dig = unifieddyes.on_dig,
|
||||||
-- on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
-- on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||||
-- homedecor.beds_on_rightclick(pos, node, clicker)
|
-- homedecor.beds_on_rightclick(pos, node, clicker)
|
||||||
-- return itemstack
|
-- return itemstack
|
||||||
|
@ -286,6 +286,7 @@ for brightness_level = 0, 14 do
|
|||||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||||
unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
|
unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
|
||||||
end,
|
end,
|
||||||
|
on_dig = unifieddyes.on_dig,
|
||||||
on_rightclick = homedecor.toggle_light,
|
on_rightclick = homedecor.toggle_light,
|
||||||
drop = {
|
drop = {
|
||||||
items = {
|
items = {
|
||||||
@ -351,6 +352,7 @@ for brightness_level = 0, 14 do
|
|||||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||||
unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
|
unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
|
||||||
end,
|
end,
|
||||||
|
on_dig = unifieddyes.on_dig,
|
||||||
on_rightclick = homedecor.toggle_light,
|
on_rightclick = homedecor.toggle_light,
|
||||||
drop = {
|
drop = {
|
||||||
items = {
|
items = {
|
||||||
@ -417,6 +419,7 @@ for brightness_level = 0, 14 do
|
|||||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||||
unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
|
unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
|
||||||
end,
|
end,
|
||||||
|
on_dig = unifieddyes.on_dig,
|
||||||
on_rightclick = homedecor.toggle_light,
|
on_rightclick = homedecor.toggle_light,
|
||||||
drop = {
|
drop = {
|
||||||
items = {
|
items = {
|
||||||
@ -637,6 +640,7 @@ for brightness_level = 0, 14 do
|
|||||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||||
unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)
|
unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)
|
||||||
end,
|
end,
|
||||||
|
on_dig = unifieddyes.on_dig,
|
||||||
on_rotate = unifieddyes.fix_after_screwdriver_nsew,
|
on_rotate = unifieddyes.fix_after_screwdriver_nsew,
|
||||||
light_source = brightness_level,
|
light_source = brightness_level,
|
||||||
on_rightclick = homedecor.toggle_light,
|
on_rightclick = homedecor.toggle_light,
|
||||||
@ -714,7 +718,8 @@ for brightness_level = 0, 14 do
|
|||||||
digiline = homedecor.digiline_alldir_light,
|
digiline = homedecor.digiline_alldir_light,
|
||||||
mesecons = homedecor.mesecon_wall_light,
|
mesecons = homedecor.mesecon_wall_light,
|
||||||
on_rightclick = homedecor.toggle_light,
|
on_rightclick = homedecor.toggle_light,
|
||||||
on_punch = digiline_on_punch
|
on_punch = digiline_on_punch,
|
||||||
|
on_dig = unifieddyes.on_dig,
|
||||||
})
|
})
|
||||||
|
|
||||||
homedecor.register("standing_lamp_"..brightness_level, {
|
homedecor.register("standing_lamp_"..brightness_level, {
|
||||||
@ -745,7 +750,8 @@ for brightness_level = 0, 14 do
|
|||||||
digiline = homedecor.digiline_alldir_light,
|
digiline = homedecor.digiline_alldir_light,
|
||||||
mesecons = homedecor.mesecon_wall_light,
|
mesecons = homedecor.mesecon_wall_light,
|
||||||
on_rightclick = homedecor.toggle_light,
|
on_rightclick = homedecor.toggle_light,
|
||||||
on_punch = digiline_on_punch
|
on_punch = digiline_on_punch,
|
||||||
|
on_dig = unifieddyes.on_dig,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -478,6 +478,7 @@ for _, side in ipairs({"diagonal_left", "diagonal_right", "horizontal"}) do
|
|||||||
def.airbrush_replacement_node = "homedecor:banister_wood_"..side.."_grey"
|
def.airbrush_replacement_node = "homedecor:banister_wood_"..side.."_grey"
|
||||||
def.groups.ud_param2_colorable = 1
|
def.groups.ud_param2_colorable = 1
|
||||||
def.paramtype2 = "colorfacedir"
|
def.paramtype2 = "colorfacedir"
|
||||||
|
def.on_dig = unifieddyes.on_dig
|
||||||
end
|
end
|
||||||
homedecor.register(nodename, def)
|
homedecor.register(nodename, def)
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@ minetest.register_node(":lrfurn:armchair", {
|
|||||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||||
unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)
|
unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)
|
||||||
end,
|
end,
|
||||||
|
on_dig = unifieddyes.on_dig,
|
||||||
on_rotate = unifieddyes.fix_after_screwdriver_nsew,
|
on_rotate = unifieddyes.fix_after_screwdriver_nsew,
|
||||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||||
if not clicker:is_player() then
|
if not clicker:is_player() then
|
||||||
@ -55,6 +56,7 @@ homedecor.register("armchair", {
|
|||||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||||
unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)
|
unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)
|
||||||
end,
|
end,
|
||||||
|
on_dig = unifieddyes.on_dig,
|
||||||
on_rotate = unifieddyes.fix_after_screwdriver_nsew,
|
on_rotate = unifieddyes.fix_after_screwdriver_nsew,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -41,6 +41,7 @@ minetest.register_node(":lrfurn:longsofa", {
|
|||||||
end
|
end
|
||||||
return itemstack
|
return itemstack
|
||||||
end,
|
end,
|
||||||
|
on_dig = unifieddyes.on_dig,
|
||||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||||
if not clicker:is_player() then
|
if not clicker:is_player() then
|
||||||
return itemstack
|
return itemstack
|
||||||
|
@ -153,6 +153,7 @@ homedecor.register("kitchen_chair_padded", {
|
|||||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||||
unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)
|
unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)
|
||||||
end,
|
end,
|
||||||
|
on_dig = unifieddyes.on_dig,
|
||||||
on_rotate = unifieddyes.fix_after_screwdriver_nsew,
|
on_rotate = unifieddyes.fix_after_screwdriver_nsew,
|
||||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||||
pos.y = pos.y+0 -- where do I put my ass ?
|
pos.y = pos.y+0 -- where do I put my ass ?
|
||||||
|
@ -41,6 +41,7 @@ minetest.register_node(":lrfurn:sofa", {
|
|||||||
end
|
end
|
||||||
return itemstack
|
return itemstack
|
||||||
end,
|
end,
|
||||||
|
on_dig = unifieddyes.on_dig,
|
||||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||||
if not clicker:is_player() then
|
if not clicker:is_player() then
|
||||||
return itemstack
|
return itemstack
|
||||||
|
@ -115,6 +115,7 @@ minetest.register_node(":homedecor:curtain_closed", {
|
|||||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||||
unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
|
unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
|
||||||
end,
|
end,
|
||||||
|
on_dig = unifieddyes.on_dig,
|
||||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||||
minetest.set_node(pos, { name = "homedecor:curtain_open", param2 = node.param2 })
|
minetest.set_node(pos, { name = "homedecor:curtain_open", param2 = node.param2 })
|
||||||
return itemstack
|
return itemstack
|
||||||
@ -137,6 +138,7 @@ minetest.register_node(":homedecor:curtain_open", {
|
|||||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||||
unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
|
unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
|
||||||
end,
|
end,
|
||||||
|
on_dig = unifieddyes.on_dig,
|
||||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||||
minetest.set_node(pos, { name = "homedecor:curtain_closed", param2 = node.param2 })
|
minetest.set_node(pos, { name = "homedecor:curtain_closed", param2 = node.param2 })
|
||||||
return itemstack
|
return itemstack
|
||||||
@ -243,6 +245,7 @@ homedecor.register("shutter", {
|
|||||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||||
unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
|
unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
|
||||||
end,
|
end,
|
||||||
|
on_dig = unifieddyes.on_dig,
|
||||||
})
|
})
|
||||||
|
|
||||||
homedecor.register("shutter_colored", {
|
homedecor.register("shutter_colored", {
|
||||||
@ -260,6 +263,7 @@ homedecor.register("shutter_colored", {
|
|||||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||||
unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
|
unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
|
||||||
end,
|
end,
|
||||||
|
on_dig = unifieddyes.on_dig,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_alias("homedecor:shutter_purple", "homedecor:shutter_violet")
|
minetest.register_alias("homedecor:shutter_purple", "homedecor:shutter_violet")
|
||||||
|
@ -38,6 +38,7 @@ minetest.register_node("lavalamp:lavalamp", {
|
|||||||
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, ud_param2_colorable = 1},
|
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, ud_param2_colorable = 1},
|
||||||
sounds = default.node_sound_glass_defaults(),
|
sounds = default.node_sound_glass_defaults(),
|
||||||
on_construct = unifieddyes.on_construct,
|
on_construct = unifieddyes.on_construct,
|
||||||
|
on_dig = unifieddyes.on_dig,
|
||||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||||
node.name = "lavalamp:lavalamp_off"
|
node.name = "lavalamp:lavalamp_off"
|
||||||
minetest.swap_node(pos, node)
|
minetest.swap_node(pos, node)
|
||||||
|
Loading…
Reference in New Issue
Block a user