got rid of the separate brown swatch in the colorwallmounted palette, as
it was being bypassed by the brown-> medium orange translation --
replaced it with light green.
fixed missing colorwallmounted light blue/azure check-and-return in
get_paletteidx()
One call registers the full set of 32, 89, or 256 colors.
Pass it a recipe of the following general form
```lua
unifieddyes.register_color_craft({
output = "mymod:colorized_node",
type = <nil or "shapeless">
palette = <see below>,
neutral_node = "some_mod:neutral_node",
recipe = {
<see below>
}
})
```
palette may be either "wallmounted" (32 colors), false or omitted
entirely (89 colors), or "extended" (256 colors).
The recipe section is either a shapeless list, or a standard three-line
shaped recipe, same as the regular register_craft() function. The key
difference is two placeholder keys that are now supported:
* if an item in the recipe is "MAIN_DYE", then Unified Dyes will, with
each pass of its registration loop, substitute the actual "dye:foo"
craft item in its place which corresponds with the current loop's color.
* if an item in the recipe list is "NEUTRAL_NODE", then the value of the
"neutral_node" field will be substituted in its place.
The expectation here is that the modder probably has some base recipe in
mind that, given no dyes, would result in a neutral, uncolored node. This
call creates all the recipes that would be needed to craft colored versions
of that neutral node either using that base recipe with dye added, or by
crafting the neutral node with some dye after the fact.
if you add `after_place_node = unifieddyes.recolor_on_place,`
to your node def, UD will automatically colorize the node when
placed, using the last dye you colored that kind of node with.
If you switch to some other colorable node, or you run out of whatever
color dye you were using at the time, a warning message will be printed
and the autocolor will be reset back to neutral.
If a player signs off, autocolor for him/her is reset to neutral
(this also helps prevent a minor memory leak)
also get rid of one or two debug prints.
full 256-color range:
24 full hues, with four lighter shades and two darker shades, plus
low-saturation versions of the full and darker shades,
and 16 levels of greyscale
(pass "wallmounted" to the "is_color_fdir" field where needed)
Comes with an abridged, 32-color version of the master palette,
containing Red, Orange, Yellow, Green, Cyan, Blue, Violet, and Magenta,
in three shades each, plus the usual black/three greys/white, plus pink
and brown in two of the extrs spaces.
Note that if the result is greyscale, the name ("black", "grey", ...) is
returned in the "hue" field, sat is empty string, and val is "light",
"dark", or empty string.
(to handle cases where the node has more than just the standard-format
nodename:[shade_]hue[_s50] naming, e.g. stairsplus nodes like:
nodename:stair_[shade_]hue[_s50][_some_extra_details]
rather than directly from flowers.
This mod now depends on "default" and "dye" from the Minetest common
sub-game. Since the default dye mod uses default flowers, this mod no
longer checks for what version of flowers you're using, or even depends
on it.
Bottle-based textures have been replaced with piles of dye powder, based
on the default red dye texture.
All dyes are obtained by crafting, not cooking, for consistency with the
default dye mod.
The somewhat-complicated method using separate "pigment" powders, glass
bottles and "liquid dye base" has been done away with. Now it's just
dry dye powders, as with the default dye mod.
Also, got rid of the whole paint scheme, in favor of dry powders.
All old dyes, paints, and Unified Dyes pigment powders have been aliased
back to the standard dye powders.
If the flowers mod defines "flowers:flower_geranium" (as is the case with my update of 2012-08-01), then those will
be used to get blue pigment powder, and violas will produce violet powder, both of which can be directly used to
create their respective liquid dye colors. If it is not defined (e.g. the user has an older version of the flowers
mod), then violas produce blue dye powder. Violet dye can still be formed by mixing blue and magenta or blue and
red dyes, as before.