func (f *FriendsList) NameSet() (nameList []string) {
	f.RLock()
	defer f.RUnlock()
	for name := range f.friendSet {
		nameList = append(nameList, strutil.Base37.Decode(name))
	}
	return
}
NameSet returns all the players names in this collection.
package social
import (
	"sync"
	"github.com/spkaeros/rscgo/pkg/strutil"
)
type friendSet map[uint64]bool
type FriendsList struct {
	sync.RWMutex
	friendSet
	Owner uint64
}
func New() *FriendsList {
	return &FriendsList{friendSet: make(friendSet)}
}
func (f *FriendsList) Contains(name string) bool {
	f.RLock()
	defer f.RUnlock()
	_, ok := f.friendSet[strutil.Base37.Encode(name)]
	return ok
}
func (f *FriendsList) Status(name string) bool {
	f.RLock()
	defer f.RUnlock()
	status, ok := f.friendSet[strutil.Base37.Encode(name)]
	if ok {
		return status
	}
	return false
}
func (f *FriendsList) StatusHash(name uint64) bool {
	f.RLock()
	defer f.RUnlock()
	status, ok := f.friendSet[name]
	if ok {
		return status
	}
	return false
}
func (f *FriendsList) ContainsHash(hash uint64) bool {
	f.RLock()
	defer f.RUnlock()
	_, ok := f.friendSet[hash]
	return ok
}
func (f *FriendsList) Add(name string) {
	f.Lock()
	defer f.Unlock()
	f.friendSet[strutil.Base37.Encode(name)] = false
}
func (f *FriendsList) ToggleStatus(name string) bool {
	f.Lock()
	defer f.Unlock()
	toggleHash := strutil.Base37.Encode(name)
	for hash, status := range f.friendSet {
		if hash == toggleHash {
			f.friendSet[hash] = !status
			return true
		}
	}
	return false
}
func (f *FriendsList) Set(name string, val bool) {
	f.Lock()
	defer f.Unlock()
	f.friendSet[strutil.Base37.Encode(name)] = val
}
func (f *FriendsList) Remove(name string) {
	f.Lock()
	defer f.Unlock()
	hash := strutil.Base37.Encode(name)
	delete(f.friendSet, hash)
}