@rian8337/osu-difficulty-calculator 4.0.0-beta.20 → 4.0.0-beta.22
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/index.js +13 -4
- package/package.json +2 -2
- package/typings/index.d.ts +4 -4
package/dist/index.js
CHANGED
|
@@ -367,6 +367,15 @@ class DifficultyHitObject {
|
|
|
367
367
|
if (slider.lazyEndPosition) {
|
|
368
368
|
return;
|
|
369
369
|
}
|
|
370
|
+
if (this.mode === osuBase.Modes.droid) {
|
|
371
|
+
// Temporary lazy end position until a real result can be derived.
|
|
372
|
+
slider.lazyEndPosition = slider.getStackedPosition(this.mode);
|
|
373
|
+
// Stop here if the slider has too short duration, allowing the player to essentially
|
|
374
|
+
// complete the slider without movement, making travel distance and time irrelevant.
|
|
375
|
+
if (osuBase.Precision.almostEqualsNumber(slider.startTime, slider.endTime)) {
|
|
376
|
+
return;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
370
379
|
// Not using slider.endTime due to legacy last tick offset.
|
|
371
380
|
slider.lazyTravelTime =
|
|
372
381
|
slider.nestedHitObjects.at(-1).startTime - slider.startTime;
|
|
@@ -1757,10 +1766,10 @@ class DroidDifficultyCalculator extends DifficultyCalculator {
|
|
|
1757
1766
|
this.visual.toFixed(2) +
|
|
1758
1767
|
" visual)");
|
|
1759
1768
|
}
|
|
1760
|
-
generateDifficultyHitObjects(
|
|
1769
|
+
generateDifficultyHitObjects(convertedBeatmap) {
|
|
1761
1770
|
var _a, _b;
|
|
1762
1771
|
const difficultyObjects = [];
|
|
1763
|
-
const { objects } =
|
|
1772
|
+
const { objects } = convertedBeatmap.hitObjects;
|
|
1764
1773
|
const difficultyAdjustMod = this.mods.find((m) => m instanceof osuBase.ModDifficultyAdjust);
|
|
1765
1774
|
for (let i = 0; i < objects.length; ++i) {
|
|
1766
1775
|
const difficultyObject = new DroidDifficultyHitObject(objects[i], (_a = objects[i - 1]) !== null && _a !== void 0 ? _a : null, (_b = objects[i - 2]) !== null && _b !== void 0 ? _b : null, difficultyObjects, this.difficultyStatistics.overallSpeedMultiplier, (difficultyAdjustMod === null || difficultyAdjustMod === void 0 ? void 0 : difficultyAdjustMod.ar) !== undefined);
|
|
@@ -3374,10 +3383,10 @@ class OsuDifficultyCalculator extends DifficultyCalculator {
|
|
|
3374
3383
|
this.flashlight.toFixed(2) +
|
|
3375
3384
|
" flashlight)");
|
|
3376
3385
|
}
|
|
3377
|
-
generateDifficultyHitObjects() {
|
|
3386
|
+
generateDifficultyHitObjects(convertedBeatmap) {
|
|
3378
3387
|
var _a, _b;
|
|
3379
3388
|
const difficultyObjects = [];
|
|
3380
|
-
const { objects } =
|
|
3389
|
+
const { objects } = convertedBeatmap.hitObjects;
|
|
3381
3390
|
for (let i = 0; i < objects.length; ++i) {
|
|
3382
3391
|
const difficultyObject = new OsuDifficultyHitObject(objects[i], (_a = objects[i - 1]) !== null && _a !== void 0 ? _a : null, (_b = objects[i - 2]) !== null && _b !== void 0 ? _b : null, difficultyObjects, this.difficultyStatistics.overallSpeedMultiplier);
|
|
3383
3392
|
difficultyObject.computeProperties(this.difficultyStatistics.overallSpeedMultiplier, objects);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rian8337/osu-difficulty-calculator",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.22",
|
|
4
4
|
"description": "A module for calculating osu!standard beatmap difficulty and performance value with respect to the current difficulty and performance algorithm.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"osu",
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"publishConfig": {
|
|
39
39
|
"access": "public"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "d8b62a07a4f862cf83bf106a46f67c6c6562c545"
|
|
42
42
|
}
|
package/typings/index.d.ts
CHANGED
|
@@ -364,9 +364,9 @@ declare abstract class DifficultyCalculator<THitObject extends DifficultyHitObje
|
|
|
364
364
|
/**
|
|
365
365
|
* Generates difficulty hitobjects for this calculator.
|
|
366
366
|
*
|
|
367
|
-
* @param
|
|
367
|
+
* @param convertedBeatmap The beatmap to generate difficulty hitobjects from.
|
|
368
368
|
*/
|
|
369
|
-
protected abstract generateDifficultyHitObjects(
|
|
369
|
+
protected abstract generateDifficultyHitObjects(convertedBeatmap: Beatmap): THitObject[];
|
|
370
370
|
/**
|
|
371
371
|
* Computes the difficulty statistics of the original beatmap with respect to the used options.
|
|
372
372
|
*
|
|
@@ -841,7 +841,7 @@ declare class DroidDifficultyCalculator extends DifficultyCalculator<DroidDiffic
|
|
|
841
841
|
calculateTotal(): void;
|
|
842
842
|
calculateAll(): void;
|
|
843
843
|
toString(): string;
|
|
844
|
-
protected generateDifficultyHitObjects(
|
|
844
|
+
protected generateDifficultyHitObjects(convertedBeatmap: Beatmap): DroidDifficultyHitObject[];
|
|
845
845
|
protected computeDifficultyStatistics(options?: DroidDifficultyCalculationOptions): DifficultyStatisticsCalculatorResult<number, number, number, number>;
|
|
846
846
|
protected createSkills(): DroidSkill[];
|
|
847
847
|
/**
|
|
@@ -1516,7 +1516,7 @@ declare class OsuDifficultyCalculator extends DifficultyCalculator<OsuDifficulty
|
|
|
1516
1516
|
calculateTotal(): void;
|
|
1517
1517
|
calculateAll(): void;
|
|
1518
1518
|
toString(): string;
|
|
1519
|
-
protected generateDifficultyHitObjects(): OsuDifficultyHitObject[];
|
|
1519
|
+
protected generateDifficultyHitObjects(convertedBeatmap: Beatmap): OsuDifficultyHitObject[];
|
|
1520
1520
|
protected computeDifficultyStatistics(options?: DifficultyCalculationOptions): DifficultyStatisticsCalculatorResult<number, number, number, number>;
|
|
1521
1521
|
protected createSkills(): OsuSkill[];
|
|
1522
1522
|
/**
|