Skip to content

Commit

Permalink
[ui] add note to consumable weapon descriptions that you can only use…
Browse files Browse the repository at this point in the history
… one per battle
  • Loading branch information
nroutasuo committed Mar 22, 2023
1 parent 99a2873 commit 8e4810b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/game/constants/ItemConstants.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,12 @@ function (Ash, ItemData, PlayerActionConstants, UpgradeConstants, WorldConstants
return parts[parts.length - 1];
},

getItemDescription: function (item) {
let result = item.description;
if (item.id.indexOf("consumable_weapon") >= 0) result += " (Only one per fight.)";
return result;
},

getItemBonusIcons: function (itemBonusType) {
return this.itemBonusTypeIcons[itemBonusType] || null;
},
Expand Down
2 changes: 1 addition & 1 deletion src/game/constants/UIConstants.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ define(['ash',
var itemCalloutContent = "<b>" + item.name + "</b><br/>Type: " + ItemConstants.getItemTypeDisplayName(item.type, false) + " " + detail;
itemCalloutContent += "</br>Weight: " + weight;
if (item.broken) itemCalloutContent += "<br><span class='warning'>Broken</span>";
itemCalloutContent += "</br>" + item.description;
itemCalloutContent += "</br>" + ItemConstants.getItemDescription(item);
if (smallCallout) itemCalloutContent = item.name + (detail.length > 0 ? " " + detail : "");

var makeButton = function (action, name) {
Expand Down

0 comments on commit 8e4810b

Please sign in to comment.