mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-02-23 08:17:59 +01:00
Make penumbra initialization before game code has run possible.
This commit is contained in:
parent
f13893cf77
commit
9ae843731d
19 changed files with 610 additions and 672 deletions
|
|
@ -110,8 +110,12 @@ public partial class ModCollection
|
|||
{
|
||||
case CollectionType.Default:
|
||||
Default = newCollection;
|
||||
Penumbra.ResidentResources.Reload();
|
||||
Default.SetFiles();
|
||||
if( Penumbra.CharacterUtility.Ready )
|
||||
{
|
||||
Penumbra.ResidentResources.Reload();
|
||||
Default.SetFiles();
|
||||
}
|
||||
|
||||
break;
|
||||
case CollectionType.Current:
|
||||
Current = newCollection;
|
||||
|
|
|
|||
|
|
@ -116,68 +116,63 @@ public partial class ModCollection
|
|||
}
|
||||
|
||||
// Set Metadata files.
|
||||
[Conditional( "USE_EQP" )]
|
||||
public void SetEqpFiles()
|
||||
{
|
||||
if( _cache == null )
|
||||
{
|
||||
MetaManager.MetaManagerEqp.ResetFiles();
|
||||
MetaManager.ResetEqpFiles();
|
||||
}
|
||||
else
|
||||
{
|
||||
_cache.MetaManipulations.Eqp.SetFiles();
|
||||
_cache.MetaManipulations.SetEqpFiles();
|
||||
}
|
||||
}
|
||||
|
||||
[Conditional( "USE_EQDP" )]
|
||||
public void SetEqdpFiles()
|
||||
{
|
||||
if( _cache == null )
|
||||
{
|
||||
MetaManager.MetaManagerEqdp.ResetFiles();
|
||||
MetaManager.ResetEqdpFiles();
|
||||
}
|
||||
else
|
||||
{
|
||||
_cache.MetaManipulations.Eqdp.SetFiles();
|
||||
_cache.MetaManipulations.SetEqdpFiles();
|
||||
}
|
||||
}
|
||||
|
||||
[Conditional( "USE_GMP" )]
|
||||
public void SetGmpFiles()
|
||||
{
|
||||
if( _cache == null )
|
||||
{
|
||||
MetaManager.MetaManagerGmp.ResetFiles();
|
||||
MetaManager.ResetGmpFiles();
|
||||
}
|
||||
else
|
||||
{
|
||||
_cache.MetaManipulations.Gmp.SetFiles();
|
||||
_cache.MetaManipulations.SetGmpFiles();
|
||||
}
|
||||
}
|
||||
|
||||
[Conditional( "USE_EST" )]
|
||||
public void SetEstFiles()
|
||||
{
|
||||
if( _cache == null )
|
||||
{
|
||||
MetaManager.MetaManagerEst.ResetFiles();
|
||||
MetaManager.ResetEstFiles();
|
||||
}
|
||||
else
|
||||
{
|
||||
_cache.MetaManipulations.Est.SetFiles();
|
||||
_cache.MetaManipulations.SetEstFiles();
|
||||
}
|
||||
}
|
||||
|
||||
[Conditional( "USE_CMP" )]
|
||||
public void SetCmpFiles()
|
||||
{
|
||||
if( _cache == null )
|
||||
{
|
||||
MetaManager.MetaManagerCmp.ResetFiles();
|
||||
MetaManager.ResetCmpFiles();
|
||||
}
|
||||
else
|
||||
{
|
||||
_cache.MetaManipulations.Cmp.SetFiles();
|
||||
_cache.MetaManipulations.SetCmpFiles();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ public partial class ModCollection
|
|||
|
||||
++ChangeCounter;
|
||||
|
||||
if( _collection == Penumbra.CollectionManager.Default )
|
||||
if( _collection == Penumbra.CollectionManager.Default && Penumbra.CharacterUtility.Ready )
|
||||
{
|
||||
Penumbra.ResidentResources.Reload();
|
||||
MetaManipulations.SetFiles();
|
||||
|
|
@ -237,7 +237,7 @@ public partial class ModCollection
|
|||
if( addMetaChanges )
|
||||
{
|
||||
++ChangeCounter;
|
||||
if( _collection == Penumbra.CollectionManager.Default )
|
||||
if( _collection == Penumbra.CollectionManager.Default && Penumbra.CharacterUtility.Ready )
|
||||
{
|
||||
Penumbra.ResidentResources.Reload();
|
||||
MetaManipulations.SetFiles();
|
||||
|
|
@ -295,7 +295,7 @@ public partial class ModCollection
|
|||
AddMetaFiles();
|
||||
}
|
||||
|
||||
if( _collection == Penumbra.CollectionManager.Default )
|
||||
if( _collection == Penumbra.CollectionManager.Default && Penumbra.CharacterUtility.Ready )
|
||||
{
|
||||
Penumbra.ResidentResources.Reload();
|
||||
MetaManipulations.SetFiles();
|
||||
|
|
@ -441,7 +441,7 @@ public partial class ModCollection
|
|||
|
||||
// Add all necessary meta file redirects.
|
||||
private void AddMetaFiles()
|
||||
=> MetaManipulations.Imc.SetFiles();
|
||||
=> MetaManipulations.SetImcFiles();
|
||||
|
||||
// Identify and record all manipulated objects for this entire collection.
|
||||
private void SetChangedItems()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue