mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-01-03 06:13:45 +01:00
Change most things to new byte strings, introduce new ResourceLoader and Logger fully.
This commit is contained in:
parent
5d77cd5514
commit
f5fccb0235
55 changed files with 2681 additions and 2730 deletions
|
|
@ -36,7 +36,7 @@ public class ModsController : WebApiController
|
|||
public object GetFiles()
|
||||
{
|
||||
return Penumbra.ModManager.Collections.CurrentCollection.Cache?.ResolvedFiles.ToDictionary(
|
||||
o => ( string )o.Key,
|
||||
o => o.Key.ToString(),
|
||||
o => o.Value.FullName
|
||||
)
|
||||
?? new Dictionary< string, string >();
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ using System.Reflection;
|
|||
using Dalamud.Game.ClientState.Objects.Types;
|
||||
using Dalamud.Logging;
|
||||
using Lumina.Data;
|
||||
using Penumbra.GameData.ByteString;
|
||||
using Penumbra.GameData.Enums;
|
||||
using Penumbra.GameData.Util;
|
||||
using Penumbra.Mods;
|
||||
|
|
@ -78,16 +79,15 @@ public class PenumbraApi : IDisposable, IPenumbraApi
|
|||
|
||||
private static string ResolvePath( string path, ModManager manager, ModCollection collection )
|
||||
{
|
||||
if( !Penumbra.Config.IsEnabled )
|
||||
if( !Penumbra.Config.EnableMods )
|
||||
{
|
||||
return path;
|
||||
}
|
||||
|
||||
var gamePath = new GamePath( path );
|
||||
var gamePath = Utf8GamePath.FromString( path, out var p, true ) ? p : Utf8GamePath.Empty;
|
||||
var ret = collection.Cache?.ResolveSwappedOrReplacementPath( gamePath );
|
||||
ret ??= manager.Collections.ForcedCollection.Cache?.ResolveSwappedOrReplacementPath( gamePath );
|
||||
ret ??= path;
|
||||
return ret;
|
||||
return ret?.ToString() ?? path;
|
||||
}
|
||||
|
||||
public string ResolvePath( string path )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue