Documentation ¶
Index ¶
- Variables
- func NamedFind[I ID, T any, D Named[T]](lt *ListTable[I, T, D], name string) D
- func NamedUnique[I ID, T any, D Named[T]](lt *ListTable[I, T, D], name string) error
- type Act
- type Clip
- type Cond
- type Dec
- type Dia
- type Grid
- type HashTable
- func (ht *HashTable[I, T, D]) All(c Cond[T, D]) []D
- func (lt *HashTable[I, T, D]) Each(f func(uint32, *Slot[T, D]) error) error
- func (ht *HashTable[I, T, D]) Find(c Cond[T, D]) D
- func (ht *HashTable[I, T, D]) From(top Topic) (id I)
- func (ht *HashTable[I, T, D]) Get(id I) (d D, _ error)
- func (ht *HashTable[I, T, D]) Mark(SyncFlag)
- func (ht *HashTable[I, T, D]) New() (D, error)
- func (ht *HashTable[I, T, D]) Set(id I, d D) error
- func (ht *HashTable[I, T, D]) Slot(id I) ModSlot[I, T, D]
- type ID
- type Img
- type Info
- type Inv
- type Item
- type List
- type ListTable
- func (lt *ListTable[I, T, D]) All(c Cond[T, D]) []D
- func (lt *ListTable[I, T, D]) Each(f func(uint32, *Slot[T, D]) error) error
- func (lt *ListTable[I, T, D]) Find(c Cond[T, D]) D
- func (lt *ListTable[I, T, D]) From(top Topic) (id I)
- func (lt *ListTable[I, T, D]) Get(id I) (d D, _ error)
- func (lt *ListTable[I, T, D]) Mark(SyncFlag)
- func (lt *ListTable[I, T, D]) New() (D, error)
- func (lt *ListTable[I, T, D]) Set(id I, d D) error
- func (lt *ListTable[I, T, D]) Slot(id I) ModSlot[I, T, D]
- type Lvl
- type Marker
- type ModSlot
- type Named
- type Obj
- type Pal
- type Pic
- type Prod
- type Slot
- type Spot
- type SyncFlag
- type Topic
- type Tset
Constants ¶
This section is empty.
Variables ¶
var ErrNotFound = fmt.Errorf("not found")
var NameCheck = regexp.MustCompile(`^[a-z0-9_]+$`)
Functions ¶
Types ¶
type Act ¶
type Act uint32
IDs are consecutive positive numbers valid within a world sub system. The zero value does represent a null instance.
type Clip ¶
type Clip uint32
IDs are consecutive positive numbers valid within a world sub system. The zero value does represent a null instance.
type Dec ¶
type Dec[T any] interface { *T UID() uint32 Make(id uint32) T encoding.BinaryMarshaler encoding.BinaryUnmarshaler }
type Dia ¶
type Dia uint32
IDs are consecutive positive numbers valid within a world sub system. The zero value does represent a null instance.
type Grid ¶
type Grid uint32
IDs are consecutive positive numbers valid within a world sub system. The zero value does represent a null instance.
type Img ¶
type Img uint32
IDs are consecutive positive numbers valid within a world sub system. The zero value does represent a null instance.
type Info ¶
type Info uint32
IDs are consecutive positive numbers valid within a world sub system. The zero value does represent a null instance.
type Inv ¶
type Inv uint32
IDs are consecutive positive numbers valid within a world sub system. The zero value does represent a null instance.
type Item ¶
type Item uint32
IDs are consecutive positive numbers valid within a world sub system. The zero value does represent a null instance.
type Lvl ¶
type Lvl uint32
IDs are consecutive positive numbers valid within a world sub system. The zero value does represent a null instance.
type Obj ¶
type Obj uint32
IDs are consecutive positive numbers valid within a world sub system. The zero value does represent a null instance.
type Pal ¶
type Pal uint32
IDs are consecutive positive numbers valid within a world sub system. The zero value does represent a null instance.
type Pic ¶
type Pic uint32
IDs are consecutive positive numbers valid within a world sub system. The zero value does represent a null instance.
type Prod ¶
type Prod uint32
IDs are consecutive positive numbers valid within a world sub system. The zero value does represent a null instance.
type Spot ¶
type Spot uint32
IDs are consecutive positive numbers valid within a world sub system. The zero value does represent a null instance.
type Topic ¶
Topic is a compound id that identifies a specific game resource mostly used for pic, clip an img. It uses a text encoding, for example: "pic:123", "clip:42", "img:5" or "obj:1337".