Conversation
| <HintPath>D:\SteamLibrary\steamapps\common\BROKE PROTOCOL\BrokeProtocol_Data\Managed\UnityEngine.PhysicsModule.dll</HintPath> | ||
| </Reference> | ||
| <Reference Include="NewtonSoft.Json"> | ||
| <HintPath>D:\SteamLibrary\steamapps\common\BROKE PROTOCOL\BrokeProtocol_Data\Managed\NewtonSoft.Json.dll</HintPath> |
There was a problem hiding this comment.
Added reference for newtonsoft json
| using System.Text; | ||
|
|
||
| namespace ClassLibrary8.Commands | ||
| namespace Chat_Log.Commands |
There was a problem hiding this comment.
Since you changed the project name, namespaces should be changed too.
|
|
||
| private void LocalCommand(ShPlayer player, string Type) | ||
| private void LocalCommand(ShPlayer player, string type) | ||
| { |
There was a problem hiding this comment.
I think "type" without caps in the parameters will make things better when reading the code.
| Core.Instance.SaveSettings(); | ||
| } | ||
| } | ||
| } No newline at end of file |
There was a problem hiding this comment.
This will save the settings file when the server saves in case you want to edit from the game it while it's running.
| public void AddMessage(Message message) | ||
| { | ||
| if (messages.Count >= 300) | ||
| if (messages.Count >= Core.Instance.Settings.MaxLogMessages) |
There was a problem hiding this comment.
Instead of using a hardcoded value it will now use the settings value which can be changed by the server owner
| { | ||
| public int MaxLogMessages { get; set; } = 300; | ||
| } | ||
| } No newline at end of file |
There was a problem hiding this comment.
This is the settings file, when creating settings the first time it will have 300 by default but after that it will use the value the server owner choose
At the end i fixed my files so you can use this pr if you want.