Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
Diffstat (limited to 'src/game')
-rw-r--r--src/game/base/ship.cc16
-rw-r--r--src/game/base/shipdealer.cc12
2 files changed, 14 insertions, 14 deletions
diff --git a/src/game/base/ship.cc b/src/game/base/ship.cc
index 7735aa1..d0bea4a 100644
--- a/src/game/base/ship.cc
+++ b/src/game/base/ship.cc
@@ -123,9 +123,11 @@ void Ship::func_jump(std::string const &args)
if (Game::g_devel->value() && (args.size())) {
core::Zone *jumptargetzone = 0;
- std::string target;
- std::istringstream is(args);
- if (!(is >> target)) {
+ std::string target(args);
+
+ aux::to_lowercase(target);
+ jumptargetzone = core::Zone::find_zone(target);
+ if (!jumptargetzone) {
std::string helpstr;
for (core::Zone::Registry::iterator it = core::Zone::registry().begin(); it != core::Zone::registry().end(); it++) {
core::Zone *zone = (*it).second;
@@ -133,18 +135,10 @@ void Ship::func_jump(std::string const &args)
helpstr.append("^N|^B");
helpstr.append(zone->label());
}
-
owner()->send("Usage: jump [^B" + helpstr + "^N]");
return;
}
- aux::to_lowercase(target);
- jumptargetzone = core::Zone::find_zone(target);
- if (!jumptargetzone) {
- owner()->send("Unknown system '" + target + '\'');
- return;
- }
-
if (jumptargetzone == zone()) {
owner()->send("Already in the " + jumptargetzone->name());
return;
diff --git a/src/game/base/shipdealer.cc b/src/game/base/shipdealer.cc
index 1a827ec..fb6415c 100644
--- a/src/game/base/shipdealer.cc
+++ b/src/game/base/shipdealer.cc
@@ -86,13 +86,19 @@ void ShipDealer::func_buy(core::Player *player, const std::string &args)
if (helpstr.size())
helpstr.append("^N|^B");
- helpstr.append((*smit).second->label());
+ helpstr.append((*smit).first);
}
}
if (!shipmodel) {
- player->send("Usage: buy [^B" + helpstr + "^N]");
- return;
+ if (!Game::g_devel->value()) {
+ player->send("Cheats disabled");
+ return;
+
+ } else {
+ player->send("Usage: buy [^B" + helpstr + "^N]");
+ return;
+ }
}
/// find the ship dealer we're buying the ship from