Documentation ¶
Index ¶
- Variables
- type ArchiveLocation
- type BugKind
- type BugReport
- type Category
- type CfModID
- type Choice
- type Configuration
- type ConflictChoiceCallback
- type CurseForgeDownloadable
- type DonationLink
- type DoneCallback
- type Download
- type DownloadFiles
- type FileConflict
- type Game
- type GitHub
- type HostedDownloadable
- type InstalledDownload
- type Kind
- type Kinds
- type Mod
- func (m *Mod) BranchName() string
- func (m *Mod) ID() ModID
- func (m *Mod) InstallType(game config.GameDef) config.InstallType
- func (m *Mod) Kinds() Kinds
- func (m *Mod) LoadFromFile(file string) (err error)
- func (m *Mod) Mod() *Mod
- func (m *Mod) Save(to string) error
- func (m *Mod) Supports(game config.GameDef) error
- func (m *Mod) Validate() string
- type ModCompat
- type ModCompatibility
- type ModDef
- type ModDir
- type ModEnabler
- type ModFile
- type ModID
- type ModKind
- type ModLookup
- type ModLookupConc
- func (l *ModLookupConc[T]) All() []T
- func (l *ModLookupConc[T]) Clear()
- func (l *ModLookupConc[T]) Get(m T) (found T, ok bool)
- func (l *ModLookupConc[T]) GetByID(modID ModID) (found T, ok bool)
- func (l *ModLookupConc[T]) Has(m T) bool
- func (l *ModLookupConc[T]) Len() int
- func (l *ModLookupConc[T]) Remove(m T)
- func (l *ModLookupConc[T]) RemoveConditionally(f func(m T) bool)
- func (l *ModLookupConc[T]) Set(m T)
- type ModName
- type NexusDownloadable
- type NexusModID
- type OnConflict
- type Preview
- func (p *Preview) Get() *canvas.Image
- func (p *Preview) GetAsButton(onClick func()) *fyne.Container
- func (p *Preview) GetAsEnlargeOnClick() *fyne.Container
- func (p *Preview) GetAsImageGallery(index int, previews []*Preview, enlarge bool) *fyne.Container
- func (p *Preview) GetUncachedImage() (img *canvas.Image)
- type Result
- type SelectType
- type Size
- type ToInstall
- type TrackedMod
- type TrackedModConc
- func (m *TrackedModConc) Disable()
- func (m *TrackedModConc) DisplayName() string
- func (m *TrackedModConc) DisplayNamePtr() *string
- func (m *TrackedModConc) Enable()
- func (m *TrackedModConc) Enabled() bool
- func (m *TrackedModConc) EnabledPtr() *bool
- func (m *TrackedModConc) ID() ModID
- func (m *TrackedModConc) InstallType(game config.GameDef) config.InstallType
- func (m *TrackedModConc) Kinds() Kinds
- func (m *TrackedModConc) Mod() *Mod
- func (m *TrackedModConc) MoogleModFile() string
- func (m *TrackedModConc) Save() error
- func (m *TrackedModConc) SetDisplayName(name string)
- func (m *TrackedModConc) SetMod(mod *Mod)
- func (m *TrackedModConc) SetUpdatedMod(updatedMod *Mod)
- func (m *TrackedModConc) Toggle() bool
- func (m *TrackedModConc) UpdatedMod() *Mod
Constants ¶
This section is empty.
Variables ¶
View Source
var Categories = []string{ string(BattleScene), string(EnemySprite), string(GameOverhauls), string(Gameplay), string(Fonts), string(PlayerNpcSprites), string(ScriptText), string(Soundtrack), string(TileSet), string(TitleScreen), string(UIGeneral), string(UiMenuPortraits), string(UiWindowFrames), string(UiTextBoxPortraits), string(Utility), }
View Source
var InstallTypes = []string{string(config.Move), string(config.MoveToArchive)}
View Source
var SubKinds = []string{ string(HostedAt), string(HostedGitHub), }
Functions ¶
This section is empty.
Types ¶
type ArchiveLocation ¶ added in v0.6.2
type ArchiveLocation string
func (*ArchiveLocation) ExtractDir ¶ added in v0.6.2
func (l *ArchiveLocation) ExtractDir(fileName string) string
type Category ¶
type Category string
const ( BattleScene Category = "Battle Scene" EnemySprite Category = "Enemy Sprite" GameOverhauls Category = "GameDef Overhauls" Gameplay Category = "Gameplay" General Category = "General" Fonts Category = "Fonts" PlayerNpcSprites Category = "Player/NPC Sprite" ScriptText Category = "Script/Text" Soundtrack Category = "Soundtrack" TileSet Category = "Tile Set" TitleScreen Category = "Title Screen" UIGeneral Category = "UI: General" UiMenuPortraits Category = "UI: Menu Portraits" UiTextBoxPortraits Category = "UI: Textbox Portraits" UiWindowFrames Category = "UI: Window Frames" Utility Category = "Utility" )
type Choice ¶
type Choice struct { Name string `json:"Name" xml:"Name"` Description string `json:"Description" xml:"Description"` Preview *Preview `json:"Preview,omitempty" xml:"Preview,omitempty"` DownloadFiles *DownloadFiles `json:"DownloadFiles,omitempty" xml:"DownloadFiles,omitempty"` NextConfigurationName *string `json:"NextConfigurationName,omitempty" xml:"NextConfigurationName"` }
type Configuration ¶
type Configuration struct { Name string `json:"Name" xml:"Name"` Description string `json:"Description" xml:"Description"` Preview *Preview `json:"Preview,omitempty" xml:"Preview,omitempty"` Root bool `json:"Root" xml:"Root"` Choices []*Choice `json:"Choice" xml:"Choices"` NextConfigurationName *string `json:"NextConfigurationName,omitempty" xml:"NextConfigurationName"` }
type ConflictChoiceCallback ¶
type ConflictChoiceCallback func(result Result, choices []*FileConflict, err ...error)
type CurseForgeDownloadable ¶ added in v0.6.0
type DonationLink ¶
type DoneCallback ¶
type Download ¶
type Download struct { Name string `json:"Name" xml:"Name"` Version string `json:"Version" xml:"Version"` Hosted *HostedDownloadable `json:"Hosted,omitempty" xml:"Hosted,omitempty"` Nexus *NexusDownloadable `json:"Nexus,omitempty" xml:"Nexus,omitempty"` CurseForge *CurseForgeDownloadable `json:"CurseForge,omitempty" xml:"CurseForge,omitempty"` DownloadedArchiveLocation *ArchiveLocation `json:"DownloadedLoc,omitempty" xml:"DownloadedLoc,omitempty"` }
type DownloadFiles ¶
type DownloadFiles struct { DownloadName string `json:"DownloadName" xml:"DownloadName"` // IsInstallAll is used by nexus mods when a mod.xml is not used Files []*ModFile `json:"File,omitempty" xml:"Files,omitempty"` Dirs []*ModDir `json:"Dir,omitempty" xml:"Dirs,omitempty"` }
func (*DownloadFiles) HasArchive ¶ added in v0.7.4
func (f *DownloadFiles) HasArchive() []string
func (*DownloadFiles) IsEmpty ¶
func (f *DownloadFiles) IsEmpty() bool
type FileConflict ¶
func (*FileConflict) OnChange ¶
func (c *FileConflict) OnChange(selected string)
type HostedDownloadable ¶
type HostedDownloadable struct {
Sources []string `json:"Source" xml:"Sources"`
}
type InstalledDownload ¶
func NewInstalledDownload ¶
func NewInstalledDownload(name, version string) *InstalledDownload
type Mod ¶
type Mod struct {
*ModDef
}
func NewModForVersion ¶ added in v0.5.5
func (*Mod) BranchName ¶
func (*Mod) InstallType ¶ added in v0.6.2
func (m *Mod) InstallType(game config.GameDef) config.InstallType
func (*Mod) LoadFromFile ¶ added in v0.8.7
type ModCompat ¶
type ModCompat struct { Versions []string `json:"Version,omitempty" xml:"Versions,omitempty"` ID ModID `json:"ModID,omitempty" xml:"ModID,omitempty"` }
ModCompatOrder string
type ModCompatibility ¶
type ModCompatibility struct { Requires []*ModCompat `json:"Require" xml:"Requires"` Forbids []*ModCompat `json:"Forbid" xml:"Forbids"` }
func (*ModCompatibility) HasItems ¶
func (c *ModCompatibility) HasItems() bool
type ModDef ¶ added in v0.6.0
type ModDef struct { ModID ModID `json:"ID" xml:"ID"` Name ModName `json:"Name" xml:"Name"` Author string `json:"Author" xml:"Author"` AuthorLink string `json:"AuthorLink" xml:"AuthorLink"` ReleaseDate string `json:"ReleaseDate" xml:"ReleaseDate"` Category Category `json:"Category" xml:"Category"` Description string `json:"Description" xml:"Description"` ReleaseNotes string `json:"ReleaseNotes" xml:"ReleaseNotes"` Link string `json:"Link" xml:"Link"` Version string `json:"Version" xml:"Version"` InstallType_ *config.InstallType `json:"InstallType,omitempty" xml:"InstallType,omitempty"` Preview *Preview `json:"Preview,omitempty" xml:"Preview,omitempty"` Previews []*Preview `json:"Previews,omitempty" xml:"Previews,omitempty"` ModKind ModKind `json:"ModKind" xml:"ModKind"` ModCompatibility *ModCompatibility `json:"Compatibility,omitempty" xml:"ModCompatibility,omitempty"` Downloadables []*Download `json:"Downloadable" xml:"Downloadables"` DonationLinks []*DonationLink `json:"DonationLink" xml:"DonationLinks"` Games []*Game `json:"Games" xml:"Games"` AlwaysDownload []*DownloadFiles `json:"AlwaysDownload,omitempty" xml:"AlwaysDownload,omitempty"` Configurations []*Configuration `json:"Configuration,omitempty" xml:"Configurations,omitempty"` ConfigSelectionType SelectType `json:"ConfigSelectionType" xml:"ConfigSelectionType"` Hide bool `json:"Hide" xml:"Hide"` VerifiedAsWorking bool `json:"VerifiedAsWorking" xml:"VerifiedAsWorking"` Bugs []BugReport `json:"Bugs,omitempty" xml:"Bugs,omitempty"` IsManuallyCreated bool `json:"IsManuallyCreated" xml:"IsManuallyCreated"` }
type ModEnabler ¶
type ModEnabler struct { Game config.GameDef TrackedMod TrackedMod ToInstall []*ToInstall OnConflict OnConflict ShowWorking func() DoneCallback DoneCallback }
func NewModEnabler ¶
func NewModEnabler(game config.GameDef, tm TrackedMod, toInstall []*ToInstall, onConflict OnConflict, showWorking func(), doneCallback DoneCallback) *ModEnabler
func (*ModEnabler) Kinds ¶ added in v0.8.1
func (e *ModEnabler) Kinds() Kinds
type ModKind ¶
type ModKind struct { Kinds Kinds `json:"Kinds" xml:"Kinds"` NexusID *NexusModID `json:"NexusID,omitempty" xml:"NexusID,omitempty"` CurseForgeID *CfModID `json:"CurseForgeID,omitempty" xml:"CurseForgeID,omitempty"` GitHub *GitHub `json:"Github,omitempty" xml:"Github,omitempty"` }
type ModLookup ¶ added in v0.6.0
type ModLookup[T mod] interface { All() []T Clear() Get(m T) (found T, ok bool) GetByID(modID ModID) (found T, ok bool) Has(m T) bool Len() int Remove(m T) RemoveConditionally(f func(t T) bool) Set(m T) }
func NewModLookup ¶ added in v0.6.0
func NewModLookup[T mod]() ModLookup[T]
type ModLookupConc ¶ added in v0.6.0
type ModLookupConc[T mod] struct {
Lookup map[lookupID]T `json:"Lookup"`
}
ModLookupConc is a public for serialization purposes.
func (*ModLookupConc[T]) Get ¶ added in v0.6.0
func (l *ModLookupConc[T]) Get(m T) (found T, ok bool)
func (*ModLookupConc[T]) RemoveConditionally ¶ added in v0.7.0
func (l *ModLookupConc[T]) RemoveConditionally(f func(m T) bool)
type NexusDownloadable ¶
type NexusModID ¶ added in v0.8.1
type NexusModID int
type OnConflict ¶
type OnConflict func(conflicts []*FileConflict, choiceCallback ConflictChoiceCallback)
type Preview ¶
type Preview struct { Url *string `json:"Url,omitempty" xml:"Url,omitempty"` Local *string `json:"Local,omitempty" xml:"Local,omitempty"` // contains filtered or unexported fields }
func (*Preview) GetAsButton ¶ added in v0.8.7
func (p *Preview) GetAsButton(onClick func()) *fyne.Container
func (*Preview) GetAsEnlargeOnClick ¶ added in v0.8.7
func (p *Preview) GetAsEnlargeOnClick() *fyne.Container
func (*Preview) GetAsImageGallery ¶ added in v0.8.7
func (*Preview) GetUncachedImage ¶ added in v0.8.7
type SelectType ¶
type SelectType string
const ( Auto SelectType = "Auto" Select SelectType = "Select" Radio SelectType = "Radio" )
type ToInstall ¶
type ToInstall struct { Download *Download DownloadFiles []*DownloadFiles // contains filtered or unexported fields }
func NewToInstall ¶
func NewToInstall(kinds Kinds, download *Download, downloadFiles *DownloadFiles) *ToInstall
func NewToInstallForMod ¶
func NewToInstallForMod(mod *Mod, downloadFiles []*DownloadFiles) (result []*ToInstall, err error)
func (*ToInstall) GetDownloadLocation ¶
type TrackedMod ¶
type TrackedMod interface { ID() ModID Kinds() Kinds Mod() *Mod SetMod(m *Mod) Enable() Enabled() bool EnabledPtr() *bool Disable() Save() error DisplayName() string DisplayNamePtr() *string SetDisplayName(name string) UpdatedMod() *Mod SetUpdatedMod(m *Mod) MoogleModFile() string InstallType(game config.GameDef) config.InstallType }
func NewTrackerMod ¶
func NewTrackerMod(mod *Mod, game config.GameDef) TrackedMod
type TrackedModConc ¶ added in v0.6.0
type TrackedModConc struct { IsEnabled bool `json:"Enabled"` MoogleModFile_ string `json:"MoogleModFile"` //Installed []*InstalledDownload `json:"Installed"` Mod_ *Mod `json:"-"` UpdatedMod_ *Mod `json:"-"` DisplayName_ string `json:"-"` }
TrackedModConc is public for serialization purposes
func (*TrackedModConc) Disable ¶ added in v0.6.0
func (m *TrackedModConc) Disable()
func (*TrackedModConc) DisplayName ¶ added in v0.6.0
func (m *TrackedModConc) DisplayName() string
func (*TrackedModConc) DisplayNamePtr ¶ added in v0.6.0
func (m *TrackedModConc) DisplayNamePtr() *string
func (*TrackedModConc) Enable ¶ added in v0.6.0
func (m *TrackedModConc) Enable()
func (*TrackedModConc) Enabled ¶ added in v0.6.0
func (m *TrackedModConc) Enabled() bool
func (*TrackedModConc) EnabledPtr ¶ added in v0.6.4
func (m *TrackedModConc) EnabledPtr() *bool
func (*TrackedModConc) ID ¶ added in v0.6.0
func (m *TrackedModConc) ID() ModID
func (*TrackedModConc) InstallType ¶ added in v0.6.2
func (m *TrackedModConc) InstallType(game config.GameDef) config.InstallType
func (*TrackedModConc) Kinds ¶ added in v0.8.1
func (m *TrackedModConc) Kinds() Kinds
func (*TrackedModConc) Mod ¶ added in v0.6.0
func (m *TrackedModConc) Mod() *Mod
func (*TrackedModConc) MoogleModFile ¶ added in v0.6.0
func (m *TrackedModConc) MoogleModFile() string
func (*TrackedModConc) Save ¶ added in v0.6.0
func (m *TrackedModConc) Save() error
func (*TrackedModConc) SetDisplayName ¶ added in v0.6.0
func (m *TrackedModConc) SetDisplayName(name string)
func (*TrackedModConc) SetMod ¶ added in v0.6.0
func (m *TrackedModConc) SetMod(mod *Mod)
func (*TrackedModConc) SetUpdatedMod ¶ added in v0.6.0
func (m *TrackedModConc) SetUpdatedMod(updatedMod *Mod)
func (*TrackedModConc) Toggle ¶ added in v0.6.0
func (m *TrackedModConc) Toggle() bool
func (*TrackedModConc) UpdatedMod ¶ added in v0.6.0
func (m *TrackedModConc) UpdatedMod() *Mod
Source Files ¶
Click to show internal directories.
Click to hide internal directories.