Skip to content

Replace StarMapDirectoryPath with per-loader paths #42

Description

@Maximilian-Nesslauer

BoreaSettings names one loader: it carries GameDirectoryPath and StarMapDirectoryPath, mirrored by IGamePathProvider.GetStarMapDirectoryPath, GamePathProvider, BoreaSettingsDto and BoreaSettingsMapper.

GetStarMapDirectoryPath has no caller outside the tests and the test double, StarMapDirectoryPath is only round-tripped by the mapper, and GamePathProvider is never constructed in Borea.App. There are no call sites to follow and no behaviour to preserve.

Installing a loader per RFC 0035 also needs [provides].launch, content-dir and the [provides.configure] write, and [provides] is never stamped into a release file so it has to be re-read from the authored listing.

The change:

  • BoreaSettings: replace StarMapDirectoryPath with a loader-id-to-path map, rebuilt through ModIds.Comparer the way ModMetadata rebuilds Links. Validate each key with ModIds.Validate and keep the existing whitespace rejection per path.
  • IGamePathProvider: GetLoaderDirectoryPath(string loaderId) returning null when unknown, and GamePathProvider follows.
  • BoreaSettingsDto takes a dictionary like ModMetadataDto.Links so Tomlyn writes it as a table, and the mapper maps both directions.
  • Tests including a round-trip with two loaders, and one with TOML keys differing only in case, which collide under ModIds.Comparer since TOML keys are case-sensitive and ids are not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:coreBorea.Core, the domain modelarea:storageBorea.Storage, persistence and TOMLdesign-repoBlocked on or waiting for a decision in mod-manager-design

    Type

    No type

    Projects

    Status
    Backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions