Documentation
¶
Index ¶
- Constants
- Variables
- func Run(s *prefs.Settings)
- type Operation
- type State
- func (s *State) AddConstraintRule() *moddata.ConstraintRule
- func (s *State) BuildEnabledMods() error
- func (s *State) CheckSettings() bool
- func (s *State) Clean()
- func (s *State) DisableMod(mod string)
- func (s *State) EnableMod(mod string)
- func (s *State) GetModIdxByName(name string) int
- func (s *State) IsDisabled(packageId string) (bool, int)
- func (s *State) IsEnabled(packageId string) (bool, int)
- func (s *State) IsModSorted(modIdx string) (bool, string)
- func (s *State) LoadConstraints() error
- func (s *State) LoadModList(name string) error
- func (s *State) LoadMods() error
- func (s *State) LoadModsConfig() error
- func (s *State) MoveMod(packageId string, pos int, enabled bool)
- func (s *State) Reload()
- func (s *State) SaveConstraints() error
- func (s *State) SaveModlist()
- func (s *State) SaveToModLists(name string) error
- func (s *State) Sort()
Constants ¶
View Source
const ( OP_QUIT = iota //modlist commands OP_RELOAD OP_SAVE OP_SORT //constraints OP_CNT_LOAD OP_CNT_SAVE OP_CNT_NEW_RULE //dialogs OP_DLG_STEAMWORKSHOP OP_DLG_RIMGAME OP_DLG_RIMSETTINGS OP_DLG_MODLIST_EXPORT OP_DLG_MODLIST_IMPORT )
View Source
const LOADMODLIST_POPUP = `loadModListFilePopup`
View Source
const SAVEMODLIST_POPUP = `saveModListFilePopup`
Variables ¶
View Source
var ( ErrSettingsMissing = errors.New("missing settings") ErrSettingsMisconfig = errors.New("one or more settings is misconfigured") ErrStateNotInitialised = errors.New("state not initialised") )
View Source
var BUS = make(chan Operation, 1)
Functions ¶
Types ¶
type State ¶
type State struct { ModList []moddata.AboutXML // List of all Mods EnabledMods []string DisabledMods []string ConstraintsCatalog *moddata.ConstraintCatalog ModsConfig *moddata.ModsConfig Settings *prefs.Settings Log strings.Builder // <RimworldConfig>/ModLists/*.rml ModLists []string // UI Theme *theme.Theme // Window Win *g.MasterWindow // contains filtered or unexported fields }
func (*State) AddConstraintRule ¶
func (s *State) AddConstraintRule() *moddata.ConstraintRule
func (*State) BuildEnabledMods ¶
BuildEnabledMods builds the state.EnabledMods and state.DisabledMods array of indices
func (*State) DisableMod ¶
func (*State) GetModIdxByName ¶
func (*State) LoadConstraints ¶
func (*State) LoadModList ¶
func (*State) LoadModsConfig ¶
LoadModsConfig loads the config/ModsConfig.xml Rimworld configuration file
func (*State) SaveConstraints ¶
func (*State) SaveModlist ¶
func (s *State) SaveModlist()
func (*State) SaveToModLists ¶
Click to show internal directories.
Click to hide internal directories.