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-11-15 14:20:13 +0000
committerStijn Buys <ingar@osirion.org>2009-11-15 14:20:13 +0000
commit89c0bc88bd4ebdc44dfb99235609c90e968af533 (patch)
tree1f381edf91aff4da09ea3b1515107dd20c19a71e /src/core/gameconnection.cc
parentb513c7d9bf6fba4a26e734ce405996f665d9c835 (diff)
added core::Info id, changed network info message, updated entity network message to include the info id
Diffstat (limited to 'src/core/gameconnection.cc')
-rw-r--r--src/core/gameconnection.cc21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/core/gameconnection.cc b/src/core/gameconnection.cc
index 8910bca..f0dfbc6 100644
--- a/src/core/gameconnection.cc
+++ b/src/core/gameconnection.cc
@@ -90,6 +90,27 @@ bool GameConnection::interactive() const
return true;
}
+Info *GameConnection::info(unsigned int id)
+{
+ // find the info record
+ Info *info = Info::find(id);
+ if (info) {
+ return info;
+ }
+
+ info = new Info(id);
+ 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;
+
+}
+
Info *GameConnection::info(const std::string &type, const std::string &label)
{
// find the info record type