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>2009-04-15 17:08:51 +0000
committerStijn Buys <ingar@osirion.org>2009-04-15 17:08:51 +0000
commita95028547981614e06ea7a6d22b853b85418cea3 (patch)
treed4d6998a4118a4d8690ce138d586abfba4893179 /src/core/gameconnection.cc
parent4f33f59571f10019c1e7a0e3640b2f69c159a8cf (diff)
added info registry, list_info
added network info transfer added info based buy menu and related game changes
Diffstat (limited to 'src/core/gameconnection.cc')
-rw-r--r--src/core/gameconnection.cc22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/core/gameconnection.cc b/src/core/gameconnection.cc
index c2763ee..2dc0e32 100644
--- a/src/core/gameconnection.cc
+++ b/src/core/gameconnection.cc
@@ -74,6 +74,28 @@ GameConnection::~GameConnection()
connection_instance = 0;
}
+Info *GameConnection::info(const std::string &label)
+{
+ // check if we already have the info record
+ Info *info = Info::find(label);
+ if (info)
+ return info;
+
+ // create a new information record and set the label
+ info = new Info(label);
+ Info::add(info);
+
+ info->text().push_back("Requesting information...");
+
+ // send an information request to the server
+ if (connection_network) {
+ connection_network->send_info_request(info);
+ } else {
+ info->text().push_back("^RNot connected.");
+ }
+ return info;
+}
+
void GameConnection::abort()
{
connection_running = false;