Modify create_map_color_file.py to create smaller diffs in the future
This commit is contained in:
parent
6f3ca37129
commit
1e8f29df0e
File diff suppressed because one or more lines are too long
@ -24,7 +24,7 @@ minetest.mkdir(map_textures_path)
|
||||
|
||||
local function load_json_file(name)
|
||||
local file = assert(io.open(modpath .. "/" .. name .. ".json", "r"))
|
||||
local data = minetest.parse_json(file:read())
|
||||
local data = minetest.parse_json(file:read("*all"))
|
||||
file:close()
|
||||
return data
|
||||
end
|
||||
|
@ -1 +1,518 @@
|
||||
{"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], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117], [109, 196, 117]]}
|
||||
{
|
||||
"beacon_beam_palette.png": [
|
||||
[232,227,227],
|
||||
[205,244,233],
|
||||
[249,252,251],
|
||||
[124, 94, 61],
|
||||
[ 24, 38,201],
|
||||
[ 22,244,244],
|
||||
[244,131,252],
|
||||
[151, 18,188],
|
||||
[234, 18, 18],
|
||||
[173,173,173],
|
||||
[ 83, 84, 84],
|
||||
[ 25,229, 42],
|
||||
[ 84,145, 89],
|
||||
[239,136, 19],
|
||||
[235,247, 4],
|
||||
[ 0, 0, 0],
|
||||
[229, 2,214],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
[255,255,255],
|
||||
],
|
||||
"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],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
[109,196,117],
|
||||
],
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import json, os
|
||||
import os
|
||||
from PIL import Image
|
||||
|
||||
colors = {}
|
||||
@ -49,11 +49,43 @@ for root, directories, files in os.walk(".."):
|
||||
except IOError:
|
||||
pass
|
||||
|
||||
# use this instead of json.dump to have full control over the output
|
||||
def dump_json(fp, obj):
|
||||
fp.write("{\n")
|
||||
for item in sorted(obj.items()):
|
||||
fp.write("\t\"" + item[0] + "\": ")
|
||||
|
||||
colors = None
|
||||
ident = None
|
||||
|
||||
value = item[1]
|
||||
|
||||
if isinstance(value, list):
|
||||
colors = value
|
||||
ident = "\t\t"
|
||||
|
||||
fp.write("[\n")
|
||||
else:
|
||||
colors = [value]
|
||||
ident = ""
|
||||
|
||||
for color in colors:
|
||||
fp.write(ident + "[")
|
||||
for idx, x in enumerate(color):
|
||||
fp.write(str(x).rjust(3))
|
||||
if idx < 2:
|
||||
fp.write(",")
|
||||
fp.write("],\n")
|
||||
|
||||
if isinstance(value, list):
|
||||
fp.write("\t],\n")
|
||||
|
||||
fp.write("}\n")
|
||||
|
||||
path = "../mods/ITEMS/mcl_maps/"
|
||||
|
||||
with open(path + "colors.json", "w") as colorfile:
|
||||
colorfile.write(json.dumps(colors))
|
||||
dump_json(colorfile, colors)
|
||||
|
||||
with open(path + "palettes.json", "w") as palettefile:
|
||||
palettefile.write(json.dumps(palettes))
|
||||
|
||||
dump_json(palettefile, palettes)
|
||||
|
Loading…
x
Reference in New Issue
Block a user