summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--changelog.txt9
-rw-r--r--init.lua81
-rw-r--r--textures/unifieddyes_pigment_violet.pngbin0 -> 2928 bytes
3 files changed, 69 insertions, 21 deletions
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 0000000..2fb2ca3
--- /dev/null
+++ b/textures/unifieddyes_pigment_violet.png
Binary files differ