forked from minetest-mods/BobBlocks
unified dyes uses on_use now, instead of on_rightclick
This commit is contained in:
parent
8f085b2c7f
commit
819effe640
60
blocks.lua
60
blocks.lua
@ -42,18 +42,14 @@ minetest.register_node("bobblocks:block", {
|
|||||||
is_ground_content = true,
|
is_ground_content = true,
|
||||||
sounds = default.node_sound_glass_defaults(),
|
sounds = default.node_sound_glass_defaults(),
|
||||||
light_source = LIGHT_MAX-0,
|
light_source = LIGHT_MAX-0,
|
||||||
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3},
|
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, ud_param2_colorable = 1},
|
||||||
mesecons = {conductor={
|
mesecons = {conductor={
|
||||||
state = mesecon.state.on,
|
state = mesecon.state.on,
|
||||||
offstate = "bobblocks:block_off"
|
offstate = "bobblocks:block_off"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
on_punch = bobblocks.update_bobblock,
|
on_punch = bobblocks.update_bobblock,
|
||||||
after_dig_node = unifieddyes.after_dig_node,
|
after_dig_node = unifieddyes.after_dig_node
|
||||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
|
||||||
unifieddyes.on_rightclick(pos, node, clicker,
|
|
||||||
itemstack, pointed_thing, "bobblocks:block", false)
|
|
||||||
end
|
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bobblocks:block_off", {
|
minetest.register_node("bobblocks:block_off", {
|
||||||
@ -63,19 +59,15 @@ minetest.register_node("bobblocks:block_off", {
|
|||||||
palette = "unifieddyes_palette.png",
|
palette = "unifieddyes_palette.png",
|
||||||
is_ground_content = true,
|
is_ground_content = true,
|
||||||
alpha = WATER_ALPHA,
|
alpha = WATER_ALPHA,
|
||||||
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3,not_in_creative_inventory=1},
|
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3,not_in_creative_inventory=1, ud_param2_colorable = 1},
|
||||||
drop = 'bobblocks:redblock',
|
drop = 'bobblocks:redblock',
|
||||||
mesecons = {conductor={
|
mesecons = {conductor={
|
||||||
state = mesecon.state.off,
|
state = mesecon.state.off,
|
||||||
onstate = "bobblocks:block"
|
onstate = "bobblocks:block"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
on_punch = bobblocks.update_bobblock,
|
on_rightclick = bobblocks.update_bobblock,
|
||||||
after_dig_node = unifieddyes.after_dig_node,
|
after_dig_node = unifieddyes.after_dig_node
|
||||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
|
||||||
unifieddyes.on_rightclick(pos, node, clicker,
|
|
||||||
itemstack, pointed_thing, "bobblocks:block_off", false)
|
|
||||||
end
|
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Block Poles
|
-- Block Poles
|
||||||
@ -91,18 +83,14 @@ minetest.register_node("bobblocks:pole", {
|
|||||||
is_ground_content = true,
|
is_ground_content = true,
|
||||||
sounds = default.node_sound_glass_defaults(),
|
sounds = default.node_sound_glass_defaults(),
|
||||||
light_source = LIGHT_MAX-0,
|
light_source = LIGHT_MAX-0,
|
||||||
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3},
|
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, ud_param2_colorable = 1},
|
||||||
mesecons = {conductor={
|
mesecons = {conductor={
|
||||||
state = mesecon.state.on,
|
state = mesecon.state.on,
|
||||||
offstate = "bobblocks:pole_off"
|
offstate = "bobblocks:pole_off"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
on_punch = bobblocks.update_bobblock,
|
on_rightclick = bobblocks.update_bobblock,
|
||||||
after_dig_node = unifieddyes.after_dig_node,
|
after_dig_node = unifieddyes.after_dig_node
|
||||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
|
||||||
unifieddyes.on_rightclick(pos, node, clicker,
|
|
||||||
itemstack, pointed_thing, "bobblocks:pole", false)
|
|
||||||
end
|
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bobblocks:pole_off", {
|
minetest.register_node("bobblocks:pole_off", {
|
||||||
@ -116,19 +104,15 @@ minetest.register_node("bobblocks:pole_off", {
|
|||||||
is_ground_content = true,
|
is_ground_content = true,
|
||||||
sounds = default.node_sound_glass_defaults(),
|
sounds = default.node_sound_glass_defaults(),
|
||||||
light_source = LIGHT_MAX-10,
|
light_source = LIGHT_MAX-10,
|
||||||
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3,not_in_creative_inventory=1},
|
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3,not_in_creative_inventory=1, ud_param2_colorable = 1},
|
||||||
drop = 'bobblocks:redpole',
|
drop = 'bobblocks:redpole',
|
||||||
mesecons = {conductor={
|
mesecons = {conductor={
|
||||||
state = mesecon.state.off,
|
state = mesecon.state.off,
|
||||||
onstate = "bobblocks:pole"
|
onstate = "bobblocks:pole"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
on_punch = bobblocks.update_bobblock,
|
on_rightclick = bobblocks.update_bobblock,
|
||||||
after_dig_node = unifieddyes.after_dig_node,
|
after_dig_node = unifieddyes.after_dig_node
|
||||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
|
||||||
unifieddyes.on_rightclick(pos, node, clicker,
|
|
||||||
itemstack, pointed_thing, "bobblocks:pole_off", false)
|
|
||||||
end
|
|
||||||
})
|
})
|
||||||
|
|
||||||
-- old static nodes grandfathered-in because they have a different texture or usage than the colored ones.
|
-- old static nodes grandfathered-in because they have a different texture or usage than the colored ones.
|
||||||
@ -155,18 +139,14 @@ minetest.register_node("bobblocks:wavyblock", {
|
|||||||
is_ground_content = true,
|
is_ground_content = true,
|
||||||
sounds = default.node_sound_glass_defaults(),
|
sounds = default.node_sound_glass_defaults(),
|
||||||
light_source = LIGHT_MAX-0,
|
light_source = LIGHT_MAX-0,
|
||||||
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3},
|
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, ud_param2_colorable = 1},
|
||||||
mesecons = {conductor=
|
mesecons = {conductor=
|
||||||
{
|
{
|
||||||
state = mesecon.state.on,
|
state = mesecon.state.on,
|
||||||
offstate = "bobblocks:wavyblock_off"
|
offstate = "bobblocks:wavyblock_off"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
after_dig_node = unifieddyes.after_dig_node,
|
after_dig_node = unifieddyes.after_dig_node
|
||||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
|
||||||
unifieddyes.on_rightclick(pos, node, clicker,
|
|
||||||
itemstack, pointed_thing, "bobblocks:wavyblock", false)
|
|
||||||
end
|
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bobblocks:wavyblock_off", {
|
minetest.register_node("bobblocks:wavyblock_off", {
|
||||||
@ -176,7 +156,7 @@ minetest.register_node("bobblocks:wavyblock_off", {
|
|||||||
palette = "unifieddyes_palette.png",
|
palette = "unifieddyes_palette.png",
|
||||||
is_ground_content = true,
|
is_ground_content = true,
|
||||||
alpha = WATER_ALPHA,
|
alpha = WATER_ALPHA,
|
||||||
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3,not_in_creative_inventory=1},
|
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3,not_in_creative_inventory=1, ud_param2_colorable = 1},
|
||||||
drop = 'bobblocks:wavyblock',
|
drop = 'bobblocks:wavyblock',
|
||||||
mesecons = {conductor=
|
mesecons = {conductor=
|
||||||
{
|
{
|
||||||
@ -184,11 +164,7 @@ minetest.register_node("bobblocks:wavyblock_off", {
|
|||||||
onstate = "bobblocks:wavyblock"
|
onstate = "bobblocks:wavyblock"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
after_dig_node = unifieddyes.after_dig_node,
|
after_dig_node = unifieddyes.after_dig_node
|
||||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
|
||||||
unifieddyes.on_rightclick(pos, node, clicker,
|
|
||||||
itemstack, pointed_thing, "bobblocks:wavyblock_off", false)
|
|
||||||
end
|
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bobblocks:wavypole", {
|
minetest.register_node("bobblocks:wavypole", {
|
||||||
@ -202,12 +178,8 @@ minetest.register_node("bobblocks:wavypole", {
|
|||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
is_ground_content = true,
|
is_ground_content = true,
|
||||||
sounds = default.node_sound_glass_defaults(),
|
sounds = default.node_sound_glass_defaults(),
|
||||||
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3},
|
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, ud_param2_colorable = 1},
|
||||||
after_dig_node = unifieddyes.after_dig_node,
|
after_dig_node = unifieddyes.after_dig_node,
|
||||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
|
||||||
unifieddyes.on_rightclick(pos, node, clicker,
|
|
||||||
itemstack, pointed_thing, "bobblocks:wavypole", false)
|
|
||||||
end
|
|
||||||
--light_source = LIGHT_MAX-0,
|
--light_source = LIGHT_MAX-0,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user