Documentation
¶
Index ¶
Constants ¶
const ( KeyCharacter = "morogue:character" KeyTile = "morogue:tile" KeyDoor = "morogue:door" KeyMob = "morogue:mob" KeyItem = "morogue:item" KeyWeapon = "morogue:weapon" KeyArmor = "morogue:armor" KeyFood = "morogue:food" // KeyPlace = "morogue:place" KeyFixture = "morogue:fixture" )
Variables ¶
var KeyToNamespace map[string]UUID
var NamespaceToKey map[UUID]string
NamespaceToKey provides a mapping of morogue's UUIDv5s to their string keys.
Functions ¶
This section is empty.
Types ¶
type UUID ¶
type UUID uuid.UUID
UUID is a UUID. In general, most UUIDs in morogue are UUIDv5s used to identify static types of objects, such as archetypes, items, and weapons. These are generally acquired through the UID func.
func UID ¶
UID generates a unique identifier for the given name in the given morogue namespace. The namespace must be one this is defined in namespaces.
func (*UUID) UnmarshalJSON ¶
UnmarshalJSON unmarshals a UUID from data in either UUID form or in a morogue valid "namespace:name" format, such as "morogue:tile:stone-wall".
type WIDGenerator ¶
type WIDGenerator struct {
// contains filtered or unexported fields
}
WIDGenerator generates WIDs.
func (*WIDGenerator) Next ¶
func (w *WIDGenerator) Next() WID
Next returns the next WID (top+1) and increases the internal top WID.
func (*WIDGenerator) Top ¶
func (w *WIDGenerator) Top() WID
Top returns the "top" WID, which corresponds to the last WID generated.