public static void Prefix(PlayerControl __instance)
 {
     if (AmongUsClient.Instance.GameState != InnerNet.InnerNetClient.GameStates.Joined)
     {
         return;
     }
     if (RR.GetInstance().players.Count >= 0)
     {
         RR.SendMessage();
     }
 }
Exemple #2
0
 public static void Prefix()
 {
     RR.LogInfo("ShipStatusStartPatch");
     if (AmongUsClient.Instance?.AmHost == true && PlayerControl.LocalPlayer)
     {
         RR.SetPlayersDelay();
     }
     else
     {
         RR.SetPlayers();
     }
     return;
 }
Exemple #3
0
        public override void Load()
        {
            // カスタムサーバーへの接続先を追加
            Ip   = Config.Bind("Custom", "Custom Server IP", "18.177.110.86");
            Port = Config.Bind("Custom", "Custom Server Port", (ushort)22023);

            IRegionInfo   customRegion  = new DnsRegionInfo(Ip.Value, "HaomingAWS", StringNames.NoTranslation, Ip.Value, Port.Value).Cast <IRegionInfo>();
            ServerManager serverManager = DestroyableSingleton <ServerManager> .Instance;

            IRegionInfo[] regions = ServerManager.DefaultRegions;

            regions = regions.Concat(new IRegionInfo[] { customRegion }).ToArray();
            ServerManager.DefaultRegions   = regions;
            serverManager.AvailableRegions = regions;
            serverManager.SaveServers();

            // RevealRolesにLoggerを登録
            RR.GetInstance().logger = Log;

            Harmony.PatchAll();
        }