mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 15:16:38 +09:00
Make HitSampleInfo immutable
This commit is contained in:
@ -101,7 +101,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
|
||||
case TernaryState.True:
|
||||
if (existingSample == null)
|
||||
samples.Add(new HitSampleInfo { Name = sampleName });
|
||||
samples.Add(new HitSampleInfo(sampleName));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -212,7 +212,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
if (blueprint != null)
|
||||
{
|
||||
// doing this post-creations as adding the default hit sample should be the case regardless of the ruleset.
|
||||
blueprint.HitObject.Samples.Add(new HitSampleInfo { Name = HitSampleInfo.HIT_NORMAL });
|
||||
blueprint.HitObject.Samples.Add(new HitSampleInfo(HitSampleInfo.HIT_NORMAL));
|
||||
|
||||
placementBlueprintContainer.Child = currentPlacement = blueprint;
|
||||
|
||||
|
@ -328,7 +328,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
if (h.Samples.Any(s => s.Name == sampleName))
|
||||
continue;
|
||||
|
||||
h.Samples.Add(new HitSampleInfo { Name = sampleName });
|
||||
h.Samples.Add(new HitSampleInfo(sampleName));
|
||||
}
|
||||
|
||||
EditorBeatmap.EndChange();
|
||||
|
Reference in New Issue
Block a user