@rpg-engine/long-bow 0.6.81 → 0.6.83
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/long-bow.cjs.development.js +13 -13
- 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 -13
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Quests/QuestList.tsx +23 -19
|
@@ -31946,13 +31946,13 @@ var QuestList = function QuestList(_ref) {
|
|
|
31946
31946
|
style: {
|
|
31947
31947
|
color: getStatusColor(quest.status)
|
|
31948
31948
|
}
|
|
31949
|
-
}, (_formatStatus = formatStatus(quest.status)) != null ? _formatStatus : 'Unknown')), React__default.createElement(QuestItem, null, React__default.createElement(Label, null, "Description:"), React__default.createElement(Value, null, quest.description)), React__default.createElement(QuestItem, null, React__default.createElement(Label, null, "Objectives:"), React__default.createElement(Value, null, formatObjectives(quest.objectives))), React__default.createElement(QuestItem, null, React__default.createElement(Label, null, "Rewards:"), React__default.createElement(Value, null, formatRewards(quest.rewards))));
|
|
31949
|
+
}, (_formatStatus = formatStatus(quest.status)) != null ? _formatStatus : 'Unknown')), React__default.createElement(QuestItem, null, React__default.createElement(Label, null, "Description:"), React__default.createElement(Value, null, quest.description)), quest.objectives && quest.objectives.length > 0 && React__default.createElement(QuestItem, null, React__default.createElement(Label, null, "Objectives:"), React__default.createElement(Value, null, formatObjectives(quest.objectives))), quest.rewards && quest.rewards.length > 0 && React__default.createElement(QuestItem, null, React__default.createElement(Label, null, "Rewards:"), React__default.createElement(Value, null, formatRewards(quest.rewards))));
|
|
31950
31950
|
}) : React__default.createElement(NoQuestContainer, null, React__default.createElement("p", null, "There are no ongoing quests")));
|
|
31951
31951
|
};
|
|
31952
31952
|
var QuestListContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
31953
31953
|
displayName: "QuestList__QuestListContainer",
|
|
31954
31954
|
componentId: "sc-1c1y8sp-0"
|
|
31955
|
-
})(["margin-top:20px;margin-bottom:40px;
|
|
31955
|
+
})(["margin-top:20px;margin-bottom:40px;max-height:400px;padding:10px;border-radius:10px;font-size:0.7rem;"]);
|
|
31956
31956
|
var QuestCard = /*#__PURE__*/styled__default.div.withConfig({
|
|
31957
31957
|
displayName: "QuestList__QuestCard",
|
|
31958
31958
|
componentId: "sc-1c1y8sp-1"
|
|
@@ -31975,28 +31975,28 @@ var NoQuestContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
31975
31975
|
})(["text-align:center;p{margin-top:5px;color:", ";}"], uiColors.lightGray);
|
|
31976
31976
|
var formatObjectives = function formatObjectives(objectives) {
|
|
31977
31977
|
try {
|
|
31978
|
-
if (!objectives || !Array.isArray(objectives)) return '
|
|
31978
|
+
if (!objectives || !Array.isArray(objectives)) return '';
|
|
31979
31979
|
return objectives.map(function (objective) {
|
|
31980
31980
|
if ('killCountTarget' in objective) {
|
|
31981
31981
|
var _killObjective$creatu, _killObjective$creatu2, _killObjective$killCo, _killObjective$killCo2;
|
|
31982
31982
|
var killObjective = objective;
|
|
31983
|
-
return "Kill " + formatText((_killObjective$creatu = (_killObjective$creatu2 = killObjective.creatureKeys) == null ? void 0 : _killObjective$creatu2.join(', ')) != null ? _killObjective$creatu : '
|
|
31983
|
+
return "Kill " + formatText((_killObjective$creatu = (_killObjective$creatu2 = killObjective.creatureKeys) == null ? void 0 : _killObjective$creatu2.join(', ')) != null ? _killObjective$creatu : '') + ": " + ((_killObjective$killCo = killObjective.killCount) != null ? _killObjective$killCo : 0) + "/" + ((_killObjective$killCo2 = killObjective.killCountTarget) != null ? _killObjective$killCo2 : 0);
|
|
31984
31984
|
} else if ('targetNPCkey' in objective) {
|
|
31985
31985
|
var _interactionObjective;
|
|
31986
31986
|
var interactionObjective = objective;
|
|
31987
|
-
return "Interact with NPC: " + formatText((_interactionObjective = interactionObjective.targetNPCkey) != null ? _interactionObjective : '
|
|
31987
|
+
return "Interact with NPC: " + formatText((_interactionObjective = interactionObjective.targetNPCkey) != null ? _interactionObjective : '');
|
|
31988
31988
|
} else {
|
|
31989
|
-
return '
|
|
31989
|
+
return '';
|
|
31990
31990
|
}
|
|
31991
|
-
}).join('; ');
|
|
31991
|
+
}).filter(Boolean).join('; ');
|
|
31992
31992
|
} catch (error) {
|
|
31993
31993
|
console.error('Error formatting objectives:', error);
|
|
31994
|
-
return '
|
|
31994
|
+
return '';
|
|
31995
31995
|
}
|
|
31996
31996
|
};
|
|
31997
31997
|
var formatRewards = function formatRewards(rewards) {
|
|
31998
31998
|
try {
|
|
31999
|
-
if (!rewards || !Array.isArray(rewards)) return '
|
|
31999
|
+
if (!rewards || !Array.isArray(rewards)) return '';
|
|
32000
32000
|
return rewards.map(function (reward) {
|
|
32001
32001
|
var _reward$itemKeys, _reward$spellKeys;
|
|
32002
32002
|
var itemKeysFormatted = reward == null ? void 0 : (_reward$itemKeys = reward.itemKeys) == null ? void 0 : _reward$itemKeys.map(function (itemKey) {
|
|
@@ -32007,15 +32007,15 @@ var formatRewards = function formatRewards(rewards) {
|
|
|
32007
32007
|
if (spellKeysFormatted) {
|
|
32008
32008
|
return formattedReward ? formattedReward + ", Spells: " + formatText(spellKeysFormatted) : "Spells: " + formatText(spellKeysFormatted);
|
|
32009
32009
|
}
|
|
32010
|
-
return formattedReward || '
|
|
32010
|
+
return formattedReward || '';
|
|
32011
32011
|
}).filter(Boolean).join('; ');
|
|
32012
32012
|
} catch (error) {
|
|
32013
32013
|
console.error("Error formatting rewards: " + JSON.stringify(rewards) + ":", error);
|
|
32014
|
-
return '
|
|
32014
|
+
return '';
|
|
32015
32015
|
}
|
|
32016
32016
|
};
|
|
32017
32017
|
var formatText = function formatText(text) {
|
|
32018
|
-
if (!text) return '
|
|
32018
|
+
if (!text) return '';
|
|
32019
32019
|
return text.split('-').map(function (word) {
|
|
32020
32020
|
return word.charAt(0).toUpperCase() + word.slice(1);
|
|
32021
32021
|
}).join(' ');
|
|
@@ -32033,7 +32033,7 @@ var getStatusColor = function getStatusColor(status) {
|
|
|
32033
32033
|
}
|
|
32034
32034
|
};
|
|
32035
32035
|
var formatStatus = function formatStatus(status) {
|
|
32036
|
-
if (!status) return '
|
|
32036
|
+
if (!status) return '';
|
|
32037
32037
|
return status.split(/(?=[A-Z])/).join(' ').replace(/^\w/, function (c) {
|
|
32038
32038
|
return c.toUpperCase();
|
|
32039
32039
|
});
|