v1.3.0.1 (Epic Store release)

This commit is contained in:
Regalis11
2024-03-28 18:34:33 +02:00
parent 81ca8637be
commit 3791670c42
269 changed files with 13160 additions and 2966 deletions
@@ -0,0 +1,34 @@
using System;
namespace Barotrauma;
public static partial class EosInterface
{
public sealed class EgsAuthContinuanceToken
{
// Got this number by checking a decoded continuance token, may be subject to change
public static readonly TimeSpan Duration = TimeSpan.FromMinutes(30);
public readonly DateTime ExpiryTime;
public bool IsValid => value != IntPtr.Zero && DateTime.Now < ExpiryTime;
private IntPtr value;
public EgsAuthContinuanceToken(IntPtr value, DateTime expiryTime)
{
this.value = value;
ExpiryTime = expiryTime;
}
public IntPtr Spend()
{
var retVal = IsValid ? value : IntPtr.Zero;
value = IntPtr.Zero;
return retVal;
}
public override string ToString()
=> $"{(IsValid ? "Valid" : "Invalid")} EGS ContinuanceToken"
+ (IsValid ? $" (expires on {ExpiryTime})" : "");
}
}