33 lines
823 B
Go
33 lines
823 B
Go
package furcadia
|
|
|
|
type Character struct {
|
|
// e-mail address of the Furcadia account (e.g., artex@furcadia.com)
|
|
AccountEmail string
|
|
|
|
// password for the Furcadia account
|
|
AccountPassword string
|
|
|
|
// display name of the character (with regular spaces) (e.g., "Ice Dragon")
|
|
DisplayName string
|
|
|
|
// shortname of the character (derived from DisplayName) (e.g., "icedragon")
|
|
ShortName string
|
|
|
|
// Furcadia color string
|
|
Color []byte
|
|
|
|
// description text
|
|
Description string
|
|
}
|
|
|
|
func NewCharacter(account, password, displayName string, color []byte, desc string) (*Character, error) {
|
|
return &Character{
|
|
AccountEmail: account,
|
|
AccountPassword: password,
|
|
DisplayName: displayName,
|
|
ShortName: GetShortName(displayName),
|
|
Color: append([]byte(nil), color...),
|
|
Description: desc,
|
|
}, nil
|
|
}
|