summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-02-24 20:13:43 -0500
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-02-24 20:13:43 -0500
commitd2819353c2ebeacc9b1741012d194277f0ded6db (patch)
tree6a7f4d0109f0d583de935ebe399714be14c64840
parentfbe762cf19d659a45de9f0812e8ab4325acebe36 (diff)
downloadunifieddyes-d2819353c2ebeacc9b1741012d194277f0ded6db.tar
unifieddyes-d2819353c2ebeacc9b1741012d194277f0ded6db.tar.gz
unifieddyes-d2819353c2ebeacc9b1741012d194277f0ded6db.tar.bz2
unifieddyes-d2819353c2ebeacc9b1741012d194277f0ded6db.tar.xz
unifieddyes-d2819353c2ebeacc9b1741012d194277f0ded6db.zip
fix greys in palette conversion table
-rw-r--r--init.lua14
1 files changed, 8 insertions, 6 deletions
diff --git a/init.lua b/init.lua
index 29d5bef..7f01fde 100644
--- a/init.lua
+++ b/init.lua
@@ -663,7 +663,14 @@ end
-- build a table to convert from classic/89-color palette to extended palette
-unifieddyes.convert_classic_palette = {}
+-- the first five entries are for the old greyscale - white, light, grey, dark, black
+unifieddyes.convert_classic_palette = {
+ 240,
+ 244,
+ 247,
+ 251,
+ 253
+}
for hue = 0, 11 do
-- light
@@ -678,11 +685,6 @@ for hue = 0, 11 do
end
end
-for grey = 0, 4 do
- local paletteidx = unifieddyes.getpaletteidx("dye:"..GREYS[grey+1], false)
- unifieddyes.convert_classic_palette[paletteidx] = 240 + grey
-end
-
-- Generate all dyes that are not part of the default minetest_game dyes mod
for _, h in ipairs(HUES_EXTENDED) do