Inheritance: UnityEngine.MonoBehaviour
        public void Start()
        {
            Instance = this;
            bool autoSaveEnabled = true; //U.Settings.Instance.AutomaticSave.Enabled;

            // ReSharper disable once ConditionIsAlwaysTrueOrFalse
            // ReSharper disable once HeuristicUnreachableCode

            if (!autoSaveEnabled)
            {
                return;
            }

            int i = 300; //;U.Settings.Instance.AutomaticSave.Interval;

            if (i < interval)
            {
                logger.LogError("AutomaticSave interval must be atleast 30 seconds, changed to 30 seconds");
            }
            else
            {
                interval = i;
            }

            logger.LogInformation("This server will automatically save every {0} seconds", interval);
            RestartTimer();
        }
Exemple #2
0
 private void Start()
 {
     Instance = this;
     if (U.Settings.Instance.AutomaticSave.Enabled)
     {
         if (U.Settings.Instance.AutomaticSave.Interval < interval)
         {
             Core.Logging.Logger.LogError("AutomaticSave interval must be atleast 30 seconds, changed to 30 seconds");
         }
         else
         {
             interval = U.Settings.Instance.AutomaticSave.Interval;
         }
         Core.Logging.Logger.Log(string.Format("This server will automatically save every {0} seconds", interval));
         restartTimer();
     }
 }
 private void Start()
 {
     Instance = this;
     if (U.Settings.Instance.AutomaticSave.Enabled)
     {
         if(U.Settings.Instance.AutomaticSave.Interval < interval)
         {
             Core.Logging.Logger.LogError("AutomaticSave interval must be atleast 30 seconds, changed to 30 seconds");
         }
         else
         {
             interval = U.Settings.Instance.AutomaticSave.Interval;
         }
         Core.Logging.Logger.Log(String.Format("This server will automatically save every {0} seconds", interval));
         restartTimer();
     }
 }