Add "less than 2gb ram" warning

This commit is contained in:
quake1337 2017-08-14 14:39:22 +02:00
parent 9dce68e6e2
commit 68437f0a22
2 changed files with 5 additions and 1 deletions

View file

@ -177,7 +177,7 @@ namespace TShockAPI
return plugins;
}
private long GetTotalSystemRam(bool isMono)
public long GetTotalSystemRam(bool isMono)
{
if (totalMem != 0)
{

View file

@ -329,6 +329,10 @@ namespace TShockAPI
Log.ConsoleInfo("TShock {0} ({1}) now running.", Version, VersionCodename);
if (StatTracker.GetTotalSystemRam(ServerApi.RunningMono) < 2)
{
Log.ConsoleInfo("This machine has less than 2 gigabytes of RAM installed. Be advised that it might not be enough to run TShock.");
}
ServerApi.Hooks.GamePostInitialize.Register(this, OnPostInit);
ServerApi.Hooks.GameUpdate.Register(this, OnUpdate);
ServerApi.Hooks.GameHardmodeTileUpdate.Register(this, OnHardUpdate);