diff options
author | Paul Gilbert | 2018-03-25 23:12:14 -0400 |
---|---|---|
committer | Paul Gilbert | 2018-03-25 23:14:22 -0400 |
commit | 99729bc15d994fa0b5b6b98a19faa252b7c1415e (patch) | |
tree | 5026accf42239921f63abcfb839e8405ef53a2cb /engines/xeen/dialogs | |
parent | f198c16f455bcbab0b5908eee2771146af544969 (diff) | |
download | scummvm-rg350-99729bc15d994fa0b5b6b98a19faa252b7c1415e.tar.gz scummvm-rg350-99729bc15d994fa0b5b6b98a19faa252b7c1415e.tar.bz2 scummvm-rg350-99729bc15d994fa0b5b6b98a19faa252b7c1415e.zip |
XEEN: Add custom engine option for showing inventory item costs
This first new option displays the effective cost of items
when viewing in the standard character inventory. This makes
it easier to compare the value (and thus relative power)
of items against either other
Diffstat (limited to 'engines/xeen/dialogs')
-rw-r--r-- | engines/xeen/dialogs/dialogs_items.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/engines/xeen/dialogs/dialogs_items.cpp b/engines/xeen/dialogs/dialogs_items.cpp index a43439b15b..9a029dc1c3 100644 --- a/engines/xeen/dialogs/dialogs_items.cpp +++ b/engines/xeen/dialogs/dialogs_items.cpp @@ -149,8 +149,8 @@ Character *ItemsDialog::execute(Character *c, ItemsMode mode) { case CATEGORY_ARMOR: case CATEGORY_ACCESSORY: if (i._id) { - if (mode == ITEMMODE_CHAR_INFO || mode == ITEMMODE_8 - || mode == ITEMMODE_ENCHANT || mode == ITEMMODE_RECHARGE) { + if ((mode == ITEMMODE_CHAR_INFO && !g_vm->_extOptions._showItemCosts) + || mode == ITEMMODE_8 || mode == ITEMMODE_ENCHANT || mode == ITEMMODE_RECHARGE) { lines.push_back(Common::String::format(Res.ITEMS_DIALOG_LINE1, arr[idx], idx + 1, c->_items[category].getFullDescription(idx, arr[idx]).c_str())); @@ -158,7 +158,8 @@ Character *ItemsDialog::execute(Character *c, ItemsMode mode) { lines.push_back(Common::String::format(Res.ITEMS_DIALOG_LINE2, arr[idx], idx + 1, c->_items[category].getFullDescription(idx, arr[idx]).c_str(), - calcItemCost(c, idx, mode, + calcItemCost(c, idx, + (mode == ITEMMODE_CHAR_INFO) ? ITEMMODE_BLACKSMITH : mode, mode == ITEMMODE_TO_GOLD ? 1 : startingChar->_skills[MERCHANT], category) )); |