Some mod movement.

This commit is contained in:
Ottermandias 2023-04-01 14:24:12 +02:00
parent c12dbf3f8a
commit 577669b21f
26 changed files with 726 additions and 732 deletions

View file

@ -5,7 +5,7 @@ using System.Linq;
using System.Threading.Tasks;
using Penumbra.Services;
namespace Penumbra.Mods;
namespace Penumbra.Mods.Manager;
/// <summary> Describes the state of a potential move-target for a mod. </summary>
public enum NewDirectoryState
@ -35,7 +35,7 @@ public sealed class ModManager : ModStorage
_config = config;
_communicator = communicator;
DataEditor = dataEditor;
OptionEditor = optionEditor;
OptionEditor = optionEditor;
SetBaseDirectory(config.ModDirectory, true);
DiscoverMods();
}
@ -73,7 +73,7 @@ public sealed class ModManager : ModStorage
if (this.Any(m => m.ModPath.Name == modFolder.Name))
return;
Mod.Creator.SplitMultiGroups(modFolder);
ModCreator.SplitMultiGroups(modFolder);
var mod = Mod.LoadMod(this, modFolder, true);
if (mod == null)
return;
@ -206,7 +206,7 @@ public sealed class ModManager : ModStorage
if (oldName == newName)
return NewDirectoryState.Identical;
var fixedNewName = Mod.Creator.ReplaceBadXivSymbols(newName);
var fixedNewName = ModCreator.ReplaceBadXivSymbols(newName);
if (fixedNewName != newName)
return NewDirectoryState.ContainsInvalidSymbols;