@rpg-engine/long-bow 0.6.82 → 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 +68 -44
- 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 +68 -44
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Quests/QuestList.tsx +74 -86
package/dist/long-bow.esm.js
CHANGED
|
@@ -31944,7 +31944,7 @@ var QuestList = function QuestList(_ref) {
|
|
|
31944
31944
|
style: {
|
|
31945
31945
|
color: getStatusColor(quest.status)
|
|
31946
31946
|
}
|
|
31947
|
-
}, (_formatStatus = formatStatus(quest.status)) != null ? _formatStatus : 'Unknown')), React.createElement(QuestItem, null, React.createElement(Label, null, "Description:"), React.createElement(Value, null, quest.description))
|
|
31947
|
+
}, (_formatStatus = formatStatus(quest.status)) != null ? _formatStatus : 'Unknown')), React.createElement(QuestItem, null, React.createElement(Label, null, "Description:"), React.createElement(Value, null, quest.description)));
|
|
31948
31948
|
}) : React.createElement(NoQuestContainer, null, React.createElement("p", null, "There are no ongoing quests")));
|
|
31949
31949
|
};
|
|
31950
31950
|
var QuestListContainer = /*#__PURE__*/styled.div.withConfig({
|
|
@@ -31971,49 +31971,73 @@ var NoQuestContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
31971
31971
|
displayName: "QuestList__NoQuestContainer",
|
|
31972
31972
|
componentId: "sc-1c1y8sp-5"
|
|
31973
31973
|
})(["text-align:center;p{margin-top:5px;color:", ";}"], uiColors.lightGray);
|
|
31974
|
-
|
|
31975
|
-
|
|
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
|
-
|
|
31974
|
+
// const formatObjectives = (
|
|
31975
|
+
// objectives: (IQuestObjectiveKill | IQuestObjectiveInteraction)[]
|
|
31976
|
+
// ) => {
|
|
31977
|
+
// try {
|
|
31978
|
+
// if (!objectives || !Array.isArray(objectives)) return '';
|
|
31979
|
+
// return objectives
|
|
31980
|
+
// .map(objective => {
|
|
31981
|
+
// if ('killCountTarget' in objective) {
|
|
31982
|
+
// const killObjective = objective as IQuestObjectiveKill;
|
|
31983
|
+
// return `Kill ${formatText(
|
|
31984
|
+
// killObjective.creatureKeys?.join(', ') ?? ''
|
|
31985
|
+
// )}: ${killObjective.killCount ?? 0}/${killObjective.killCountTarget ??
|
|
31986
|
+
// 0}`;
|
|
31987
|
+
// } else if ('targetNPCkey' in objective) {
|
|
31988
|
+
// const interactionObjective = objective as IQuestObjectiveInteraction;
|
|
31989
|
+
// return `Interact with NPC: ${formatText(
|
|
31990
|
+
// interactionObjective.targetNPCkey ?? ''
|
|
31991
|
+
// )}`;
|
|
31992
|
+
// } else {
|
|
31993
|
+
// return '';
|
|
31994
|
+
// }
|
|
31995
|
+
// })
|
|
31996
|
+
// .filter(Boolean)
|
|
31997
|
+
// .join('; ');
|
|
31998
|
+
// } catch (error) {
|
|
31999
|
+
// console.error('Error formatting objectives:', error);
|
|
32000
|
+
// return '';
|
|
32001
|
+
// }
|
|
32002
|
+
// };
|
|
32003
|
+
// const formatRewards = (rewards: IQuest['rewards']) => {
|
|
32004
|
+
// try {
|
|
32005
|
+
// if (!rewards || !Array.isArray(rewards)) return '';
|
|
32006
|
+
// return rewards
|
|
32007
|
+
// .map(reward => {
|
|
32008
|
+
// const itemKeysFormatted = reward?.itemKeys
|
|
32009
|
+
// ?.map(itemKey =>
|
|
32010
|
+
// itemKey && reward?.qty !== undefined
|
|
32011
|
+
// ? `${itemKey} x${reward.qty}`
|
|
32012
|
+
// : ''
|
|
32013
|
+
// )
|
|
32014
|
+
// .filter(Boolean)
|
|
32015
|
+
// .join(', ');
|
|
32016
|
+
// const spellKeysFormatted = reward?.spellKeys
|
|
32017
|
+
// ?.filter(Boolean)
|
|
32018
|
+
// .join(', ');
|
|
32019
|
+
// const formattedReward = itemKeysFormatted
|
|
32020
|
+
// ? `${formatText(itemKeysFormatted)}`
|
|
32021
|
+
// : '';
|
|
32022
|
+
// if (spellKeysFormatted) {
|
|
32023
|
+
// return formattedReward
|
|
32024
|
+
// ? `${formattedReward}, Spells: ${formatText(spellKeysFormatted)}`
|
|
32025
|
+
// : `Spells: ${formatText(spellKeysFormatted)}`;
|
|
32026
|
+
// }
|
|
32027
|
+
// return formattedReward || '';
|
|
32028
|
+
// })
|
|
32029
|
+
// .filter(Boolean)
|
|
32030
|
+
// .join('; ');
|
|
32031
|
+
// } catch (error) {
|
|
32032
|
+
// console.error(
|
|
32033
|
+
// `Error formatting rewards: ${JSON.stringify(rewards)}:`,
|
|
32034
|
+
// error
|
|
32035
|
+
// );
|
|
32036
|
+
// return '';
|
|
32037
|
+
// }
|
|
32038
|
+
// };
|
|
32015
32039
|
var formatText = function formatText(text) {
|
|
32016
|
-
if (!text) return '
|
|
32040
|
+
if (!text) return '';
|
|
32017
32041
|
return text.split('-').map(function (word) {
|
|
32018
32042
|
return word.charAt(0).toUpperCase() + word.slice(1);
|
|
32019
32043
|
}).join(' ');
|
|
@@ -32031,7 +32055,7 @@ var getStatusColor = function getStatusColor(status) {
|
|
|
32031
32055
|
}
|
|
32032
32056
|
};
|
|
32033
32057
|
var formatStatus = function formatStatus(status) {
|
|
32034
|
-
if (!status) return '
|
|
32058
|
+
if (!status) return '';
|
|
32035
32059
|
return status.split(/(?=[A-Z])/).join(' ').replace(/^\w/, function (c) {
|
|
32036
32060
|
return c.toUpperCase();
|
|
32037
32061
|
});
|