From 3ea6096a7aa61ccabcc82d2ae90bc6568e0b4f8d Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Tue, 24 Jul 2012 17:52:01 +0300 Subject: [PATCH] Dyes --- mods/dye/README.txt | 13 +++ mods/dye/depends.txt | 0 mods/dye/init.lua | 134 +++++++++++++++++++++++++++ mods/dye/textures/dye_black.png | Bin 0 -> 364 bytes mods/dye/textures/dye_blue.png | Bin 0 -> 352 bytes mods/dye/textures/dye_brown.png | Bin 0 -> 348 bytes mods/dye/textures/dye_cyan.png | Bin 0 -> 370 bytes mods/dye/textures/dye_dark_green.png | Bin 0 -> 367 bytes mods/dye/textures/dye_dark_grey.png | Bin 0 -> 371 bytes mods/dye/textures/dye_green.png | Bin 0 -> 376 bytes mods/dye/textures/dye_grey.png | Bin 0 -> 374 bytes mods/dye/textures/dye_magenta.png | Bin 0 -> 380 bytes mods/dye/textures/dye_orange.png | Bin 0 -> 374 bytes mods/dye/textures/dye_pink.png | Bin 0 -> 364 bytes mods/dye/textures/dye_red.png | Bin 0 -> 381 bytes mods/dye/textures/dye_violet.png | Bin 0 -> 376 bytes mods/dye/textures/dye_white.png | Bin 0 -> 375 bytes mods/dye/textures/dye_yellow.png | Bin 0 -> 389 bytes 18 files changed, 147 insertions(+) create mode 100644 mods/dye/README.txt create mode 100644 mods/dye/depends.txt create mode 100644 mods/dye/init.lua create mode 100644 mods/dye/textures/dye_black.png create mode 100644 mods/dye/textures/dye_blue.png create mode 100644 mods/dye/textures/dye_brown.png create mode 100644 mods/dye/textures/dye_cyan.png create mode 100644 mods/dye/textures/dye_dark_green.png create mode 100644 mods/dye/textures/dye_dark_grey.png create mode 100644 mods/dye/textures/dye_green.png create mode 100644 mods/dye/textures/dye_grey.png create mode 100644 mods/dye/textures/dye_magenta.png create mode 100644 mods/dye/textures/dye_orange.png create mode 100644 mods/dye/textures/dye_pink.png create mode 100644 mods/dye/textures/dye_red.png create mode 100644 mods/dye/textures/dye_violet.png create mode 100644 mods/dye/textures/dye_white.png create mode 100644 mods/dye/textures/dye_yellow.png diff --git a/mods/dye/README.txt b/mods/dye/README.txt new file mode 100644 index 00000000..c7ae077a --- /dev/null +++ b/mods/dye/README.txt @@ -0,0 +1,13 @@ +Minetest 0.4 mod: dye +====================== + +License of source code and media files: +--------------------------------------- +Copyright (C) 2012 Perttu Ahola (celeron55) + +This program is free software. It comes without any warranty, to +the extent permitted by applicable law. You can redistribute it +and/or modify it under the terms of the Do What The Fuck You Want +To Public License, Version 2, as published by Sam Hocevar. See +http://sam.zoy.org/wtfpl/COPYING for more details. + diff --git a/mods/dye/depends.txt b/mods/dye/depends.txt new file mode 100644 index 00000000..e69de29b diff --git a/mods/dye/init.lua b/mods/dye/init.lua new file mode 100644 index 00000000..28868281 --- /dev/null +++ b/mods/dye/init.lua @@ -0,0 +1,134 @@ +-- 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 = ':item_yellow', +-- recipe = {':item_no_color', 'group:basecolor_yellow'}, +-- }) + +-- Other mods can use these for looping through available colors +local 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_ +-- For the following, no white/grey/black is allowed: +-- - unicolor_medium_ +-- - unicolor_dark_ +-- - unicolor_light_ +-- - unicolor__s50 +-- - unicolor_medium__s50 +-- - unicolor_dark__s50 + +-- Local stuff +local dyelocal = {} + +-- This collection of colors is partly a historic thing, partly something else. +dyelocal.dyes = { + {"white", "White dye", {dye=1, basecolor_white=1, excolor_white=1, unicolor_white=1}}, + {"grey", "Grey dye", {dye=1, basecolor_grey=1, excolor_grey=1, unicolor_grey=1}}, + {"dark_grey", "Dark grey dye", {dye=1, basecolor_grey=1, excolor_darkgrey=1, unicolor_darkgrey=1}}, + {"black", "Black dye", {dye=1, basecolor_black=1, excolor_black=1, unicolor_black=1}}, + {"violet", "Violet dye", {dye=1, basecolor_magenta=1, excolor_violet=1, unicolor_violet=1}}, + {"blue", "Blue dye", {dye=1, basecolor_blue=1, excolor_blue=1, unicolor_blue=1}}, + {"cyan", "Cyan dye", {dye=1, basecolor_cyan=1, excolor_cyan=1, unicolor_cyan=1}}, + {"dark_green", "Dark green dye",{dye=1, basecolor_green=1, excolor_green=1, unicolor_dark_green=1}}, + {"green", "Green dye", {dye=1, basecolor_green=1, excolor_green=1, unicolor_green=1}}, + {"yellow", "Yellow dye", {dye=1, basecolor_yellow=1, excolor_yellow=1, unicolor_yellow=1}}, + {"brown", "Brown dye", {dye=1, basecolor_yellow=1, excolor_orange=1, unicolor_dark_orange=1}}, + {"orange", "Orange dye", {dye=1, basecolor_orange=1, excolor_orange=1, unicolor_orange=1}}, + {"red", "Red dye", {dye=1, basecolor_red=1, excolor_red=1, unicolor_red=1}}, + {"magenta", "Magenta dye", {dye=1, basecolor_magenta=1, excolor_red_violet=1,unicolor_red_violet=1}}, + {"pink", "Pink dye", {dye=1, basecolor_red=1, excolor_red=1, unicolor_light_red=1}}, +} + +-- Define items +for _, row in ipairs(dyelocal.dyes) do + local name = row[1] + local description = row[2] + local groups = row[3] + local item_name = "dye:"..name + local item_image = "dye_"..name..".png" + minetest.register_craftitem(item_name, { + inventory_image = item_image, + description = description, + groups = groups + }) +end + +-- Mix recipes +-- Just mix everything to everything somehow sanely + +dyelocal.mixbases = {"magenta", "red", "orange", "brown", "yellow", "green", "dark_green", "cyan", "blue", "violet", "black", "dark_grey", "grey", "white"} + +dyelocal.mixes = { + -- magenta, red, orange, brown, yellow, green, dark_green, cyan, blue, violet, black, dark_grey, grey, white + white = {"pink", "pink", "orange", "orange", "yellow", "green", "green", "grey", "cyan", "violet", "grey", "grey", "white", "white"}, + grey = {"pink", "pink", "orange", "orange", "yellow", "green", "green", "grey", "cyan", "pink", "dark_grey","grey", "grey"}, + dark_grey={"brown","brown", "brown", "brown", "brown","dark_green","dark_green","blue","blue","violet","black", "black"}, + black = {"black", "black", "black", "black", "black", "black", "black", "black", "black", "black", "black"}, + violet= {"magenta","magenta","red", "brown", "red", "cyan", "brown", "blue", "violet","violet"}, + blue = {"violet", "magenta","brown","brown","dark_green","cyan","cyan", "cyan", "blue"}, + cyan = {"blue","brown","dark_green","dark_grey","green","cyan","dark_green","cyan"}, + dark_green={"brown","brown","brown", "brown", "green", "green", "dark_green"}, + green = {"brown", "yellow","yellow","dark_green","green","green"}, + yellow= {"red", "orange", "yellow","orange", "yellow"}, + brown = {"brown", "brown","orange", "brown"}, + orange= {"red", "orange","orange"}, + red = {"magenta","red"}, + magenta={"magenta"}, +} + +for one,results in pairs(dyelocal.mixes) do + for i,result in ipairs(results) do + local another = dyelocal.mixbases[i] + minetest.register_craft({ + type = "shapeless", + output = 'dye:'..result..' 2', + recipe = {'dye:'..one, 'dye:'..another}, + }) + end +end + +-- Hide dyelocal +dyelocal = nil + +-- EOF diff --git a/mods/dye/textures/dye_black.png b/mods/dye/textures/dye_black.png new file mode 100644 index 0000000000000000000000000000000000000000..ef526e698581cdddaa7803dd1fd63e0d97d928cb GIT binary patch literal 364 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPaySTWDg_x@*KTt?EGbEzKIX^cyHLnE7WngeFN=+$&Ut@oTQk%88)NAH z3+7KGr)q69*A_kdj{m|zN7WXM>`?D%2foRsOF!UWyLV&$U1MSG4bnf?ye{1;%~&1T z!nax}cC)(@!`~|l=UereFXv^Q>GOFHo6@5z7r9?IxD}tXdhpMWlk343KbMUDxF-+t zxt)*CYv|+%Y@8x=*t@m$*3PM`z7%ow98=-goW>Z-Y$mzLFpcrtdCi4YbDU+0Lbd$j z^^Pu`^5L_U>ps_|AvbVM%=V6_q`Jwy`^9{S0q~a|rzJNUK>FVdQ&MBb@0GVBe ArvLx| literal 0 HcmV?d00001 diff --git a/mods/dye/textures/dye_blue.png b/mods/dye/textures/dye_blue.png new file mode 100644 index 0000000000000000000000000000000000000000..d3e97919c79b2977c58d8b5101e4fd3d23327b12 GIT binary patch literal 352 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPaySTWD^cJOvTA+|@W=KSdbAE1aYF-JD%fR4Vl$uzQ znxasiS(2gP?&%wlqL<1J6hGqW;uvCa`fkuh!NUqXHAQJ1OBSRu_&<`&SSi_bYi;@o ziIox!VXihVTtN?RaGcnA*0p?>u+?90eU?89eZ9Zszdz-|ylh7D(%V^G4j*(%GrOjo z`=`j15YD`N)*N|RZTX0DzbR!xoPr!13>sJt@mAP)bFMuW(x10foI&6PgS^l?wQ9~~ zC%zf(k4d_m7u1&b{GQU(V?KHhcloX}5jdsl$IX7d(9@&v{`m{Kde+}RdA*$RiKb;W=KSdbAE1aYF-JD%fR4Vl$uzQ znxasiS(2gP?&%wlqL<1J6hGkU;uvCa`tGE?f`<%vTIU!0I6gFE-l3Rm&>Vf8XQHeT zbFu^%|Aa7Cn>NiU0zcI+6us~(pX7Ic^BUm~?PYUs^nW@O!g~44#&@stW;Gh5EnSy& z$@aGz%K=wzaoy`@-zGFA`H1Io9ocv>ppjv*B|pm#S1yx;nd>)bJ^agEep>H=!<*ME z94%9Pch@b=-m7!)Y>USv?>g=s+(tWkmOl8fB{TZd%Bwo@c~^Vc{v_wzVQhHV^X2We kKbwkQ1t)8&9lXC${9teZ=YH0p43H;1UHx3vIVCg!00uRJ2><{9 literal 0 HcmV?d00001 diff --git a/mods/dye/textures/dye_cyan.png b/mods/dye/textures/dye_cyan.png new file mode 100644 index 0000000000000000000000000000000000000000..3ae44e26cdb91e2e2d033852e9d112fb61e75831 GIT binary patch literal 370 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPaySO;3kYnOkE1-~UW=KSdbAE1aYF-JD%fR4Vl$uzQ znxasiS(2gP?&%wlqL<1J6u;)_;uvCa`tBrKzC#8)t@}fsa`EuQ?rv?=E?`{ez&6e6 zt_4f9s)W@S9+~Eq%r|$HEfAW{;T$#Vi+il#G@YB*s<+Kg{o!maa_#x2#!kVV>vCj{ zCYQuIR(|w4$RTp{+HN<8OB$2hZvJ}r=Ad)_uI%GC7HsX6c8PRuY7(6yU9l&I)A^I! zuNFMbgFCelRFeCrRb*3mY6KH#CLb;yz|H!Oi<}$kNL?kzKO)f96R3aJHVacm2`MPS%Qq|I@at zk&`gEtFtv)#PgF}2g8=+=CYiceOBuIdV0^h9L z6Rs(<ypg@WLfmAov`J^fj=ql9Cw_=qtJ@T;ir%zWZtJQ0Ze1E$9i0h0M_Katt6ApH zQN6V-ly7qgXTzdbC+>1AKXE{5^&JL>wgUepWxHzoAL$hSo}#-`@z-32Ih#XFTHWWL z*q5gslPh#r$5Mi8n>PQ?RF7)Ehw+7_6Mx-aKXB N0G_UXF6*2UngG)KkgWg! literal 0 HcmV?d00001 diff --git a/mods/dye/textures/dye_grey.png b/mods/dye/textures/dye_grey.png new file mode 100644 index 0000000000000000000000000000000000000000..c4706e7f469b809b0294c0824c8876c652dae49d GIT binary patch literal 374 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPaySTWlb>oSz{6Hbu%#er@=ltB<)VvZPmw~~#C^fMp zHASI3vm`^o-P1Q9MK6^dD1OV+#WBR<^xa9ie1{waTKB73@Tjk7T*Cf>_1NMMue)4| zInD*#sp>mm5yJ1#w2GnIQ9mj3#^X@P937(pq#4YG}P=8uMUDAo76^m8FLa!=* zzrS(8+_^QopJZxTuA9@<&2cVQsGK1p`|tMX;&U^p%v6+d4di`K LS3j3^P6ARD3`3^YEr~7HiZH`mdB44GrIAd?ay<%QS@rYD*3x9 z2^P0om5#J5^zf5yN@O!MFnD6)pLU{h9*>~8-rldLx<*2-@B{*-M_c zOG+@9)_h`a?U4foe&@YE#lYIoed^ETYdbV(Seu+xvFO# z{OtQ{-<7>EF7Z&B@g_Hk2Fakq%%&VtCkmM5R6G`DxTPyg@A#T^tv*6wb3$-WjnqbD)rHW=KSdbAE1aYF-JD%fR4Vl$uzQ znxasiS(2gP?&%wlqL<1J6u;o<;uvCa`tGEKe1{x(+V)2a*c=tQ!tzNb-?7R0TwYpJ zyTcqu<>i$+A;RfOLd@)bt!xSMxSXqL&#ufP8Py)E+Z!ng3}-tP}w;kmO_&u?>O z>Gh^L>MK*irlg&7S6c9*xXZ4*vNkF};KY{pt*$H$n+(0IF0A}LneUzcdl@%CBban<#U zj@CVoh|4xOenOUE+p0I)ql1sF_@P*<__=X^a=zT55YtH|-u56*d%F6$taD0e0svlE BjB@}0 literal 0 HcmV?d00001 diff --git a/mods/dye/textures/dye_red.png b/mods/dye/textures/dye_red.png new file mode 100644 index 0000000000000000000000000000000000000000..9f8c151ee25685c138bfce9fa731e991f334412d GIT binary patch literal 381 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPaySTWLEVp#jIiQeiW=KSdbAE1aYF-JD%fR4Vl$uzQ znxasiS(2gP?&%wlqL<1J6o2UH;uvCaIyph2O`$-K47X?NtA0;=xcpD0($xmHge5 z1dH3PN=I52dicpUC9)YB7(B7@PdiaLk4Mm4@9;w=lk}>b+CTq4-+#^n0&UBTCC}R> zB^XR=J~6lU$bo`ClA9PKOq4&{|F1olkYP1hFxL1G_v^`u5}u!*?>{e@p!XnkT8c%z z)nEIr?1gcO2h)r7BhqQysByOhV zJlb<+5)V(h^oAwOY;0`V&%XR`xpeE|eq+gv>MBfairF$Y3=Ao$u`Sysc76o~fTydU J%Q~loCIEfHif8}; literal 0 HcmV?d00001 diff --git a/mods/dye/textures/dye_white.png b/mods/dye/textures/dye_white.png new file mode 100644 index 0000000000000000000000000000000000000000..508e32fbe38d264e1ca2086124d284d1ba124ff8 GIT binary patch literal 375 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPaySTWL+4AL!`+!2SnIRD+&iT2ysd*(pE(3#eQEFmI zYKlU6W=V#EyQgnJie4%^Q2e&1i(`nz>ARB*`3@QIxW)@EXIQDt?$GssEz;7NecHJ* zXYMpCOixJsz&kO!vcYh9VXTVGlwJ8SdDbCwL}s-w5a>YV;?t*l_@aTdvf zIo8iD-seti+RU_SRd}erQk+Z8oa@>V=i`{;<9`YShSu5(9*}U}#o1tckLg{=URR%k znKHts%HCB^T)y*JMbWyvp2llw?-&FG?aQ*S-BPOeP);%YQ2vIq?ozJr>(lqPgZ%I5 L>gTe~DWM4f4C##D literal 0 HcmV?d00001 diff --git a/mods/dye/textures/dye_yellow.png b/mods/dye/textures/dye_yellow.png new file mode 100644 index 0000000000000000000000000000000000000000..d00a5b83fadd5f54ac76bb9d0fc498e8d6d67f51 GIT binary patch literal 389 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPaySTWrtPn$XKTt?EGbEzKIX^cyHLnE7WngeFN=+}c&d~f~Rcm3aVruvNA-CtJDnJLk*Ipo+h z+c)Qe6fD1aZFZcT>ixch;m1yP`|l}tIn~V)vaeld&MahQ;5g)@BKaWVlkUle-_EKM zjH`Ewg#*P3KCEac%?yg2Ur0NAtOe%Mwmfh`Q{^c z_w;wjoJpQK;hXg_FPBvM`r@QXL4y$L~%O&nHD$lZ+=c{;(|0VZKu0OKX YjBVzbtIZB;&j5vnr>mdKI;Vst0M~GfUjP6A literal 0 HcmV?d00001