From f50dac3fb752a5fc18b4bf39d05850bceb0502f7 Mon Sep 17 00:00:00 2001 From: SkyCopeland Date: Thu, 21 Nov 2024 11:48:08 -0500 Subject: [PATCH] Fix for C# 6 --- CrimsonBanned.csproj | 1 + Services/PlayerService.cs | 11 ++++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CrimsonBanned.csproj b/CrimsonBanned.csproj index 30a6c9e..25ec74c 100644 --- a/CrimsonBanned.csproj +++ b/CrimsonBanned.csproj @@ -22,6 +22,7 @@ + diff --git a/Services/PlayerService.cs b/Services/PlayerService.cs index 8d1c4a2..f1bf203 100644 --- a/Services/PlayerService.cs +++ b/Services/PlayerService.cs @@ -15,16 +15,17 @@ internal class PlayerService static readonly WaitForSeconds Delay = new(60); - static readonly ComponentType[] UserComponent = - [ + static readonly ComponentType[] UserComponent = new ComponentType[] + { ComponentType.ReadOnly(Il2CppType.Of()), - ]; + }; static EntityQuery UserQuery; - public static readonly Dictionary PlayerCache = []; + public static readonly Dictionary PlayerCache = new Dictionary(); - public static readonly Dictionary OnlineCache = []; + public static readonly Dictionary OnlineCache = new Dictionary(); + public class PlayerInfo(Entity userEntity = default, Entity charEntity = default, User user = default) { public User User { get; set; } = user;