Documentation
¶
Index ¶
- func CheckForUpdates(install bool) bool
- func DownloadModWithDependencies(modID string, version string) (bool, int)
- func GetDependencies(modID string, modVersion string) map[string]string
- func GetDownloadedModVersionWithConstraint(modID string, versionConstraint string) string
- func GetDownloadedModVersions(modID string) ([]string, error)
- func GetInstalledModVersionWithConstraint(modID string, versionConstraint string, smlPath string) string
- func GetLatestDownloadedVersion(modID string) (string, error)
- func Install(modID string, modVersion string, smlPath string) bool
- func InstallModWithDependencies(modID string, version string, smlPath string) bool
- func IsModInstalled(modID string, smlPath string) bool
- func IsModVersionInstalled(modID string, version string, smlPath string) bool
- func IsModVersionWithConstraintInstalled(modID string, versionConstraint string, smlPath string) bool
- func Remove(modID string, modVersion string) bool
- func Uninstall(modID string, modVersion string, smlPath string) bool
- func Update(modID string) (bool, int)
- type DataJSON
- type ModFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckForUpdates ¶
CheckForUpdates compares the installed version with the newest available and optionally downloads it
func DownloadModWithDependencies ¶
DownloadModWithDependencies downloads the mod and its dependencies
func GetDependencies ¶
GetDependencies returns the non optional dependencies of a mod
func GetDownloadedModVersionWithConstraint ¶
GetDownloadedModVersionWithConstraint returns the latest downloaded version that meets the constraint
func GetDownloadedModVersions ¶
GetDownloadedModVersions Returns the downloaded versions of the mod
func GetInstalledModVersionWithConstraint ¶
func GetInstalledModVersionWithConstraint(modID string, versionConstraint string, smlPath string) string
GetInstalledModVersionWithConstraint returns the latest installed version that meets the constraint
func GetLatestDownloadedVersion ¶
GetLatestDownloadedVersion Returns the latest downloaded version of the mod
func InstallModWithDependencies ¶
InstallModWithDependencies installs the mod and its dependencies
func IsModInstalled ¶
IsModInstalled checks if a mod is installed
func IsModVersionInstalled ¶
IsModVersionInstalled checks if a mod is installed
func IsModVersionWithConstraintInstalled ¶
func IsModVersionWithConstraintInstalled(modID string, versionConstraint string, smlPath string) bool
IsModVersionWithConstraintInstalled checks if a mod is installed
Types ¶
type DataJSON ¶
type DataJSON struct {
ModID string `json:"mod_id"`
Name string `json:"name"`
Version string `json:"version"`
Description string `json:"description"`
Authors []string `json:"authors"`
Objects []ModFile `json:"objects"`
Dependencies map[string]string `json:"dependencies"`
OptDependencies map[string]string `json:"optional_dependencies"`
}
DataJSON contains the data.json information
func GetDataFromZip ¶
GetDataFromZip returns the data.json file in the zip
func GetDownloadedMods ¶
func GetDownloadedMods() []DataJSON
GetDownloadedMods returns all mods found in the smlauncher mods dir
func GetInstalledModVersions ¶
GetInstalledModVersions returns the data.jsons of the versions of the mod
func GetInstalledMods ¶
GetInstalledMods returns all mods found in the sml mods dir