Add changes requested by @hakusaro

This commit is contained in:
quake1337 2017-09-20 17:39:38 +02:00
parent e6ec63a90e
commit 4aa81a3d30

View file

@ -177,6 +177,12 @@ namespace TShockAPI
}
return plugins;
}
/// <summary>
/// Returns the amount of free RAM, in megabytes.
/// </summary>
/// <param name="mono">Whether or not this program is being executed in a Mono runtime</param>
/// <returns>Free RAM memory amount, in megabytes</returns>
public long GetFreeSystemRam(bool mono)
{
if (mono)
@ -209,6 +215,11 @@ namespace TShockAPI
return pc.RawValue;
}
}
/// <summary>
/// Returns the total amount of installed RAM, in gigabytes.
/// </summary>
/// <param name="isMono">Whether or not this program is being executed in a Mono runtime</param>
/// <returns>Total RAM memory amount, in gigabytes</returns>
public long GetTotalSystemRam(bool isMono)
{
if (totalMem != 0)