mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 18:12:56 +08:00
Allow transfer of previously loaded background between WorkingBeatmaps
This commit is contained in:
parent
88b2b740d7
commit
28375ed1fc
@ -94,6 +94,9 @@ namespace osu.Game.Beatmaps
|
|||||||
{
|
{
|
||||||
if (track != null && BeatmapInfo.AudioEquals(other.BeatmapInfo))
|
if (track != null && BeatmapInfo.AudioEquals(other.BeatmapInfo))
|
||||||
other.track = track;
|
other.track = track;
|
||||||
|
|
||||||
|
if (background != null && BeatmapInfo.BackgroundEquals(other.BeatmapInfo))
|
||||||
|
other.background = background;
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void Dispose()
|
public virtual void Dispose()
|
||||||
|
@ -93,5 +93,9 @@ namespace osu.Game.Database
|
|||||||
public bool AudioEquals(BeatmapInfo other) => other != null && BeatmapSet != null && other.BeatmapSet != null &&
|
public bool AudioEquals(BeatmapInfo other) => other != null && BeatmapSet != null && other.BeatmapSet != null &&
|
||||||
BeatmapSet.Path == other.BeatmapSet.Path &&
|
BeatmapSet.Path == other.BeatmapSet.Path &&
|
||||||
(Metadata ?? BeatmapSet.Metadata).AudioFile == (other.Metadata ?? other.BeatmapSet.Metadata).AudioFile;
|
(Metadata ?? BeatmapSet.Metadata).AudioFile == (other.Metadata ?? other.BeatmapSet.Metadata).AudioFile;
|
||||||
|
|
||||||
|
public bool BackgroundEquals(BeatmapInfo other) => other != null && BeatmapSet != null && other.BeatmapSet != null &&
|
||||||
|
BeatmapSet.Path == other.BeatmapSet.Path &&
|
||||||
|
(Metadata ?? BeatmapSet.Metadata).BackgroundFile == (other.Metadata ?? other.BeatmapSet.Metadata).BackgroundFile;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user