Compare commits

15 Commits

11 changed files with 618 additions and 160 deletions

0
README.md Executable file → Normal file
View File

8
depends.txt Executable file → Normal file
View File

@ -1,15 +1,9 @@
dye
default?
unifieddyes?
coloredwood?
unifiedbricks?
stained_glass?
cotton?
wool?
flags?
blox?
homedecor?
plasticbox?
kerova?
hardenedclay?
clstone?
@ -21,3 +15,5 @@ mydeck?
mycorners?
mymulch?
clothing?
cblocks?
morecolors?

760
init.lua Executable file → Normal file

File diff suppressed because it is too large Load Diff

10
paint_roller.lua Executable file → Normal file
View File

@ -1,5 +1,9 @@
-- This is based upon the paint_roller mod by Krock.
-- if the old color of the block can be identified and is supported, its
-- corresponding dye is added to the player's inventory;
-- if at all possible, the block is colored with the dye that is found in
-- the player's inventory to the right of the paintroller
minetest.register_tool("colormachine:paint_roller", {
description = "Paint roller",
inventory_image = "paint_roller.png",
@ -22,9 +26,9 @@ minetest.register_tool("colormachine:paint_roller", {
local stack = inv:get_stack("main", idx) --dye
local stack_name = stack:get_name()
local res = colormachine.get_node_name_painted( node_name, stack_name );
local res = colormachine.get_node_name_painted( node_name, stack_name, node.param2 );
if( not( res) or not( res.possible ) or #res.possible < 1 or (#res.possible==1 and res.possible[1]==node_name)) then
if( not( res) or not( res.possible ) or #res.possible < 1 or (#res.possible==1 and res.possible[1]==node_name and node.param2==res.param2)) then
return;
end
local index = 1;
@ -45,7 +49,7 @@ minetest.register_tool("colormachine:paint_roller", {
end
-- paint the node
minetest.set_node(pointed_thing.under, {name=res.possible[ index ], param2=node.param2})
minetest.set_node(pointed_thing.under, {name=res.possible[ index ], param2=res.param2})
--itemstack:add_wear( 65535 / 30 );
return itemstack

BIN
textures/colormachine_bottom.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
textures/colormachine_front.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
textures/colormachine_front_active.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
textures/colormachine_side.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
textures/colormachine_top.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
textures/colormachine_top_active.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
textures/paint_roller.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 196 B

After

Width:  |  Height:  |  Size: 417 B