mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-30 04:13:43 +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 )
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Dalamud.Plugin;
|
||||
using Dalamud.Logging;
|
||||
using Newtonsoft.Json;
|
||||
using Penumbra.Importer;
|
||||
using Penumbra.Meta.Files;
|
||||
|
|
@ -23,7 +23,7 @@ namespace Penumbra.Meta
|
|||
|
||||
// Store total number of manipulations for some ease of access.
|
||||
[JsonIgnore]
|
||||
internal int Count = 0;
|
||||
internal int Count;
|
||||
|
||||
|
||||
// Return an enumeration of all active meta manipulations for a given mod with given settings.
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Dalamud.Plugin;
|
||||
using Dalamud.Logging;
|
||||
using Lumina.Data.Files;
|
||||
using Penumbra.GameData.Util;
|
||||
using Penumbra.Interop;
|
||||
|
|
@ -57,7 +57,7 @@ namespace Penumbra.Meta
|
|||
=> _currentManipulations.Count;
|
||||
|
||||
public bool TryGetValue( MetaManipulation manip, out Mod.Mod mod )
|
||||
=> _currentManipulations.TryGetValue( manip, out mod );
|
||||
=> _currentManipulations.TryGetValue( manip, out mod! );
|
||||
|
||||
private static void DisposeFile( FileInfo? file )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue