The main programming interface for the Game Subsystem.
Loads the 'data:tables/blueprint.json' file and subsequently sets up categories based on the blueprin...
Definition blueprintmanager.h:31
bool ParseTemplate(Util::String const &templatePath)
parse blueprint template file
Definition blueprintmanager.cc:168
static void SetBlueprintsFilename(const Util::String &name, const Util::String &folder)
set a optional blueprints.xml, which is used instead of standard blueprint.xml
Definition blueprintmanager.cc:269
static Util::String templatesFolder
Definition blueprintmanager.h:108
EntityMapping Instantiate(World *const world, BlueprintId blueprint)
create an instance from blueprint. Note that this does not tie it to an entity! It's not recommended ...
Definition blueprintmanager.cc:412
void OnActivate() override
Definition blueprintmanager.cc:29
MemDb::TableId CreateCategory(World *const world, BlueprintId bid)
create a table in the world db
Definition blueprintmanager.cc:463
__DeclareClass(BlueprintManager) __DeclareSingleton(BlueprintManager) public BlueprintManager()
constructor
Definition blueprintmanager.cc:61
Ids::IdGenerationPool templateIdPool
Definition blueprintmanager.h:99
static Util::String blueprintFolder
Definition blueprintmanager.h:107
static Util::Array< Template > const & ListTemplates()
Definition blueprintmanager.cc:403
~BlueprintManager()
destructor
Definition blueprintmanager.cc:79
Util::HashTable< Util::StringAtom, TemplateId > templateMap
maps from template name to template id
Definition blueprintmanager.h:102
Util::Array< Template > templates
Definition blueprintmanager.h:94
bool LoadTemplateFolder(Util::String const &path)
load a template folder
Definition blueprintmanager.cc:143
static TemplateId const GetTemplateId(Util::StringAtom name)
get a template id
Definition blueprintmanager.cc:289
void OnDeactivate() override
called when removed from game server
Definition blueprintmanager.cc:53
Util::Array< Blueprint > blueprints
contains all blueprints and their information.
Definition blueprintmanager.h:97
bool ParseBlueprint(Util::String const &blueprintsPath)
parse entity blueprints file
Definition blueprintmanager.cc:90
static Util::StringAtom const GetTemplateName(TemplateId const templateId)
get template name
Definition blueprintmanager.cc:393
void SetupBlueprints()
setup blueprint database
Definition blueprintmanager.cc:307
static BlueprintId const GetBlueprintId(Util::StringAtom name)
get a blueprint id
Definition blueprintmanager.cc:279
Util::HashTable< Util::StringAtom, BlueprintId > blueprintMap
maps from blueprint name to blueprint id, which is the index in the blueprints array.
Definition blueprintmanager.h:105
Managers are objects which care about some specific functionality of a feature.
Definition manager.h:32
A container of entities, their components, and processors.
Provides a system for creating array friendly id numbers with reuse and generations.
Definition idgenerationpool.h:43
Nebula's dynamic array class.
Definition array.h:60
Organizes key/value pairs by a hash code.
Definition hashtable.h:42
A StringAtom.
Definition stringatom.h:22
Game::EditorState.
Definition graphicsmanager.h:60
#define __DeclareSingleton(type)
Definition osxsingleton.h:24
#define __DeclareClass(type)
an entity blueprint
Definition blueprintmanager.h:84
Util::Array< ComponentEntry > components
contains all the components for this blueprint
Definition blueprintmanager.h:91
Util::StringAtom name
Definition blueprintmanager.h:89
MemDb::TableId tableId
The blueprint table. Contains all templates for the blueprint.
Definition blueprintmanager.h:87
Definition blueprintmanager.h:78
Util::StringAtom name
Definition blueprintmanager.h:79
Maps an entity to a table and instance id.
Definition entity.h:87
row identifier
Definition tableid.h:18
Table identifier.
Definition tableid.h:14
Nebula's universal string class.
Definition string.h:50