diff --git a/VCF.Core/Basics/RoleMiddleware.cs b/VCF.Core/Basics/RoleMiddleware.cs index dcc5a16..be6e920 100644 --- a/VCF.Core/Basics/RoleMiddleware.cs +++ b/VCF.Core/Basics/RoleMiddleware.cs @@ -1,5 +1,4 @@ using Microsoft.Extensions.DependencyInjection; -using System; using System.Collections.Generic; using System.Linq; using System.Reflection; diff --git a/VCF.Core/Breadstone/VWorld.cs b/VCF.Core/Breadstone/VWorld.cs index 903100f..712f73e 100644 --- a/VCF.Core/Breadstone/VWorld.cs +++ b/VCF.Core/Breadstone/VWorld.cs @@ -1,5 +1,6 @@ using ProjectM; using ProjectM.Network; +using Unity.Collections; using Unity.Entities; using UnityEngine; @@ -12,7 +13,8 @@ internal static class VWorld { public static void SendSystemMessage(this User user, string message) { - ServerChatUtils.SendSystemMessageToClient(Server.EntityManager, user, message); + FixedString512Bytes unityMessage = message; + ServerChatUtils.SendSystemMessageToClient(Server.EntityManager, user, ref unityMessage); } private static World _serverWorld; diff --git a/VCF.Core/Common/Utility.cs b/VCF.Core/Common/Utility.cs index fd57b38..2bf4ad7 100644 --- a/VCF.Core/Common/Utility.cs +++ b/VCF.Core/Common/Utility.cs @@ -1,7 +1,5 @@ -using RootMotion.FinalIK; -using System; +using System; using System.Collections.Generic; -using System.Linq; using System.Text; namespace VampireCommandFramework.Common; diff --git a/VCF.Core/Framework/ChatCommandContext.cs b/VCF.Core/Framework/ChatCommandContext.cs index 3ed1dcd..2a94b80 100644 --- a/VCF.Core/Framework/ChatCommandContext.cs +++ b/VCF.Core/Framework/ChatCommandContext.cs @@ -1,6 +1,8 @@ -using ProjectM; +using Engine.Console; +using ProjectM; using ProjectM.Network; using System; +using Unity.Collections; using VampireCommandFramework.Breadstone; namespace VampireCommandFramework; @@ -44,9 +46,11 @@ public ChatCommandContext(VChatEvent e) static int maxMessageLength = 509; public void Reply(string v) { - if(v.Length > maxMessageLength) + if (v.Length > maxMessageLength) v = v[..maxMessageLength]; - ServerChatUtils.SendSystemMessageToClient(VWorld.Server.EntityManager, User, v); + + FixedString512Bytes unityMessage = v; + ServerChatUtils.SendSystemMessageToClient(VWorld.Server.EntityManager, User, ref unityMessage); } // todo: expand this, just throw from here as void and build a handler that can message user/log. diff --git a/VCF.Core/Plugin.cs b/VCF.Core/Plugin.cs index 237e2a0..589f3c8 100644 --- a/VCF.Core/Plugin.cs +++ b/VCF.Core/Plugin.cs @@ -1,14 +1,6 @@ using BepInEx; -using BepInEx.IL2CPP; using BepInEx.Unity.IL2CPP; using HarmonyLib; -using ProjectM; -using ProjectM.Audio; -using System; -using System.Reflection; -using Unity.Entities; -using Unity.Transforms; -using VampireCommandFramework.Basics; namespace VampireCommandFramework; diff --git a/VCF.Core/VCF.Core.csproj b/VCF.Core/VCF.Core.csproj index 1ef87ac..df9bdde 100644 --- a/VCF.Core/VCF.Core.csproj +++ b/VCF.Core/VCF.Core.csproj @@ -23,8 +23,8 @@ - + diff --git a/VCF.SimpleSamplePlugin/VCF.SimpleSamplePlugin.csproj b/VCF.SimpleSamplePlugin/VCF.SimpleSamplePlugin.csproj index 4b271c9..a2a79e7 100644 --- a/VCF.SimpleSamplePlugin/VCF.SimpleSamplePlugin.csproj +++ b/VCF.SimpleSamplePlugin/VCF.SimpleSamplePlugin.csproj @@ -13,7 +13,7 @@ - + diff --git a/VCF.Tests/CommandArgumentConverterTests.cs b/VCF.Tests/CommandArgumentConverterTests.cs index 7dc0827..6378c5f 100644 --- a/VCF.Tests/CommandArgumentConverterTests.cs +++ b/VCF.Tests/CommandArgumentConverterTests.cs @@ -1,7 +1,6 @@ using FakeItEasy; using NUnit.Framework; using VampireCommandFramework; -using VampireCommandFramework.Basics; namespace VCF.Tests; public class CommandArgumentConverterTests diff --git a/VCF.Tests/CommandContextTests.cs b/VCF.Tests/CommandContextTests.cs index d14d443..f4fb7c8 100644 --- a/VCF.Tests/CommandContextTests.cs +++ b/VCF.Tests/CommandContextTests.cs @@ -1,13 +1,6 @@ -using FakeItEasy; -using NUnit.Framework; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using NUnit.Framework; using VampireCommandFramework; using VampireCommandFramework.Common; -using VampireCommandFramework.Registry; namespace VCF.Tests; diff --git a/VCF.Tests/HelpTests.cs b/VCF.Tests/HelpTests.cs index 35a7e19..dd6d2c6 100644 --- a/VCF.Tests/HelpTests.cs +++ b/VCF.Tests/HelpTests.cs @@ -1,11 +1,6 @@ -using FakeItEasy; +using FakeItEasy; using NUnit.Framework; -using System; -using System.Collections.Generic; -using System.Linq; using System.Reflection; -using System.Text; -using System.Threading.Tasks; using VampireCommandFramework; using VampireCommandFramework.Basics; using VampireCommandFramework.Registry; diff --git a/VCF.Tests/MiddlewareTests.cs b/VCF.Tests/MiddlewareTests.cs index ab7941c..7a4a1ca 100644 --- a/VCF.Tests/MiddlewareTests.cs +++ b/VCF.Tests/MiddlewareTests.cs @@ -1,6 +1,5 @@ -using Consumer; -using NUnit.Framework; using FakeItEasy; +using NUnit.Framework; using System.Reflection; using VampireCommandFramework; diff --git a/VCF.Tests/OverloadTests.cs b/VCF.Tests/OverloadTests.cs index ba01c91..790c69b 100644 --- a/VCF.Tests/OverloadTests.cs +++ b/VCF.Tests/OverloadTests.cs @@ -1,7 +1,5 @@ -using FakeItEasy; using NUnit.Framework; using VampireCommandFramework; -using VampireCommandFramework.Registry; namespace VCF.Tests; diff --git a/VCF.Tests/ParsingTests.cs b/VCF.Tests/ParsingTests.cs index 98e0894..f646079 100644 --- a/VCF.Tests/ParsingTests.cs +++ b/VCF.Tests/ParsingTests.cs @@ -1,7 +1,6 @@ using Consumer; -using NUnit.Framework; using FakeItEasy; -using VampireCommandFramework.Registry; +using NUnit.Framework; using VampireCommandFramework; namespace VCF.Tests; diff --git a/VCF.Tests/StaticCommandsTests.cs b/VCF.Tests/StaticCommandsTests.cs index 0484341..a0f0c5b 100644 --- a/VCF.Tests/StaticCommandsTests.cs +++ b/VCF.Tests/StaticCommandsTests.cs @@ -1,7 +1,6 @@ using FakeItEasy; using NUnit.Framework; using VampireCommandFramework; -using VampireCommandFramework.Registry; namespace VCF.Tests;