[Mod] Paint roller [paint_roller]

Post Reply
User avatar
Krock
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

[Mod] Paint roller [paint_roller]

by Krock » Post

Image
Put the dye to use one slot on the right of the paint roller in your hud bar.
Punch wool or any of the supported nodes to give it a new color.
Spoiler

Code: Select all

Register a single node:
paint_roller.register_one( node_name , dye_group , pack_name )
-> paint_roller.register_one("mymod:node_green", "excolor_green", "My new mod nodes")

Register a table of nodes:
paint_roller.register_table( data_table , pack_name )

Format of data_table: {
     {"mymod:node_white", "excolor_white"},
     {"mymod:node_black", "excolor_black"},
     {"mymod:node_brown", "unicolor_dark_orange"},
}

The dyes have special groups, insert an exact as possible group to your node when you have light and dark tone nodes. Use an unique string to describe your pack, otherwise another will be overwritten.
Craft recipe:

Code: Select all

Wool Wool  Steel
     Steel
     Steel
Depends: wool, coloredwood?
License: CC0
Download: Master *.zip | Browse code
Last edited by Krock on Sun Sep 04, 2016 07:23, edited 6 times in total.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
philipbenr
Member
Posts: 1897
Joined: Fri Jun 14, 2013 01:56
GitHub: philipbenr
IRC: philipbenr
In-game: robinspi
Location: United States

Re: [Mod] Paint roller [paint_roller]

by philipbenr » Post

I like this one better than the spray booth mod. Nice going.

User avatar
lightonflux
Member
Posts: 384
Joined: Mon Nov 11, 2013 07:22
In-game: lof
Location: Germany

Re: [Mod] Paint roller [paint_roller]

by lightonflux » Post

Great mod, nice that you don't have a separate slot for dye or recipe but just the default action bar.

It would be awesome if the tool changes the color, so the tool shows which color is selected.

User avatar
Kilarin
Member
Posts: 894
Joined: Mon Mar 10, 2014 00:36
GitHub: Kilarin

Re: [Mod] Paint roller [paint_roller]

by Kilarin » Post

This looks really cool! I noticed that you are checking the idx<7 to ensure it isn't past the end of the action bar. It was pointed out to me that some mods change the length of the default action bar. After some testing, I decided that checking the index wasn't really necessary. For BridgeTool I left it out, and I'll probably take it out of ExplorerTool on the next update. If you don't check the index, the worst thing that can happen is that the user puts the item in the very last action slot, and if they do so, the logic just wraps around and grabs whatever is on the first inventory square of the row below. Which is intuitive, even if not ideal. And that way, there is no problem with compatibility with any inventory mods that modify the width of the action bar.

Not very important, just an idea to consider. Looks like a GREAT mod, hope to play with it soon!

User avatar
Krock
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: [Mod] Paint roller [paint_roller]

by Krock » Post

*SUPERDUPERMEGABUMP*

The
"Pain Troller" - Calinou
...has returned with a simple coloredwood support.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
Wuzzy
Member
Posts: 4786
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy
Contact:

Re: [Mod] Paint roller [paint_roller]

by Wuzzy » Post

Hi! I happily can announce now the current development snapshot of Color Cubes has optional Paint Roller compatibility!

It took me a while to get the color names right; it seems many color names didn’t work as expected or worked at all … Maybe this is just me.

User avatar
Krock
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: [Mod] Paint roller [paint_roller]

by Krock » Post

Wuzzy wrote:Hi! I happily can announce now the current development snapshot of Color Cubes has optional Paint Roller compatibility!

It took me a while to get the color names right; it seems many color names didn’t work as expected or worked at all … Maybe this is just me.
Thanks for adding support for this mod!
I know that problem, where it doesn't paint them correctly, cause for this is...

http://repo.or.cz/w/minetest_colorcubes ... :/init.lua

Code: Select all

", "excolor_green", "unicolor_dark_green", "
https://github.com/BlockMen/minetest_ne ... e/init.lua

Code: Select all

{"dark_green", "Dark green dye",{dye=1, basecolor_green=1,   excolor_green=1,     unicolor_dark_green=1}},
The paint roller does not know if it should take the "excolor_green" or "unicolor_dark_green" when using dark green dye. To solve this problem, you need to use the "unicolor" groups (if there are 2x green as example)
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

Sokomine
Member
Posts: 4276
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: [Mod] Paint roller [paint_roller]

by Sokomine » Post

As this seems to be a very nice mod, I've added a version of it to my colormachine mod. The colormachine already is mostly about figuring out which block fits to which color, so it can use quite a lot of code that exists already.

As there are sometimes multiple possible ways of painting a block (coloredbricks, blox etc.), applying the same paint multiple times cycles through those options.

The paint roller in my colormachine mod was formed after Krocks idea here. It also shares texture, craft receipe and basic functionality, although its code is a bit diffrent.
A list of my mods can be found here.

User avatar
Wuzzy
Member
Posts: 4786
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy
Contact:

Re: [Mod] Paint roller [paint_roller]

by Wuzzy » Post

Doesn’t that create an incompatibility between the Color Machine mod and this Paint roller mod?

Sokomine
Member
Posts: 4276
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: [Mod] Paint roller [paint_roller]

by Sokomine » Post

Wuzzy wrote: Doesn’t that create an incompatibility between the Color Machine mod and this Paint roller mod?
That's right, it does. The colormachine mod contains a version of the paint roller. I first intended to change this mod here so that it may use the colormachines' functions, which would also have been possible, but in the end it seemed more plain to integrate the paint roller.
A list of my mods can be found here.

Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 20 guests