Ejemplo n.º 1
0
        private void AddModPath(string path)
        {
            if (_modPaths.ContainsKey(path))
            {
                return;
            }

            _modPaths.Add(path, DateTime.Now.Ticks);

            ModFound?.Invoke(path);
        }
Ejemplo n.º 2
0
        private void AddMod(Mod mod)
        {
            mod.Loaded             += OnModLoaded;
            mod.Unloaded           += OnModUnloaded;
            mod.LoadCancelled      += OnModLoadCancelled;
            mod.SceneLoaded        += OnSceneLoaded;
            mod.SceneUnloaded      += OnSceneUnloaded;
            mod.SceneLoadCancelled += OnSceneLoadCancelled;

            mod.UpdateConflicts(_mods);
            foreach (Mod other in _mods)
            {
                other.UpdateConflicts(mod);
            }

            LogUtility.LogInfo("Mod found: " + mod.name + " - " + mod.contentType);
            _mods.Add(mod);

            ModFound?.Invoke(mod);
            ModsChanged?.Invoke();
        }