mirror of
https://github.com/ppy/osu.git
synced 2025-03-16 05:37:19 +08:00
Use existing ModdingBeatmap
activity
This commit is contained in:
parent
bbeef53569
commit
cb51b9e350
@ -117,7 +117,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
AddStep("solo (osu!mania)", () => activity.Value = soloGameStatusForRuleset(3));
|
||||
AddStep("choosing", () => activity.Value = new UserActivity.ChoosingBeatmap());
|
||||
AddStep("editing beatmap", () => activity.Value = new UserActivity.EditingBeatmap(null));
|
||||
AddStep("modding beatmap", () => activity.Value = new UserActivity.ModdingBeatmap());
|
||||
AddStep("modding beatmap", () => activity.Value = new UserActivity.ModdingBeatmap(null));
|
||||
AddStep("testing beatmap", () => activity.Value = new UserActivity.TestingBeatmap(null, null));
|
||||
}
|
||||
|
||||
|
@ -157,7 +157,16 @@ namespace osu.Game.Screens.Edit
|
||||
|
||||
private bool isNewBeatmap;
|
||||
|
||||
protected override UserActivity InitialActivity => new UserActivity.EditingBeatmap(Beatmap.Value.BeatmapInfo);
|
||||
protected override UserActivity InitialActivity
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Beatmap.Value.Metadata.Author.OnlineID == api.LocalUser.Value.OnlineID)
|
||||
return new UserActivity.EditingBeatmap(Beatmap.Value.BeatmapInfo);
|
||||
|
||||
return new UserActivity.ModdingBeatmap(Beatmap.Value.BeatmapInfo);
|
||||
}
|
||||
}
|
||||
|
||||
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
||||
=> dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
|
||||
|
@ -18,10 +18,15 @@ namespace osu.Game.Users
|
||||
|
||||
public virtual Color4 GetAppropriateColour(OsuColour colours) => colours.GreenDarker;
|
||||
|
||||
public class ModdingBeatmap : UserActivity
|
||||
public class ModdingBeatmap : EditingBeatmap
|
||||
{
|
||||
public override string GetStatus(bool hideIdentifiableInformation = false) => "Modding a beatmap";
|
||||
public override Color4 GetAppropriateColour(OsuColour colours) => colours.PurpleDark;
|
||||
|
||||
public ModdingBeatmap(IBeatmapInfo info)
|
||||
: base(info)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public class ChoosingBeatmap : UserActivity
|
||||
|
Loading…
x
Reference in New Issue
Block a user