diff options
-rw-r--r-- | src/game/base/cargo.cc | 5 | ||||
-rw-r--r-- | src/game/base/cargo.h | 2 | ||||
-rw-r--r-- | src/game/base/game.cc | 2 |
3 files changed, 8 insertions, 1 deletions
diff --git a/src/game/base/cargo.cc b/src/game/base/cargo.cc index 626a1b3..668c3a4 100644 --- a/src/game/base/cargo.cc +++ b/src/game/base/cargo.cc @@ -294,5 +294,10 @@ void Cargo::buy(core::EntityControlable *buyer, core::Entity *seller, const int buyer->owner()->sound("game/buy"); } +void Cargo::list() +{ + core::Info::list(cargo_infotype); +} + } // namespace game diff --git a/src/game/base/cargo.h b/src/game/base/cargo.h index 1e97d40..25b8739 100644 --- a/src/game/base/cargo.h +++ b/src/game/base/cargo.h @@ -27,6 +27,8 @@ public: static Cargo *find(const std::string & label); static bool init(); + + static void list(); }; } // namespace game diff --git a/src/game/base/game.cc b/src/game/base/game.cc index c6b45ad..a3d9899 100644 --- a/src/game/base/game.cc +++ b/src/game/base/game.cc @@ -315,7 +315,7 @@ void Game::func_give(core::Player *player, const std::string &args) item = new core::Item(cargo); player->control()->inventory()->add(item); } else { - assert(player->control()->info() == cargo); + assert(item->info() == cargo); } item->inc_amount(amount); player->control()->inventory()->set_dirty(); |