mirror of
https://github.com/ppy/osu
synced 2024-12-23 23:33:36 +00:00
Revert nullability change
This commit is contained in:
parent
662822a40c
commit
1a8ab77f21
@ -3,7 +3,6 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using JetBrains.Annotations;
|
||||
@ -227,13 +226,11 @@ namespace osu.Game.Tests.Visual.Playlists
|
||||
|
||||
private MultiplayerScore createUserResponse([NotNull] ScoreInfo userScore)
|
||||
{
|
||||
Debug.Assert(userScore.Date != null);
|
||||
|
||||
var multiplayerUserScore = new MultiplayerScore
|
||||
{
|
||||
ID = (int)(userScore.OnlineScoreID ?? currentScoreId++),
|
||||
Accuracy = userScore.Accuracy,
|
||||
EndedAt = userScore.Date.Value,
|
||||
EndedAt = userScore.Date,
|
||||
Passed = userScore.Passed,
|
||||
Rank = userScore.Rank,
|
||||
Position = 200,
|
||||
@ -254,7 +251,7 @@ namespace osu.Game.Tests.Visual.Playlists
|
||||
{
|
||||
ID = currentScoreId++,
|
||||
Accuracy = userScore.Accuracy,
|
||||
EndedAt = userScore.Date.Value,
|
||||
EndedAt = userScore.Date,
|
||||
Passed = true,
|
||||
Rank = userScore.Rank,
|
||||
MaxCombo = userScore.MaxCombo,
|
||||
@ -272,7 +269,7 @@ namespace osu.Game.Tests.Visual.Playlists
|
||||
{
|
||||
ID = currentScoreId++,
|
||||
Accuracy = userScore.Accuracy,
|
||||
EndedAt = userScore.Date.Value,
|
||||
EndedAt = userScore.Date,
|
||||
Passed = true,
|
||||
Rank = userScore.Rank,
|
||||
MaxCombo = userScore.MaxCombo,
|
||||
|
@ -2,7 +2,6 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using osu.Framework.Extensions.Color4Extensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
@ -137,11 +136,9 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
||||
{
|
||||
set
|
||||
{
|
||||
Debug.Assert(value.Date != null);
|
||||
|
||||
avatar.User = value.User;
|
||||
flag.Country = value.User.Country;
|
||||
achievedOn.Date = value.Date.Value;
|
||||
achievedOn.Date = value.Date;
|
||||
|
||||
usernameText.Clear();
|
||||
usernameText.AddUserLink(value.User);
|
||||
|
@ -1,7 +1,6 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using JetBrains.Annotations;
|
||||
using osu.Framework.Allocation;
|
||||
@ -45,8 +44,6 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
Debug.Assert(Score.Date != null);
|
||||
|
||||
AddInternal(new ProfileItemContainer
|
||||
{
|
||||
Children = new Drawable[]
|
||||
@ -95,7 +92,7 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
|
||||
Font = OsuFont.GetFont(size: 12, weight: FontWeight.Regular),
|
||||
Colour = colours.Yellow
|
||||
},
|
||||
new DrawableDate(Score.Date.Value, 12)
|
||||
new DrawableDate(Score.Date, 12)
|
||||
{
|
||||
Colour = colourProvider.Foreground1
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ namespace osu.Game.Scoring.Legacy
|
||||
sw.Write((int)score.ScoreInfo.Ruleset.CreateInstance().ConvertToLegacyMods(score.ScoreInfo.Mods));
|
||||
|
||||
sw.Write(getHpGraphFormatted());
|
||||
sw.Write((score.ScoreInfo.Date ?? DateTimeOffset.Now).DateTime);
|
||||
sw.Write(score.ScoreInfo.Date.DateTime);
|
||||
sw.WriteByteArray(createReplayData());
|
||||
sw.Write((long)0);
|
||||
writeModSpecificData(score.ScoreInfo, sw);
|
||||
|
@ -5,7 +5,6 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using JetBrains.Annotations;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using osu.Game.Beatmaps;
|
||||
@ -156,8 +155,7 @@ namespace osu.Game.Scoring
|
||||
public long? OnlineScoreID { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
[CanBeNull] // may be null in cases of autoplay.
|
||||
public DateTimeOffset? Date { get; set; }
|
||||
public DateTimeOffset Date { get; set; }
|
||||
|
||||
[JsonProperty("statistics")]
|
||||
public Dictionary<HitResult, int> Statistics = new Dictionary<HitResult, int>();
|
||||
|
Loading…
Reference in New Issue
Block a user