From e55638d081e2e1ff6fbc06e0e8ac0381a04308e7 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Wed, 15 Sep 2010 21:29:18 +0000 Subject: updated comments, updated buy menu, info support for map window, added const to target selection --- src/core/gameconnection.cc | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'src/core/gameconnection.cc') diff --git a/src/core/gameconnection.cc b/src/core/gameconnection.cc index 46b50f5..ce33dc6 100644 --- a/src/core/gameconnection.cc +++ b/src/core/gameconnection.cc @@ -105,7 +105,7 @@ Info *GameConnection::info(unsigned int id) return info; } else { info = new Info(id); - info->text().push_back("Requesting information..."); + info->add_text("Requesting information..."); } @@ -113,12 +113,11 @@ Info *GameConnection::info(unsigned int id) if (connection_network) { //con_debug << "Requesting info for " << info->id() << std::endl; info->set_timestamp(connection_timestamp); - info->set_id(0); - + connection_network->send_info_request(info); connection_network->transmit(); } else { - info->text().push_back("^RNot connected."); + info->add_text("^RNot connected."); info->set_timestamp(0); } return info; @@ -151,21 +150,18 @@ Info *GameConnection::info(const std::string &type, const std::string &label) return info; } else { // create a new info record and set the label - info = new Info(infotype); - info->set_label(label); - info->text().push_back("Requesting information..."); + info = new Info(infotype, label); + info->add_text("Requesting information..."); } // send an information request to the server if (connection_network) { //con_debug << "Requesting info for " << info->type()->label() << ":" << info->label() << std::endl; info->set_timestamp(connection_timestamp); - info->set_id(0); - connection_network->send_info_request(info); connection_network->transmit(); } else { - info->text().push_back("^RNot connected."); + info->add_text("^RNot connected."); info->set_timestamp(0); } return info; -- cgit v1.2.3