22 lines
593 B
C#
22 lines
593 B
C#
using System.Text.Json;
|
|
using GameDataExtractor;
|
|
using Lumina;
|
|
|
|
var data = new GameData("/home/anna/.xlcore/ffxiv/game/sqpack");
|
|
|
|
var maps = new Maps(data).Extract();
|
|
var worlds = new Worlds(data).Extract();
|
|
var serverInfo = new ServerInfo(data).Extract();
|
|
|
|
await WriteToFile("territories.json", maps);
|
|
await WriteToFile("worlds.json", worlds);
|
|
await File.WriteAllTextAsync("game_info.rs", serverInfo);
|
|
|
|
Console.WriteLine("Done");
|
|
return;
|
|
|
|
async Task WriteToFile<T>(string path, T item) {
|
|
await using var file = File.Create(path);
|
|
await JsonSerializer.SerializeAsync(file, item);
|
|
}
|