Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindSteamRoots ¶
func FindSteamRoots() []string
FindSteamRoots returns candidate Steam installation roots in search order. On many real Linux installs ~/.steam/steam is a symlink to ~/.local/share/Steam (or the reverse) - both paths exist and both pass the existence check below, but they are the same real directory. Scanning both would run DetectGames' whole library scan twice against identical data, duplicating every warning it produces (and doing twice the redundant work). Resolved-path dedup keeps only the first candidate (this list's own priority order) whenever a later one turns out to be the same real directory as one already kept.
func GetLibraryPaths ¶
GetLibraryPaths returns all Steam library paths from a Steam root (reading libraryfolders.vdf).
Types ¶
type AppManifest ¶
AppManifest holds parsed fields from an appmanifest_*.acf file.
func ParseAppManifest ¶
func ParseAppManifest(data string) (AppManifest, error)
ParseAppManifest parses appmanifest_*.acf content and returns AppManifest.
type DetectedGame ¶
type DetectedGame struct {
SteamAppID string // Steam App ID
Slug string // lmm game ID (from known games list)
Name string // Display name
InstallPath string // Absolute path to game install (e.g. .../common/Skyrim Special Edition)
ModPath string // Absolute path to mod directory (InstallPath + ModPath relative)
NexusID string // NexusMods game domain ID. Optional: "" for games with no NexusMods presence (#177).
DeployMode string // games.yaml's deploy_mode string, passed through from GameInfo.DeployMode. Optional: "" means the default (extract).
Sources map[string]string // games.yaml's sources map, passed through from GameInfo.Sources. Optional: nil means "derive {nexusmods: NexusID}".
}
DetectedGame is a Steam game found on disk that lmm knows how to configure.
func DetectGames ¶
func DetectGames(configDir string) (games []DetectedGame, warnings []string, err error)
DetectGames scans Steam libraries for known moddable games and returns them. configDir is used to load the known-games list (embedded default + optional steam-games.yaml). Warnings are non-fatal errors (e.g. unreadable library, parse failure) so users can diagnose.
type GameInfo ¶
type GameInfo struct {
Slug string // lmm game ID, e.g. "skyrim-se"
Name string // Display name, e.g. "Skyrim Special Edition"
NexusID string // NexusMods game domain ID, e.g. "skyrimspecialedition". Optional: absent for games with no NexusMods presence (e.g. Icarus).
ModPath string // Relative path from game install to mod directory, e.g. "Data"
// DeployMode is games.yaml's deploy_mode string ("extract"/"copy"/"compile"),
// passed through as-is for domain.ParseDeployMode to interpret. Optional:
// "" means the game uses the default (extract), exactly as every entry
// behaved before this field existed (#177).
DeployMode string
// Sources is a full source-id -> per-source game-id map (games.yaml's
// "sources:" block), for games whose primary source isn't NexusMods (or
// that need more than one source, e.g. #177's Icarus: {"icarus": "icarus"}).
// Optional: nil means "derive {nexusmods: NexusID}", exactly as every
// entry behaved before this field existed.
Sources map[string]string
}
GameInfo describes a moddable game known to lmm, mapped from Steam App ID.