Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/base/ship.cc')
-rw-r--r--src/game/base/ship.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/game/base/ship.cc b/src/game/base/ship.cc
index 23929ea..d51a119 100644
--- a/src/game/base/ship.cc
+++ b/src/game/base/ship.cc
@@ -39,14 +39,20 @@ Ship::Ship(core::Player *owner, ShipModel *shipmodel) : core::EntityControlable(
ship_jumpdepart = 0;
if (owner) {
+ // this ship is owned by a player
set_owner(owner);
get_color().assign(owner->color());
get_color_second().assign(owner->color_second());
std::string str(aux::text_strip(owner->name()));
aux::to_label(str);
set_label(str);
+
+ // add an inventory
set_inventory(new core::Inventory());
+ inventory()->set_capacity(shipmodel->maxcargo());
+
} else {
+ set_name(shipmodel->name());
set_label(shipmodel->label());
}