Skip to content

ConfigAtlas

var (
// GetConfigAtlas returns the active ConfigAtlas. It must be set before
// calling any XxxCfgId.Cfg.
GetConfigAtlas func() *ConfigAtlas
)

ConfigAtlas holds all game configuration tables and provides cross-table reference binding.

Implements archmage.Atlas.

type ConfigAtlas struct {
AtlasExtension
// DataVersion is the version info of the config repo at export time.
DataVersion *archmage.VersionInfo
// One field per config type.
// ...
}
func NewConfigAtlas() *ConfigAtlas

AtlasItems returns the internal map of config-name to AtlasItem.

func (atlas *ConfigAtlas) AtlasItems() map[string]*AtlasItem

BindRefs is for internal use only.

func (atlas *ConfigAtlas) BindRefs()

OnLoaded is called after all config data has been loaded and refs bound. It delegates to AtlasExtension.OnLoaded. For internal use only.

func (atlas *ConfigAtlas) OnLoaded() error

SetDataVersion is for internal use only.

func (atlas *ConfigAtlas) SetDataVersion(v *archmage.VersionInfo)