mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-02-23 16:27:47 +01:00
Add some refactoring of data, Stains and STM files.
This commit is contained in:
parent
7e167cf0cf
commit
8d11e1075d
11 changed files with 580 additions and 227 deletions
|
|
@ -61,6 +61,7 @@ public class Penumbra : IDalamudPlugin
|
|||
public static ActorManager Actors { get; private set; } = null!;
|
||||
public static IObjectIdentifier Identifier { get; private set; } = null!;
|
||||
public static IGamePathParser GamePathParser { get; private set; } = null!;
|
||||
public static StainManager StainManager { get; private set; } = null!;
|
||||
|
||||
public static readonly List< Exception > ImcExceptions = new();
|
||||
|
||||
|
|
@ -85,6 +86,7 @@ public class Penumbra : IDalamudPlugin
|
|||
Log = new Logger();
|
||||
Identifier = GameData.GameData.GetIdentifier( Dalamud.PluginInterface, Dalamud.GameData );
|
||||
GamePathParser = GameData.GameData.GetGamePathParser();
|
||||
StainManager = new StainManager( Dalamud.PluginInterface, Dalamud.GameData );
|
||||
DevPenumbraExists = CheckDevPluginPenumbra();
|
||||
IsNotInstalledPenumbra = CheckIsNotInstalled();
|
||||
|
||||
|
|
@ -292,6 +294,7 @@ public class Penumbra : IDalamudPlugin
|
|||
|
||||
public void Dispose()
|
||||
{
|
||||
StainManager?.Dispose();
|
||||
Actors?.Dispose();
|
||||
Identifier?.Dispose();
|
||||
Framework?.Dispose();
|
||||
|
|
|
|||
25
Penumbra/Util/StainManager.cs
Normal file
25
Penumbra/Util/StainManager.cs
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
using System;
|
||||
using Dalamud.Data;
|
||||
using Dalamud.Plugin;
|
||||
using OtterGui.Widgets;
|
||||
using Penumbra.GameData.Data;
|
||||
using Penumbra.GameData.Files;
|
||||
|
||||
namespace Penumbra.Util;
|
||||
|
||||
public class StainManager : IDisposable
|
||||
{
|
||||
public readonly StainData StainData;
|
||||
public readonly FilterComboColors Combo;
|
||||
public readonly StmFile StmFile;
|
||||
|
||||
public StainManager(DalamudPluginInterface pluginInterface, DataManager dataManager)
|
||||
{
|
||||
StainData = new StainData( pluginInterface, dataManager, dataManager.Language );
|
||||
Combo = new FilterComboColors( 140, StainData.Data );
|
||||
StmFile = new StmFile( dataManager );
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
=> StainData.Dispose();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue