public override void Loaded() { Instance = this; Logger.Info($"Core ETGMod init {FullVersion}"); Logger.Info($"Game folder: {Paths.GameFolder}"); if (AutoReloadMods) { _FSWatcher = new FileSystemWatcher { Path = Paths.ModsFolder, NotifyFilter = NotifyFilters.Attributes | NotifyFilters.CreationTime | NotifyFilters.DirectoryName | NotifyFilters.FileName | NotifyFilters.LastWrite | NotifyFilters.Security | NotifyFilters.Size, IncludeSubdirectories = true, }; var deleg = new FileSystemEventHandler((source, e) => _ShouldAutoReload = true); _FSWatcher.Changed += deleg; _FSWatcher.Created += deleg; _FSWatcher.Deleted += deleg; _FSWatcher.Renamed += (source, e) => _ShouldAutoReload = true; _FSWatcher.EnableRaisingEvents = true; } }
public override void Loaded() { Instance = this; Logger.Info($"Core ETGMod init {FullVersion}"); Logger.Info($"Game folder: {GameFolder}"); }