Compare commits

...

19 Commits

Author SHA1 Message Date
ac8e6ca8f7 Fix deprecated use of use_texture_alpha
To avoid warning messages at boot time.
Breaks Minetest 5.4< compatibility.
2021-02-28 13:46:45 +01:00
422d94e311 Prevents loss of color when digging an off block 2021-02-28 13:33:50 +01:00
54614811d6 Add files via upload 2020-11-03 06:23:14 -05:00
d18c76b578 Add files via upload 2020-11-03 06:22:02 -05:00
4852ee7200 Add files via upload 2020-11-03 06:20:57 -05:00
27c170fbed Merge pull request #6 from Panquesito7/master
Use mod.conf for dependencies and description
2020-11-03 06:04:06 -05:00
be5478c88b Merge pull request #5 from VanessaE/master
use Unified Dyes on_dig where needed
2020-11-03 06:02:49 -05:00
69cc65bc8a Update init.lua 2020-11-03 05:57:54 -05:00
dbdaee8eed Update readme.txt 2020-11-03 05:55:55 -05:00
b900a7aff3 Merge pull request #4 from minetest-mods/master
Pull from minetest-mods
2020-11-03 05:24:55 -05:00
437275f8e4 Update blocks.lua ahead of Pull Request 2020-11-03 05:19:35 -05:00
1280300a4a Empêche la perte de couleur à la récolte du bloc éteint 2020-01-04 15:00:40 +01:00
d598f02bcd Use mod.conf for dependencies and description
Deletes deprecated 'depends.txt' and 'description.txt'.
2019-10-28 16:29:12 -06:00
7ad7a5e842 Use Unified Dyes on_dig where needed (#3)
Requires Unified Dyes commit 9ff40a7f or later
2019-07-21 12:36:41 +02:00
e0ff72b43f use Unified Dyes on_dig where needed
requires UD commit 9ff40a7f or later
2019-07-18 02:04:51 -04:00
eed93cbc5d get rid of old 89->256 color LBM
(it'll only crash now, and is obsolete)
also fixed a wrong/outdated color translation.
2018-09-30 20:54:27 -07:00
31f5af2c58 switch to colored itemstacks
with full crafting recipes
(requires Unified Dyes commit 2a816534 or later)
2018-09-30 20:54:27 -07:00
0f2b5b7b2f use unified dyes auto-recolor feature 2017-03-18 05:50:11 -04:00
20221b2618 minetest.env:* --> minetest.* (#2)
* minetest.env:* --> minetest.*

* tile_images --> tiles

* Add standard mod files.

* Rewrote the mod to use the new param2 color method
New dependency on Unified Dyes.

This change comes with a few neutral-to-positive side effects:

1) Minor recipe changes were necessary since there are only two blocks and
   two poles now.
2) All recipes, node names, etc. were updated to current minetest API.
3) Where recipes called for leaves or sticks, I used groups.
4) the "wavy" (formerly "grey") block and fence/pole can now be
   colored as well.
5) Inside the conversion LBM, some of the original colors were re-mapped
   to the closest Unified Dyes equivalents, to try to keep the on-screen
   appearance mostly the same after conversion.
6) Aside from "BTM" and "Health", all block and pole nodes can take on the
   entire Unified Dyes palette instead of just the 9 originally offered.

Mod works the same as others that depend on Unified Dyes - craft and place
a block or pole, then right-click on it with dye to colorize it.

* unified dyes uses on_use now, instead of on_rightclick

* don't run the LBM at every load
2017-02-19 08:12:17 -05:00
33 changed files with 98 additions and 60 deletions

View File

@ -18,7 +18,7 @@ bobblocks.colorlist = {
bobblocks.opacity = 150 -- Opacity: 0-255; 0 Full transparent, 255 Full opaque
bobblocks.update_bobblock = function (pos, node)
local function update_bobblock(pos, node)
local newnode = node
if string.find(newnode.name, "_off") then
newnode.name = string.sub(newnode.name, 1, -5)
@ -31,6 +31,13 @@ bobblocks.update_bobblock = function (pos, node)
{pos = pos, gain = 1.0, max_hear_distance = 32,})
end
bobblocks.update_bobblock = update_bobblock
local function dig_block(pos, node, digger)
update_bobblock(pos, node)
return unifieddyes.on_dig(pos, node, digger)
end
-- Nodes
minetest.register_node("bobblocks:block", {
@ -40,7 +47,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(),
@ -51,9 +57,9 @@ minetest.register_node("bobblocks:block", {
offstate = "bobblocks:block_off"
}
},
on_rightclick = bobblocks.update_bobblock,
on_rightclick = 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,19 +68,17 @@ 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,
use_texture_alpha = "blend",
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3,not_in_creative_inventory=1, ud_param2_colorable = 1},
drop = "bobblocks:block",
mesecons = {conductor={
state = mesecon.state.off,
onstate = "bobblocks:block"
}
},
on_rightclick = bobblocks.update_bobblock,
on_rightclick = update_bobblock,
on_construct = unifieddyes.on_construct,
after_dig_node = unifieddyes.after_dig_node
on_dig = dig_block,
})
-- Block Poles
@ -86,7 +90,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(),
@ -97,9 +100,9 @@ minetest.register_node("bobblocks:pole", {
offstate = "bobblocks:pole_off"
}
},
on_rightclick = bobblocks.update_bobblock,
on_rightclick = 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,25 +112,23 @@ 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,
use_texture_alpha = "blend",
sounds = default.node_sound_glass_defaults(),
light_source = LIGHT_MAX-10,
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3,not_in_creative_inventory=1, ud_param2_colorable = 1},
drop = 'bobblocks:pole',
mesecons = {conductor={
state = mesecon.state.off,
onstate = "bobblocks:pole"
}
},
on_rightclick = bobblocks.update_bobblock,
on_rightclick = update_bobblock,
on_construct = unifieddyes.on_construct,
after_dig_node = unifieddyes.after_dig_node
on_dig = dig_block,
})
-- 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 +147,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(),
@ -158,9 +158,9 @@ minetest.register_node("bobblocks:wavyblock", {
offstate = "bobblocks:wavyblock_off"
}
},
on_rightclick = bobblocks.update_bobblock,
on_rightclick = 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,20 +169,18 @@ 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,
use_texture_alpha = "blend",
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3,not_in_creative_inventory=1, ud_param2_colorable = 1},
drop = "bobblocks:wavyblock",
mesecons = {conductor=
{
state = mesecon.state.off,
onstate = "bobblocks:wavyblock"
}
},
on_rightclick = bobblocks.update_bobblock,
on_rightclick = update_bobblock,
on_construct = unifieddyes.on_construct,
after_dig_node = unifieddyes.after_dig_node
on_dig = dig_block,
})
minetest.register_node("bobblocks:wavypole", {
@ -193,13 +191,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 +221,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 +239,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 +290,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 +332,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 +367,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
})

View File

@ -1,3 +0,0 @@
default
mesecons
unifieddyes

View File

@ -1 +0,0 @@
Add some colorful nodes to building and also to add light.

View File

@ -1,4 +1,4 @@
print("[BobBlocks By minetest@rabbibob.com] Version 0.0.8 loading....")
print("[BobBlocks By minetest@rabbibob.com] Version 0.0.9 loading....")
print("[BobBlocks] loading Blocks")
dofile(minetest.get_modpath("bobblocks") .. "/blocks.lua")
print("[BobBlocks] loaded Blocks")
@ -8,4 +8,4 @@ print("[BobBlocks] loaded Health")
print("[BobBlocks] loading Traps")
dofile(minetest.get_modpath("bobblocks") .. "/trap.lua")
print("[BobBlocks] loaded Traps")
print("[BobBlocks By minetest@rabbibob.com] Version 0.0.8 loaded!")
print("[BobBlocks By minetest@rabbibob.com] Version 0.0.9 loaded!")

View File

@ -1 +1,3 @@
name = bobblocks
depends = default, mesecons, unifieddyes
description = Add some colorful nodes to building and also to add light.

View File

@ -1,8 +1,15 @@
-- BobBlocks v0.0.8
-- (Minetest 0.4.5 compatible 20130315)
-- BobBlocks v0.0.9
-- (Minetest 5.3.0 compatible 20201103)
-- http://forum.minetest.net/viewtopic.php?id=1274
--------------------------------------------------------------------------
--------------------------------------------------------------------------
-- Full dependencies (including sub-dependencies):
-- basic_materials
-- mesecons
-- moreores
-- unifieddyes
---- Notes prior to v0.0.9
-- Requirements: Mesecons --
-- http://forum.minetest.net/viewtopic.php?id=628 --
-- --
@ -50,4 +57,4 @@
# http://www.freesound.org/people/Rock%20Savage/sounds/65924/#
# Edited by rabbibob
# bobblocks_health
# http://hamsterrepublic.com/ohrrpgce/Free_Sound_Effects.html
# http://hamsterrepublic.com/ohrrpgce/Free_Sound_Effects.html

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB