Move mod creation functions to own subclass.

This commit is contained in:
Ottermandias 2023-03-03 13:43:00 +01:00
parent c2ac745d72
commit 1f942491ac
13 changed files with 237 additions and 233 deletions

View file

@ -3,11 +3,13 @@ using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using Dalamud.Interface.Internal.Notifications;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using OtterGui;
using OtterGui.Filesystem;
using Penumbra.Api.Enums;
using Penumbra.Util;
namespace Penumbra.Mods;
@ -63,8 +65,7 @@ public partial class Mod
{
if( ret.PrioritizedOptions.Count == IModGroup.MaxMultiOptions )
{
Penumbra.Log.Warning(
$"Multi Group {ret.Name} has more than {IModGroup.MaxMultiOptions} options, ignoring excessive options." );
ChatUtil.NotificationMessage( $"Multi Group {ret.Name} has more than {IModGroup.MaxMultiOptions} options, ignoring excessive options.", "Warning", NotificationType.Warning );
break;
}

View file

@ -67,7 +67,7 @@ public partial class Mod
_default.WriteTexToolsMeta( ModPath );
foreach( var group in Groups )
{
var dir = NewOptionDirectory( ModPath, group.Name );
var dir = Creator.NewOptionDirectory( ModPath, group.Name );
if( !dir.Exists )
{
dir.Create();
@ -75,7 +75,7 @@ public partial class Mod
foreach( var option in group.OfType< SubMod >() )
{
var optionDir = NewOptionDirectory( dir, option.Name );
var optionDir = Creator.NewOptionDirectory( dir, option.Name );
if( !optionDir.Exists )
{
optionDir.Create();