import 'package:libac_dart/utils/TimeUtils.dart'; import 'package:servermanager/statemachine.dart'; class SessionData { static bool shutdownPending = false; /// This flag will track the number of seconds until restart /// /// This is initialized initially based on the AutomaticRestart timer if enabled. /// /// This may be updated to one to two minutes by a Mod Update, or Wrapper update static Time timer = Time(hours: 0, minutes: 0, seconds: 0); static Time operating_time = Time(hours: 0, minutes: 0, seconds: 0); static String shutdownMessage = ""; static WarnIntervals CURRENT_INTERVAL = WarnIntervals.NONE; static Time mod_update_check_tracker = Time(hours: 0, minutes: 0, seconds: 0); static bool enableRestartTimer = false; static bool canPingServer = false; static bool isWorldRestore = false; static String snapshotToRestore = ""; // This is the absolute path to the snapshot being restored static Time timeSinceLastPing = Time(hours: 0, minutes: 0, seconds: 0); static void resetModUpdateChecker() { mod_update_check_tracker = Time(hours: 0, minutes: 0, seconds: 0); } static void bumpModUpdateChecker() { mod_update_check_tracker.tickUp(); } static bool shouldCheckModUpdates() { return mod_update_check_tracker.minutes >= 30; } /// Interactive Editor - Snapshots /// /// This contains the list of snapshot files for the editor client GUI. /// /// DO NOT USE ON SERVER /// /// Use the [Settings.getWorldSnapshotFiles] function instead static List IE_SNAPSHOTS = []; static bool IS_FIRST_MOD_CHECK = true; }