From 48356ea59c59ff0b5c0045fd88b3ea3cf3aed2bf Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Wed, 1 Aug 2012 19:14:49 -0400 Subject: [PATCH] Added a "version" check for the flowers dependency: 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. --- changelog.txt | 9 +++ init.lua | 81 ++++++++++++++++++------ textures/unifieddyes_pigment_violet.png | Bin 0 -> 2928 bytes 3 files changed, 69 insertions(+), 21 deletions(-) create mode 100644 textures/unifieddyes_pigment_violet.png diff --git a/changelog.txt b/changelog.txt index d5eb870..143911e 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,6 +1,15 @@ Changelog --------- +2012-07-26: Added a "version" check for the flowers dependency: 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. + 2012-07-26: Better bottle textures. Note that these are blended against the 50% grey field they normally appear on in the inventory display, so they will show artifacts if you try to wield them. Don't do that. :-) diff --git a/init.lua b/init.lua index aab7666..eda56bd 100644 --- a/init.lua +++ b/init.lua @@ -61,16 +61,14 @@ pigments = { "red", "orange", "yellow", - "green", - "blue", + "green" } dyesdesc = { "Red", "Orange", "Yellow", - "Green", - "Blue", + "Green" } colorsources = { @@ -78,10 +76,9 @@ colorsources = { "flowers:flower_tulip", "flowers:flower_dandelion_yellow", "flowers:flower_waterlily", - "flowers:flower_viola", } -for color = 1, 5 do +for color in ipairs(colorsources) do groupcolor = -- the recipes to turn sources into pigments @@ -333,7 +330,45 @@ minetest.register_craft( { }, }) --- Violet +-- Red-violet + +minetest.register_craftitem("unifieddyes:redviolet", { + description = "Full Red-violet Dye", + inventory_image = "unifieddyes_redviolet.png", + groups = { dye=1, excolor_red_violet=1, unicolor_red_violet=1 } +}) + +minetest.register_craft( { + type = "shapeless", + output = "unifieddyes:redviolet 2", + recipe = { + "unifieddyes:red", + "unifieddyes:magenta", + }, +}) + +-- We need to check if the version of the Flowers mod that is installed +-- contains geraniums or not. If it doesn't, use the Viola to make blue dye. +-- If Geraniums do exist, use them to make blue dye instead, and use Violas +-- to get violet dye. Violet can always be made by mixing blue with magenta +-- or red as usual. + + +minetest.register_craftitem("unifieddyes:pigment_blue", { + description = "Blue Pigment", + inventory_image = "unifieddyes_pigment_blue.png", +}) + +minetest.register_craftitem("unifieddyes:blue", { + description = "Full Blue Dye", + inventory_image = "unifieddyes_blue.png", + groups = { dye=1, basecolor_violet=1, excolor_violet=1, unicolor_violet=1 } +}) + +minetest.register_craftitem("unifieddyes:pigment_violet", { + description = "Violet Pigment", + inventory_image = "unifieddyes_pigment_violet.png", +}) minetest.register_craftitem("unifieddyes:violet", { description = "Full Violet/Purple Dye", @@ -360,22 +395,26 @@ minetest.register_craft( { }, }) --- Red-violet +if minetest.registered_nodes["flowers:flower_geranium"] == nil then -minetest.register_craftitem("unifieddyes:redviolet", { - description = "Full Red-violet Dye", - inventory_image = "unifieddyes_redviolet.png", - groups = { dye=1, excolor_red_violet=1, unicolor_red_violet=1 } -}) + minetest.register_craft({ + type = "cooking", + output = "unifieddyes:pigment_blue 2", + recipe = "flowers:flower_viola", + }) +else + minetest.register_craft({ + type = "cooking", + output = "unifieddyes:pigment_blue 2", + recipe = "flowers:flower_geranium", + }) -minetest.register_craft( { - type = "shapeless", - output = "unifieddyes:redviolet 2", - recipe = { - "unifieddyes:red", - "unifieddyes:magenta", - }, -}) + minetest.register_craft({ + type = "cooking", + output = "unifieddyes:pigment_violet 2", + recipe = "flowers:flower_viola", + }) +end -- ================================================================= diff --git a/textures/unifieddyes_pigment_violet.png b/textures/unifieddyes_pigment_violet.png new file mode 100644 index 0000000000000000000000000000000000000000..2fb2ca3be923a80e52e998c57da60a3a5d79b934 GIT binary patch literal 2928 zcmV-$3y<`PP)EX>4Tx0C?J+Q)g6D=@vcr-tj1^HV42lZa2jn55j)S9!ipu-pd!uXCy!YnK{> z2n?1;Gf_2w45>mM5#WQz#Kz&|EGkvK~TfD`~gdX7S-06<0ofSs5oQvjd@0AR~wV&ec% zEdXFAf9BHwfSvf6djSAjlpz%XppgI|6J>}*0BAb^tj|`8MF3bZ02F3R#5n-iEdVe{ zS7t~6u(trf&JYW-00;~KFj0twDF6g}0AR=?BX|IWnE(_<@>e|ZE3OddDgXd@nX){& zBsoQaTL>+22Uk}v9w^R97b_GtVFF>AKrX_0nHe&HG!NkO%m4tOkrff(gY*4(&JM25 z&Nhy=4qq+mzXtyzVq)X|<DpKGaQJ>aJVl|9x!Kv}EM4F8AGNmGkLXs)P zCDQ+7;@>R$13uq10I+I40eg`xs9j?N_Dd%aSaiVR_W%I$yKlkNCzL=651DUOSSq$Ed=-((3YAKgCY2j1FI1_jrmEhm z3sv(~%T$l4UQ>OpMpZLYTc&xiMv2YpRx)mRPGut5K^*>%BIv?Wdil zy+ylO`+*KY$4Vz$Cr4+G&IO(4Q`uA9rwXSQO+7mGt}d!;r5mBUM0dY#r|y`ZzFvTy zOmC;&dA;ZQ9DOhSRQ+xGr}ak+SO&8UBnI0I&KNw!HF0k|9WTe*@liuv!$3o&VU=N* z;e?U7(LAHoMvX=fjA_PP<0Rv4#%;!P6gpNq-kQ#w?mvCS^p@!_XIRe=&)75LwiC-K#A%&Vo6|>U7iYP1 zgY$@siA#dZE|)$on;XX6$i3uBboFsv;d;{botv|p!tJQrukJSPY3_&IpUgC$DV|v~ zbI`-cL*P;6(LW2Hl`w1HtbR{JPl0E(=OZs;FOgTR*RZ#xcdGYc?-xGyK60PqKI1$$ z-ZI`wBrnsy*W_HW0Wrec-#cqqYFCLW#$!oKa ztOZ#u3bsO~=u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