diff options
author | Eugene Sandulenko | 2016-01-21 15:55:14 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2016-02-14 17:12:51 +0100 |
commit | 2dc5841fcc843a5c3657acf86c0cdbcc516f9940 (patch) | |
tree | edb6b13ac21f988c10e3a89c748dc7d9acfd7637 /engines/wage/script.cpp | |
parent | b066a592ee394b01823d4c94245f27de0ae49799 (diff) | |
download | scummvm-rg350-2dc5841fcc843a5c3657acf86c0cdbcc516f9940.tar.gz scummvm-rg350-2dc5841fcc843a5c3657acf86c0cdbcc516f9940.tar.bz2 scummvm-rg350-2dc5841fcc843a5c3657acf86c0cdbcc516f9940.zip |
WAGE: Implement handleInventoryCommand()
Diffstat (limited to 'engines/wage/script.cpp')
-rw-r--r-- | engines/wage/script.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/engines/wage/script.cpp b/engines/wage/script.cpp index 71f2cec21b..7ede7eafa4 100644 --- a/engines/wage/script.cpp +++ b/engines/wage/script.cpp @@ -1026,7 +1026,20 @@ void Script::appendObjNames(Common::String &str, ObjArray &objs) { } void Script::handleInventoryCommand() { - warning("STUB: handleInventoryCommand"); + Chr *player = _world->_player; + ObjArray objs; + + for (ObjArray::const_iterator it = player->_inventory.begin(); it != player->_inventory.end(); ++it) + if (!player->isWearing(*it)) + objs.push_back(*it); + + if (!objs.size()) { + appendText("Your pack is empty."); + } else { + Common::String res("Your pack contains "); + appendObjNames(res, objs); + appendText(res); + } } static const char *armorMessages[] = { |