@rpg-engine/long-bow 0.6.72 → 0.6.74
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/QuestList.d.ts +1 -1
- package/dist/long-bow.cjs.development.js +13 -6
- package/dist/long-bow.cjs.development.js.map +1 -1
- package/dist/long-bow.cjs.production.min.js +1 -1
- package/dist/long-bow.cjs.production.min.js.map +1 -1
- package/dist/long-bow.esm.js +13 -6
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/QuestList.tsx +25 -17
|
@@ -32124,13 +32124,20 @@ var formatObjectives = function formatObjectives(objectives) {
|
|
|
32124
32124
|
}
|
|
32125
32125
|
}).join('; ');
|
|
32126
32126
|
};
|
|
32127
|
-
//
|
|
32127
|
+
// Updated helper function to format rewards
|
|
32128
32128
|
var formatRewards = function formatRewards(rewards) {
|
|
32129
|
-
|
|
32130
|
-
|
|
32131
|
-
|
|
32132
|
-
|
|
32133
|
-
|
|
32129
|
+
try {
|
|
32130
|
+
if (!rewards || !Array.isArray(rewards)) return 'No rewards';
|
|
32131
|
+
return rewards.map(function (reward) {
|
|
32132
|
+
var _reward$itemKeys;
|
|
32133
|
+
return "" + formatText(reward == null ? void 0 : (_reward$itemKeys = reward.itemKeys) == null ? void 0 : _reward$itemKeys.map(function (itemKey) {
|
|
32134
|
+
return itemKey + ' x' + (reward == null ? void 0 : reward.qty);
|
|
32135
|
+
}).join(', ')) + (reward != null && reward.spellKeys ? ", Spells: " + formatText(reward.spellKeys.join(', ')) : '');
|
|
32136
|
+
}).join('; ');
|
|
32137
|
+
} catch (error) {
|
|
32138
|
+
console.error("Error formatting rewards: " + JSON.stringify(rewards) + ":", error);
|
|
32139
|
+
return 'Error on rewards';
|
|
32140
|
+
}
|
|
32134
32141
|
};
|
|
32135
32142
|
var formatText = function formatText(text) {
|
|
32136
32143
|
return text.split('-').map(function (word) {
|