summaryrefslogtreecommitdiff
path: root/Client/Assembly-CSharp/Constants.cs
blob: 5daa994a5a967e92bb44b2f1618d13b53a2e3d3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
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();
	}
}