@rian8337/osu-difficulty-calculator 4.0.0-beta.69 → 4.0.0-beta.70

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 CHANGED
@@ -68,6 +68,7 @@ class DifficultyCalculator {
68
68
  this.difficultyAdjustmentMods = [
69
69
  osuBase.ModDifficultyAdjust,
70
70
  osuBase.ModRateAdjust,
71
+ osuBase.ModTimeRamp,
71
72
  osuBase.ModEasy,
72
73
  osuBase.ModHardRock,
73
74
  osuBase.ModFlashlight,
@@ -79,13 +80,9 @@ class DifficultyCalculator {
79
80
  ];
80
81
  }
81
82
  calculate(beatmap, mods) {
82
- const difficultyAdjustmentMods = this.retainDifficultyAdjustmentMods(mods ? Array.from(mods.values()) : []);
83
83
  const playableBeatmap = beatmap instanceof osuBase.PlayableBeatmap
84
84
  ? beatmap
85
- : this.createPlayableBeatmap(beatmap, new osuBase.ModMap(difficultyAdjustmentMods.map((m) => [
86
- m.constructor,
87
- m,
88
- ])));
85
+ : this.createPlayableBeatmapWithDifficultyAdjustmentMods(beatmap, mods);
89
86
  const skills = this.createSkills(playableBeatmap);
90
87
  const objects = this.createDifficultyHitObjects(playableBeatmap);
91
88
  for (const object of objects) {
@@ -98,7 +95,7 @@ class DifficultyCalculator {
98
95
  calculateStrainPeaks(beatmap, mods) {
99
96
  const playableBeatmap = beatmap instanceof osuBase.PlayableBeatmap
100
97
  ? beatmap
101
- : this.createPlayableBeatmap(beatmap, mods);
98
+ : this.createPlayableBeatmapWithDifficultyAdjustmentMods(beatmap, mods);
102
99
  const skills = this.createStrainPeakSkills(playableBeatmap);
103
100
  const objects = this.createDifficultyHitObjects(playableBeatmap);
104
101
  for (const object of objects) {
@@ -130,6 +127,13 @@ class DifficultyCalculator {
130
127
  basePerformanceValue(rating) {
131
128
  return Math.pow(5 * Math.max(1, rating / 0.0675) - 4, 3) / 100000;
132
129
  }
130
+ createPlayableBeatmapWithDifficultyAdjustmentMods(beatmap, mods) {
131
+ const difficultyAdjustmentMods = this.retainDifficultyAdjustmentMods(mods ? Array.from(mods.values()) : []);
132
+ return this.createPlayableBeatmap(beatmap, new osuBase.ModMap(difficultyAdjustmentMods.map((m) => [
133
+ m.constructor,
134
+ m,
135
+ ])));
136
+ }
133
137
  }
134
138
 
135
139
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rian8337/osu-difficulty-calculator",
3
- "version": "4.0.0-beta.69",
3
+ "version": "4.0.0-beta.70",
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",
@@ -33,10 +33,10 @@
33
33
  "url": "https://github.com/Rian8337/osu-droid-module/issues"
34
34
  },
35
35
  "dependencies": {
36
- "@rian8337/osu-base": "^4.0.0-beta.69"
36
+ "@rian8337/osu-base": "^4.0.0-beta.70"
37
37
  },
38
38
  "publishConfig": {
39
39
  "access": "public"
40
40
  },
41
- "gitHead": "aed764bcd1c55a0a937b8f7439146c00b0457bfb"
41
+ "gitHead": "8652186374636fb74ffc69eb2db39f7728ac12e8"
42
42
  }
@@ -518,6 +518,7 @@ declare abstract class DifficultyCalculator<TBeatmap extends PlayableBeatmap, TH
518
518
  * @param rating The difficulty rating.
519
519
  */
520
520
  protected basePerformanceValue(rating: number): number;
521
+ private createPlayableBeatmapWithDifficultyAdjustmentMods;
521
522
  }
522
523
 
523
524
  /**