1package game_world23import (4 "strconv"56 "gno.land/p/nt/bptree/v0"7)89var (10 gameWorlds *bptree.BPTree = bptree.NewBPTree32()11 ownerGameWorldIDs *bptree.BPTree = bptree.NewBPTree32()12 restrictedGameWorldIDs *bptree.BPTree = bptree.NewBPTree32()13 latestGameWorldID uint6414)1516func addOwnerGameWorldID(owner address, gameWorldID uint64) {17 value := ownerGameWorldIDs.Get(owner.String())18 var ids *bptree.BPTree19 if value != nil {20 ids = value.(*bptree.BPTree)21 } else {22 ids = bptree.NewBPTree32()23 ownerGameWorldIDs.Set(owner.String(), ids)24 }25 ids.Set(uint64Key(gameWorldID), true)26}2728func removeOwnerGameWorldID(owner address, gameWorldID uint64) {29 ids, found := getOwnerGameWorldIDs(owner)30 if !found {31 return32 }33 ids.Remove(uint64Key(gameWorldID))34}3536func getOwnerGameWorldIDs(owner address) (*bptree.BPTree, bool) {37 value := ownerGameWorldIDs.Get(owner.String())38 if value == nil {39 return nil, false40 }41 return value.(*bptree.BPTree), true42}4344func resetGameWorldStore() {45 gameWorlds = bptree.NewBPTree32()46 ownerGameWorldIDs = bptree.NewBPTree32()47 restrictedGameWorldIDs = bptree.NewBPTree32()48 latestGameWorldID = 049}5051func uint64Key(id uint64) string {52 // Zero-pad so BPTree key order matches numeric ID order.53 s := strconv.FormatUint(id, 10)54 if len(s) >= 20 {55 return s56 }57 return "00000000000000000000"[len(s):] + s58}5960func parseUint64Key(key string) uint64 {61 id, err := strconv.ParseUint(key, 10, 64)62 if err != nil {63 panic("invalid uint64 key: " + key)64 }65 return id66}67AddApprovedCreator(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, gameType string, creator string)
CreateGameWorld(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, gameType string) uint64
GetApprovedCreatorCount(gameType string) int
GetGameTypePolicy(gameType string) struct{CreationCost int64; CreationMode gno.land/r/akkadia/beta/game_world.CreationMode}
GetGameWorld(gameWorldID uint64) struct{ID uint64; Owner .uverse.address; GameType string; Status gno.land/r/akkadia/beta/game_world.GameWorldStatus; CreatedHeight int64; RestrictedHeight int64}
GetLatestGameWorldID() uint64
GetListLimit() int
GetRestrictedGameWorldCount() int
HasGameTypePolicy(gameType string) bool
HasGameWorld(gameWorldID uint64) bool
IsApprovedCreator(gameType string, creator string) bool
ListApprovedCreators(gameType string, offset int, count int) [].uverse.address
ListLatestGameWorldsByOwner(owner string) []gno.land/r/akkadia/beta/game_world.GameWorld
ListRestrictedGameWorldIDs(page int, count int) []uint64
RemoveApprovedCreator(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, gameType string, creator string)
RestrictGameWorld(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, gameWorldID uint64)
SetApprovedCreators(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, gameType string, creatorsCSV string, approved bool)
SetGameTypePolicy(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, gameType string, creationCost int64, mode int)
Signatures reconstructed verbatim from vm/qfuncs — interface params keep their inline definitions.
Render unavailable
rate limit exceeded — the render query is served by the Gnoland archive RPC.
vm/qrender output, sanitized (docs/render-security.md) and displayed in an empty-sandbox iframe — scripts, forms and popups cannot run. Links stay inert in-preview; right-click to open.