mirror of
https://github.com/osukey/osukey.git
synced 2025-08-07 16:43:52 +09:00
Merge branch 'master' into fix-timeline-parts-working-beatmap
This commit is contained in:
@ -25,7 +25,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup Label="Package References">
|
<ItemGroup Label="Package References">
|
||||||
<PackageReference Include="System.IO.Packaging" Version="5.0.0" />
|
<PackageReference Include="System.IO.Packaging" Version="5.0.0" />
|
||||||
<PackageReference Include="ppy.squirrel.windows" Version="1.9.0.4" />
|
<PackageReference Include="ppy.squirrel.windows" Version="1.9.0.5" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.2.6" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.2.6" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.2.6" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.2.6" />
|
||||||
<PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" />
|
<PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" />
|
||||||
|
@ -50,15 +50,7 @@ namespace osu.Game.Beatmaps
|
|||||||
|
|
||||||
IBeatmap IBeatmap.Clone() => Clone();
|
IBeatmap IBeatmap.Clone() => Clone();
|
||||||
|
|
||||||
public Beatmap<T> Clone()
|
public Beatmap<T> Clone() => (Beatmap<T>)MemberwiseClone();
|
||||||
{
|
|
||||||
var clone = (Beatmap<T>)MemberwiseClone();
|
|
||||||
|
|
||||||
clone.ControlPointInfo = ControlPointInfo.CreateCopy();
|
|
||||||
// todo: deep clone other elements as required.
|
|
||||||
|
|
||||||
return clone;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Beatmap : Beatmap<HitObject>
|
public class Beatmap : Beatmap<HitObject>
|
||||||
|
@ -24,7 +24,7 @@ namespace osu.Game.Beatmaps
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The control points in this beatmap.
|
/// The control points in this beatmap.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
ControlPointInfo ControlPointInfo { get; }
|
ControlPointInfo ControlPointInfo { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The breaks in this beatmap.
|
/// The breaks in this beatmap.
|
||||||
|
@ -131,6 +131,10 @@ namespace osu.Game.Screens.Edit
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
playableBeatmap = Beatmap.Value.GetPlayableBeatmap(Beatmap.Value.BeatmapInfo.Ruleset);
|
playableBeatmap = Beatmap.Value.GetPlayableBeatmap(Beatmap.Value.BeatmapInfo.Ruleset);
|
||||||
|
|
||||||
|
// clone these locally for now to avoid incurring overhead on GetPlayableBeatmap usages.
|
||||||
|
// eventually we will want to improve how/where this is done as there are issues with *not* cloning it in all cases.
|
||||||
|
playableBeatmap.ControlPointInfo = playableBeatmap.ControlPointInfo.CreateCopy();
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
@ -74,7 +74,11 @@ namespace osu.Game.Screens.Edit
|
|||||||
|
|
||||||
public BeatmapMetadata Metadata => PlayableBeatmap.Metadata;
|
public BeatmapMetadata Metadata => PlayableBeatmap.Metadata;
|
||||||
|
|
||||||
public ControlPointInfo ControlPointInfo => PlayableBeatmap.ControlPointInfo;
|
public ControlPointInfo ControlPointInfo
|
||||||
|
{
|
||||||
|
get => PlayableBeatmap.ControlPointInfo;
|
||||||
|
set => PlayableBeatmap.ControlPointInfo = value;
|
||||||
|
}
|
||||||
|
|
||||||
public List<BreakPeriod> Breaks => PlayableBeatmap.Breaks;
|
public List<BreakPeriod> Breaks => PlayableBeatmap.Breaks;
|
||||||
|
|
||||||
|
@ -29,7 +29,11 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
public BeatmapMetadata Metadata => PlayableBeatmap.Metadata;
|
public BeatmapMetadata Metadata => PlayableBeatmap.Metadata;
|
||||||
|
|
||||||
public ControlPointInfo ControlPointInfo => PlayableBeatmap.ControlPointInfo;
|
public ControlPointInfo ControlPointInfo
|
||||||
|
{
|
||||||
|
get => PlayableBeatmap.ControlPointInfo;
|
||||||
|
set => PlayableBeatmap.ControlPointInfo = value;
|
||||||
|
}
|
||||||
|
|
||||||
public List<BreakPeriod> Breaks => PlayableBeatmap.Breaks;
|
public List<BreakPeriod> Breaks => PlayableBeatmap.Breaks;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user