Skip to content

Commit

Permalink
Added a warning dialog if a mission is trying to add an outfit to you…
Browse files Browse the repository at this point in the history
…r ship but there is no room for it.
  • Loading branch information
Michael Zahniser committed May 7, 2015
1 parent 499b90e commit 18be2ee
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions source/MissionAction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,14 @@ void MissionAction::Do(PlayerInfo &player, UI *ui, const System *destination) co
{
player.Cargo().Transfer(it.first, -count);
didCargo = true;
if(count > 0)
{
string special = "The " + name + (count == 1 ? " was" : "s were");
special += " put in your cargo hold because there is not enough space to install ";
special += (count == 1) ? "it" : "them";
special += " in your ship.";
ui->Push(new Dialog(special));
}
}
if(didCargo && didShip)
message += "cargo hold and your flagship.";
Expand Down

0 comments on commit 18be2ee

Please sign in to comment.