Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2010-09-16 14:12:27 +0000
committerStijn Buys <ingar@osirion.org>2010-09-16 14:12:27 +0000
commit0c509866a37ab47ff0e48d357ca55e31658c37c2 (patch)
tree57f69397ac1b30ce42a3e3fcd19c2fd8ed67d4e0 /src/core/parser.cc
parent3392cb739f212aea561eceb1781cd2e10e55c932 (diff)
map info support, initial trade window
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;