Added some extra steps in the dye-making process (increases difficulty).

This commit is contained in:
Vanessa Ezekowitz 2012-07-24 17:56:03 -04:00
parent 03e2f76d54
commit bd11247b0c
14 changed files with 252 additions and 168 deletions

BIN
bottle-9-pack.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

BIN
craft-red-dye.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
dye-base.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

420
init.lua

@ -1,60 +1,278 @@
-- Unified Dyes Mod by Vanessa Ezekowitz ~~ 2012-07-08 -- Unified Dyes Mod by Vanessa Ezekowitz ~~ 2012-07-24
-- --
-- License: GPL -- License: GPL
-- --
-- This mod depends on ironzorg's flowers mod -- This mod depends on ironzorg's flowers mod
-- --
--================================================================= --===========================================================================
-- Smelting/crafting recipes needed to generate various base colors -- First you need something to put the dyes into - glass bottles
-- (the register_craftitem functions are in the generate-the-rest --
-- loop below the base colors). -- Smelt some sand into glass as usual, then smelt one of the resulting glass
-- blocks to get a 9-pack of empty bottles.
----------------- minetest.register_craftitem("unifieddyes:empty_bottle", {
-- Primary colors description = "Empty Glass Bottle",
inventory_image = "unifieddyes_empty_bottle.png",
-- Red (rose)
minetest.register_craft({
type = "cooking",
output = "unifieddyes:red 2",
recipe = "flowers:flower_rose",
}) })
-- Green (cactus) minetest.register_craftitem("unifieddyes:bottle_9_pack", {
description = "Empty Glass Bottles (9-pack)",
minetest.register_craft({ inventory_image = "unifieddyes_bottle_9_pack.png",
type = "cooking",
output = "unifieddyes:green 2",
recipe = "default:cactus",
}) })
minetest.register_craft({ minetest.register_craft({
type = "cooking", type = "cooking",
output = "unifieddyes:green 2", output = "unifieddyes:bottle_9_pack",
recipe = "flowers:flower_waterlily", recipe = "default:glass",
})
-- The use of this mod will, if the mods that depend on it are written
-- correctly, generate lots of empty bottles, so let's recycle them.
-- First, pack them into a 9-pack unit by placing one into each of the 9
-- crafting slots.
minetest.register_craft( {
output = "unifieddyes:bottle_9_pack",
recipe = {
{ "unifieddyes:empty_bottle", "unifieddyes:empty_bottle", "unifieddyes:empty_bottle" },
{ "unifieddyes:empty_bottle", "unifieddyes:empty_bottle", "unifieddyes:empty_bottle" },
{ "unifieddyes:empty_bottle", "unifieddyes:empty_bottle", "unifieddyes:empty_bottle" },
},
})
-- then smelt the 9-pack back into a glass block:
minetest.register_craft({
type = "cooking",
output = "default:glass",
recipe = "unifieddyes:bottle_9_pack",
})
-- Now, once you have a 9-pack of bottles, craft it with one bucket of water
-- and a piece of jungle grass to get 9 individual portions of the liquid dye
-- base and an empty bucket:
minetest.register_craftitem("unifieddyes:dye_base", {
description = "Uncolored Dye Base Liquid",
inventory_image = "unifieddyes_dye_base.png",
}) })
minetest.register_craft( { minetest.register_craft( {
type = "shapeless", type = "shapeless",
output = "unifieddyes:green 2", output = "unifieddyes:dye_base 9",
recipe = { recipe = {
"unifieddyes:blue", "bucket:bucket_water",
"unifieddyes:yellow", "default:junglegrass",
"unifieddyes:bottle_9_pack",
},
replacements = { {'bucket:bucket_water', 'bucket:bucket_empty'}, },
})
--==========================================================================
-- Now we need to turn our color sources (flowers, etc) into pigments and from
-- there into actual usable dyes. There are seven base colors - one for each
-- flower, plus black (as "carbon black") from coal, and white (as "titanium
-- dioxide") from stone. Most give two portions of pigment; cactus gives 6,
-- stone gives 10.
pigments = {
"red",
"orange",
"yellow",
"green",
"blue",
"carbon_black",
}
pigmentsdesc = {
"Red",
"Orange",
"Yellow",
"Green",
"Blue",
}
dyesdesc = {
"Red",
"Orange",
"Yellow",
"Green",
"Blue",
}
colorsources = {
"flowers:flower_rose",
"flowers:flower_tulip",
"flowers:flower_dandelion_yellow",
"flowers:flower_waterlily",
"flowers:flower_viola",
}
for color = 1, 5 do
-- the recipes to turn sources into pigments
minetest.register_craftitem("unifieddyes:pigment_"..pigments[color], {
description = pigmentsdesc[color].." Pigment",
inventory_image = "unifieddyes_pigment_"..pigments[color]..".png",
})
minetest.register_craft({
type = "cooking",
output = "unifieddyes:pigment_"..pigments[color].." 2",
recipe = colorsources[color],
})
-- The recipes to turn pigments into usable dyes
minetest.register_craftitem("unifieddyes:"..pigments[color], {
description = dyesdesc[color].." Dye",
inventory_image = "unifieddyes_"..pigments[color]..".png",
})
minetest.register_craft( {
type = "shapeless",
output = "unifieddyes:"..pigments[color],
recipe = {
"unifieddyes:pigment_"..pigments[color],
"unifieddyes:dye_base"
}
})
end
-- Stone->titanium dioxide and cactus->green pigment are done separately
-- because of their larger yields
minetest.register_craftitem("unifieddyes:titanium_dioxide", {
description = "Titanium Dioxide",
inventory_image = "unifieddyes_titanium_dioxide.png",
})
minetest.register_craft({
type = "cooking",
output = "unifieddyes:titanium_dioxide 10",
recipe = "default:stone",
})
minetest.register_craft({
type = "cooking",
output = "unifieddyes:pigment_green 6",
recipe = "default:cactus",
})
-- coal->carbon black and carbon black -> black dye are done separately
-- because of the different names
minetest.register_craftitem("unifieddyes:carbon_black", {
description = "Carbon Black",
inventory_image = "unifieddyes_carbon_black.png",
})
minetest.register_craft({
type = "cooking",
output = "unifieddyes:carbon_black 2",
recipe = "default:coal_lump",
})
minetest.register_craftitem("unifieddyes:black", {
description = "Carbon Black",
inventory_image = "unifieddyes_black.png",
})
minetest.register_craft( {
type = "shapeless",
output = "unifieddyes:black",
recipe = {
"unifieddyes:carbon_black",
"unifieddyes:dye_base",
},
})
--=======================================================================
-- Now that we have the dyes in a usable form, let's mix the various
-- ingredients together to create the rest of the mod's colors and greys.
----------------------------
-- The 5 levels of greyscale
-- White paint
minetest.register_craft( {
type = "shapeless",
output = "unifieddyes:white_paint",
recipe = {
"unifieddyes:titanium_dioxide",
"bucket:bucket_water",
"default:junglegrass",
},
})
minetest.register_craftitem("unifieddyes:white_paint", {
description = "White Paint",
inventory_image = "unifieddyes_white_paint.png",
groups = {dye=1},
})
-- Light grey paint
minetest.register_craft( {
type = "shapeless",
output = "unifieddyes:lightgrey_paint 3",
recipe = {
"unifieddyes:white_paint",
"unifieddyes:white_paint",
"unifieddyes:carbon_black",
}, },
}) })
-- Blue (Viola) minetest.register_craftitem("unifieddyes:lightgrey_paint", {
description = "Light grey paint",
inventory_image = "unifieddyes_lightgrey_paint.png",
groups = {dye=1},
})
minetest.register_craft({ -- Medium grey paint
type = "cooking",
output = "unifieddyes:blue 2", minetest.register_craft( {
recipe = "flowers:flower_viola", type = "shapeless",
output = "unifieddyes:grey_paint 2",
recipe = {
"unifieddyes:white_paint",
"unifieddyes:carbon_black",
},
})
minetest.register_craftitem("unifieddyes:grey_paint", {
description = "Medium grey paint",
inventory_image = "unifieddyes_grey_paint.png",
groups = {dye=1},
})
-- Dark grey paint
minetest.register_craft( {
type = "shapeless",
output = "unifieddyes:darkgrey_paint 3",
recipe = {
"unifieddyes:white_paint",
"unifieddyes:carbon_black",
"unifieddyes:carbon_black",
},
})
minetest.register_craftitem("unifieddyes:darkgrey_paint", {
description = "Dark grey paint",
inventory_image = "unifieddyes_darkgrey_paint.png",
groups = {dye=1},
}) })
------------------- --=============================================================================
-- Secondary colors -- Smelting/crafting recipes needed to generate various remaining 'full' colors
-- (the register_craftitem functions are in the generate-the-rest loop below).
-- Cyan -- Cyan
@ -78,36 +296,6 @@ minetest.register_craft( {
}, },
}) })
-- Yellow (yellow dandelion)
minetest.register_craft({
type = "cooking",
output = "unifieddyes:yellow 2",
recipe = "flowers:flower_dandelion_yellow",
})
------------------
-- Tertiary colors
-- Orange (tulip)
minetest.register_craft({
type = "cooking",
output = "unifieddyes:orange 2",
recipe = "flowers:flower_tulip",
})
minetest.register_craft( {
type = "shapeless",
output = "unifieddyes:orange 2",
recipe = {
"unifieddyes:yellow",
"unifieddyes:red",
},
})
-- Lime -- Lime
minetest.register_craft( { minetest.register_craft( {
@ -174,116 +362,11 @@ minetest.register_craft( {
}, },
}) })
----------------------------
-- The 5 levels of greyscale
-- White paint
minetest.register_craftitem("unifieddyes:titanium_dioxide", {
description = "Titanium Dioxide Powder",
inventory_image = "unifieddyes_titanium_dioxide.png",
groups = {dye=1},
})
minetest.register_craft({
type = "cooking",
output = "unifieddyes:titanium_dioxide 10",
recipe = "default:stone",
})
minetest.register_craft( {
type = "shapeless",
output = "unifieddyes:white_paint",
recipe = {
"unifieddyes:titanium_dioxide",
"bucket:bucket_water",
"default:junglegrass",
},
})
minetest.register_craftitem("unifieddyes:white_paint", {
description = "White Paint",
inventory_image = "unifieddyes_white_paint.png",
groups = {dye=1},
})
-- Light grey paint
minetest.register_craft( {
type = "shapeless",
output = "unifieddyes:lightgrey_paint 3",
recipe = {
"unifieddyes:white_paint",
"unifieddyes:white_paint",
"unifieddyes:black",
},
})
minetest.register_craftitem("unifieddyes:lightgrey_paint", {
description = "Light grey paint",
inventory_image = "unifieddyes_lightgrey_paint.png",
groups = {dye=1},
})
-- Medium grey paint
minetest.register_craft( {
type = "shapeless",
output = "unifieddyes:grey_paint 2",
recipe = {
"unifieddyes:white_paint",
"unifieddyes:black",
},
})
minetest.register_craftitem("unifieddyes:grey_paint", {
description = "Medium grey paint",
inventory_image = "unifieddyes_grey_paint.png",
groups = {dye=1},
})
-- Dark grey paint
minetest.register_craft( {
type = "shapeless",
output = "unifieddyes:darkgrey_paint 3",
recipe = {
"unifieddyes:white_paint",
"unifieddyes:black",
"unifieddyes:black",
},
})
minetest.register_craftitem("unifieddyes:darkgrey_paint", {
description = "Dark grey paint",
inventory_image = "unifieddyes_darkgrey_paint.png",
groups = {dye=1},
})
-- Black dye (coal)
minetest.register_craft({
type = "cooking",
output = "unifieddyes:black 2",
recipe = "default:coal_lump",
})
minetest.register_craftitem("unifieddyes:black", {
description = "Black Dye",
inventory_image = "unifieddyes_black.png",
groups = {dye=1},
})
-- ================================================================= -- =================================================================
-- Finally, generate all of additional variants of hue, saturation, and -- Finally, generate all of additional variants of hue, saturation, and
-- brightness from the above 12 base colors. -- brightness.
-- "s50" in a file/item name means "saturation: 50%". -- "s50" in a file/item name means "saturation: 50%".
-- Brightness levels in the textures are 33% ("dark"), 66% ("medium"), -- Brightness levels in the textures are 33% ("dark"), 66% ("medium"),
@ -440,5 +523,6 @@ for i = 1, 12 do
end end
print("[UnifiedDyes] Loaded!") print("[UnifiedDyes] Loaded!")

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 16 KiB