1
0
mirror of https://github.com/Sokomine/colormachine.git synced 2025-06-29 23:10:48 +02:00

Compare commits

1 Commits

Author SHA1 Message Date
fd988cf650 Version MFF. 2018-09-06 22:40:52 +02:00
11 changed files with 160 additions and 618 deletions

0
README.md Normal file → Executable file
View File

8
depends.txt Normal file → Executable file
View File

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

760
init.lua Normal file → Executable file

File diff suppressed because it is too large Load Diff

10
paint_roller.lua Normal file → Executable file
View File

@ -1,9 +1,5 @@
-- 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",
@ -26,9 +22,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, node.param2 );
local res = colormachine.get_node_name_painted( node_name, stack_name );
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
if( not( res) or not( res.possible ) or #res.possible < 1 or (#res.possible==1 and res.possible[1]==node_name)) then
return;
end
local index = 1;
@ -49,7 +45,7 @@ minetest.register_tool("colormachine:paint_roller", {
end
-- paint the node
minetest.set_node(pointed_thing.under, {name=res.possible[ index ], param2=res.param2})
minetest.set_node(pointed_thing.under, {name=res.possible[ index ], param2=node.param2})
--itemstack:add_wear( 65535 / 30 );
return itemstack

BIN
textures/colormachine_bottom.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
textures/colormachine_front.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
textures/colormachine_front_active.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
textures/colormachine_side.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
textures/colormachine_top.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
textures/colormachine_top_active.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
textures/paint_roller.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 417 B

After

Width:  |  Height:  |  Size: 196 B