Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/parser.cc')
-rw-r--r--src/core/parser.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/core/parser.cc b/src/core/parser.cc
index c5e0a38..7ef44d9 100644
--- a/src/core/parser.cc
+++ b/src/core/parser.cc
@@ -11,6 +11,17 @@
namespace core
{
+InfoType *Parser::entity_infotype = 0;
+
+void Parser::init()
+{
+ entity_infotype = new InfoType("entity");
+}
+
+void Parser::done()
+{
+ entity_infotype = 0;
+}
bool Parser::got_entity_key(filesystem::IniFile &inifile, core::Entity *entity)
{
@@ -47,6 +58,13 @@ bool Parser::got_entity_key(filesystem::IniFile &inifile, core::Entity *entity)
return false;
}
+ } else if (inifile.got_key_string("info", strval)) {
+ if (!entity->info()) {
+ entity->set_info(new Info(entity_infotype, entity->label().c_str()));
+ }
+ entity->info()->add_text(strval);
+ return true;
+
} else if (inifile.got_key_string("label", strval)) {
entity->set_label(strval);
return true;