user.go 359 B

123456789101112131415161718192021222324
  1. package main
  2. import "git.red-green.com/david/cyber-knight/fancycolors"
  3. type User struct {
  4. Id uint64
  5. Name string
  6. RealName string
  7. Level uint32
  8. Exp uint64
  9. Cash uint64
  10. Weapon *Weapon
  11. }
  12. func (u *User) PrettyName() string {
  13. return fancycolors.ReplaceAll(u.Name)
  14. }
  15. func (u *User) DullName() string {
  16. return fancycolors.StripAll(u.Name)
  17. }