class IGameDef;
typedef std::list<std::pair<content_t, int> > GroupItems;
+typedef std::list<std::pair<std::string, std::vector<content_t> *> >
+ ContentVectorResolveList;
enum ContentParamType
{
*/
#ifndef SERVER
// 0 1 2 3 4 5
- // up down right left back front
+ // up down right left back front
TileSpec tiles[6];
// Special tiles
// - Currently used for flowing liquids
std::string mesh;
#ifndef SERVER
scene::IMesh *mesh_ptr[24];
-#endif
+#endif
float visual_scale; // Misc. scale parameter
TileDef tiledef[6];
TileDef tiledef_special[CF_SPECIAL_COUNT]; // eg. flowing liquid
/*
Methods
*/
-
+
ContentFeatures();
~ContentFeatures();
void reset();
node name resolution.
@return Status of node resolution request.
*/
- int addNode(std::string n_wanted, std::string n_alt,
+ int addNode(const std::string &n_wanted, const std::string &n_alt,
content_t c_fallback, content_t *content);
/**
before the pending request had been satisfied, cancelNodeList() must be
called.
- @param nodename Name of node (or node group) to be resolved.
+ @param nodename Name of node (or node group) to be resolved.
@param content_vec Pointer to content_t vector onto which the results
are added.
@return Status of node resolution request.
*/
- int addNodeList(const char *nodename, std::vector<content_t> *content_vec);
+ int addNodeList(const std::string &nodename,
+ std::vector<content_t> *content_vec);
/**
- Removes all pending requests from the resolution queue to be satisfied
- to content.
+ Removes all pending requests from the resolution queue with the output
+ address of 'content'.
@param content Location of the content ID for the request being
cancelled.
bool cancelNode(content_t *content);
/**
- Removes all pending requests from the resolution queue to be satisfied
- to content_vec.
+ Removes all pending requests from the resolution queue with the output
+ address of 'content_vec'.
@param content_vec Location of the content ID vector for requests being
cancelled.
INodeDefManager *m_ndef;
bool m_is_node_registration_complete;
std::list<NodeResolveInfo *> m_pending_contents;
- std::list<std::pair<std::string, std::vector<content_t> *> > m_pending_content_vecs;
+ ContentVectorResolveList m_pending_content_vecs;
};
class INodeDefManager
virtual void getIds(const std::string &name, std::set<content_t> &result)
const=0;
virtual const ContentFeatures& get(const std::string &name) const=0;
-
+
virtual void serialize(std::ostream &os, u16 protocol_version)=0;
virtual NodeResolver *getResolver()=0;