Documentation ¶
Overview ¶
Package nook provides a comprehensive collection of character information from the video game series, Animal Crossing.
This package focuses on organizing and classifying characters into two main categories: residents and villagers. Residents are essential characters in the game world, playing unique roles and often serving as quest givers. They cannot be invited as homeowners to the player's town, city, or island. Examples of residents include Isabelle, Tom Nook, and Guliver. Villagers, on the other hand, form the larger world population and can be invited to stay in the player's town, city, or island. They possess distinct personalities, homes, and can receive gifts. Alfonso, Tabby, and Eggbert are among the charming villagers you may encounter.
To manage the vast number of characters in the series and potential naming overlaps, this package thoughtfully categorizes characters based on their animal type. For example, the name Petunia is shared by both a Cow and a Rhinoceros character, while Snooty is the name of both a wolf character and a personality type.
Index ¶
- type Animal
- type Birthday
- type Character
- type Code
- type Gender
- type Key
- type Languages
- func (v Languages) Add(name Name)
- func (v Languages) Del(key language.Tag) bool
- func (v Languages) Each(fn func(language.Tag, Name))
- func (v Languages) EachWithBreak(fn func(language.Tag, Name) bool)
- func (v Languages) Get(key language.Tag) (Name, bool)
- func (v Languages) Has(key language.Tag) bool
- func (v Languages) Must(key language.Tag) Name
- type Name
- type Personality
- type Resident
- type Residents
- func (v Residents) Add(resident Resident)
- func (v Residents) Del(key Key) bool
- func (v Residents) Each(fn func(Key, Resident))
- func (v Residents) EachWithBreak(fn func(Key, Resident) bool)
- func (v Residents) Get(key Key) (Resident, bool)
- func (v Residents) Has(key Key) bool
- func (v Residents) Must(key Key) Resident
- type Villager
- type Villagers
- func (v Villagers) Add(villager Villager)
- func (v Villagers) Del(key Key) bool
- func (v Villagers) Each(fn func(Key, Villager))
- func (v Villagers) EachWithBreak(fn func(Key, Villager) bool)
- func (v Villagers) Get(key Key) (Villager, bool)
- func (v Villagers) Has(key Key) bool
- func (v Villagers) Must(key Key) Villager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Animal ¶
type Animal struct { // Key is a unique identifier for the animal type. Key Key // Name contains the names of the animal type in different languages. Name Languages }
Animal represents the animal type of an Animal Crossing character.
type Birthday ¶
type Birthday struct { // Day is the day of the month when the character's birthday falls. Day uint8 // Month is the month of the year when the character's birthday falls. Month time.Month }
Birthday represents the birthday information of an Animal Crossing character.
type Character ¶
type Character struct { // Animal represents the animal type of the character. Animal // Birthday contains the birthday information of the character. Birthday Birthday // Code is a unique identifier for the character. Code Code // Key is a unique identifier for the character. Key Key // Gender represents the gender of the character. Gender Gender // Name contains the names of the character in different languages. Name Languages // Special indicates whether the character is special or has a unique role. Special bool }
Character is a composite type that combines various attributes of an Animal Crossing character.
type Code ¶
type Code struct { // Value holds the actual unique identifier code. Value string }
Code represents the unique identifier assigned to an Animal Crossing character. These codes are based on data mined from various Animal Crossing games.
type Gender ¶
type Gender struct { // Name contains the gender name of the character in different languages. Name Languages }
Gender represents the gender of an Animal Crossing character.
type Languages ¶
Languages is a collection of language information, where each language tag maps to a Name.
func (Languages) Add ¶
Add adds a Name to the collection. The Name.Language is used as the key to store it in Languages.
func (Languages) Del ¶
Del removes a Name from Languages using the specified language tag as the key. It returns true if the Name was found and removed, otherwise false.
func (Languages) Each ¶
Each iterates over each language entry in Languages, executing the specified function for each Name.
func (Languages) EachWithBreak ¶
EachWithBreak iterates over each language entry in Languages, executing the specified function for each Name. It is possible to break out of the loop by returning true as a callback.
func (Languages) Get ¶
Get retrieves a Name from Languages using the specified language tag as the key. It returns the Name and a boolean indicating whether the Name was found.
type Name ¶
type Name struct { // Language specifies the language tag of the name. Language language.Tag // Value holds the actual name value in the specified language. Value string }
Name represents the name of a value in a specific language.
type Personality ¶
type Personality struct { // Name contains the name of the personality type in different languages. Name Languages }
Personality represents an Animal Crossing character's personality type.
type Resident ¶
type Resident struct {
Character
}
Resident represents an Animal Crossing character that performs special roles within the player's town, city, or island. Characters that are Residents cannot be invited to live within the player's world, but inhabit the world indirectly. Residents often serve as merchants, administrators, or quest givers.
type Residents ¶
Residents is a collection of Resident characters, where each Resident is identified by a unique Key.
func (Residents) Del ¶
Del removes a Resident from Residents using the specified Key. It returns true if the Resident was found and removed, otherwise false.
func (Residents) Each ¶
Each iterates over each Resident in the collection, executing the specified function for each one.
func (Residents) EachWithBreak ¶
EachWithBreak iterates over each Resident in the collection, executing the specified function for each one. It is possible to break out of the loop by returning true as a callback.
func (Residents) Get ¶
Get retrieves a Resident from Residents using the specified Key. It returns the Resident and a boolean indicating whether the Resident was found.
type Villager ¶
type Villager struct { Character // Personality represents the personality type of the Villager. Personality Personality // Phrase contains the unique phrases associated with the Villager in different languages. Phrase Languages }
Villager represents an Animal Crossing character that can be invited to live within the player's town, city, or island. Villagers are home owners and can befriend the player, allowing gift and decoration exchanges. Each Villager has a unique personality and set of phrases that accompany them.
type Villagers ¶
Villagers is a collection of Villager characters, where each Villager is identified by a unique Key.
func (Villagers) Del ¶
Del removes a Villager from Villagers using the specified Key. It returns true if the Villager was found and removed, otherwise false.
func (Villagers) Each ¶
Each iterates over each Villager in the collection, executing the specified function for each one.
func (Villagers) EachWithBreak ¶
EachWithBreak iterates over each Villager in the collection, executing the specified function for each one. It is possible to break out of the loop by returning true as a callback.
func (Villagers) Get ¶
Get retrieves a Villager from Villagers using the specified Key. It returns the Villager and a boolean indicating whether the Villager was found.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package animal exports the various types of animals found in the Animal Crossing series.
|
Package animal exports the various types of animals found in the Animal Crossing series. |
Package character exports the key values for Animal Crossing characters.
|
Package character exports the key values for Animal Crossing characters. |
Package gender exports the various genders of characters found in the Animal Crossing series.
|
Package gender exports the various genders of characters found in the Animal Crossing series. |
Package personality exports the various personality types of villagers found in the Animal Crossing series.
|
Package personality exports the various personality types of villagers found in the Animal Crossing series. |