mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-22 18:41:09 +01:00
Fix maps to display coloured foliage and water
This commit is contained in:
parent
8a408a5c7f
commit
c0f52ad344
4 changed files with 14 additions and 3 deletions
|
@ -30,7 +30,9 @@ local function load_json_file(name)
|
||||||
end
|
end
|
||||||
|
|
||||||
local texture_colors = load_json_file("colors")
|
local texture_colors = load_json_file("colors")
|
||||||
local palettes = load_json_file("palettes")
|
local palettes_grass = load_json_file("palettes_grass")
|
||||||
|
local palettes_foliage = load_json_file("palettes_foliage")
|
||||||
|
local palettes_water = load_json_file("palettes_water")
|
||||||
|
|
||||||
local color_cache = {}
|
local color_cache = {}
|
||||||
|
|
||||||
|
@ -92,8 +94,14 @@ function mcl_maps.create_map(pos)
|
||||||
if texture then
|
if texture then
|
||||||
texture = texture:match("([^=^%^]-([^.]+))$"):split("^")[1]
|
texture = texture:match("([^=^%^]-([^.]+))$"):split("^")[1]
|
||||||
end
|
end
|
||||||
if def.palette then
|
if def.palette == "mcl_core_palette_grass.png" then
|
||||||
local palette = palettes[texture]
|
local palette = palettes_grass[texture]
|
||||||
|
color = palette and { palette = palette }
|
||||||
|
elseif def.palette == "mcl_core_palette_foliage.png" then
|
||||||
|
local palette = palettes_foliage[texture]
|
||||||
|
color = palette and { palette = palette }
|
||||||
|
elseif def.palette == "mcl_core_palette_water.png" then
|
||||||
|
local palette = palettes_water[texture]
|
||||||
color = palette and { palette = palette }
|
color = palette and { palette = palette }
|
||||||
else
|
else
|
||||||
color = texture_colors[texture]
|
color = texture_colors[texture]
|
||||||
|
|
1
mods/ITEMS/mcl_maps/palettes_foliage.json
Normal file
1
mods/ITEMS/mcl_maps/palettes_foliage.json
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"mcl_core_palette_foliage.png": [[86, 164, 117], [109, 196, 117], [118, 177, 120], [159, 193, 114], [159, 193, 114], [74, 107, 58], [94, 190, 107], [94, 190, 107], [222, 188, 101], [90, 197, 87], [35, 175, 105], [92, 182, 119], [93, 181, 76], [93, 181, 76], [82, 153, 81], [91, 177, 85], [86, 164, 117], [94, 190, 107]]}
|
1
mods/ITEMS/mcl_maps/palettes_grass.json
Normal file
1
mods/ITEMS/mcl_maps/palettes_grass.json
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"mcl_core_palette_grass.png": [[109, 196, 117], [159, 193, 114], [118, 177, 120], [118, 177, 120], [107, 186, 107], [118, 177, 120], [92, 182, 119], [92, 182, 119], [92, 182, 119], [92, 182, 119], [118, 177, 120], [109, 196, 117], [35, 175, 105], [94, 190, 107], [94, 190, 107], [94, 190, 107], [94, 190, 107], [159, 193, 114], [76, 176, 84], [164, 150, 110], [164, 150, 110], [164, 150, 110], [164, 150, 110], [159, 193, 114], [93, 181, 76], [93, 181, 76], [93, 181, 76], [93, 181, 76], [76, 118, 60], [94, 190, 107]]}
|
1
mods/ITEMS/mcl_maps/palettes_water.json
Normal file
1
mods/ITEMS/mcl_maps/palettes_water.json
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"mcl_core_palette_water.png": [[63, 118, 228], [82, 121, 179], [66, 149, 235], [65, 174, 233], [62, 104, 221], [60, 93, 215], [46, 100, 218], [61, 120, 181]]}
|
Loading…
Reference in a new issue