mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-01-03 06:13:45 +01:00
Add Byte String stuff, remove Services, cleanup and refactor interop stuff, disable path resolver for the moment
This commit is contained in:
parent
0e8f839471
commit
c3454f1d16
65 changed files with 4707 additions and 3371 deletions
|
|
@ -42,9 +42,8 @@ public class CollectionManager
|
|||
|
||||
if( ActiveCollection.Cache?.MetaManipulations.Count > 0 || newActive.Cache?.MetaManipulations.Count > 0 )
|
||||
{
|
||||
var resourceManager = Service< ResidentResources >.Get();
|
||||
ActiveCollection = newActive;
|
||||
resourceManager.ReloadResidentResources();
|
||||
Penumbra.ResidentResources.Reload();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -115,7 +114,7 @@ public class CollectionManager
|
|||
|
||||
if( reloadMeta && ActiveCollection.Settings.TryGetValue( mod.BasePath.Name, out var config ) && config.Enabled )
|
||||
{
|
||||
Service< ResidentResources >.Get().ReloadResidentResources();
|
||||
Penumbra.ResidentResources.Reload();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -223,8 +222,7 @@ public class CollectionManager
|
|||
if( !CollectionChangedTo.Any() )
|
||||
{
|
||||
ActiveCollection = c;
|
||||
var resourceManager = Service< ResidentResources >.Get();
|
||||
resourceManager.ReloadResidentResources();
|
||||
Penumbra.ResidentResources.Reload();
|
||||
}
|
||||
|
||||
DefaultCollection = c;
|
||||
|
|
@ -244,8 +242,7 @@ public class CollectionManager
|
|||
if( CollectionChangedTo == characterName && CharacterCollection.TryGetValue( characterName, out var collection ) )
|
||||
{
|
||||
ActiveCollection = c;
|
||||
var resourceManager = Service< ResidentResources >.Get();
|
||||
resourceManager.ReloadResidentResources();
|
||||
Penumbra.ResidentResources.Reload();
|
||||
}
|
||||
|
||||
CharacterCollection[ characterName ] = c;
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ namespace Penumbra.Mods
|
|||
Cache.UpdateMetaManipulations();
|
||||
if( activeCollection )
|
||||
{
|
||||
Service< ResidentResources >.Get().ReloadResidentResources();
|
||||
Penumbra.ResidentResources.Reload();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ using System.Diagnostics;
|
|||
using System.IO;
|
||||
using System.Linq;
|
||||
using Dalamud.Logging;
|
||||
using Penumbra.GameData.ByteString;
|
||||
using Penumbra.GameData.Util;
|
||||
using Penumbra.Meta;
|
||||
using Penumbra.Mod;
|
||||
|
|
@ -186,8 +187,9 @@ public class ModCollectionCache
|
|||
{
|
||||
foreach( var (file, paths) in option.OptionFiles )
|
||||
{
|
||||
var fullPath = new FullPath( mod.Data.BasePath, file );
|
||||
var idx = mod.Data.Resources.ModFiles.IndexOf( f => f.Equals( fullPath ) );
|
||||
var fullPath = new FullPath( mod.Data.BasePath,
|
||||
NewRelPath.FromString( file.ToString(), out var p ) ? p : NewRelPath.Empty ); // TODO
|
||||
var idx = mod.Data.Resources.ModFiles.IndexOf( f => f.Equals( fullPath ) );
|
||||
if( idx < 0 )
|
||||
{
|
||||
AddMissingFile( fullPath );
|
||||
|
|
@ -255,7 +257,14 @@ public class ModCollectionCache
|
|||
var file = mod.Data.Resources.ModFiles[ i ];
|
||||
if( file.Exists )
|
||||
{
|
||||
AddFile( mod, file.ToGamePath( mod.Data.BasePath ), file );
|
||||
if( file.ToGamePath( mod.Data.BasePath, out var gamePath ) )
|
||||
{
|
||||
AddFile( mod, new GamePath( gamePath.ToString() ), file ); // TODO
|
||||
}
|
||||
else
|
||||
{
|
||||
PluginLog.Warning( $"Could not convert {file} in {mod.Data.BasePath.FullName} to GamePath." );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue