Initial commit
This commit is contained in:
32
furcadia/character.go
Normal file
32
furcadia/character.go
Normal file
@@ -0,0 +1,32 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user