Documentation
¶
Index ¶
- Constants
- func DownloadMods(cacheDir string, modVersions []ModVersion, binaryType aumgr.BinaryType, ...) error
- func PrepareProfileDirectory(profileDir string, cacheDir string, modVersions []ModVersion, ...) error
- func ResolveDependencies(initialMods []ModVersion, provider VersionProvider) (map[string]ModVersion, error)
- func SaveInstallationInfo(gameRoot *os.Root, installation *ModInstallation) error
- func UninstallMod(modInstallLocation *os.Root, progress progress.Progress, ...) error
- type HashCheckingWriter
- type InstallStatus
- type InstalledVersionInfo
- type Mod
- type ModDependencydeprecated
- type ModDependencyType
- type ModInstallationdeprecated
- type ModPackdeprecated
- type ModType
- type ModVersion
- func (m ModVersion) CompatibleFilesCount(binaryType aumgr.BinaryType) int
- func (m ModVersion) Downloads(binaryType aumgr.BinaryType) iter.Seq[model.ModVersionFile]
- func (m ModVersion) HasFeature(feature string) bool
- func (m ModVersion) IsCompatible(launcherType aumgr.LauncherType, binaryType aumgr.BinaryType, ...) bool
- type ProfileMetadata
- type RestoreInfo
- type VersionProvider
Constants ¶
View Source
const FeatureDirectJoin = "direct_join"
View Source
const InstallationInfoFileName = ".mod_installation"
Variables ¶
This section is empty.
Functions ¶
func DownloadMods ¶ added in v1.1.0
func DownloadMods(cacheDir string, modVersions []ModVersion, binaryType aumgr.BinaryType, progressListener progress.Progress, force bool) error
func PrepareProfileDirectory ¶ added in v1.1.0
func PrepareProfileDirectory(profileDir string, cacheDir string, modVersions []ModVersion, binaryType aumgr.BinaryType, gameVersion string, force bool, progressListener progress.Progress) error
PrepareProfileDirectory installs mods from cache to the profile directory and generates doorstop_config.ini.
func ResolveDependencies ¶ added in v1.1.0
func ResolveDependencies(initialMods []ModVersion, provider VersionProvider) (map[string]ModVersion, error)
ResolveDependencies recursively finds all required dependencies for a given set of mod versions. It returns a map of ModID to ModVersion containing all original mods and their required dependencies.
func SaveInstallationInfo ¶
func SaveInstallationInfo(gameRoot *os.Root, installation *ModInstallation) error
func UninstallMod ¶
Types ¶
type HashCheckingWriter ¶ added in v1.4.2
type InstallStatus ¶
type InstallStatus string
const ( InstallStatusCompatible InstallStatus = "compatible" InstallStatusIncompatible InstallStatus = "incompatible" InstallStatusBroken InstallStatus = "broken" InstallStatusUnknown InstallStatus = "unknown" )
type InstalledVersionInfo ¶ added in v1.1.0
type InstalledVersionInfo struct {
ModVersion `json:",inline"`
Paths []string `json:"paths"`
}
func UninstallRemainingMods ¶
func UninstallRemainingMods(modInstallLocation *os.Root, progress progress.Progress, remainMods []ModVersion) ([]InstalledVersionInfo, error)
type Mod ¶
type Mod struct {
model.ModDetails
}
type ModDependency
deprecated
type ModDependency struct {
ID string `json:"id"`
Version string `json:"version,omitempty"`
Type ModDependencyType `json:"type"`
}
Deprecated: use model.ModVersionDependency instead
type ModDependencyType ¶
type ModDependencyType = model.DependencyType
const ( ModDependencyTypeRequired ModDependencyType = model.DependencyTypeRequired ModDependencyTypeOptional ModDependencyType = model.DependencyTypeOptional ModDependencyTypeConflict ModDependencyType = model.DependencyTypeConflict ModDependencyTypeEmbedded ModDependencyType = model.DependencyTypeEmbedded )
type ModInstallation
deprecated
type ModInstallation struct {
FileVersion int `json:"file_version"`
InstalledMods []InstalledVersionInfo `json:"installed_mods"`
InstalledGameVersion string `json:"installed_game_version"`
Status InstallStatus `json:"status"`
// contains filtered or unexported fields
}
Deprecated: Should use profile.Profile to track installed mods instead.
func LoadInstallationInfo ¶
func LoadInstallationInfo(modInstallLocation *os.Root) (*ModInstallation, error)
func (*ModInstallation) MarshalJSON ¶
func (mi *ModInstallation) MarshalJSON() ([]byte, error)
func (*ModInstallation) OldVanillaFiles ¶
func (mi *ModInstallation) OldVanillaFiles() []string
For file versions 0 and 1, return the list of vanilla files stored in the installation data.
func (*ModInstallation) UnmarshalJSON ¶
func (mi *ModInstallation) UnmarshalJSON(data []byte) error
type ModVersion ¶
type ModVersion struct {
model.ModVersionDetails
}
func (ModVersion) CompatibleFilesCount ¶
func (m ModVersion) CompatibleFilesCount(binaryType aumgr.BinaryType) int
func (ModVersion) Downloads ¶
func (m ModVersion) Downloads(binaryType aumgr.BinaryType) iter.Seq[model.ModVersionFile]
func (ModVersion) HasFeature ¶ added in v1.6.0
func (m ModVersion) HasFeature(feature string) bool
func (ModVersion) IsCompatible ¶
func (m ModVersion) IsCompatible(launcherType aumgr.LauncherType, binaryType aumgr.BinaryType, gameVersion string) bool
type ProfileMetadata ¶ added in v1.1.0
type ProfileMetadata struct {
ModVersions []ModVersion `json:"mod_versions"`
GameVersion string `json:"game_version"`
BinaryType aumgr.BinaryType `json:"binary_type"`
}
func GetProfileMetadata ¶ added in v1.1.0
func GetProfileMetadata(profileDir string) (*ProfileMetadata, error)
type RestoreInfo ¶ added in v1.1.0
type RestoreInfo struct {
BackupDir string `json:"backup_dir"`
Added []string `json:"added"`
Moved map[string]string `json:"moved"` // Original Path -> Backup Path
}
func ApplyMods ¶ added in v1.1.0
func ApplyMods(gameDir string, cacheDir string, modVersions []ModVersion, binaryType aumgr.BinaryType) (*RestoreInfo, error)
type VersionProvider ¶ added in v1.1.0
type VersionProvider interface {
GetModVersion(modID string, versionID string) (*ModVersion, error)
GetLatestModVersion(modID string) (*ModVersion, error)
GetModVersionIDs(modID string, limit int, after string) ([]string, error)
}
VersionProvider is an interface to fetch mod version details.
Click to show internal directories.
Click to hide internal directories.