mod

package
v1.0.47 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 11, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ModCachePatch string
)

Functions

func ExtractArchive

func ExtractArchive(modFilePath string, modDirectory string) error

func GetModState

func GetModState()

func InitModManager

func InitModManager()

func InstallAllMods

func InstallAllMods() error

func ProcessModState

func ProcessModState()

func SendModState

func SendModState() error

func ShutdownModManager

func ShutdownModManager() error

func UninstallMod

func UninstallMod(modReference string) error

func UpdateModConfigFile

func UpdateModConfigFile(modReference string, modConfig string) error

func UpdateSMLConfig

func UpdateSMLConfig() error

Types

type InstalledMod

type InstalledMod struct {
	ModReference    string
	ModPath         string
	ModDisplayName  string `json:"FriendlyName"`
	ModUPluginPath  string
	ModVersion      string `json:"SemVersion"`
	ShouldUninstall bool
}

func FindModsOnDisk

func FindModsOnDisk() []InstalledMod

type Mod

type Mod struct {
	ID           string       `json:"_id"`
	ModID        string       `json:"modId"`
	ModName      string       `json:"modName"`
	ModReference string       `json:"modReference"`
	Hidden       bool         `json:"hidden"`
	Versions     []ModVersion `json:"versions"`
}

type ModState

type ModState struct {
	ID                  string        `json:"_id"`
	InstalledSMLVersion string        `json:"installedSMLVersion"`
	SMLInstalled        bool          `json:"smlInstalled"`
	SelectedMods        []SelectedMod `json:"selectedMods"`
}

type ModVersion

type ModVersion struct {
	Version    string             `json:"version"`
	Link       string             `json:"link"`
	SMLVersion string             `json:"sml_version"`
	Targets    []ModVersionTarget `json:"targets"`
}

type ModVersionTarget

type ModVersionTarget struct {
	TargetName string `json:"targetName"`
	Link       string `json:"link"`
}

type SMLConfig

type SMLConfig struct {
	Installed        bool
	InstalledVersion string
	DesiredVersion   string
	ModPath          string
}

func (*SMLConfig) CheckInstalledOnDisk

func (obj *SMLConfig) CheckInstalledOnDisk() error

func (*SMLConfig) CheckMeetsDesiredVersion

func (obj *SMLConfig) CheckMeetsDesiredVersion() error

func (*SMLConfig) FindDesiredVersion

func (obj *SMLConfig) FindDesiredVersion(selectedMods []SelectedMod)

func (*SMLConfig) Init

func (obj *SMLConfig) Init() error

func (*SMLConfig) Install

func (obj *SMLConfig) Install() error

func (*SMLConfig) Uninstall

func (obj *SMLConfig) Uninstall() error

func (*SMLConfig) Update

func (obj *SMLConfig) Update(selectedMods []SelectedMod) error

type SelectedMod

type SelectedMod struct {
	ID               string `json:"_id"`
	Mod              Mod    `json:"mod"`
	DesiredVersion   string `json:"desiredVersion"`
	InstalledVersion string `json:"installedVersion"`
	Installed        bool   `json:"installed"`
	NeedsUpdate      bool   `json:"needsUpdate"`
	Config           string `json:"config"`
}

func (*SelectedMod) CheckInstalledOnDisk

func (obj *SelectedMod) CheckInstalledOnDisk() error

func (*SelectedMod) CheckMeetsDesiredVersion

func (obj *SelectedMod) CheckMeetsDesiredVersion() error

func (*SelectedMod) DownloadVersion

func (obj *SelectedMod) DownloadVersion(version ModVersion) error

func (*SelectedMod) GetModConfig

func (obj *SelectedMod) GetModConfig() error

func (*SelectedMod) Init

func (obj *SelectedMod) Init() error

type UPluginFile

type UPluginFile struct {
	SemVersion string `json:"SemVersion"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL