Skip to main content

StaticKnowledgeDataTable

Classes

StaticKnowledgeDataTable

Base class for managing various kinds of static game data

Functions

generate_id(database)string

StaticKnowledgeDataTable

Base class for managing various kinds of static game data

Kind: global class

staticKnowledgeDataTable.elements : Object.<T>

Elements mapped by their string ID

Kind: instance property of StaticKnowledgeDataTable

staticKnowledgeDataTable.__json : Map.<string, object>

Kind: instance property of StaticKnowledgeDataTable
Access: protected

staticKnowledgeDataTable.__array : Array.<T>

Array representation of elements, useful for fast traversal

Kind: instance property of StaticKnowledgeDataTable
Access: protected

staticKnowledgeDataTable.__automatic_ids : boolean

Allow automatic ID generation when ID is not present

Kind: instance property of StaticKnowledgeDataTable
Access: protected

staticKnowledgeDataTable.__element_type_name : string

Kind: instance property of StaticKnowledgeDataTable
Access: protected

staticKnowledgeDataTable.isStaticKnowledgeDataTable : boolean

Kind: instance property of StaticKnowledgeDataTable
Read only: true

staticKnowledgeDataTable.size() ⇒ number

Number of elements in the table

Kind: instance method of StaticKnowledgeDataTable

staticKnowledgeDataTable.contains(id) ⇒ boolean

Kind: instance method of StaticKnowledgeDataTable

ParamType
idstring

staticKnowledgeDataTable.get(id) ⇒ T | null

Kind: instance method of StaticKnowledgeDataTable

ParamType
idstring

staticKnowledgeDataTable.getMany(ids, result)

Kind: instance method of StaticKnowledgeDataTable
Throws:

  • Error if an item can't be found
ParamType
idsArray.<String>
resultArray.<T>

staticKnowledgeDataTable.traverse(visitor, [thisArg])

Kind: instance method of StaticKnowledgeDataTable

ParamType
visitorfunction
[thisArg]*

staticKnowledgeDataTable.filter(f, [thisArg]) ⇒ Array.<T>

Kind: instance method of StaticKnowledgeDataTable

ParamType
ffunction
[thisArg]*

staticKnowledgeDataTable.asArray() ⇒ Array.<T>

Kind: instance method of StaticKnowledgeDataTable

staticKnowledgeDataTable.add(item) ⇒ boolean

Kind: instance method of StaticKnowledgeDataTable

ParamType
itemT

staticKnowledgeDataTable.parse(json) ⇒ T | Object

Kind: instance method of StaticKnowledgeDataTable

ParamType
jsonobject

staticKnowledgeDataTable.load(data, executor) ⇒ Promise

Kind: instance method of StaticKnowledgeDataTable

ParamType
dataArray
executorConcurrentExecutor

staticKnowledgeDataTable.linkOne(element, json, database, assetManager) ⇒ Promise

Kind: instance method of StaticKnowledgeDataTable

ParamType
elementT
jsonobject
databaseStaticKnowledgeDatabase
assetManagerAssetManager

staticKnowledgeDataTable.link(database, assetManager, executor) ⇒ Promise

Kind: instance method of StaticKnowledgeDataTable

ParamType
databaseStaticKnowledgeDatabase
assetManagerAssetManager
executorConcurrentExecutor

staticKnowledgeDataTable.validateOne(element, database, errorConsumer) ⇒ boolean

Kind: instance method of StaticKnowledgeDataTable
Access: protected

ParamType
element
databaseStaticKnowledgeDatabase
errorConsumerfunction

staticKnowledgeDataTable.validate(database, errorConsumer) ⇒ Task

Kind: instance method of StaticKnowledgeDataTable
Returns: Task - Task succeeds if validation succeeds, and fails if validation fails
Throws:

  • Error
ParamType
databaseStaticKnowledgeDatabase
errorConsumerfunction

generate_id(database) ⇒ string

Kind: global function

ParamType
databaseObject