@tosuapp/osu-native-wrapper 1.0.2 → 1.0.3

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 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
- nullableScore.hasValue = true;
569
- nullableScore.value = input.legacyScore;
570
- score.legacyTotalScore = nullableScore;
568
+ if (input.legacyScore !== 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.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
- nullableScore.hasValue = true;
520
- nullableScore.value = input.legacyScore;
521
- score.legacyTotalScore = nullableScore;
519
+ if (input.legacyScore !== 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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tosuapp/osu-native-wrapper",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "type": "commonjs",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",