diff options
-rw-r--r-- | src/game/game.cc | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/game/game.cc b/src/game/game.cc index efca1be..5a937ca 100644 --- a/src/game/game.cc +++ b/src/game/game.cc @@ -148,14 +148,22 @@ void func_jump(core::Player *player, std::string const &args) core::server()->send(player, "Your ship is not equiped with a jumpdrive"); return; } - - std::string target; + std::string target; std::istringstream is(args); if (!(is >> target)) { - core::server()->send(player, "Usage: jump [system]"); + std::string helpstr; + for (core::Zone::Registry::iterator it = core::Zone::registry().begin(); it != core::Zone::registry().end(); it++) { + core::Zone *zone = (*it).second; + if (helpstr.size()) + helpstr.append("^N|^B"); + helpstr.append(zone->label()); + } + + core::server()->send(player, "Usage: jump [^B" + helpstr + "^N]"); return; } + aux::to_lowercase(target); core::Zone *zone = core::Zone::find_zone(target); if (!zone) { core::server()->send(player, "Unknown system '" + target + '\''); @@ -261,7 +269,7 @@ bool Game::load_world() } else if (worldini.section().compare("world") == 0 ) { if (worldini.got_key_string("zone", label)) { aux::trim(label); - aux::lowercase(label); + aux::to_lowercase(label); zone = new core::Zone(label); core::Zone::add(zone); } |