Compare commits
39 Commits
2018-08-27
...
2019-05-25
Author | SHA1 | Date | |
---|---|---|---|
10ab87bf65 | |||
f59c8affc1 | |||
667bce80b9 | |||
5039a8ce07 | |||
13a8cbb38f | |||
58dd71e561 | |||
1fd850d37c | |||
334de564fd | |||
545968517b | |||
368205d3b8 | |||
feed6d5aae | |||
4811847655 | |||
44629935d2 | |||
ccbedcd3d6 | |||
622d09a243 | |||
27fe090395 | |||
230ac1342a | |||
e921095006 | |||
3eb3a9a330 | |||
078a998d29 | |||
4b88997360 | |||
ef7d357e0b | |||
66774213e2 | |||
ad21862eee | |||
ad12387432 | |||
7b18314235 | |||
73a062f026 | |||
0413f23df1 | |||
8fbd9cd23b | |||
997d703b94 | |||
95f009a282 | |||
fb2c14b4a8 | |||
42093582df | |||
3cbb25d92a | |||
0589d8f02e | |||
fc199cced4 | |||
da9ab7215c | |||
19febc877d | |||
c3036aba00 |
11
API.md
@ -28,7 +28,9 @@ minetest.register_node("mymod:colored_node", {
|
|||||||
- "unifieddyes_palette_colorwallmounted.png"
|
- "unifieddyes_palette_colorwallmounted.png"
|
||||||
- or one of the "split" hues palettes (see below).
|
- or one of the "split" hues palettes (see below).
|
||||||
|
|
||||||
`groups`: If your node can be colored by punching it with dye, its groups entry must contain the key ud_param2_colorable = 1, among whatever else you'd normally put there. If the node is software-controlled, as might be the case for some mesecons-digilines aware node, then this group key should be omitted.
|
`groups`: If your node can be colored by using the airbrush, its groups entry must contain the key ud_param2_colorable = 1, among whatever else you'd normally put there. If the node is software-controlled, as might be the case for some mesecons-digilines aware node, then this group key should be omitted.
|
||||||
|
|
||||||
|
If your node if of the kind where you need the split palette, but you need to put the *full color name* into the node name, as opposed to just the hue, then add the keys `ud_color_start` and `ud_color_end` and set them to the positions of the first and last characters of the color name (where 1 is the first character of the mod name at the start of the node name, i.e. "mymod:foo_bar_orange_baz" would have the start set to 15 and the end at 20).
|
||||||
|
|
||||||
`on_construct`: see below.
|
`on_construct`: see below.
|
||||||
|
|
||||||
@ -115,12 +117,17 @@ This will loop through all of Unified Dyes' color lists, generating one recipe f
|
|||||||
|
|
||||||
`recipe` is the same as in the normal call, except that Unified Dyes will replace all instances of the string "NEUTRAL_NODE" with the item specified in the preceding `neutral_node` field. Every instance of "MAIN_DYE" will be replaced with a portion of dye, as Unified Dyes' recipe helper works through its color lists (i.e. this field will become whatever dye is needed for each recipe).
|
`recipe` is the same as in the normal call, except that Unified Dyes will replace all instances of the string "NEUTRAL_NODE" with the item specified in the preceding `neutral_node` field. Every instance of "MAIN_DYE" will be replaced with a portion of dye, as Unified Dyes' recipe helper works through its color lists (i.e. this field will become whatever dye is needed for each recipe).
|
||||||
|
|
||||||
`output_prefix` and `output_suffix`, if specified (must use both if at all), will cause the recipe registration to ignore the usual `output` field, and instead set to the output item to `output_prefix` + (hue) + `output_suffix`. Used for mods that use the split 89-color palette. `hue` will thus be one of the 12 hues, or "grey", as defined by the split palettes.
|
`output_prefix` and `output_suffix`, if specified (must use both if at all), will cause the recipe registration to set to the output item to `output_prefix` + (hue) + `output_suffix` + `output`. Used for mods that use the split 89-color palette. `hue` will thus be one of the 12 hues, or "grey", as defined by the split palettes. In this situation, you can set `output` to your recipe yield (with a leading space) if needed. For example, if the prefix is "foo:bar", the suffix is "baz", and the output is set to " 3", then the craft helper will generate output item strings of the form "foo:bar_COLOR_baz 3", for each color in the table.
|
||||||
|
|
||||||
**`unifieddyes.make_colored_itemstack(itemstack, palette, color)`**
|
**`unifieddyes.make_colored_itemstack(itemstack, palette, color)`**
|
||||||
|
|
||||||
Makes a colored itemstack out of the given `itemstack` and `color` (as a dye, e.g. "dye:dark_red_s50"), setting the correct index per the `palette` field, which works as described above for `unifieddyes.getpaletteidx()`. Said itemstack is returned as a string suitable for use as the output field of a craft recipe, equal in size to the itemstack passed into the function (e.g. if you give it "mymod:colored_node 7", it'll return a stack of 7 colored items).
|
Makes a colored itemstack out of the given `itemstack` and `color` (as a dye, e.g. "dye:dark_red_s50"), setting the correct index per the `palette` field, which works as described above for `unifieddyes.getpaletteidx()`. Said itemstack is returned as a string suitable for use as the output field of a craft recipe, equal in size to the itemstack passed into the function (e.g. if you give it "mymod:colored_node 7", it'll return a stack of 7 colored items).
|
||||||
|
|
||||||
|
**`unifieddyes.generate_split_palette_nodes(name, def, drop)`**
|
||||||
|
|
||||||
|
Does just what it sounds like - it registers all the nodes that are needed for a given base node (`def`) to be able to use the split palette, each named according to `name`, with the palette hue appended. If a custom drop is needed, it can be passed along (only a string is allowed here, specifying a single item).
|
||||||
|
|
||||||
|
|
||||||
#### Tables
|
#### Tables
|
||||||
|
|
||||||
In addition to the above API calls, Unified Dyes provides several useful tables
|
In addition to the above API calls, Unified Dyes provides several useful tables
|
||||||
|
90
colors.txt
@ -1,90 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
Full-saturation colors:
|
|
||||||
-----------------------
|
|
||||||
|
|
||||||
dark aqua 0, 84, 42 unifieddyes_dark_aqua.png
|
|
||||||
dark blue 0, 0, 84 unifieddyes_dark_blue.png
|
|
||||||
dark cyan 0, 84, 83 unifieddyes_dark_cyan.png
|
|
||||||
dark green 0, 84, 0 unifieddyes_dark_green.png
|
|
||||||
dark lime 43, 84, 0 unifieddyes_dark_lime.png
|
|
||||||
dark magenta 84, 0, 83 unifieddyes_dark_magenta.png
|
|
||||||
dark orange 84, 42, 0 unifieddyes_dark_orange.png
|
|
||||||
dark red 84, 0, 0 unifieddyes_dark_red.png
|
|
||||||
dark redviolet 84, 0, 42 unifieddyes_dark_redviolet.png
|
|
||||||
dark skyblue 0, 42, 84 unifieddyes_dark_skyblue.png
|
|
||||||
dark violet 43, 0, 84 unifieddyes_dark_violet.png
|
|
||||||
dark yellow 84, 83, 0 unifieddyes_dark_yellow.png
|
|
||||||
medium aqua 0,169, 84 unifieddyes_medium_aqua.png
|
|
||||||
medium blue 0, 0,169 unifieddyes_medium_blue.png
|
|
||||||
medium cyan 0,169,167 unifieddyes_medium_cyan.png
|
|
||||||
medium green 0,169, 0 unifieddyes_medium_green.png
|
|
||||||
medium lime 87,169, 0 unifieddyes_medium_lime.png
|
|
||||||
medium magenta 169, 0,167 unifieddyes_medium_magenta.png
|
|
||||||
medium orange 169, 84, 0 unifieddyes_medium_orange.png
|
|
||||||
medium red 168, 0, 0 unifieddyes_medium_red.png
|
|
||||||
medium redviolet 169, 0, 84 unifieddyes_medium_redviolet.png
|
|
||||||
medium skyblue 0, 84,169 unifieddyes_medium_skyblue.png
|
|
||||||
medium violet 87, 0,169 unifieddyes_medium_violet.png
|
|
||||||
medium yellow 169,167, 0 unifieddyes_medium_yellow.png
|
|
||||||
aqua 1,255,127 unifieddyes_aqua.png
|
|
||||||
blue 1, 1,255 unifieddyes_blue.png
|
|
||||||
cyan 1,255,252 unifieddyes_cyan.png
|
|
||||||
green 1,255, 1 unifieddyes_green.png
|
|
||||||
lime 132,255, 1 unifieddyes_lime.png
|
|
||||||
magenta 255, 1,252 unifieddyes_magenta.png
|
|
||||||
orange 255,127, 1 unifieddyes_orange.png
|
|
||||||
red 255, 0, 0 unifieddyes_red.png
|
|
||||||
redviolet 255, 1,127 unifieddyes_redviolet.png
|
|
||||||
skyblue 1,127,255 unifieddyes_skyblue.png
|
|
||||||
violet 132, 1,255 unifieddyes_violet.png
|
|
||||||
yellow 255,252, 1 unifieddyes_yellow.png
|
|
||||||
|
|
||||||
Low-saturation colors:
|
|
||||||
----------------------
|
|
||||||
|
|
||||||
dark aqua 50% saturation 21, 63, 42 unifieddyes_dark_aqua_s50.png
|
|
||||||
dark blue 50% saturation 21, 21, 63 unifieddyes_dark_blue_s50.png
|
|
||||||
dark cyan 50% saturation 21, 63, 63 unifieddyes_dark_cyan_s50.png
|
|
||||||
dark green 50% saturation 21, 63, 21 unifieddyes_dark_green_s50.png
|
|
||||||
dark lime 50% saturation 43, 63, 21 unifieddyes_dark_lime_s50.png
|
|
||||||
dark magenta 50% saturation 63, 21, 63 unifieddyes_dark_magenta_s50.png
|
|
||||||
dark orange 50% saturation 63, 42, 21 unifieddyes_dark_orange_s50.png
|
|
||||||
dark red 50% saturation 63, 21, 21 unifieddyes_dark_red_s50.png
|
|
||||||
dark redviolet 50% saturation 63, 21, 42 unifieddyes_dark_redviolet_s50.png
|
|
||||||
dark skyblue 50% saturation 21, 42, 63 unifieddyes_dark_skyblue_s50.png
|
|
||||||
dark violet 50% saturation 43, 21, 63 unifieddyes_dark_violet_s50.png
|
|
||||||
dark yellow 50% saturation 63, 63, 21 unifieddyes_dark_yellow_s50.png
|
|
||||||
medium aqua 50% saturation 42,126, 84 unifieddyes_medium_aqua_s50.png
|
|
||||||
medium blue 50% saturation 42, 42,126 unifieddyes_medium_blue_s50.png
|
|
||||||
medium cyan 50% saturation 42,126,126 unifieddyes_medium_cyan_s50.png
|
|
||||||
medium green 50% saturation 42,126, 42 unifieddyes_medium_green_s50.png
|
|
||||||
medium lime 50% saturation 86,126, 42 unifieddyes_medium_lime_s50.png
|
|
||||||
medium magenta 50% saturation 126, 42,126 unifieddyes_medium_magenta_s50.png
|
|
||||||
medium orange 50% saturation 126, 84, 42 unifieddyes_medium_orange_s50.png
|
|
||||||
medium red 50% saturation 127, 42, 42 unifieddyes_medium_red_s50.png
|
|
||||||
medium redviolet 50% saturation 126, 42, 84 unifieddyes_medium_redviolet_s50.png
|
|
||||||
medium skyblue 50% saturation 42, 84,126 unifieddyes_medium_skyblue_s50.png
|
|
||||||
medium violet 50% saturation 86, 42,126 unifieddyes_medium_violet_s50.png
|
|
||||||
medium yellow 50% saturation 126,126, 42 unifieddyes_medium_yellow_s50.png
|
|
||||||
aqua 50% saturation 65,191,127 unifieddyes_aqua_s50.png
|
|
||||||
blue 50% saturation 65, 65,191 unifieddyes_blue_s50.png
|
|
||||||
cyan 50% saturation 65,191,190 unifieddyes_cyan_s50.png
|
|
||||||
green 50% saturation 65,191, 65 unifieddyes_green_s50.png
|
|
||||||
lime 50% saturation 130,191, 65 unifieddyes_lime_s50.png
|
|
||||||
magenta 50% saturation 191, 65,190 unifieddyes_magenta_s50.png
|
|
||||||
orange 50% saturation 191,127, 65 unifieddyes_orange_s50.png
|
|
||||||
red 50% saturation 192, 64, 64 unifieddyes_red_s50.png
|
|
||||||
redviolet 50% saturation 191, 65,127 unifieddyes_redviolet_s50.png
|
|
||||||
skyblue 50% saturation 65,127,191 unifieddyes_skyblue_s50.png
|
|
||||||
violet 50% saturation 130, 65,191 unifieddyes_violet_s50.png
|
|
||||||
yellow 50% saturation 191,190, 65 unifieddyes_yellow_s50.png
|
|
||||||
|
|
||||||
Greyscale:
|
|
||||||
----------
|
|
||||||
|
|
||||||
black 0, 0, 0 unifieddyes_black.png
|
|
||||||
dark grey 64, 64, 64 unifieddyes_darkgrey_paint.png
|
|
||||||
medium grey 128,128,128 unifieddyes_grey_paint.png
|
|
||||||
light grey 192,192,192 unifieddyes_lightgrey_paint.png
|
|
||||||
white 255,255,255 unifieddyes_white_paint.png
|
|
Before Width: | Height: | Size: 140 B After Width: | Height: | Size: 140 B |
BIN
textures/unifieddyes_onhand_unavailable_overlay.png
Normal file
After Width: | Height: | Size: 319 B |
Before Width: | Height: | Size: 207 B |
BIN
textures/unifieddyes_palette_ambers.png
Normal file
After Width: | Height: | Size: 93 B |
BIN
textures/unifieddyes_palette_azures.png
Normal file
After Width: | Height: | Size: 91 B |
Before Width: | Height: | Size: 99 B After Width: | Height: | Size: 91 B |
BIN
textures/unifieddyes_palette_ceruleans.png
Normal file
After Width: | Height: | Size: 93 B |
BIN
textures/unifieddyes_palette_chartreuses.png
Normal file
After Width: | Height: | Size: 91 B |
BIN
textures/unifieddyes_palette_crimsons.png
Normal file
After Width: | Height: | Size: 91 B |
Before Width: | Height: | Size: 101 B After Width: | Height: | Size: 91 B |
BIN
textures/unifieddyes_palette_fuchsias.png
Normal file
After Width: | Height: | Size: 93 B |
Before Width: | Height: | Size: 91 B After Width: | Height: | Size: 91 B |
BIN
textures/unifieddyes_palette_harlequins.png
Normal file
After Width: | Height: | Size: 91 B |
BIN
textures/unifieddyes_palette_indigos.png
Normal file
After Width: | Height: | Size: 91 B |
Before Width: | Height: | Size: 99 B After Width: | Height: | Size: 93 B |
Before Width: | Height: | Size: 101 B After Width: | Height: | Size: 91 B |
BIN
textures/unifieddyes_palette_malachites.png
Normal file
After Width: | Height: | Size: 91 B |
BIN
textures/unifieddyes_palette_mulberrys.png
Normal file
After Width: | Height: | Size: 93 B |
Before Width: | Height: | Size: 99 B After Width: | Height: | Size: 91 B |
Before Width: | Height: | Size: 99 B After Width: | Height: | Size: 91 B |
Before Width: | Height: | Size: 99 B |
BIN
textures/unifieddyes_palette_roses.png
Normal file
After Width: | Height: | Size: 91 B |
BIN
textures/unifieddyes_palette_sapphires.png
Normal file
After Width: | Height: | Size: 91 B |
Before Width: | Height: | Size: 99 B |
BIN
textures/unifieddyes_palette_springs.png
Normal file
After Width: | Height: | Size: 91 B |
BIN
textures/unifieddyes_palette_turquoises.png
Normal file
After Width: | Height: | Size: 93 B |
BIN
textures/unifieddyes_palette_vermilions.png
Normal file
After Width: | Height: | Size: 91 B |
Before Width: | Height: | Size: 99 B After Width: | Height: | Size: 91 B |
Before Width: | Height: | Size: 101 B After Width: | Height: | Size: 91 B |
BIN
textures/unifieddyes_unavailable_overlay.png
Normal file
After Width: | Height: | Size: 266 B |