Move doc for dyes to game_api.txt 370/head
authorPilzAdam <pilzadam@minetest.net>
Sat, 6 Dec 2014 11:11:07 +0000 (12:11 +0100)
committerPilzAdam <pilzadam@minetest.net>
Sat, 6 Dec 2014 19:54:53 +0000 (20:54 +0100)
game_api.txt
mods/dye/init.lua

index 4424b20ba02ffb5da81a7e0354652b1068c0a914..8123c0109ba194b52990d7caeb3acfe229191f4e 100644 (file)
@@ -212,3 +212,66 @@ that use param2 otherwise (e.g. facedir)).
 
 If the node is in the leafdecay_drop group then it will always be dropped as an
 item.
+
+Dyes
+----
+To make recipes that will work with any dye ever made by anybody, define
+them based on groups. You can select any group of groups, based on your need for
+amount of colors.
+
+#Color groups
+-------------
+Base color groups:
+- basecolor_white
+- basecolor_grey
+- basecolor_black
+- basecolor_red
+- basecolor_yellow
+- basecolor_green
+- basecolor_cyan
+- basecolor_blue
+- basecolor_magenta
+
+Extended color groups (* = equal to a base color):
+* excolor_white
+- excolor_lightgrey
+* excolor_grey
+- excolor_darkgrey
+* excolor_black
+* excolor_red
+- excolor_orange
+* excolor_yellow
+- excolor_lime
+* excolor_green
+- excolor_aqua
+* excolor_cyan
+- excolor_sky_blue
+* excolor_blue
+- excolor_violet
+* excolor_magenta
+- excolor_red_violet
+
+The whole unifieddyes palette as groups:
+- unicolor_<excolor>
+For the following, no white/grey/black is allowed:
+- unicolor_medium_<excolor>
+- unicolor_dark_<excolor>
+- unicolor_light_<excolor>
+- unicolor_<excolor>_s50
+- unicolor_medium_<excolor>_s50
+- unicolor_dark_<excolor>_s50
+
+Example of one shapeless recipe using a color group:
+minetest.register_craft({
+       type = "shapeless",
+       output = '<mod>:item_yellow',
+       recipe = {'<mod>:item_no_color', 'group:basecolor_yellow'},
+})
+
+#Color lists
+------------
+dye.basecolors
+^ Array containing the names of available base colors
+
+dye.excolors
+^ Array containing the names of the available extended colors
index 3e8274467dac4013f1c60168464d6aeb30eda5a8..d7d18f7a0b9be6166b31d12c7621cb738cee51ab 100644 (file)
@@ -1,63 +1,10 @@
 -- minetest/dye/init.lua
 
--- To make recipes that will work with any dye ever made by anybody, define
--- them based on groups.
--- You can select any group of groups, based on your need for amount of colors.
--- basecolor: 9, excolor: 17, unicolor: 89
---
--- Example of one shapeless recipe using a color group:
--- Note: As this uses basecolor_*, you'd need 9 of these.
--- minetest.register_craft({
---     type = "shapeless",
---     output = '<mod>:item_yellow',
---     recipe = {'<mod>:item_no_color', 'group:basecolor_yellow'},
--- })
-
 -- Other mods can use these for looping through available colors
 dye = {}
 dye.basecolors = {"white", "grey", "black", "red", "yellow", "green", "cyan", "blue", "magenta"}
 dye.excolors = {"white", "lightgrey", "grey", "darkgrey", "black", "red", "orange", "yellow", "lime", "green", "aqua", "cyan", "sky_blue", "blue", "violet", "magenta", "red_violet"}
 
--- Base color groups:
--- - basecolor_white
--- - basecolor_grey
--- - basecolor_black
--- - basecolor_red
--- - basecolor_yellow
--- - basecolor_green
--- - basecolor_cyan
--- - basecolor_blue
--- - basecolor_magenta
-
--- Extended color groups (* = equal to a base color):
--- * excolor_white
--- - excolor_lightgrey
--- * excolor_grey
--- - excolor_darkgrey
--- * excolor_black
--- * excolor_red
--- - excolor_orange
--- * excolor_yellow
--- - excolor_lime
--- * excolor_green
--- - excolor_aqua
--- * excolor_cyan
--- - excolor_sky_blue
--- * excolor_blue
--- - excolor_violet
--- * excolor_magenta
--- - excolor_red_violet
-
--- The whole unifieddyes palette as groups:
--- - unicolor_<excolor>
--- For the following, no white/grey/black is allowed:
--- - unicolor_medium_<excolor>
--- - unicolor_dark_<excolor>
--- - unicolor_light_<excolor>
--- - unicolor_<excolor>_s50
--- - unicolor_medium_<excolor>_s50
--- - unicolor_dark_<excolor>_s50
-
 -- Local stuff
 local dyelocal = {}