15 lines
470 B
C#
15 lines
470 B
C#
using System.Collections.Generic;
|
|
using System.Text.Json;
|
|
|
|
public record WorldIndex(int schema, string world_id, string display_name, int chunk_size_px, int tile_size_px, int[] start_pos_px, List<WorldIndexChunk> chunks)
|
|
{
|
|
public Dictionary<(int x, int y), string> BuildChunkMap()
|
|
{
|
|
var map = new Dictionary<(int, int), string>();
|
|
foreach (var c in chunks)
|
|
map[(c.x, c.y)] = c.path;
|
|
return map;
|
|
}
|
|
}
|
|
|
|
public record WorldIndexChunk(int x, int y, string path);
|