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.
This commit is contained in:
Vanessa Ezekowitz 2012-08-01 19:14:49 -04:00
parent bebf865d1a
commit 48356ea59c
3 changed files with 69 additions and 21 deletions

View File

@ -1,6 +1,15 @@
Changelog 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 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 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. :-) show artifacts if you try to wield them. Don't do that. :-)

View File

@ -61,16 +61,14 @@ pigments = {
"red", "red",
"orange", "orange",
"yellow", "yellow",
"green", "green"
"blue",
} }
dyesdesc = { dyesdesc = {
"Red", "Red",
"Orange", "Orange",
"Yellow", "Yellow",
"Green", "Green"
"Blue",
} }
colorsources = { colorsources = {
@ -78,10 +76,9 @@ colorsources = {
"flowers:flower_tulip", "flowers:flower_tulip",
"flowers:flower_dandelion_yellow", "flowers:flower_dandelion_yellow",
"flowers:flower_waterlily", "flowers:flower_waterlily",
"flowers:flower_viola",
} }
for color = 1, 5 do for color in ipairs(colorsources) do
groupcolor = groupcolor =
-- the recipes to turn sources into pigments -- 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", { minetest.register_craftitem("unifieddyes:violet", {
description = "Full Violet/Purple Dye", 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", { minetest.register_craft({
description = "Full Red-violet Dye", type = "cooking",
inventory_image = "unifieddyes_redviolet.png", output = "unifieddyes:pigment_blue 2",
groups = { dye=1, excolor_red_violet=1, unicolor_red_violet=1 } recipe = "flowers:flower_viola",
}) })
else
minetest.register_craft({
type = "cooking",
output = "unifieddyes:pigment_blue 2",
recipe = "flowers:flower_geranium",
})
minetest.register_craft( { minetest.register_craft({
type = "shapeless", type = "cooking",
output = "unifieddyes:redviolet 2", output = "unifieddyes:pigment_violet 2",
recipe = { recipe = "flowers:flower_viola",
"unifieddyes:red", })
"unifieddyes:magenta", end
},
})
-- ================================================================= -- =================================================================

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB