Compare commits
15 Commits
Author | SHA1 | Date | |
---|---|---|---|
890a201456 | |||
5acf71fa61 | |||
e9215fcf31 | |||
3a649a80ad | |||
eb931bba39 | |||
f992fdad52 | |||
cea4794a53 | |||
3764316063 | |||
0a880d88d7 | |||
b8cc8b8624 | |||
59b2415fed | |||
049d8a6196 | |||
ee97687770 | |||
9efadd467d | |||
bb48034a43 |
8
depends.txt
Executable file → Normal 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?
|
||||
|
10
paint_roller.lua
Executable file → Normal 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
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 2.1 KiB |
BIN
textures/colormachine_front.png
Executable file → Normal file
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.4 KiB |
BIN
textures/colormachine_front_active.png
Executable file → Normal file
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.4 KiB |
BIN
textures/colormachine_side.png
Executable file → Normal file
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 2.2 KiB |
BIN
textures/colormachine_top.png
Executable file → Normal file
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.3 KiB |
BIN
textures/colormachine_top_active.png
Executable file → Normal file
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.2 KiB |
BIN
textures/paint_roller.png
Executable file → Normal file
Before Width: | Height: | Size: 196 B After Width: | Height: | Size: 417 B |