diff options
author | Stijn Buys <ingar@osirion.org> | 2009-11-15 14:20:13 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2009-11-15 14:20:13 +0000 |
commit | 89c0bc88bd4ebdc44dfb99235609c90e968af533 (patch) | |
tree | 1f381edf91aff4da09ea3b1515107dd20c19a71e /src/core/gameconnection.cc | |
parent | b513c7d9bf6fba4a26e734ce405996f665d9c835 (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.cc | 21 |
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 |