Faction Test v1.0.1.0

This commit is contained in:
Regalis11
2023-02-16 15:01:28 +02:00
parent caa5a2f762
commit 2c5a7923b0
309 changed files with 7502 additions and 4335 deletions
@@ -29,49 +29,6 @@ namespace Barotrauma
static partial class ToolBox
{
internal static class Epoch
{
private static readonly DateTime epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
/// <summary>
/// Returns the current Unix Epoch (Coordinated Universal Time)
/// </summary>
public static int NowUTC
{
get
{
return (int)(DateTime.UtcNow.Subtract(epoch).TotalSeconds);
}
}
/// <summary>
/// Returns the current Unix Epoch (user's current time)
/// </summary>
public static int NowLocal
{
get
{
return (int)(DateTime.Now.Subtract(epoch).TotalSeconds);
}
}
/// <summary>
/// Convert an epoch to a datetime
/// </summary>
public static DateTime ToDateTime(decimal unixTime)
{
return epoch.AddSeconds((long)unixTime);
}
/// <summary>
/// Convert a DateTime to a unix time
/// </summary>
public static uint FromDateTime(DateTime dt)
{
return (uint)(dt.Subtract(epoch).TotalSeconds);
}
}
public static bool IsProperFilenameCase(string filename)
{
//File case only matters on Linux where the filesystem is case-sensitive, so we don't need these errors in release builds.