@rian8337/osu-difficulty-calculator 1.0.4 → 1.0.5

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.
Files changed (2) hide show
  1. package/package.json +3 -3
  2. package/typings/index.d.ts +35 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rian8337/osu-difficulty-calculator",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
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",
@@ -30,10 +30,10 @@
30
30
  "url": "https://github.com/Rian8337/osu-droid-module/issues"
31
31
  },
32
32
  "dependencies": {
33
- "@rian8337/osu-base": "^1.0.4"
33
+ "@rian8337/osu-base": "^1.0.5"
34
34
  },
35
35
  "publishConfig": {
36
36
  "access": "public"
37
37
  },
38
- "gitHead": "31e88dedb78e6b1e0123b67bcc5d4dd31f5dfc60"
38
+ "gitHead": "c8c092485a5ae3be16f2bfa0a3defb00163918d7"
39
39
  }
@@ -403,6 +403,41 @@ declare module "@rian8337/osu-difficulty-calculator" {
403
403
  protected override saveToHitObject(current: DifficultyHitObject): void;
404
404
  }
405
405
 
406
+ /**
407
+ * A star rating calculator that configures which mode to calculate difficulty for and what mods are applied.
408
+ */
409
+ export class MapStars {
410
+ /**
411
+ * The osu!droid star rating of the beatmap.
412
+ */
413
+ readonly droidStars: DroidStarRating;
414
+ /**
415
+ * The osu!standard star rating of the beatmap.
416
+ */
417
+ readonly pcStars: OsuStarRating;
418
+ /**
419
+ * Calculates the star rating of a beatmap.
420
+ */
421
+ calculate(params: {
422
+ /**
423
+ * The beatmap to calculate.
424
+ */
425
+ map: Beatmap;
426
+ /**
427
+ * Applied modifications.
428
+ */
429
+ mods?: Mod[];
430
+ /**
431
+ * Custom map statistics to apply speed multiplier and force AR values as well as old statistics.
432
+ */
433
+ stats?: MapStats;
434
+ }): MapStars;
435
+ /**
436
+ * Returns a string representative of the class.
437
+ */
438
+ toString(): string;
439
+ }
440
+
406
441
  /**
407
442
  * Represents the skill required to correctly aim at every object in the map with a uniform CircleSize and normalized distances.
408
443
  */