@rpg-engine/long-bow 0.6.83 → 0.6.85
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 +66 -42
- 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 +66 -42
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Quests/QuestList.tsx +72 -89
|
@@ -31946,7 +31946,7 @@ 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))
|
|
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)));
|
|
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({
|
|
@@ -31973,47 +31973,71 @@ var NoQuestContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
31973
31973
|
displayName: "QuestList__NoQuestContainer",
|
|
31974
31974
|
componentId: "sc-1c1y8sp-5"
|
|
31975
31975
|
})(["text-align:center;p{margin-top:5px;color:", ";}"], uiColors.lightGray);
|
|
31976
|
-
|
|
31977
|
-
|
|
31978
|
-
|
|
31979
|
-
|
|
31980
|
-
|
|
31981
|
-
|
|
31982
|
-
|
|
31983
|
-
|
|
31984
|
-
|
|
31985
|
-
|
|
31986
|
-
|
|
31987
|
-
|
|
31988
|
-
|
|
31989
|
-
|
|
31990
|
-
|
|
31991
|
-
|
|
31992
|
-
|
|
31993
|
-
|
|
31994
|
-
|
|
31995
|
-
|
|
31996
|
-
}
|
|
31997
|
-
|
|
31998
|
-
|
|
31999
|
-
|
|
32000
|
-
|
|
32001
|
-
|
|
32002
|
-
|
|
32003
|
-
|
|
32004
|
-
|
|
32005
|
-
|
|
32006
|
-
|
|
32007
|
-
|
|
32008
|
-
|
|
32009
|
-
|
|
32010
|
-
|
|
32011
|
-
|
|
32012
|
-
|
|
32013
|
-
|
|
32014
|
-
|
|
32015
|
-
|
|
32016
|
-
|
|
31976
|
+
// const formatObjectives = (
|
|
31977
|
+
// objectives: (IQuestObjectiveKill | IQuestObjectiveInteraction)[]
|
|
31978
|
+
// ) => {
|
|
31979
|
+
// try {
|
|
31980
|
+
// if (!objectives || !Array.isArray(objectives)) return '';
|
|
31981
|
+
// return objectives
|
|
31982
|
+
// .map(objective => {
|
|
31983
|
+
// if ('killCountTarget' in objective) {
|
|
31984
|
+
// const killObjective = objective as IQuestObjectiveKill;
|
|
31985
|
+
// return `Kill ${formatText(
|
|
31986
|
+
// killObjective.creatureKeys?.join(', ') ?? ''
|
|
31987
|
+
// )}: ${killObjective.killCount ?? 0}/${killObjective.killCountTarget ??
|
|
31988
|
+
// 0}`;
|
|
31989
|
+
// } else if ('targetNPCkey' in objective) {
|
|
31990
|
+
// const interactionObjective = objective as IQuestObjectiveInteraction;
|
|
31991
|
+
// return `Interact with NPC: ${formatText(
|
|
31992
|
+
// interactionObjective.targetNPCkey ?? ''
|
|
31993
|
+
// )}`;
|
|
31994
|
+
// } else {
|
|
31995
|
+
// return '';
|
|
31996
|
+
// }
|
|
31997
|
+
// })
|
|
31998
|
+
// .filter(Boolean)
|
|
31999
|
+
// .join('; ');
|
|
32000
|
+
// } catch (error) {
|
|
32001
|
+
// console.error('Error formatting objectives:', error);
|
|
32002
|
+
// return '';
|
|
32003
|
+
// }
|
|
32004
|
+
// };
|
|
32005
|
+
// const formatRewards = (rewards: IQuest['rewards']) => {
|
|
32006
|
+
// try {
|
|
32007
|
+
// if (!rewards || !Array.isArray(rewards)) return '';
|
|
32008
|
+
// return rewards
|
|
32009
|
+
// .map(reward => {
|
|
32010
|
+
// const itemKeysFormatted = reward?.itemKeys
|
|
32011
|
+
// ?.map(itemKey =>
|
|
32012
|
+
// itemKey && reward?.qty !== undefined
|
|
32013
|
+
// ? `${itemKey} x${reward.qty}`
|
|
32014
|
+
// : ''
|
|
32015
|
+
// )
|
|
32016
|
+
// .filter(Boolean)
|
|
32017
|
+
// .join(', ');
|
|
32018
|
+
// const spellKeysFormatted = reward?.spellKeys
|
|
32019
|
+
// ?.filter(Boolean)
|
|
32020
|
+
// .join(', ');
|
|
32021
|
+
// const formattedReward = itemKeysFormatted
|
|
32022
|
+
// ? `${formatText(itemKeysFormatted)}`
|
|
32023
|
+
// : '';
|
|
32024
|
+
// if (spellKeysFormatted) {
|
|
32025
|
+
// return formattedReward
|
|
32026
|
+
// ? `${formattedReward}, Spells: ${formatText(spellKeysFormatted)}`
|
|
32027
|
+
// : `Spells: ${formatText(spellKeysFormatted)}`;
|
|
32028
|
+
// }
|
|
32029
|
+
// return formattedReward || '';
|
|
32030
|
+
// })
|
|
32031
|
+
// .filter(Boolean)
|
|
32032
|
+
// .join('; ');
|
|
32033
|
+
// } catch (error) {
|
|
32034
|
+
// console.error(
|
|
32035
|
+
// `Error formatting rewards: ${JSON.stringify(rewards)}:`,
|
|
32036
|
+
// error
|
|
32037
|
+
// );
|
|
32038
|
+
// return '';
|
|
32039
|
+
// }
|
|
32040
|
+
// };
|
|
32017
32041
|
var formatText = function formatText(text) {
|
|
32018
32042
|
if (!text) return '';
|
|
32019
32043
|
return text.split('-').map(function (word) {
|