data displaying properly now

This commit is contained in:
2026-03-16 12:52:48 -06:00
parent c252ef0e11
commit 43dc14745f
5 changed files with 96 additions and 27 deletions

View File

@@ -19,8 +19,7 @@ defmodule CobblemonUi.CobblemonFS.PartyStore do
def parse(path) do
with {:ok, data} <- File.read(path),
{:ok, {_name, root}} <- NBT.decode(data) do
party = Map.get(root, "party", %{})
slots = for i <- 0..(@party_slots - 1), do: Pokemon.normalize(Map.get(party, "slot#{i}"))
slots = for i <- 0..(@party_slots - 1), do: Pokemon.normalize(Map.get(root, "Slot#{i}"))
{:ok, slots}
else
{:error, :enoent} -> {:error, :not_found}