Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2015-01-10 23:30:08 +0000
committerStijn Buys <ingar@osirion.org>2015-01-10 23:30:08 +0000
commit2aba6b4976cd81ea1af2af6d8adb77072cd3e0be (patch)
tree6969dc2374d78eba69b6d88537ac1348ac3a74ca
parent62eec5977f15fc50f3c2c428f30c40879af09943 (diff)
Print a message if the player tries to beam cargo and the cargo hold is full.
-rw-r--r--src/game/base/game.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/game/base/game.cc b/src/game/base/game.cc
index 315f1fa..d7f8435 100644
--- a/src/game/base/game.cc
+++ b/src/game/base/game.cc
@@ -1532,6 +1532,7 @@ void Game::func_beam(core::Player *player, const std::string &args)
core::Zone *zone = player->control()->zone();
core::Inventory *inventory = player->control()->inventory();
+ bool cargo_hold_full = false;
// entity iterator
for (core::Zone::Content::iterator eit = zone->content().begin(); eit != zone->content().end(); eit++) {
@@ -1584,9 +1585,16 @@ void Game::func_beam(core::Player *player, const std::string &args)
// if there's no loot left, the cargo pod will be destroyed
if (!loot_left) {
(*eit)->die();
+ } else {
+ cargo_hold_full = true;
}
}
}
+
+ if (cargo_hold_full)
+ {
+ player->send("^WNot enough cargo space available!");
+ }
}
// launch request