summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-02-24 14:28:38 -0500
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-02-24 14:28:38 -0500
commit68f8c18bc324f9690019ccc09fc69ee2972d3a1d (patch)
tree7caaa18fe05bd6cb2cf26be9d00c9eaf5487a08d
parent0ceb8f0afec23bedc7cd4ea9ad2451f54267fadf (diff)
downloadunifieddyes-68f8c18bc324f9690019ccc09fc69ee2972d3a1d.tar
unifieddyes-68f8c18bc324f9690019ccc09fc69ee2972d3a1d.tar.gz
unifieddyes-68f8c18bc324f9690019ccc09fc69ee2972d3a1d.tar.bz2
unifieddyes-68f8c18bc324f9690019ccc09fc69ee2972d3a1d.tar.xz
unifieddyes-68f8c18bc324f9690019ccc09fc69ee2972d3a1d.zip
get rid of HUES2 table (use string ops to replace it)
-rw-r--r--init.lua23
1 files changed, 7 insertions, 16 deletions
diff --git a/init.lua b/init.lua
index b83ee60..3b32d04 100644
--- a/init.lua
+++ b/init.lua
@@ -77,21 +77,6 @@ local GREYS = {
"black"
}
-local HUES2 = {
- "Red",
- "Orange",
- "Yellow",
- "Lime",
- "Green",
- "Aqua",
- "Cyan",
- "Sky-blue",
- "Blue",
- "Violet",
- "Magenta",
- "Red-violet"
-}
-
local default_dyes = {
"black",
"blue",
@@ -708,7 +693,13 @@ minetest.register_craft( {
for i = 1, 12 do
local hue = HUES[i]
- local hue2 = HUES2[i]
+ local hue2 = HUES[i]:gsub("%a", string.upper, 1)
+
+ if hue == "skyblue" then
+ hue2 = "Sky Blue"
+ elseif hue == "redviolet" then
+ hue2 = "Red-violet"
+ end
minetest.register_craft( {
type = "shapeless",