mirror of
https://github.com/osukey/osukey.git
synced 2025-08-08 09:03:50 +09:00
Merge remote-tracking branch 'upstream/master' into discord-rich-presence
This commit is contained in:
@ -32,7 +32,7 @@ If you are not interested in developing the game, you can consume our [binary re
|
|||||||
| ------------- | ------------- |
|
| ------------- | ------------- |
|
||||||
|
|
||||||
- **Linux** users are recommended to self-compile until we have official deployment in place.
|
- **Linux** users are recommended to self-compile until we have official deployment in place.
|
||||||
- **iOS** users can join the [TestFlight beta program](https://t.co/xQJmHkfC18) (note that due to high demand this is regularly full).
|
- **iOS** users can join the [TestFlight beta program](https://t.co/PasE1zrHhw) (note that due to high demand this is regularly full).
|
||||||
- **Android** users can self-compile, and expect a public beta soon.
|
- **Android** users can self-compile, and expect a public beta soon.
|
||||||
|
|
||||||
If your platform is not listed above, there is still a chance you can manually build it by following the instructions below.
|
If your platform is not listed above, there is still a chance you can manually build it by following the instructions below.
|
||||||
|
@ -327,6 +327,8 @@ namespace osu.Game.Beatmaps
|
|||||||
/// <returns>Results from the provided query.</returns>
|
/// <returns>Results from the provided query.</returns>
|
||||||
public IQueryable<BeatmapInfo> QueryBeatmaps(Expression<Func<BeatmapInfo, bool>> query) => beatmaps.Beatmaps.AsNoTracking().Where(query);
|
public IQueryable<BeatmapInfo> QueryBeatmaps(Expression<Func<BeatmapInfo, bool>> query) => beatmaps.Beatmaps.AsNoTracking().Where(query);
|
||||||
|
|
||||||
|
protected override string HumanisedModelName => "beatmap";
|
||||||
|
|
||||||
protected override BeatmapSetInfo CreateModel(ArchiveReader reader)
|
protected override BeatmapSetInfo CreateModel(ArchiveReader reader)
|
||||||
{
|
{
|
||||||
// let's make sure there are actually .osu files to import.
|
// let's make sure there are actually .osu files to import.
|
||||||
|
@ -163,7 +163,7 @@ namespace osu.Game.Database
|
|||||||
imported.Add(model);
|
imported.Add(model);
|
||||||
current++;
|
current++;
|
||||||
|
|
||||||
notification.Text = $"Imported {current} of {paths.Length} {humanisedModelName}s";
|
notification.Text = $"Imported {current} of {paths.Length} {HumanisedModelName}s";
|
||||||
notification.Progress = (float)current / paths.Length;
|
notification.Progress = (float)current / paths.Length;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -186,7 +186,7 @@ namespace osu.Game.Database
|
|||||||
{
|
{
|
||||||
notification.CompletionText = imported.Count == 1
|
notification.CompletionText = imported.Count == 1
|
||||||
? $"Imported {imported.First()}!"
|
? $"Imported {imported.First()}!"
|
||||||
: $"Imported {current} {humanisedModelName}s!";
|
: $"Imported {current} {HumanisedModelName}s!";
|
||||||
|
|
||||||
if (imported.Count > 0 && PresentImport != null)
|
if (imported.Count > 0 && PresentImport != null)
|
||||||
{
|
{
|
||||||
@ -344,7 +344,7 @@ namespace osu.Game.Database
|
|||||||
if (CanUndelete(existing, item))
|
if (CanUndelete(existing, item))
|
||||||
{
|
{
|
||||||
Undelete(existing);
|
Undelete(existing);
|
||||||
LogForModel(item, $"Found existing {humanisedModelName} for {item} (ID {existing.ID}) – skipping import.");
|
LogForModel(item, $"Found existing {HumanisedModelName} for {item} (ID {existing.ID}) – skipping import.");
|
||||||
handleEvent(() => ItemAdded?.Invoke(existing, true));
|
handleEvent(() => ItemAdded?.Invoke(existing, true));
|
||||||
|
|
||||||
// existing item will be used; rollback new import and exit early.
|
// existing item will be used; rollback new import and exit early.
|
||||||
@ -424,7 +424,8 @@ namespace osu.Game.Database
|
|||||||
var notification = new ProgressNotification
|
var notification = new ProgressNotification
|
||||||
{
|
{
|
||||||
Progress = 0,
|
Progress = 0,
|
||||||
CompletionText = $"Deleted all {typeof(TModel).Name.Replace("Info", "").ToLower()}s!",
|
Text = $"Preparing to delete all {HumanisedModelName}s...",
|
||||||
|
CompletionText = $"Deleted all {HumanisedModelName}s!",
|
||||||
State = ProgressNotificationState.Active,
|
State = ProgressNotificationState.Active,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -441,7 +442,7 @@ namespace osu.Game.Database
|
|||||||
// user requested abort
|
// user requested abort
|
||||||
return;
|
return;
|
||||||
|
|
||||||
notification.Text = $"Deleting ({++i} of {items.Count})";
|
notification.Text = $"Deleting {HumanisedModelName}s ({++i} of {items.Count})";
|
||||||
|
|
||||||
Delete(b);
|
Delete(b);
|
||||||
|
|
||||||
@ -613,7 +614,7 @@ namespace osu.Game.Database
|
|||||||
|
|
||||||
private DbSet<TModel> queryModel() => ContextFactory.Get().Set<TModel>();
|
private DbSet<TModel> queryModel() => ContextFactory.Get().Set<TModel>();
|
||||||
|
|
||||||
private string humanisedModelName => $"{typeof(TModel).Name.Replace("Info", "").ToLower()}";
|
protected virtual string HumanisedModelName => $"{typeof(TModel).Name.Replace("Info", "").ToLower()}";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates an <see cref="ArchiveReader"/> from a valid storage path.
|
/// Creates an <see cref="ArchiveReader"/> from a valid storage path.
|
||||||
|
@ -167,6 +167,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
|||||||
{
|
{
|
||||||
OnRevertResult?.Invoke(this, Result);
|
OnRevertResult?.Invoke(this, Result);
|
||||||
|
|
||||||
|
Result.TimeOffset = 0;
|
||||||
Result.Type = HitResult.None;
|
Result.Type = HitResult.None;
|
||||||
State.Value = ArmedState.Idle;
|
State.Value = ArmedState.Idle;
|
||||||
}
|
}
|
||||||
|
@ -21,22 +21,32 @@ namespace osu.Game.Users
|
|||||||
set => Model = value;
|
set => Model = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Resolved]
|
protected override Drawable CreateDrawable(User user) => new Cover(user);
|
||||||
private LargeTextureStore textures { get; set; }
|
|
||||||
|
|
||||||
protected override Drawable CreateDrawable(User user)
|
private class Cover : CompositeDrawable
|
||||||
|
{
|
||||||
|
private readonly User user;
|
||||||
|
|
||||||
|
public Cover(User user)
|
||||||
|
{
|
||||||
|
this.user = user;
|
||||||
|
|
||||||
|
RelativeSizeAxes = Axes.Both;
|
||||||
|
}
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load(LargeTextureStore textures)
|
||||||
{
|
{
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
return new Box
|
InternalChild = new Box
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Colour = ColourInfo.GradientVertical(Color4.Black.Opacity(0.1f), Color4.Black.Opacity(0.75f))
|
Colour = ColourInfo.GradientVertical(Color4.Black.Opacity(0.1f), Color4.Black.Opacity(0.75f))
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
InternalChild = new Sprite
|
||||||
var sprite = new Sprite
|
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Texture = textures.Get(user.CoverUrl),
|
Texture = textures.Get(user.CoverUrl),
|
||||||
@ -44,8 +54,12 @@ namespace osu.Game.Users
|
|||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre
|
Origin = Anchor.Centre
|
||||||
};
|
};
|
||||||
sprite.OnLoadComplete += d => d.FadeInFromZero(400);
|
}
|
||||||
return sprite;
|
|
||||||
|
protected override void LoadComplete()
|
||||||
|
{
|
||||||
|
base.LoadComplete();
|
||||||
|
this.FadeInFromZero(400);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -66,8 +66,6 @@ namespace osu.Game.Users
|
|||||||
|
|
||||||
FillFlowContainer infoContainer;
|
FillFlowContainer infoContainer;
|
||||||
|
|
||||||
UserCoverBackground coverBackground;
|
|
||||||
|
|
||||||
AddInternal(content = new Container
|
AddInternal(content = new Container
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
@ -82,13 +80,16 @@ namespace osu.Game.Users
|
|||||||
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new DelayedLoadWrapper(coverBackground = new UserCoverBackground
|
new DelayedLoadUnloadWrapper(() => new UserCoverBackground
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
User = user,
|
User = user,
|
||||||
}, 300) { RelativeSizeAxes = Axes.Both },
|
}, 300, 5000)
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
},
|
||||||
new Box
|
new Box
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
@ -189,8 +190,6 @@ namespace osu.Game.Users
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
coverBackground.OnLoadComplete += d => d.FadeInFromZero(400, Easing.Out);
|
|
||||||
|
|
||||||
if (user.IsSupporter)
|
if (user.IsSupporter)
|
||||||
{
|
{
|
||||||
infoContainer.Add(new SupporterIcon
|
infoContainer.Add(new SupporterIcon
|
||||||
|
@ -104,7 +104,7 @@
|
|||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.2.1" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.2.1" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.2.1" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.2.1" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
|
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
|
||||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2019.518.0" />
|
<PackageReference Include="ppy.osu.Game.Resources" Version="2019.609.0" />
|
||||||
<PackageReference Include="ppy.osu.Framework" Version="2019.611.1" />
|
<PackageReference Include="ppy.osu.Framework" Version="2019.611.1" />
|
||||||
<PackageReference Include="ppy.osu.Framework.iOS" Version="2019.611.1" />
|
<PackageReference Include="ppy.osu.Framework.iOS" Version="2019.611.1" />
|
||||||
<PackageReference Include="SharpCompress" Version="0.22.0" />
|
<PackageReference Include="SharpCompress" Version="0.22.0" />
|
||||||
|
Reference in New Issue
Block a user