diff --git a/packages/tosu/src/api/types/v2.ts b/packages/tosu/src/api/types/v2.ts index 7954c556..74e61dbc 100644 --- a/packages/tosu/src/api/types/v2.ts +++ b/packages/tosu/src/api/types/v2.ts @@ -250,6 +250,7 @@ export interface Profile { } export interface Beatmap { + isConvert: boolean; time: BeatmapTime; status: NumberName; checksum: string; diff --git a/packages/tosu/src/api/utils/buildResultV2.ts b/packages/tosu/src/api/utils/buildResultV2.ts index 2cb1a18c..5f3258b7 100644 --- a/packages/tosu/src/api/utils/buildResultV2.ts +++ b/packages/tosu/src/api/utils/buildResultV2.ts @@ -104,6 +104,13 @@ export const buildResult = (instanceManager: InstanceManager): ApiAnswer => { ? gamePlayData.Mods : allTimesData.MenuMods; + const currentMode = + allTimesData.Status === 2 + ? gamePlayData.Mode + : allTimesData.Status === 7 + ? resultsScreenData.Mode + : menuData.MenuGameMode; + const resultScreenHits = { 300: resultsScreenData.Hit300, geki: resultsScreenData.HitGeki, @@ -211,6 +218,7 @@ export const buildResult = (instanceManager: InstanceManager): ApiAnswer => { backgroundColour: userProfile.backgroundColour?.toString(16) }, beatmap: { + isConvert: beatmapPpData.Mode !== currentMode, time: { live: allTimesData.PlayTime, firstObject: beatmapPpData.timings.firstObj, diff --git a/packages/tosu/src/entities/BeatmapPpData/index.ts b/packages/tosu/src/entities/BeatmapPpData/index.ts index c7496f81..c4048dee 100644 --- a/packages/tosu/src/entities/BeatmapPpData/index.ts +++ b/packages/tosu/src/entities/BeatmapPpData/index.ts @@ -396,6 +396,8 @@ export class BeatmapPPData extends AbstractEntity { this.timings.firstObj = firstObj; this.timings.full = full; + this.Mode = this.beatmap.mode; + this.resetReportCount('BPPD(updateMapMetadataTimings)'); } catch (exc) { this.reportError( @@ -596,7 +598,6 @@ export class BeatmapPPData extends AbstractEntity { this.strains = oldStrains; this.strainsAll = resultStrains; - this.Mode = strains.mode; strains.free();