mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-02-19 22:37:46 +01:00
Update to API4, use IPC instead of API-project. Replace Actor in most visible names with Object, Character or Player..
This commit is contained in:
parent
3680d2b63f
commit
4dfc2cf665
60 changed files with 812 additions and 740 deletions
|
|
@ -160,7 +160,7 @@ namespace Penumbra.Meta.Files
|
|||
private void WriteBlocks( BinaryWriter bw )
|
||||
{
|
||||
foreach( var entry in Blocks.Where( block => block != null )
|
||||
.SelectMany( block => block ) )
|
||||
.SelectMany( block => block! ) )
|
||||
{
|
||||
bw.Write( ( ushort )entry );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ namespace Penumbra.Meta.Files
|
|||
using var bw = new BinaryWriter( mem );
|
||||
|
||||
foreach( var parameter in blocks.Where( array => array != null )
|
||||
.SelectMany( array => array ) )
|
||||
.SelectMany( array => array! ) )
|
||||
{
|
||||
bw.Write( transform( parameter ) );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Dalamud.Logging;
|
||||
using Dalamud.Plugin;
|
||||
using Lumina.Data;
|
||||
using Lumina.Data.Files;
|
||||
|
|
@ -12,8 +13,6 @@ namespace Penumbra.Meta.Files
|
|||
// On first call, the default version of any supported file will be cached and can be returned without reparsing.
|
||||
public class MetaDefaults
|
||||
{
|
||||
private readonly DalamudPluginInterface _pi;
|
||||
|
||||
private readonly Dictionary< GamePath, object > _defaultFiles = new();
|
||||
|
||||
private object CreateNewFile( string path )
|
||||
|
|
@ -110,14 +109,11 @@ namespace Penumbra.Meta.Files
|
|||
public CmpFile? GetNewCmpFile()
|
||||
=> GetDefaultCmpFile()?.Clone();
|
||||
|
||||
public MetaDefaults( DalamudPluginInterface pi )
|
||||
=> _pi = pi;
|
||||
private static ImcFile GetImcFile( string path )
|
||||
=> Dalamud.GameData.GetFile< ImcFile >( path )!;
|
||||
|
||||
private ImcFile GetImcFile( string path )
|
||||
=> _pi.Data.GetFile< ImcFile >( path );
|
||||
|
||||
private FileResource FetchFile( string name )
|
||||
=> _pi.Data.GetFile( name );
|
||||
private static FileResource FetchFile( string name )
|
||||
=> Dalamud.GameData.GetFile( name )!;
|
||||
|
||||
// Check that a given meta manipulation is an actual change to the default value. We don't need to keep changes to default.
|
||||
public bool CheckAgainstDefault( MetaManipulation m )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue