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) DisableMod(mod int)
- func (s *State) EnableMod(mod int)
- 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 int) (bool, string)
- func (s *State) LoadConstraints() error
- func (s *State) LoadModList(_ string) error
- func (s *State) LoadMods() error
- func (s *State) LoadModsConfig() error
- func (s *State) Reload()
- func (s *State) SaveConstraints() error
- func (s *State) SaveExternalModList(filename string) error
- func (s *State) SaveModlist()
- 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 )
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 []int DisabledMods []int ConstraintsCatalog *moddata.ConstraintCatalog ModsConfig *moddata.ModsConfig Settings *prefs.Settings Log strings.Builder // 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) SaveExternalModList ¶
func (*State) SaveModlist ¶
func (s *State) SaveModlist()
Click to show internal directories.
Click to hide internal directories.