Skip to content

fix(mods): accept numeric Fantome versions - #321

Open
NoName-txt wants to merge 1 commit into
LeagueToolkit:mainfrom
NoName-txt:fix/fantome-numeric-version
Open

fix(mods): accept numeric Fantome versions#321
NoName-txt wants to merge 1 commit into
LeagueToolkit:mainfrom
NoName-txt:fix/fantome-numeric-version

Conversation

@NoName-txt

Copy link
Copy Markdown

What and why

Fantome metadata expects Version to be a string, but some existing mods use a numeric value such as "Version": 1.1.

This caused LTK Manager to reject the archive with:

Failed to parse info.json: invalid type: floating point 1.1, expected a string

A example is Sausage dog Naafiri, which could not be installed through the Install with LTK Manager flow.

This change:

  • Accepts numeric and unquoted dotted Fantome version values.
  • Converts those values to the string format expected by ltk_fantome.
  • Uses the same parser for archive installation, cslol migration, and workshop peek/import flows.
  • Preserves the original parse error for unrelated invalid metadata.

How it was tested

  • Added a regression test using the failing "Version": 1.1 format.
  • Added coverage for integer versions such as "Version": 2.
  • Verified the RuneForge mod can proceed through the LTK Manager download/install flow.
  • cargo fmt --all -- --check
  • cargo clippy -- -D warnings
  • cargo test - 449 tests passed across 3 suites.

Checklist

  • Title follows Conventional Commits (feat: / fix: / docs: / chore:; ! for breaking)
  • cargo fmt --all -- --check passes
  • cargo clippy -- -D warnings passes
  • cargo test passes
  • README / docs update not required; no public API or documented workflow changed
  • Tests added for the bug fixed or feature added

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant