From 89c0bc88bd4ebdc44dfb99235609c90e968af533 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 15 Nov 2009 14:20:13 +0000 Subject: added core::Info id, changed network info message, updated entity network message to include the info id --- src/core/gameconnection.cc | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/core/gameconnection.cc') 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 -- cgit v1.2.3