mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 17:02:55 +08:00
Merge branch 'master' into intro-triangles-background-access
This commit is contained in:
commit
f46880f68a
@ -35,7 +35,7 @@ namespace osu.Game.Rulesets.Taiko.Skinning.Legacy
|
|||||||
{
|
{
|
||||||
// if a taiko skin is providing explosion sprites, hide the judgements completely
|
// if a taiko skin is providing explosion sprites, hide the judgements completely
|
||||||
if (hasExplosion.Value)
|
if (hasExplosion.Value)
|
||||||
return Drawable.Empty();
|
return Drawable.Empty().With(d => d.Expire());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(component is TaikoSkinComponent taikoComponent))
|
if (!(component is TaikoSkinComponent taikoComponent))
|
||||||
@ -118,7 +118,7 @@ namespace osu.Game.Rulesets.Taiko.Skinning.Legacy
|
|||||||
// suppress the default kiai explosion if the skin brings its own sprites.
|
// suppress the default kiai explosion if the skin brings its own sprites.
|
||||||
// the drawable needs to expire as soon as possible to avoid accumulating empty drawables on the playfield.
|
// the drawable needs to expire as soon as possible to avoid accumulating empty drawables on the playfield.
|
||||||
if (hasExplosion.Value)
|
if (hasExplosion.Value)
|
||||||
return Drawable.Empty().With(d => d.LifetimeEnd = double.MinValue);
|
return Drawable.Empty().With(d => d.Expire());
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
Username = "flyte",
|
Username = "flyte",
|
||||||
Id = 3103765,
|
Id = 3103765,
|
||||||
IsOnline = true,
|
IsOnline = true,
|
||||||
CurrentModeRank = 1111,
|
Statistics = new UserStatistics { GlobalRank = 1111 },
|
||||||
Country = new Country { FlagName = "JP" },
|
Country = new Country { FlagName = "JP" },
|
||||||
CoverUrl = "https://osu.ppy.sh/images/headers/profile-covers/c6.jpg"
|
CoverUrl = "https://osu.ppy.sh/images/headers/profile-covers/c6.jpg"
|
||||||
},
|
},
|
||||||
@ -60,7 +60,7 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
Username = "peppy",
|
Username = "peppy",
|
||||||
Id = 2,
|
Id = 2,
|
||||||
IsOnline = false,
|
IsOnline = false,
|
||||||
CurrentModeRank = 2222,
|
Statistics = new UserStatistics { GlobalRank = 2222 },
|
||||||
Country = new Country { FlagName = "AU" },
|
Country = new Country { FlagName = "AU" },
|
||||||
CoverUrl = "https://osu.ppy.sh/images/headers/profile-covers/c3.jpg",
|
CoverUrl = "https://osu.ppy.sh/images/headers/profile-covers/c3.jpg",
|
||||||
IsSupporter = true,
|
IsSupporter = true,
|
||||||
|
@ -20,7 +20,7 @@ namespace osu.Game.Tests.Visual.Playlists
|
|||||||
Room.RecentParticipants.Add(new User
|
Room.RecentParticipants.Add(new User
|
||||||
{
|
{
|
||||||
Username = "peppy",
|
Username = "peppy",
|
||||||
CurrentModeRank = 1234,
|
Statistics = new UserStatistics { GlobalRank = 1234 },
|
||||||
Id = 2
|
Id = 2
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -150,7 +150,9 @@ namespace osu.Game.Tournament
|
|||||||
{
|
{
|
||||||
foreach (var p in t.Players)
|
foreach (var p in t.Players)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(p.Username) || p.Statistics?.GlobalRank == null)
|
if (string.IsNullOrEmpty(p.Username)
|
||||||
|
|| p.Statistics?.GlobalRank == null
|
||||||
|
|| p.Statistics?.CountryRank == null)
|
||||||
{
|
{
|
||||||
PopulateUser(p, immediate: true);
|
PopulateUser(p, immediate: true);
|
||||||
addedInfo = true;
|
addedInfo = true;
|
||||||
|
@ -244,7 +244,7 @@ namespace osu.Game.Overlays.Dashboard.Friends
|
|||||||
return unsorted.OrderByDescending(u => u.LastVisit).ToList();
|
return unsorted.OrderByDescending(u => u.LastVisit).ToList();
|
||||||
|
|
||||||
case UserSortCriteria.Rank:
|
case UserSortCriteria.Rank:
|
||||||
return unsorted.OrderByDescending(u => u.CurrentModeRank.HasValue).ThenBy(u => u.CurrentModeRank ?? 0).ToList();
|
return unsorted.OrderByDescending(u => u.Statistics.GlobalRank.HasValue).ThenBy(u => u.Statistics.GlobalRank ?? 0).ToList();
|
||||||
|
|
||||||
case UserSortCriteria.Username:
|
case UserSortCriteria.Username:
|
||||||
return unsorted.OrderBy(u => u.Username).ToList();
|
return unsorted.OrderBy(u => u.Username).ToList();
|
||||||
|
@ -150,19 +150,15 @@ namespace osu.Game.Rulesets.Judgements
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (JudgementBody.Drawable is IAnimatableJudgement animatable)
|
if (JudgementBody.Drawable is IAnimatableJudgement animatable)
|
||||||
{
|
|
||||||
var drawableAnimation = (Drawable)animatable;
|
|
||||||
|
|
||||||
animatable.PlayAnimation();
|
animatable.PlayAnimation();
|
||||||
|
|
||||||
// a derived version of DrawableJudgement may be proposing a lifetime.
|
// a derived version of DrawableJudgement may be proposing a lifetime.
|
||||||
// if not adjusted (or the skinned portion requires greater bounds than calculated) use the skinned source's lifetime.
|
// if not adjusted (or the skinned portion requires greater bounds than calculated) use the skinned source's lifetime.
|
||||||
double lastTransformTime = drawableAnimation.LatestTransformEndTime;
|
double lastTransformTime = JudgementBody.Drawable.LatestTransformEndTime;
|
||||||
if (LifetimeEnd == double.MaxValue || lastTransformTime > LifetimeEnd)
|
if (LifetimeEnd == double.MaxValue || lastTransformTime > LifetimeEnd)
|
||||||
LifetimeEnd = lastTransformTime;
|
LifetimeEnd = lastTransformTime;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private HitResult? currentDrawableType;
|
private HitResult? currentDrawableType;
|
||||||
|
|
||||||
|
@ -84,14 +84,15 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
{
|
{
|
||||||
InternalChildren = new[]
|
InternalChildren = new[]
|
||||||
{
|
{
|
||||||
displayedCountSpriteText = createSpriteText().With(s =>
|
|
||||||
{
|
|
||||||
s.Alpha = 0;
|
|
||||||
}),
|
|
||||||
popOutCount = createSpriteText().With(s =>
|
popOutCount = createSpriteText().With(s =>
|
||||||
{
|
{
|
||||||
s.Alpha = 0;
|
s.Alpha = 0;
|
||||||
s.Margin = new MarginPadding(0.05f);
|
s.Margin = new MarginPadding(0.05f);
|
||||||
|
s.Blending = BlendingParameters.Additive;
|
||||||
|
}),
|
||||||
|
displayedCountSpriteText = createSpriteText().With(s =>
|
||||||
|
{
|
||||||
|
s.Alpha = 0;
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -72,9 +72,6 @@ namespace osu.Game.Users
|
|||||||
[JsonProperty(@"support_level")]
|
[JsonProperty(@"support_level")]
|
||||||
public int SupportLevel;
|
public int SupportLevel;
|
||||||
|
|
||||||
[JsonProperty(@"current_mode_rank")]
|
|
||||||
public int? CurrentModeRank;
|
|
||||||
|
|
||||||
[JsonProperty(@"is_gmt")]
|
[JsonProperty(@"is_gmt")]
|
||||||
public bool IsGMT;
|
public bool IsGMT;
|
||||||
|
|
||||||
@ -182,7 +179,7 @@ namespace osu.Game.Users
|
|||||||
private UserStatistics statistics;
|
private UserStatistics statistics;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// User statistics for the requested ruleset (in the case of a <see cref="GetUserRequest"/> response).
|
/// User statistics for the requested ruleset (in the case of a <see cref="GetUserRequest"/> or <see cref="GetFriendsRequest"/> response).
|
||||||
/// Otherwise empty.
|
/// Otherwise empty.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty(@"statistics")]
|
[JsonProperty(@"statistics")]
|
||||||
|
@ -29,16 +29,9 @@ namespace osu.Game.Users
|
|||||||
[JsonProperty(@"global_rank")]
|
[JsonProperty(@"global_rank")]
|
||||||
public int? GlobalRank;
|
public int? GlobalRank;
|
||||||
|
|
||||||
|
[JsonProperty(@"country_rank")]
|
||||||
public int? CountryRank;
|
public int? CountryRank;
|
||||||
|
|
||||||
[JsonProperty(@"rank")]
|
|
||||||
private UserRanks ranks
|
|
||||||
{
|
|
||||||
// eventually that will also become an own json property instead of reading from a `rank` object.
|
|
||||||
// see https://github.com/ppy/osu-web/blob/cb79bb72186c8f1a25f6a6f5ef315123decb4231/app/Transformers/UserStatisticsTransformer.php#L53.
|
|
||||||
set => CountryRank = value.Country;
|
|
||||||
}
|
|
||||||
|
|
||||||
// populated via User model, as that's where the data currently lives.
|
// populated via User model, as that's where the data currently lives.
|
||||||
public RankHistoryData RankHistory;
|
public RankHistoryData RankHistory;
|
||||||
|
|
||||||
@ -119,13 +112,5 @@ namespace osu.Game.Users
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma warning disable 649
|
|
||||||
private struct UserRanks
|
|
||||||
{
|
|
||||||
[JsonProperty(@"country")]
|
|
||||||
public int? Country;
|
|
||||||
}
|
|
||||||
#pragma warning restore 649
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user