mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-30 20:33:43 +01:00
Change everything in collection caches to use IMod and introduce TemporaryMod.
This commit is contained in:
parent
c578bd3a49
commit
fc767589a2
18 changed files with 129 additions and 74 deletions
|
|
@ -14,7 +14,7 @@ public partial class MetaManager
|
|||
public struct MetaManagerCmp : IDisposable
|
||||
{
|
||||
public CmpFile? File = null;
|
||||
public readonly Dictionary< RspManipulation, Mod > Manipulations = new();
|
||||
public readonly Dictionary< RspManipulation, IMod > Manipulations = new();
|
||||
|
||||
public MetaManagerCmp()
|
||||
{ }
|
||||
|
|
@ -39,7 +39,7 @@ public partial class MetaManager
|
|||
Manipulations.Clear();
|
||||
}
|
||||
|
||||
public bool ApplyMod( RspManipulation m, Mod mod )
|
||||
public bool ApplyMod( RspManipulation m, IMod mod )
|
||||
{
|
||||
#if USE_CMP
|
||||
Manipulations[ m ] = mod;
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ public partial class MetaManager
|
|||
{
|
||||
public readonly ExpandedEqdpFile?[] Files = new ExpandedEqdpFile?[CharacterUtility.NumEqdpFiles - 2]; // TODO: female Hrothgar
|
||||
|
||||
public readonly Dictionary< EqdpManipulation, Mod > Manipulations = new();
|
||||
public readonly Dictionary< EqdpManipulation, IMod > Manipulations = new();
|
||||
|
||||
public MetaManagerEqdp()
|
||||
{ }
|
||||
|
|
@ -51,7 +51,7 @@ public partial class MetaManager
|
|||
Manipulations.Clear();
|
||||
}
|
||||
|
||||
public bool ApplyMod( EqdpManipulation m, Mod mod )
|
||||
public bool ApplyMod( EqdpManipulation m, IMod mod )
|
||||
{
|
||||
#if USE_EQDP
|
||||
Manipulations[ m ] = mod;
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ public partial class MetaManager
|
|||
public struct MetaManagerEqp : IDisposable
|
||||
{
|
||||
public ExpandedEqpFile? File = null;
|
||||
public readonly Dictionary< EqpManipulation, Mod > Manipulations = new();
|
||||
public readonly Dictionary< EqpManipulation, IMod > Manipulations = new();
|
||||
|
||||
public MetaManagerEqp()
|
||||
{ }
|
||||
|
|
@ -39,7 +39,7 @@ public partial class MetaManager
|
|||
Manipulations.Clear();
|
||||
}
|
||||
|
||||
public bool ApplyMod( EqpManipulation m, Mod mod )
|
||||
public bool ApplyMod( EqpManipulation m, IMod mod )
|
||||
{
|
||||
#if USE_EQP
|
||||
Manipulations[ m ] = mod;
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ public partial class MetaManager
|
|||
public EstFile? BodyFile = null;
|
||||
public EstFile? HeadFile = null;
|
||||
|
||||
public readonly Dictionary< EstManipulation, Mod > Manipulations = new();
|
||||
public readonly Dictionary< EstManipulation, IMod > Manipulations = new();
|
||||
|
||||
public MetaManagerEst()
|
||||
{ }
|
||||
|
|
@ -51,7 +51,7 @@ public partial class MetaManager
|
|||
Manipulations.Clear();
|
||||
}
|
||||
|
||||
public bool ApplyMod( EstManipulation m, Mod mod )
|
||||
public bool ApplyMod( EstManipulation m, IMod mod )
|
||||
{
|
||||
#if USE_EST
|
||||
Manipulations[ m ] = mod;
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ public partial class MetaManager
|
|||
public struct MetaManagerGmp : IDisposable
|
||||
{
|
||||
public ExpandedGmpFile? File = null;
|
||||
public readonly Dictionary< GmpManipulation, Mod > Manipulations = new();
|
||||
public readonly Dictionary< GmpManipulation, IMod > Manipulations = new();
|
||||
|
||||
public MetaManagerGmp()
|
||||
{ }
|
||||
|
|
@ -38,7 +38,7 @@ public partial class MetaManager
|
|||
}
|
||||
}
|
||||
|
||||
public bool ApplyMod( GmpManipulation m, Mod mod )
|
||||
public bool ApplyMod( GmpManipulation m, IMod mod )
|
||||
{
|
||||
#if USE_GMP
|
||||
Manipulations[ m ] = mod;
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ public partial class MetaManager
|
|||
public readonly struct MetaManagerImc : IDisposable
|
||||
{
|
||||
public readonly Dictionary< Utf8GamePath, ImcFile > Files = new();
|
||||
public readonly Dictionary< ImcManipulation, Mod > Manipulations = new();
|
||||
public readonly Dictionary< ImcManipulation, IMod > Manipulations = new();
|
||||
|
||||
private readonly ModCollection _collection;
|
||||
private static int _imcManagerCount;
|
||||
|
|
@ -65,7 +65,7 @@ public partial class MetaManager
|
|||
Manipulations.Clear();
|
||||
}
|
||||
|
||||
public bool ApplyMod( ImcManipulation m, Mod mod )
|
||||
public bool ApplyMod( ImcManipulation m, IMod mod )
|
||||
{
|
||||
#if USE_IMC
|
||||
Manipulations[ m ] = mod;
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ public partial class MetaManager : IDisposable
|
|||
}
|
||||
}
|
||||
|
||||
public bool TryGetValue( MetaManipulation manip, [NotNullWhen(true)] out Mod? mod )
|
||||
public bool TryGetValue( MetaManipulation manip, [NotNullWhen(true)] out IMod? mod )
|
||||
{
|
||||
mod = manip.ManipulationType switch
|
||||
{
|
||||
|
|
@ -86,7 +86,7 @@ public partial class MetaManager : IDisposable
|
|||
Imc.Dispose();
|
||||
}
|
||||
|
||||
public bool ApplyMod( MetaManipulation m, Mod mod )
|
||||
public bool ApplyMod( MetaManipulation m, IMod mod )
|
||||
{
|
||||
return m.ManipulationType switch
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue