Public Member Functions | |
CNodeDefManager () | |
virtual | ~CNodeDefManager () |
void | clear () |
virtual IWritableNodeDefManager * | clone () |
virtual const ContentFeatures & | get (content_t c) const |
virtual const ContentFeatures & | get (const MapNode &n) const |
virtual bool | getId (const std::string &name, content_t &result) const |
virtual content_t | getId (const std::string &name) const |
virtual bool | getIds (const std::string &name, std::set< content_t > &result) const |
virtual const ContentFeatures & | get (const std::string &name) const |
content_t | allocateId () |
virtual content_t | set (const std::string &name, const ContentFeatures &def) |
virtual content_t | allocateDummy (const std::string &name) |
virtual void | removeNode (const std::string &name) |
virtual void | updateAliases (IItemDefManager *idef) |
virtual void | applyTextureOverrides (const std::string &override_filepath) |
virtual void | updateTextures (IGameDef *gamedef, void(*progress_cbk)(void *progress_args, u32 progress, u32 max_progress), void *progress_cbk_args) |
void | serialize (std::ostream &os, u16 protocol_version) const |
void | deSerialize (std::istream &is) |
virtual void | setNodeRegistrationStatus (bool completed) |
virtual void | pendNodeResolve (NodeResolver *nr) |
virtual bool | cancelNodeResolveCallback (NodeResolver *nr) |
virtual void | runNodeResolveCallbacks () |
virtual void | resetNodeResolveState () |
virtual void | mapNodeboxConnections () |
virtual bool | nodeboxConnects (MapNode from, MapNode to, u8 connect_face) |
virtual core::aabbox3d< s16 > | getSelectionBoxIntUnion () const |
Public Member Functions inherited from IWritableNodeDefManager | |
IWritableNodeDefManager () | |
virtual | ~IWritableNodeDefManager () |
Public Member Functions inherited from INodeDefManager | |
INodeDefManager () | |
virtual | ~INodeDefManager () |
Private Member Functions | |
void | addNameIdMapping (content_t i, std::string name) |
void | fixSelectionBoxIntUnion () |
Private Attributes | |
std::vector< ContentFeatures > | m_content_features |
NameIdMapping | m_name_id_mapping |
UNORDERED_MAP< std::string, content_t > | m_name_id_mapping_with_aliases |
UNORDERED_MAP< std::string, GroupItems > | m_group_to_items |
content_t | m_next_id |
std::vector< NodeResolver * > | m_pending_resolve_callbacks |
bool | m_node_registration_complete |
aabb3f | m_selection_box_union |
The union of all nodes' selection boxes. More... | |
core::aabbox3d< s16 > | m_selection_box_int_union |
CNodeDefManager::CNodeDefManager | ( | ) |
|
virtual |
References m_content_features, and ContentFeatures::mesh_ptr.
|
private |
References m_name_id_mapping, m_name_id_mapping_with_aliases, and NameIdMapping::set().
Referenced by clear(), deSerialize(), and set().
|
virtual |
Implements IWritableNodeDefManager.
References ContentFeatures::name, and set().
content_t CNodeDefManager::allocateId | ( | ) |
References CONTENT_IGNORE, m_content_features, m_next_id, and ContentFeatures::name.
Referenced by set().
|
virtual |
Implements IWritableNodeDefManager.
References errorstream, getId(), infostream, m_content_features, TileDef::name, str_split(), ContentFeatures::tiledef, and trim().
|
virtual |
Implements IWritableNodeDefManager.
References m_pending_resolve_callbacks.
void CNodeDefManager::clear | ( | ) |
References addNameIdMapping(), ContentFeatures::buildable_to, NameIdMapping::clear(), CONTENT_AIR, CONTENT_IGNORE, CONTENT_UNKNOWN, CPT_LIGHT, CPT_NONE, ContentFeatures::diggable, ContentFeatures::drawtype, ContentFeatures::floodable, ContentFeatures::is_ground_content, ContentFeatures::light_propagates, m_content_features, m_group_to_items, m_name_id_mapping, m_name_id_mapping_with_aliases, m_next_id, m_selection_box_int_union, m_selection_box_union, MYMAX, ContentFeatures::name, NDT_AIRLIKE, ContentFeatures::param_type, ContentFeatures::pointable, resetNodeResolveState(), ContentFeatures::sunlight_propagates, and ContentFeatures::walkable.
Referenced by CNodeDefManager(), and deSerialize().
|
virtual |
Implements IWritableNodeDefManager.
References CNodeDefManager().
|
virtual |
Implements IWritableNodeDefManager.
References addNameIdMapping(), clear(), CONTENT_AIR, CONTENT_IGNORE, CONTENT_UNKNOWN, ContentFeatures::deSerialize(), deSerializeLongString(), deSerializeString(), fixSelectionBoxIntUnion(), NameIdMapping::getId(), getNodeBoxUnion(), m_content_features, m_name_id_mapping, m_selection_box_union, ContentFeatures::name, readU16(), readU8(), ContentFeatures::selection_box, verbosestream, and warningstream.
|
inlineprivate |
Recalculates m_selection_box_int_union based on m_selection_box_union.
References BS, m_selection_box_int_union, and m_selection_box_union.
Referenced by deSerialize(), and set().
|
inlinevirtual |
Implements IWritableNodeDefManager.
References get(), and MapNode::getContent().
|
virtual |
Implements IWritableNodeDefManager.
References CONTENT_UNKNOWN, get(), and getId().
|
inlinevirtual |
Implements IWritableNodeDefManager.
References CONTENT_UNKNOWN, and m_content_features.
Referenced by get(), and nodeboxConnects().
|
virtual |
Implements IWritableNodeDefManager.
References CONTENT_IGNORE, and getId().
|
virtual |
Implements IWritableNodeDefManager.
References m_name_id_mapping_with_aliases.
Referenced by applyTextureOverrides(), get(), getId(), and getIds().
|
virtual |
Implements IWritableNodeDefManager.
References CONTENT_IGNORE, getId(), and m_group_to_items.
Referenced by mapNodeboxConnections().
|
inlinevirtual |
Returns the smallest box in node coordinates that contains all nodes' selection boxes.
Implements IWritableNodeDefManager.
References m_selection_box_int_union.
|
virtual |
Implements IWritableNodeDefManager.
References ContentFeatures::connects_to, ContentFeatures::connects_to_ids, ContentFeatures::drawtype, getIds(), m_content_features, NDT_NODEBOX, ContentFeatures::node_box, NODEBOX_CONNECTED, and NodeBox::type.
Implements INodeDefManager.
References ContentFeatures::connect_sides, ContentFeatures::connects_to_ids, CPT2_COLORED_FACEDIR, CPT2_FACEDIR, ContentFeatures::drawtype, get(), NDT_NODEBOX, ContentFeatures::node_box, NODEBOX_CONNECTED, MapNode::param0, MapNode::param2, ContentFeatures::param_type_2, and NodeBox::type.
|
virtual |
Implements IWritableNodeDefManager.
References NodeResolver::m_ndef, m_node_registration_complete, m_pending_resolve_callbacks, and NodeResolver::nodeResolveInternal().
|
virtual |
Implements IWritableNodeDefManager.
References CONTENT_IGNORE, NameIdMapping::eraseName(), NameIdMapping::getId(), m_group_to_items, m_name_id_mapping, and m_name_id_mapping_with_aliases.
|
virtual |
Implements IWritableNodeDefManager.
References m_node_registration_complete, and m_pending_resolve_callbacks.
Referenced by clear().
|
virtual |
Implements IWritableNodeDefManager.
References m_pending_resolve_callbacks, and NodeResolver::nodeResolveInternal().
|
virtual |
Implements IWritableNodeDefManager.
References CONTENT_AIR, CONTENT_IGNORE, CONTENT_UNKNOWN, FATAL_ERROR_IF, m_content_features, ContentFeatures::name, ContentFeatures::serialize(), serializeLongString(), serializeString(), writeU16(), and writeU8().
|
virtual |
Implements IWritableNodeDefManager.
References addNameIdMapping(), allocateId(), CONTENT_IGNORE, fixSelectionBoxIntUnion(), NameIdMapping::getId(), getNodeBoxUnion(), ContentFeatures::groups, m_content_features, m_group_to_items, m_name_id_mapping, m_selection_box_union, ContentFeatures::name, ContentFeatures::selection_box, verbosestream, and warningstream.
Referenced by allocateDummy().
|
inlinevirtual |
Implements IWritableNodeDefManager.
References m_node_registration_complete.
|
virtual |
Implements IWritableNodeDefManager.
References IItemDefManager::getAlias(), IItemDefManager::getAll(), NameIdMapping::getId(), m_name_id_mapping, and m_name_id_mapping_with_aliases.
|
virtual |
Implements IWritableNodeDefManager.
References Client::getSceneManager(), Client::getShaderSource(), infostream, m_content_features, TextureSettings::readSettings(), Client::tsrc(), and ContentFeatures::updateTextures().
|
private |
Referenced by allocateId(), applyTextureOverrides(), clear(), deSerialize(), get(), mapNodeboxConnections(), serialize(), set(), updateTextures(), and ~CNodeDefManager().
|
private |
Referenced by clear(), getIds(), removeNode(), and set().
|
private |
Referenced by addNameIdMapping(), clear(), deSerialize(), removeNode(), set(), and updateAliases().
|
private |
Referenced by addNameIdMapping(), clear(), getId(), removeNode(), and updateAliases().
|
private |
Referenced by allocateId(), and clear().
|
private |
Referenced by pendNodeResolve(), resetNodeResolveState(), and setNodeRegistrationStatus().
|
private |
Referenced by cancelNodeResolveCallback(), pendNodeResolve(), resetNodeResolveState(), and runNodeResolveCallbacks().
|
private |
The smallest box in node coordinates that contains all nodes' selection boxes.
Referenced by clear(), fixSelectionBoxIntUnion(), and getSelectionBoxIntUnion().
|
private |
The union of all nodes' selection boxes.
Referenced by clear(), deSerialize(), fixSelectionBoxIntUnion(), and set().