Documentation
¶
Overview ¶
Package profile keeps each character's play style on the player's own machine (the user config directory, never a repo).
Index ¶
Constants ¶
const Env = "WOWC_PROFILES"
Env overrides the store's path.
const (
MaxField = 120
)
Limits on what is stored.
const Schema = 1
Schema is the version of the file's layout. Changes are additive only: a field is added, never renamed, retyped or removed, so an older release reads a newer file by ignoring what it does not know (see docs/releasing.md).
Variables ¶
var ( Roles = []string{"damage", "tank", "healer", "balanced"} Foci = []string{"leveling", "dungeons", "pvp", "mixed"} // StatPrefs are the optional stat preferences ("" is balanced): see the stats package. StatPrefs = []string{"", "balanced", "damage", "survival"} )
Allowed values, first is listed first in the question the model asks.
Functions ¶
func Ask ¶
func Ask() string
Ask is the short multiple-choice question the model puts to a player who has no saved play style, before it gives any talent advice. The answer is saved with set_character_profile.
func Attach ¶
Attach returns c with its stored profile and plan; c is unchanged when path holds neither.
func Clean ¶
Clean checks a profile: role and focus are empty ("Not set") or from the allowed lists (case-insensitive, lower-cased on save) and the spec is short text. An empty role or focus is asked for again when a question needs it.
func Incomplete ¶ added in v0.7.42
Incomplete is true when a saved play style lacks its role or its focus, so a question that needs them must ask. A nil profile is incomplete too.
Types ¶
type Entry ¶
type Entry struct {
Profile *character.Profile `json:"profile,omitempty"`
// Seasonal is the holiday-event setting: empty (off, the default), "on" or "on:<event keys>".
Seasonal string `json:"seasonal,omitempty"`
}
Entry is everything stored for one character.