@tosuapp/osu-native-wrapper 1.0.2 → 1.0.4
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.cjs +7 -3
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +7 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -565,9 +565,13 @@ function makeScoreInfo(input) {
|
|
|
565
565
|
score.beatmapHandle = input.beatmap.handle;
|
|
566
566
|
score.modsHandle = input.mods?.handle ?? OsuNative.makeNullHandle();
|
|
567
567
|
const nullableScore = new import_osu_native_napi10.Cabinet__Nullable_int64_t();
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
568
|
+
if (input.legacyScore !== void 0) {
|
|
569
|
+
nullableScore.hasValue = true;
|
|
570
|
+
nullableScore.value = input.legacyScore;
|
|
571
|
+
score.legacyTotalScore = nullableScore;
|
|
572
|
+
} else {
|
|
573
|
+
nullableScore.hasValue = false;
|
|
574
|
+
}
|
|
571
575
|
score.maxCombo = input.maxCombo ?? 0;
|
|
572
576
|
score.accuracy = input.accuracy ?? 0;
|
|
573
577
|
score.countMiss = input.countMiss ?? 0;
|
package/dist/index.d.mts
CHANGED
|
@@ -121,7 +121,7 @@ type ScoreInfoInput = Partial<Omit<NativeScoreInfo, "rulesetHandle" | "beatmapHa
|
|
|
121
121
|
ruleset: Ruleset;
|
|
122
122
|
beatmap: Beatmap;
|
|
123
123
|
mods?: ModsCollection | null;
|
|
124
|
-
legacyScore
|
|
124
|
+
legacyScore?: number;
|
|
125
125
|
};
|
|
126
126
|
|
|
127
127
|
declare class CatchPerformanceCalculator extends NativeHandleOwner<NativeCatchPerformanceCalculator> {
|
package/dist/index.d.ts
CHANGED
|
@@ -121,7 +121,7 @@ type ScoreInfoInput = Partial<Omit<NativeScoreInfo, "rulesetHandle" | "beatmapHa
|
|
|
121
121
|
ruleset: Ruleset;
|
|
122
122
|
beatmap: Beatmap;
|
|
123
123
|
mods?: ModsCollection | null;
|
|
124
|
-
legacyScore
|
|
124
|
+
legacyScore?: number;
|
|
125
125
|
};
|
|
126
126
|
|
|
127
127
|
declare class CatchPerformanceCalculator extends NativeHandleOwner<NativeCatchPerformanceCalculator> {
|
package/dist/index.mjs
CHANGED
|
@@ -516,9 +516,13 @@ function makeScoreInfo(input) {
|
|
|
516
516
|
score.beatmapHandle = input.beatmap.handle;
|
|
517
517
|
score.modsHandle = input.mods?.handle ?? OsuNative.makeNullHandle();
|
|
518
518
|
const nullableScore = new Cabinet__Nullable_int64_t();
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
519
|
+
if (input.legacyScore !== void 0) {
|
|
520
|
+
nullableScore.hasValue = true;
|
|
521
|
+
nullableScore.value = input.legacyScore;
|
|
522
|
+
score.legacyTotalScore = nullableScore;
|
|
523
|
+
} else {
|
|
524
|
+
nullableScore.hasValue = false;
|
|
525
|
+
}
|
|
522
526
|
score.maxCombo = input.maxCombo ?? 0;
|
|
523
527
|
score.accuracy = input.accuracy ?? 0;
|
|
524
528
|
score.countMiss = input.countMiss ?? 0;
|