48 logger->
log1(
"Initializing homunculus database...");
60 XmlNodeConstPtr rootNode = doc.
rootNode();
62 if ((rootNode ==
nullptr) || !xmlNameEqual(rootNode,
"homunculuses"))
64 logger->
log(
"Homunculus Database: Error while loading %s!",
75 if (xmlNameEqual(homunculusNode,
"include"))
78 homunculusNode,
"name",
"");
83 if (!xmlNameEqual(homunculusNode,
"homunculus"))
91 logger->
log(
"HomunculusDB: Redefinition of homunculus ID %d",
id);
94 if (currentInfo ==
nullptr)
100 homunculusNode,
"name",
_(
"unnamed")));
103 homunculusNode,
"attack");
113 homunculusNode,
"deadSortOffsetY", 31));
127 currentInfo,
"HomunculusDB");
137 logger->
log1(
"Unloading homunculus database...");
153 reportAlways(
"HomunculusDB: Warning, unknown homunculus ID "
static void loadXmlFile(const std::string &file, const std::string &name, BadgesInfos &arr, const SkipError skipError)
#define loadXmlDir(name, function)
BeingInfos::iterator BeingInfoIterator
std::map< BeingTypeId, BeingInfo * > BeingInfos
#define reportAlways(...)
void setBlockType(const BlockTypeT &blockType)
void setColorsList(const std::string &name)
void setName(const std::string &name)
void setDisplay(const SpriteDisplay &display)
void setDeadSortOffsetY(const int n)
void setStaticMaxHP(const bool n)
static BeingInfo * unknown
void setMaxHP(const int n)
std::string getStringValue(const std::string &key) const
void log(const char *const log_text,...)
void log1(const char *const log_text)
void delete_all(Container &c)
#define fromInt(val, name)
#define for_each_xml_child_node(var, parent)
bool readObjectNodes(xmlNode *const &spriteNode, SpriteDisplay &display, BeingInfo *const currentInfo, const std::string &dbName)
void readAiAttributes(BeingInfo *const info, xmlNode *const node)
void readBasicAttributes(BeingInfo *const info, xmlNode *const node, const std::string &hoverCursor)
void readWalkingAttributes(BeingInfo *const info, xmlNode *const node, const int moreBlockFlags)
void loadXmlFile(const std::string &fileName, const SkipError skipError)
BeingInfo * get(const BeingTypeId id)
std::string langProperty(const xmlNodePtr node, const char *const name, const std::string &def)
int getProperty(const xmlNodePtr node, const char *const name, int def)
BeingInfos mHomunculusInfos
const bool SkipError_false
const bool SkipError_true
const bool UseVirtFs_true