コード例 #1
0
        public static void LoadServersFromFile()
        {
            foreach (var Server in ServersArrayPreSplit())
            {
                ArkServerInfo tempServer = new ArkServerInfo();
                string[]      serverInfo = { "" };
                serverInfo           = Server.Split(',');
                tempServer.Name      = serverInfo[0];
                tempServer.ServerDir = serverInfo[1];
                Servers.Add(tempServer);

                if (!File.Exists(tempServer.CurrentWorkshopACF))
                {
                    File.Copy(tempServer.UpdatedWorkshopACF, tempServer.CurrentWorkshopACF);
                }
                string sasFile = tempServer.SASLogs + "/SASLog" + DateTime.Now.ToString("MMddyyyy_hhmmss") + ".txt";
                if (!File.Exists(sasFile))
                {
                    tempServer.SASFile = sasFile;
                    var myFile = File.Create(sasFile);
                    myFile.Close();
                }
            }
            foreach (var Server in Servers)
            {
                Methods.Log(Server, "Build Version: " + VersionCheck.GetGameInformation(376030));
                Methods.Log(Server, "Game Version: " + VersionCheck.GetGameBuildID(Server));
                Processes.ModVersionUpdate(Server);
            }
        }
コード例 #2
0
 public static bool NeedsArkUpdate(ArkServerInfo Server)
 {
     if (Int32.Parse(VersionCheck.GetGameBuildID(Server)) < VersionCheck.GetGameInformation(376030))
     {
         return(true);
     }
     return(false);
 }