From f2700b0a6d085593981dbea89d75de44cb529a83 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 5 Nov 2021 13:38:48 +0900 Subject: [PATCH] Expose bot state via interface --- osu.Game/Models/RealmUser.cs | 2 ++ osu.Game/Online/API/Requests/Responses/APIUser.cs | 2 +- osu.Game/Users/IUser.cs | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/osu.Game/Models/RealmUser.cs b/osu.Game/Models/RealmUser.cs index 8b050e8a93..154ece502f 100644 --- a/osu.Game/Models/RealmUser.cs +++ b/osu.Game/Models/RealmUser.cs @@ -11,5 +11,7 @@ public class RealmUser : EmbeddedObject, IUser public int OnlineID { get; set; } = 1; public string Username { get; set; } + + public bool IsBot => false; } } diff --git a/osu.Game/Online/API/Requests/Responses/APIUser.cs b/osu.Game/Online/API/Requests/Responses/APIUser.cs index 58f19ceaad..49edfd036b 100644 --- a/osu.Game/Online/API/Requests/Responses/APIUser.cs +++ b/osu.Game/Online/API/Requests/Responses/APIUser.cs @@ -79,7 +79,7 @@ public class UserCover public bool IsBNG; [JsonProperty(@"is_bot")] - public bool IsBot; + public bool IsBot { get; set; } [JsonProperty(@"is_active")] public bool Active; diff --git a/osu.Game/Users/IUser.cs b/osu.Game/Users/IUser.cs index 34a59fa214..89831e6c4d 100644 --- a/osu.Game/Users/IUser.cs +++ b/osu.Game/Users/IUser.cs @@ -8,5 +8,7 @@ namespace osu.Game.Users public interface IUser : IHasOnlineID { string Username { get; set; } + + bool IsBot { get; } } }