@rpg-engine/long-bow 0.6.54 → 0.6.55
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/SkillProgressBar.d.ts +1 -0
- package/dist/long-bow.cjs.development.js +5 -1
- 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 +6 -2
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/SkillProgressBar.tsx +3 -1
- package/src/components/SkillsContainer.tsx +15 -1
|
@@ -32131,6 +32131,7 @@ var SkillProgressBar = function SkillProgressBar(_ref) {
|
|
|
32131
32131
|
skillName = _ref.skillName,
|
|
32132
32132
|
level = _ref.level,
|
|
32133
32133
|
currentSkillPoints = _ref.skillPoints,
|
|
32134
|
+
skillPointsToNextLevel = _ref.skillPointsToNextLevel,
|
|
32134
32135
|
texturePath = _ref.texturePath,
|
|
32135
32136
|
_ref$showSkillPoints = _ref.showSkillPoints,
|
|
32136
32137
|
showSkillPoints = _ref$showSkillPoints === void 0 ? true : _ref$showSkillPoints,
|
|
@@ -32140,7 +32141,7 @@ var SkillProgressBar = function SkillProgressBar(_ref) {
|
|
|
32140
32141
|
// Base skill points for the previous level (0 for level 1)
|
|
32141
32142
|
var baseSkillPointsPrevLevel = level > 1 ? shared.getSPForLevel(level - 1) : 0;
|
|
32142
32143
|
// Total skill points needed for the next level
|
|
32143
|
-
var nextLevelSkillPoints =
|
|
32144
|
+
var nextLevelSkillPoints = skillPointsToNextLevel;
|
|
32144
32145
|
// Calculate excess skill points above the previous level
|
|
32145
32146
|
var excessSkillPoints = Math.max(currentSkillPoints - baseSkillPointsPrevLevel, 0);
|
|
32146
32147
|
// Calculate progress percentage towards the next level
|
|
@@ -32299,12 +32300,14 @@ var SkillsContainer = function SkillsContainer(_ref) {
|
|
|
32299
32300
|
if (!skillDetails) {
|
|
32300
32301
|
continue;
|
|
32301
32302
|
}
|
|
32303
|
+
var skillPointsToNextLevel = shared.calculateSPToNextLevel(skillDetails.skillPoints, skillDetails.level);
|
|
32302
32304
|
output.push(React__default.createElement(SkillProgressBar, {
|
|
32303
32305
|
key: key,
|
|
32304
32306
|
skillName: skillNameMap[key],
|
|
32305
32307
|
bgColor: skillCategoryColor,
|
|
32306
32308
|
level: skillDetails.level || 0,
|
|
32307
32309
|
skillPoints: Math.round(skillDetails.skillPoints) || 0,
|
|
32310
|
+
skillPointsToNextLevel: skillPointsToNextLevel,
|
|
32308
32311
|
texturePath: value,
|
|
32309
32312
|
atlasIMG: atlasIMG,
|
|
32310
32313
|
atlasJSON: atlasJSON,
|
|
@@ -32329,6 +32332,7 @@ var SkillsContainer = function SkillsContainer(_ref) {
|
|
|
32329
32332
|
bgColor: uiColors.navyBlue,
|
|
32330
32333
|
level: Math.round(skill.level) || 0,
|
|
32331
32334
|
skillPoints: Math.round(skill.experience) || 0,
|
|
32335
|
+
skillPointsToNextLevel: Math.round(shared.getXPForLevel(skill.level + 1)) || 0,
|
|
32332
32336
|
texturePath: 'swords/broad-sword.png',
|
|
32333
32337
|
atlasIMG: atlasIMG,
|
|
32334
32338
|
atlasJSON: atlasJSON
|