forked from minetest-mods/BobBlocks
switch to colored itemstacks
with full crafting recipes (requires Unified Dyes commit 2a816534 or later)
This commit is contained in:
parent
0f2b5b7b2f
commit
31f5af2c58
80
blocks.lua
80
blocks.lua
@ -40,7 +40,6 @@ minetest.register_node("bobblocks:block", {
|
|||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "color",
|
paramtype2 = "color",
|
||||||
palette = "unifieddyes_palette_extended.png",
|
palette = "unifieddyes_palette_extended.png",
|
||||||
place_param2 = 240,
|
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
sounds = default.node_sound_glass_defaults(),
|
sounds = default.node_sound_glass_defaults(),
|
||||||
@ -53,8 +52,6 @@ minetest.register_node("bobblocks:block", {
|
|||||||
},
|
},
|
||||||
on_rightclick = bobblocks.update_bobblock,
|
on_rightclick = bobblocks.update_bobblock,
|
||||||
on_construct = unifieddyes.on_construct,
|
on_construct = unifieddyes.on_construct,
|
||||||
after_place_node = unifieddyes.recolor_on_place,
|
|
||||||
after_dig_node = unifieddyes.after_dig_node
|
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bobblocks:block_off", {
|
minetest.register_node("bobblocks:block_off", {
|
||||||
@ -63,7 +60,6 @@ minetest.register_node("bobblocks:block_off", {
|
|||||||
tiles = {"bobblocks_block.png^[opacity:"..bobblocks.opacity},
|
tiles = {"bobblocks_block.png^[opacity:"..bobblocks.opacity},
|
||||||
paramtype2 = "color",
|
paramtype2 = "color",
|
||||||
palette = "unifieddyes_palette_extended.png",
|
palette = "unifieddyes_palette_extended.png",
|
||||||
place_param2 = 240,
|
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
use_texture_alpha = true,
|
use_texture_alpha = true,
|
||||||
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3,not_in_creative_inventory=1, ud_param2_colorable = 1},
|
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3,not_in_creative_inventory=1, ud_param2_colorable = 1},
|
||||||
@ -75,8 +71,6 @@ minetest.register_node("bobblocks:block_off", {
|
|||||||
},
|
},
|
||||||
on_rightclick = bobblocks.update_bobblock,
|
on_rightclick = bobblocks.update_bobblock,
|
||||||
on_construct = unifieddyes.on_construct,
|
on_construct = unifieddyes.on_construct,
|
||||||
after_place_node = unifieddyes.recolor_on_place,
|
|
||||||
after_dig_node = unifieddyes.after_dig_node
|
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Block Poles
|
-- Block Poles
|
||||||
@ -88,7 +82,6 @@ minetest.register_node("bobblocks:pole", {
|
|||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "color",
|
paramtype2 = "color",
|
||||||
palette = "unifieddyes_palette_extended.png",
|
palette = "unifieddyes_palette_extended.png",
|
||||||
place_param2 = 240,
|
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
sounds = default.node_sound_glass_defaults(),
|
sounds = default.node_sound_glass_defaults(),
|
||||||
@ -101,8 +94,6 @@ minetest.register_node("bobblocks:pole", {
|
|||||||
},
|
},
|
||||||
on_rightclick = bobblocks.update_bobblock,
|
on_rightclick = bobblocks.update_bobblock,
|
||||||
on_construct = unifieddyes.on_construct,
|
on_construct = unifieddyes.on_construct,
|
||||||
after_place_node = unifieddyes.recolor_on_place,
|
|
||||||
after_dig_node = unifieddyes.after_dig_node
|
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bobblocks:pole_off", {
|
minetest.register_node("bobblocks:pole_off", {
|
||||||
@ -112,7 +103,6 @@ minetest.register_node("bobblocks:pole_off", {
|
|||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "color",
|
paramtype2 = "color",
|
||||||
palette = "unifieddyes_palette_extended.png",
|
palette = "unifieddyes_palette_extended.png",
|
||||||
place_param2 = 240,
|
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
use_texture_alpha = true,
|
use_texture_alpha = true,
|
||||||
@ -127,8 +117,6 @@ minetest.register_node("bobblocks:pole_off", {
|
|||||||
},
|
},
|
||||||
on_rightclick = bobblocks.update_bobblock,
|
on_rightclick = bobblocks.update_bobblock,
|
||||||
on_construct = unifieddyes.on_construct,
|
on_construct = unifieddyes.on_construct,
|
||||||
after_place_node = unifieddyes.recolor_on_place,
|
|
||||||
after_dig_node = unifieddyes.after_dig_node
|
|
||||||
})
|
})
|
||||||
|
|
||||||
-- old nodes grandfathered-in because they have a different texture or usage than the colored ones.
|
-- old nodes grandfathered-in because they have a different texture or usage than the colored ones.
|
||||||
@ -150,7 +138,6 @@ minetest.register_node("bobblocks:wavyblock", {
|
|||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "color",
|
paramtype2 = "color",
|
||||||
palette = "unifieddyes_palette_extended.png",
|
palette = "unifieddyes_palette_extended.png",
|
||||||
place_param2 = 240,
|
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
sounds = default.node_sound_glass_defaults(),
|
sounds = default.node_sound_glass_defaults(),
|
||||||
@ -164,8 +151,6 @@ minetest.register_node("bobblocks:wavyblock", {
|
|||||||
},
|
},
|
||||||
on_rightclick = bobblocks.update_bobblock,
|
on_rightclick = bobblocks.update_bobblock,
|
||||||
on_construct = unifieddyes.on_construct,
|
on_construct = unifieddyes.on_construct,
|
||||||
after_place_node = unifieddyes.recolor_on_place,
|
|
||||||
after_dig_node = unifieddyes.after_dig_node
|
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bobblocks:wavyblock_off", {
|
minetest.register_node("bobblocks:wavyblock_off", {
|
||||||
@ -174,7 +159,6 @@ minetest.register_node("bobblocks:wavyblock_off", {
|
|||||||
tiles = {"bobblocks_wavyblock.png^[opacity:"..bobblocks.opacity},
|
tiles = {"bobblocks_wavyblock.png^[opacity:"..bobblocks.opacity},
|
||||||
paramtype2 = "color",
|
paramtype2 = "color",
|
||||||
palette = "unifieddyes_palette_extended.png",
|
palette = "unifieddyes_palette_extended.png",
|
||||||
place_param2 = 240,
|
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
use_texture_alpha = true,
|
use_texture_alpha = true,
|
||||||
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3,not_in_creative_inventory=1, ud_param2_colorable = 1},
|
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3,not_in_creative_inventory=1, ud_param2_colorable = 1},
|
||||||
@ -187,8 +171,6 @@ minetest.register_node("bobblocks:wavyblock_off", {
|
|||||||
},
|
},
|
||||||
on_rightclick = bobblocks.update_bobblock,
|
on_rightclick = bobblocks.update_bobblock,
|
||||||
on_construct = unifieddyes.on_construct,
|
on_construct = unifieddyes.on_construct,
|
||||||
after_place_node = unifieddyes.recolor_on_place,
|
|
||||||
after_dig_node = unifieddyes.after_dig_node
|
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bobblocks:wavypole", {
|
minetest.register_node("bobblocks:wavypole", {
|
||||||
@ -199,14 +181,11 @@ minetest.register_node("bobblocks:wavypole", {
|
|||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "color",
|
paramtype2 = "color",
|
||||||
palette = "unifieddyes_palette_extended.png",
|
palette = "unifieddyes_palette_extended.png",
|
||||||
place_param2 = 240,
|
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
sounds = default.node_sound_glass_defaults(),
|
sounds = default.node_sound_glass_defaults(),
|
||||||
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},
|
||||||
on_construct = unifieddyes.on_construct,
|
on_construct = unifieddyes.on_construct,
|
||||||
after_place_node = unifieddyes.recolor_on_place,
|
|
||||||
after_dig_node = unifieddyes.after_dig_node,
|
|
||||||
--light_source = LIGHT_MAX-0,
|
--light_source = LIGHT_MAX-0,
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -231,6 +210,17 @@ minetest.register_craft({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
unifieddyes.register_color_craft({
|
||||||
|
output = "bobblocks:block",
|
||||||
|
palette = "extended",
|
||||||
|
type = "shapeless",
|
||||||
|
neutral_node = "bobblocks:block",
|
||||||
|
recipe = {
|
||||||
|
"NEUTRAL_NODE",
|
||||||
|
"MAIN_DYE"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "bobblocks:pole",
|
output = "bobblocks:pole",
|
||||||
recipe = {
|
recipe = {
|
||||||
@ -238,15 +228,50 @@ minetest.register_craft({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
unifieddyes.register_color_craft({
|
||||||
|
output = "bobblocks:pole",
|
||||||
|
palette = "extended",
|
||||||
|
type = "shapeless",
|
||||||
|
neutral_node = "bobblocks:pole",
|
||||||
|
recipe = {
|
||||||
|
"NEUTRAL_NODE",
|
||||||
|
"MAIN_DYE"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "bobblocks:wavyblock 2",
|
output = "bobblocks:wavyblock 2",
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
recipe = {
|
recipe = {
|
||||||
"bobblocks:block",
|
"bobblocks:block",
|
||||||
"bobblocks:block"
|
"default:cobble"
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
unifieddyes.register_color_craft({
|
||||||
|
output = "bobblocks:wavyblock 2",
|
||||||
|
palette = "extended",
|
||||||
|
type = "shapeless",
|
||||||
|
neutral_node = "bobblocks:block",
|
||||||
|
recipe = {
|
||||||
|
"MAIN_DYE",
|
||||||
|
"NEUTRAL_NODE",
|
||||||
|
"default:cobble"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
unifieddyes.register_color_craft({
|
||||||
|
output = "bobblocks:wavyblock",
|
||||||
|
palette = "extended",
|
||||||
|
type = "shapeless",
|
||||||
|
neutral_node = "bobblocks:wavyblock",
|
||||||
|
recipe = {
|
||||||
|
"MAIN_DYE",
|
||||||
|
"NEUTRAL_NODE"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "bobblocks:wavypole",
|
output = "bobblocks:wavypole",
|
||||||
recipe = {
|
recipe = {
|
||||||
@ -254,6 +279,17 @@ minetest.register_craft({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
unifieddyes.register_color_craft({
|
||||||
|
output = "bobblocks:wavypole",
|
||||||
|
palette = "extended",
|
||||||
|
type = "shapeless",
|
||||||
|
neutral_node = "bobblocks:wavypole",
|
||||||
|
recipe = {
|
||||||
|
"NEUTRAL_NODE",
|
||||||
|
"MAIN_DYE"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
-- Convert old static nodes to the param2 scheme
|
-- Convert old static nodes to the param2 scheme
|
||||||
|
|
||||||
for _, i in ipairs(bobblocks.colorlist) do
|
for _, i in ipairs(bobblocks.colorlist) do
|
||||||
|
Loading…
Reference in New Issue
Block a user