1
0
mirror of https://github.com/mt-mods/homedecor_modpack.git synced 2024-11-18 16:10:39 +01:00

use Unified Dyes on_dig where needed - requires Unified Dyes commit 9ff40a7f or later

This commit is contained in:
Vanessa Dannenberg 2019-07-18 02:16:46 -04:00
parent 80352d69e1
commit 9dcc6c2b4d
10 changed files with 25 additions and 2 deletions

View File

@ -15,6 +15,7 @@ minetest.register_node(":homedecor:bathroom_tiles_dark", {
groups = {cracky=3, ud_param2_colorable = 1},
sounds = default.node_sound_stone_defaults(),
on_construct = unifieddyes.on_construct,
on_dig = unifieddyes.on_dig,
})
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},
sounds = default.node_sound_stone_defaults(),
on_construct = unifieddyes.on_construct,
on_dig = unifieddyes.on_dig,
})
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},
sounds = default.node_sound_stone_defaults(),
on_construct = unifieddyes.on_construct,
on_dig = unifieddyes.on_dig,
})
local tr_cbox = {

View File

@ -59,6 +59,7 @@ homedecor.register("bed_regular", {
after_dig_node = function(pos, oldnode, oldmetadata, digger)
homedecor.unextend_bed(pos)
end,
on_dig = unifieddyes.on_dig,
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
local itemname = itemstack:get_name()
if itemname == "homedecor:bed_regular" then
@ -92,6 +93,7 @@ homedecor.register("bed_extended", {
after_dig_node = function(pos, oldnode, oldmetadata, digger)
homedecor.unextend_bed(pos)
end,
on_dig = unifieddyes.on_dig,
-- on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
-- homedecor.beds_on_rightclick(pos, node, clicker)
-- return itemstack
@ -128,6 +130,7 @@ homedecor.register("bed_kingsize", {
inv:add_item("main", "homedecor:bed_regular 2")
end
end,
on_dig = unifieddyes.on_dig,
-- on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
-- homedecor.beds_on_rightclick(pos, node, clicker)
-- return itemstack

View File

@ -286,6 +286,7 @@ for brightness_level = 0, 14 do
after_place_node = function(pos, placer, itemstack, pointed_thing)
unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
end,
on_dig = unifieddyes.on_dig,
on_rightclick = homedecor.toggle_light,
drop = {
items = {
@ -351,6 +352,7 @@ for brightness_level = 0, 14 do
after_place_node = function(pos, placer, itemstack, pointed_thing)
unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
end,
on_dig = unifieddyes.on_dig,
on_rightclick = homedecor.toggle_light,
drop = {
items = {
@ -417,6 +419,7 @@ for brightness_level = 0, 14 do
after_place_node = function(pos, placer, itemstack, pointed_thing)
unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
end,
on_dig = unifieddyes.on_dig,
on_rightclick = homedecor.toggle_light,
drop = {
items = {
@ -637,6 +640,7 @@ for brightness_level = 0, 14 do
after_place_node = function(pos, placer, itemstack, pointed_thing)
unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)
end,
on_dig = unifieddyes.on_dig,
on_rotate = unifieddyes.fix_after_screwdriver_nsew,
light_source = brightness_level,
on_rightclick = homedecor.toggle_light,
@ -714,7 +718,8 @@ for brightness_level = 0, 14 do
digiline = homedecor.digiline_alldir_light,
mesecons = homedecor.mesecon_wall_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, {
@ -745,7 +750,8 @@ for brightness_level = 0, 14 do
digiline = homedecor.digiline_alldir_light,
mesecons = homedecor.mesecon_wall_light,
on_rightclick = homedecor.toggle_light,
on_punch = digiline_on_punch
on_punch = digiline_on_punch,
on_dig = unifieddyes.on_dig,
})
end

View File

@ -478,6 +478,7 @@ for _, side in ipairs({"diagonal_left", "diagonal_right", "horizontal"}) do
def.airbrush_replacement_node = "homedecor:banister_wood_"..side.."_grey"
def.groups.ud_param2_colorable = 1
def.paramtype2 = "colorfacedir"
def.on_dig = unifieddyes.on_dig
end
homedecor.register(nodename, def)

View File

@ -26,6 +26,7 @@ minetest.register_node(":lrfurn:armchair", {
after_place_node = function(pos, placer, itemstack, pointed_thing)
unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)
end,
on_dig = unifieddyes.on_dig,
on_rotate = unifieddyes.fix_after_screwdriver_nsew,
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
if not clicker:is_player() then
@ -55,6 +56,7 @@ homedecor.register("armchair", {
after_place_node = function(pos, placer, itemstack, pointed_thing)
unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)
end,
on_dig = unifieddyes.on_dig,
on_rotate = unifieddyes.fix_after_screwdriver_nsew,
})

View File

@ -41,6 +41,7 @@ minetest.register_node(":lrfurn:longsofa", {
end
return itemstack
end,
on_dig = unifieddyes.on_dig,
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
if not clicker:is_player() then
return itemstack

View File

@ -153,6 +153,7 @@ homedecor.register("kitchen_chair_padded", {
after_place_node = function(pos, placer, itemstack, pointed_thing)
unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)
end,
on_dig = unifieddyes.on_dig,
on_rotate = unifieddyes.fix_after_screwdriver_nsew,
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
pos.y = pos.y+0 -- where do I put my ass ?

View File

@ -41,6 +41,7 @@ minetest.register_node(":lrfurn:sofa", {
end
return itemstack
end,
on_dig = unifieddyes.on_dig,
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
if not clicker:is_player() then
return itemstack

View File

@ -115,6 +115,7 @@ minetest.register_node(":homedecor:curtain_closed", {
after_place_node = function(pos, placer, itemstack, pointed_thing)
unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
end,
on_dig = unifieddyes.on_dig,
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
minetest.set_node(pos, { name = "homedecor:curtain_open", param2 = node.param2 })
return itemstack
@ -137,6 +138,7 @@ minetest.register_node(":homedecor:curtain_open", {
after_place_node = function(pos, placer, itemstack, pointed_thing)
unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
end,
on_dig = unifieddyes.on_dig,
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
minetest.set_node(pos, { name = "homedecor:curtain_closed", param2 = node.param2 })
return itemstack
@ -243,6 +245,7 @@ homedecor.register("shutter", {
after_place_node = function(pos, placer, itemstack, pointed_thing)
unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
end,
on_dig = unifieddyes.on_dig,
})
homedecor.register("shutter_colored", {
@ -260,6 +263,7 @@ homedecor.register("shutter_colored", {
after_place_node = function(pos, placer, itemstack, pointed_thing)
unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
end,
on_dig = unifieddyes.on_dig,
})
minetest.register_alias("homedecor:shutter_purple", "homedecor:shutter_violet")

View File

@ -38,6 +38,7 @@ 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,
on_dig = unifieddyes.on_dig,
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
node.name = "lavalamp:lavalamp_off"
minetest.swap_node(pos, node)