mirror of
https://github.com/minetest-mods/BobBlocks.git
synced 2025-07-12 21:00:24 +02:00
Compare commits
4 Commits
a16e960ac1
...
master
Author | SHA1 | Date | |
---|---|---|---|
7ad7a5e842 | |||
eed93cbc5d | |||
31f5af2c58 | |||
0f2b5b7b2f |
105
blocks.lua
105
blocks.lua
@ -40,7 +40,6 @@ minetest.register_node("bobblocks:block", {
|
||||
paramtype = "light",
|
||||
paramtype2 = "color",
|
||||
palette = "unifieddyes_palette_extended.png",
|
||||
place_param2 = 240,
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = false,
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
@ -53,7 +52,7 @@ minetest.register_node("bobblocks:block", {
|
||||
},
|
||||
on_rightclick = bobblocks.update_bobblock,
|
||||
on_construct = unifieddyes.on_construct,
|
||||
after_dig_node = unifieddyes.after_dig_node
|
||||
on_dig = unifieddyes.on_dig,
|
||||
})
|
||||
|
||||
minetest.register_node("bobblocks:block_off", {
|
||||
@ -62,7 +61,6 @@ minetest.register_node("bobblocks:block_off", {
|
||||
tiles = {"bobblocks_block.png^[opacity:"..bobblocks.opacity},
|
||||
paramtype2 = "color",
|
||||
palette = "unifieddyes_palette_extended.png",
|
||||
place_param2 = 240,
|
||||
is_ground_content = false,
|
||||
use_texture_alpha = true,
|
||||
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3,not_in_creative_inventory=1, ud_param2_colorable = 1},
|
||||
@ -74,7 +72,7 @@ minetest.register_node("bobblocks:block_off", {
|
||||
},
|
||||
on_rightclick = bobblocks.update_bobblock,
|
||||
on_construct = unifieddyes.on_construct,
|
||||
after_dig_node = unifieddyes.after_dig_node
|
||||
on_dig = unifieddyes.on_dig,
|
||||
})
|
||||
|
||||
-- Block Poles
|
||||
@ -86,7 +84,6 @@ minetest.register_node("bobblocks:pole", {
|
||||
paramtype = "light",
|
||||
paramtype2 = "color",
|
||||
palette = "unifieddyes_palette_extended.png",
|
||||
place_param2 = 240,
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = false,
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
@ -99,7 +96,7 @@ minetest.register_node("bobblocks:pole", {
|
||||
},
|
||||
on_rightclick = bobblocks.update_bobblock,
|
||||
on_construct = unifieddyes.on_construct,
|
||||
after_dig_node = unifieddyes.after_dig_node
|
||||
on_dig = unifieddyes.on_dig,
|
||||
})
|
||||
|
||||
minetest.register_node("bobblocks:pole_off", {
|
||||
@ -109,7 +106,6 @@ minetest.register_node("bobblocks:pole_off", {
|
||||
paramtype = "light",
|
||||
paramtype2 = "color",
|
||||
palette = "unifieddyes_palette_extended.png",
|
||||
place_param2 = 240,
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = false,
|
||||
use_texture_alpha = true,
|
||||
@ -124,10 +120,10 @@ minetest.register_node("bobblocks:pole_off", {
|
||||
},
|
||||
on_rightclick = bobblocks.update_bobblock,
|
||||
on_construct = unifieddyes.on_construct,
|
||||
after_dig_node = unifieddyes.after_dig_node
|
||||
on_dig = unifieddyes.on_dig,
|
||||
})
|
||||
|
||||
-- old static 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.
|
||||
|
||||
minetest.register_node("bobblocks:btm", {
|
||||
description = "Bobs TransMorgifier v5",
|
||||
@ -146,7 +142,6 @@ minetest.register_node("bobblocks:wavyblock", {
|
||||
paramtype = "light",
|
||||
paramtype2 = "color",
|
||||
palette = "unifieddyes_palette_extended.png",
|
||||
place_param2 = 240,
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = false,
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
@ -160,7 +155,7 @@ minetest.register_node("bobblocks:wavyblock", {
|
||||
},
|
||||
on_rightclick = bobblocks.update_bobblock,
|
||||
on_construct = unifieddyes.on_construct,
|
||||
after_dig_node = unifieddyes.after_dig_node
|
||||
on_dig = unifieddyes.on_dig,
|
||||
})
|
||||
|
||||
minetest.register_node("bobblocks:wavyblock_off", {
|
||||
@ -169,7 +164,6 @@ minetest.register_node("bobblocks:wavyblock_off", {
|
||||
tiles = {"bobblocks_wavyblock.png^[opacity:"..bobblocks.opacity},
|
||||
paramtype2 = "color",
|
||||
palette = "unifieddyes_palette_extended.png",
|
||||
place_param2 = 240,
|
||||
is_ground_content = false,
|
||||
use_texture_alpha = true,
|
||||
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3,not_in_creative_inventory=1, ud_param2_colorable = 1},
|
||||
@ -182,7 +176,7 @@ minetest.register_node("bobblocks:wavyblock_off", {
|
||||
},
|
||||
on_rightclick = bobblocks.update_bobblock,
|
||||
on_construct = unifieddyes.on_construct,
|
||||
after_dig_node = unifieddyes.after_dig_node
|
||||
on_dig = unifieddyes.on_dig,
|
||||
})
|
||||
|
||||
minetest.register_node("bobblocks:wavypole", {
|
||||
@ -193,13 +187,12 @@ minetest.register_node("bobblocks:wavypole", {
|
||||
paramtype = "light",
|
||||
paramtype2 = "color",
|
||||
palette = "unifieddyes_palette_extended.png",
|
||||
place_param2 = 240,
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = false,
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, ud_param2_colorable = 1},
|
||||
on_construct = unifieddyes.on_construct,
|
||||
after_dig_node = unifieddyes.after_dig_node,
|
||||
on_dig = unifieddyes.on_dig,
|
||||
--light_source = LIGHT_MAX-0,
|
||||
})
|
||||
|
||||
@ -224,6 +217,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({
|
||||
output = "bobblocks:pole",
|
||||
recipe = {
|
||||
@ -231,15 +235,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({
|
||||
output = "bobblocks:wavyblock 2",
|
||||
type = "shapeless",
|
||||
recipe = {
|
||||
"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({
|
||||
output = "bobblocks:wavypole",
|
||||
recipe = {
|
||||
@ -247,6 +286,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
|
||||
|
||||
for _, i in ipairs(bobblocks.colorlist) do
|
||||
@ -278,7 +328,7 @@ minetest.register_lbm({
|
||||
|
||||
-- custom re-mappings to use unified dyes' colors that are most similar to the originals
|
||||
if color == "blue" then
|
||||
newcolor = "medium_skyblue"
|
||||
newcolor = "medium_azure"
|
||||
end
|
||||
if color == "indigo" then
|
||||
newcolor = "light_violet"
|
||||
@ -313,24 +363,3 @@ minetest.register_lbm({
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_lbm({
|
||||
name = "bobblocks:recolor_stuff",
|
||||
label = "Convert 89-color fences to use UD extended palette",
|
||||
run_at_every_load = false,
|
||||
nodenames = {
|
||||
"bobblocks:block",
|
||||
"bobblocks:block_off",
|
||||
"bobblocks:pole",
|
||||
"bobblocks:pole_off",
|
||||
"bobblocks:wavyblock",
|
||||
"bobblocks:wavyblock_off",
|
||||
"bobblocks:wavypole"
|
||||
},
|
||||
action = function(pos, node)
|
||||
local meta = minetest.get_meta(pos)
|
||||
if meta:get_string("palette") ~= "ext" then
|
||||
minetest.swap_node(pos, { name = node.name, param2 = unifieddyes.convert_classic_palette[node.param2] })
|
||||
meta:set_string("palette", "ext")
|
||||
end
|
||||
end
|
||||
})
|
||||
|
Reference in New Issue
Block a user