Beispiel #1
0
 public static string[] CreateServerCfg()
 {
     try
     {
         if (!Directory.Exists(SteamDSConfig.GetServerCfgDir()))
         {
             Directory.CreateDirectory(SteamDSConfig.GetServerCfgDir());
         }
     }
     catch (Exception exception)
     {
         Debug.LogException(exception);
     }
     try
     {
         if (File.Exists(SteamDSConfig.GetServerCfgPath()))
         {
             File.Delete(SteamDSConfig.GetServerCfgPath());
         }
     }
     catch (Exception exception2)
     {
         Debug.LogException(exception2);
     }
     try
     {
         File.WriteAllLines(SteamDSConfig.GetServerCfgPath(), SteamDSConfig.ServerDefaultData);
     }
     catch (Exception exception3)
     {
         Debug.LogException(exception3);
     }
     return(SteamDSConfig.ServerDefaultData);
 }
Beispiel #2
0
	public static string[] GetServerCfg()
	{
		try
		{
			if (File.Exists(SteamDSConfig.GetServerCfgPath()))
			{
				return File.ReadAllLines(SteamDSConfig.GetServerCfgPath());
			}
		}
		catch (Exception exception)
		{
			Debug.LogException(exception);
		}
		return SteamDSConfig.CreateServerCfg();
	}