diff options
Diffstat (limited to 'Client/Assembly-CSharp/Constants.cs')
-rw-r--r-- | Client/Assembly-CSharp/Constants.cs | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/Client/Assembly-CSharp/Constants.cs b/Client/Assembly-CSharp/Constants.cs new file mode 100644 index 0000000..5daa994 --- /dev/null +++ b/Client/Assembly-CSharp/Constants.cs @@ -0,0 +1,90 @@ +using System; +using UnityEngine; + +public static class Constants +{ + public const string LocalNetAddress = "127.0.0.1"; + + public const int GamePlayPort = 22023; + + public const int AnnouncementPort = 22024; + + public const int ServersPort = 22025; + + public const string InfinitySymbol = "∞"; + + public static readonly int ShipOnlyMask = LayerMask.GetMask(new string[] + { + "Ship" + }); + + public static readonly int ShipAndObjectsMask = LayerMask.GetMask(new string[] + { + "Ship", + "Objects" + }); + + public static readonly int ShipAndAllObjectsMask = LayerMask.GetMask(new string[] + { + "Ship", + "Objects", + "ShortObjects" + }); + + public static readonly int NotShipMask = ~LayerMask.GetMask(new string[] + { + "Ship" + }); + + public static readonly int Usables = ~LayerMask.GetMask(new string[] + { + "Ship", + "UI" + }); + + public static readonly int PlayersOnlyMask = LayerMask.GetMask(new string[] + { + "Players", + "Ghost" + }); + + public static readonly int ShadowMask = LayerMask.GetMask(new string[] + { + "Shadow", + "Objects", + "IlluminatedBlocking" + }); + + public static readonly int[] CompatVersions = new int[] + { + Constants.GetBroadcastVersion() + }; + + public const int Year = 2019; + + public const int Month = 6; + + public const int Day = 27; + + public const int Revision = 0; + + internal static int GetBroadcastVersion() + { + return 50487150; + } + + internal static int GetVersion(int year, int month, int day, int rev) + { + return year * 25000 + month * 1800 + day * 50 + rev; + } + + internal static byte[] GetBroadcastVersionBytes() + { + return BitConverter.GetBytes(Constants.GetBroadcastVersion()); + } + + public static bool ShouldPlaySfx() + { + return !AmongUsClient.Instance || AmongUsClient.Instance.GameMode != GameModes.LocalGame || DetectHeadset.Detect(); + } +} |