New translation system, part 7: Items, part 3
This commit is contained in:
parent
e4fbbeddb2
commit
a29626881f
20 changed files with 253 additions and 220 deletions
|
@ -1,5 +1,3 @@
|
|||
-- 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.
|
||||
|
@ -15,6 +13,8 @@
|
|||
|
||||
mcl_dye = {}
|
||||
|
||||
local S = minetest.get_translator("mcl_dye")
|
||||
|
||||
-- Other mods can use these for looping through available colors
|
||||
mcl_dye.basecolors = {"white", "grey", "black", "red", "yellow", "green", "cyan", "blue", "magenta"}
|
||||
mcl_dye.excolors = {"white", "lightgrey", "grey", "darkgrey", "black", "red", "orange", "yellow", "lime", "green", "aqua", "cyan", "sky_blue", "blue", "violet", "magenta", "red_violet"}
|
||||
|
@ -64,22 +64,22 @@ local dyelocal = {}
|
|||
|
||||
-- This collection of colors is partly a historic thing, partly something else.
|
||||
dyelocal.dyes = {
|
||||
{"white", "mcl_dye_white", "Bone Meal", {dye=1, craftitem=1, basecolor_white=1, excolor_white=1, unicolor_white=1}},
|
||||
{"grey", "dye_grey", "Light Grey Dye", {dye=1, craftitem=1, basecolor_grey=1, excolor_grey=1, unicolor_grey=1}},
|
||||
{"dark_grey", "dye_dark_grey", "Grey Dye", {dye=1, craftitem=1, basecolor_grey=1, excolor_darkgrey=1, unicolor_darkgrey=1}},
|
||||
{"black", "mcl_dye_black", "Ink Sac", {dye=1, craftitem=1, basecolor_black=1, excolor_black=1, unicolor_black=1}},
|
||||
{"violet", "dye_violet", "Purple Dye", {dye=1, craftitem=1, basecolor_magenta=1, excolor_violet=1, unicolor_violet=1}},
|
||||
{"blue", "mcl_dye_blue", "Lapis Lazuli", {dye=1, craftitem=1, basecolor_blue=1, excolor_blue=1, unicolor_blue=1}},
|
||||
{"lightblue", "mcl_dye_light_blue", "Light Blue Dye", {dye=1, craftitem=1, basecolor_blue=1, excolor_blue=1, unicolor_light_blue=1}},
|
||||
{"cyan", "dye_cyan", "Cyan Dye", {dye=1, craftitem=1, basecolor_cyan=1, excolor_cyan=1, unicolor_cyan=1}},
|
||||
{"dark_green", "dye_dark_green", "Cactus Green",{dye=1, craftitem=1, basecolor_green=1, excolor_green=1, unicolor_dark_green=1}},
|
||||
{"green", "mcl_dye_lime", "Lime Dye", {dye=1, craftitem=1, basecolor_green=1, excolor_green=1, unicolor_green=1}},
|
||||
{"yellow", "dye_yellow", "Dandelion Yellow", {dye=1, craftitem=1, basecolor_yellow=1, excolor_yellow=1, unicolor_yellow=1}},
|
||||
{"brown", "mcl_dye_brown", "Cocoa Beans", {dye=1, craftitem=1, basecolor_brown=1, excolor_orange=1, unicolor_dark_orange=1}},
|
||||
{"orange", "dye_orange", "Orange Dye", {dye=1, craftitem=1, basecolor_orange=1, excolor_orange=1, unicolor_orange=1}},
|
||||
{"red", "dye_red", "Rose Red", {dye=1, craftitem=1, basecolor_red=1, excolor_red=1, unicolor_red=1}},
|
||||
{"magenta", "dye_magenta", "Magenta Dye", {dye=1, craftitem=1, basecolor_magenta=1, excolor_red_violet=1,unicolor_red_violet=1}},
|
||||
{"pink", "dye_pink", "Pink Dye", {dye=1, craftitem=1, basecolor_red=1, excolor_red=1, unicolor_light_red=1}},
|
||||
{"white", "mcl_dye_white", S("Bone Meal"), {dye=1, craftitem=1, basecolor_white=1, excolor_white=1, unicolor_white=1}},
|
||||
{"grey", "dye_grey", S("Light Grey Dye"), {dye=1, craftitem=1, basecolor_grey=1, excolor_grey=1, unicolor_grey=1}},
|
||||
{"dark_grey", "dye_dark_grey", S("Grey Dye"), {dye=1, craftitem=1, basecolor_grey=1, excolor_darkgrey=1, unicolor_darkgrey=1}},
|
||||
{"black", "mcl_dye_black", S("Ink Sac"), {dye=1, craftitem=1, basecolor_black=1, excolor_black=1, unicolor_black=1}},
|
||||
{"violet", "dye_violet", S("Purple Dye"), {dye=1, craftitem=1, basecolor_magenta=1, excolor_violet=1, unicolor_violet=1}},
|
||||
{"blue", "mcl_dye_blue", S("Lapis Lazuli"), {dye=1, craftitem=1, basecolor_blue=1, excolor_blue=1, unicolor_blue=1}},
|
||||
{"lightblue", "mcl_dye_light_blue", S("Light Blue Dye"), {dye=1, craftitem=1, basecolor_blue=1, excolor_blue=1, unicolor_light_blue=1}},
|
||||
{"cyan", "dye_cyan", S("Cyan Dye"), {dye=1, craftitem=1, basecolor_cyan=1, excolor_cyan=1, unicolor_cyan=1}},
|
||||
{"dark_green", "dye_dark_green", S("Cactus Green"),{dye=1, craftitem=1, basecolor_green=1, excolor_green=1, unicolor_dark_green=1}},
|
||||
{"green", "mcl_dye_lime", S("Lime Dye"), {dye=1, craftitem=1, basecolor_green=1, excolor_green=1, unicolor_green=1}},
|
||||
{"yellow", "dye_yellow", S("Dandelion Yellow"), {dye=1, craftitem=1, basecolor_yellow=1, excolor_yellow=1, unicolor_yellow=1}},
|
||||
{"brown", "mcl_dye_brown", S("Cocoa Beans"), {dye=1, craftitem=1, basecolor_brown=1, excolor_orange=1, unicolor_dark_orange=1}},
|
||||
{"orange", "dye_orange", S("Orange Dye"), {dye=1, craftitem=1, basecolor_orange=1, excolor_orange=1, unicolor_orange=1}},
|
||||
{"red", "dye_red", S("Rose Red"), {dye=1, craftitem=1, basecolor_red=1, excolor_red=1, unicolor_red=1}},
|
||||
{"magenta", "dye_magenta", S("Magenta Dye"), {dye=1, craftitem=1, basecolor_magenta=1, excolor_red_violet=1,unicolor_red_violet=1}},
|
||||
{"pink", "dye_pink", S("Pink Dye"), {dye=1, craftitem=1, basecolor_red=1, excolor_red=1, unicolor_light_red=1}},
|
||||
}
|
||||
|
||||
dyelocal.unicolor_to_dye_id = {}
|
||||
|
@ -109,8 +109,8 @@ for _, row in ipairs(dyelocal.dyes) do
|
|||
minetest.register_craftitem(item_name, {
|
||||
inventory_image = item_image,
|
||||
description = description,
|
||||
_doc_items_longdesc = "This item is a dye which is used for dyeing and crafting.",
|
||||
_doc_items_usagehelp = "Rightclick on a sheep to dye its wool. Other things are dyed by crafting.",
|
||||
_doc_items_longdesc = S("This item is a dye which is used for dyeing and crafting."),
|
||||
_doc_items_usagehelp = S("Rightclick on a sheep to dye its wool. Other things are dyed by crafting."),
|
||||
groups = groups,
|
||||
stack_max = 64,
|
||||
})
|
||||
|
@ -295,9 +295,9 @@ end
|
|||
|
||||
minetest.register_craftitem("mcl_dye:white", {
|
||||
inventory_image = "mcl_dye_white.png",
|
||||
description = "Bone Meal",
|
||||
_doc_items_longdesc = "Bone meal is a white dye and also useful as a fertilizer to speed up the growth of many plants.",
|
||||
_doc_items_usagehelp = "Rightclick a sheep to turn its wool white. Rightclick a plant to speed up its growth. Note that not all plants can be fertilized like this. When you rightclick a grass block, tall grass and flowers will grow all over the place.",
|
||||
description = S("Bone Meal"),
|
||||
_doc_items_longdesc = S("Bone meal is a white dye and also useful as a fertilizer to speed up the growth of many plants."),
|
||||
_doc_items_usagehelp = S("Rightclick a sheep to turn its wool white. Rightclick a plant to speed up its growth. Note that not all plants can be fertilized like this. When you rightclick a grass block, tall grass and flowers will grow all over the place."),
|
||||
stack_max = 64,
|
||||
groups = dyelocal.dyes[1][4],
|
||||
on_place = function(itemstack, user, pointed_thing)
|
||||
|
@ -333,9 +333,9 @@ minetest.register_craftitem("mcl_dye:white", {
|
|||
|
||||
minetest.register_craftitem("mcl_dye:brown", {
|
||||
inventory_image = "mcl_dye_brown.png",
|
||||
_doc_items_longdesc = "Cocoa beans are a brown dye and can be used to plant cocoas.",
|
||||
_doc_items_usagehelp = "Rightclick a sheep to turn its wool brown. Rightclick on the side of a jungle tree trunk (Jungle Wood) to plant a young cocoa.",
|
||||
description = "Cocoa Beans",
|
||||
_doc_items_longdesc = S("Cocoa beans are a brown dye and can be used to plant cocoas."),
|
||||
_doc_items_usagehelp = S("Rightclick a sheep to turn its wool brown. Rightclick on the side of a jungle tree trunk (Jungle Wood) to plant a young cocoa."),
|
||||
description = S("Cocoa Beans"),
|
||||
stack_max = 64,
|
||||
groups = dyelocal.dyes[12][4],
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue