mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-02-21 15:27:51 +01:00
Use DataShare in ObjectIdentifier
This commit is contained in:
parent
52b2b66cd7
commit
ef3ffb5f10
17 changed files with 4138 additions and 573 deletions
|
|
@ -7,7 +7,6 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Penumbra.Api.Enums;
|
||||
using Penumbra.GameData.Util;
|
||||
using Penumbra.String.Classes;
|
||||
|
||||
namespace Penumbra.Collections;
|
||||
|
|
@ -474,10 +473,10 @@ public partial class ModCollection
|
|||
_changedItems.Clear();
|
||||
// Skip IMCs because they would result in far too many false-positive items,
|
||||
// since they are per set instead of per item-slot/item/variant.
|
||||
var identifier = GameData.GameData.GetIdentifier();
|
||||
var identifier = Penumbra.Identifier;
|
||||
foreach( var (resolved, modPath) in ResolvedFiles.Where( file => !file.Key.Path.EndsWith( "imc"u8 ) ) )
|
||||
{
|
||||
foreach( var (name, obj) in identifier.Identify( new GamePath( resolved.ToString() ) ) )
|
||||
foreach( var (name, obj) in identifier.Identify( resolved.ToString() ) )
|
||||
{
|
||||
if( !_changedItems.TryGetValue( name, out var data ) )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
using Penumbra.GameData.Enums;
|
||||
using Penumbra.GameData.Util;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace Penumbra.Import;
|
||||
|
|
@ -54,10 +53,6 @@ public class MetaFileInfo
|
|||
}
|
||||
|
||||
public MetaFileInfo( string fileName )
|
||||
: this( new GamePath( fileName ) )
|
||||
{ }
|
||||
|
||||
public MetaFileInfo( GamePath fileName )
|
||||
{
|
||||
// Set the primary type from the gamePath start.
|
||||
PrimaryType = GameData.GameData.GetGamePathParser().PathToObjectType( fileName );
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
using System;
|
||||
using Penumbra.GameData.Enums;
|
||||
using Penumbra.GameData.Structs;
|
||||
using Penumbra.GameData.Util;
|
||||
using Penumbra.Interop.Structs;
|
||||
using System.Collections.Generic;
|
||||
using Penumbra.String.Functions;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using Penumbra.GameData.Enums;
|
||||
using Penumbra.GameData.Structs;
|
||||
using Penumbra.GameData.Util;
|
||||
using Penumbra.Interop.Structs;
|
||||
using Penumbra.String.Functions;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ using System.Collections;
|
|||
using System.Collections.Generic;
|
||||
using System.Numerics;
|
||||
using Penumbra.GameData.Structs;
|
||||
using Penumbra.GameData.Util;
|
||||
using Penumbra.Interop.Structs;
|
||||
using Penumbra.String.Functions;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Penumbra.GameData.Enums;
|
||||
using Penumbra.GameData.Util;
|
||||
using Penumbra.Interop.Structs;
|
||||
using Penumbra.Meta.Manipulations;
|
||||
using Penumbra.String.Functions;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
using System;
|
||||
using Dalamud.Memory;
|
||||
using Penumbra.GameData.Util;
|
||||
using Penumbra.String.Functions;
|
||||
using CharacterUtility = Penumbra.Interop.CharacterUtility;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ using System;
|
|||
using System.Runtime.InteropServices;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Penumbra.GameData.Util;
|
||||
using Penumbra.Interop.Structs;
|
||||
using Penumbra.String.Functions;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Penumbra.GameData.Util;
|
||||
|
||||
namespace Penumbra.Mods;
|
||||
|
||||
|
|
@ -11,11 +10,10 @@ public sealed partial class Mod
|
|||
|
||||
private void ComputeChangedItems()
|
||||
{
|
||||
var identifier = GameData.GameData.GetIdentifier();
|
||||
ChangedItems.Clear();
|
||||
foreach( var gamePath in AllRedirects )
|
||||
{
|
||||
identifier.Identify( ChangedItems, new GamePath(gamePath.ToString()) );
|
||||
Penumbra.Identifier.Identify( ChangedItems, gamePath.ToString() );
|
||||
}
|
||||
|
||||
// TODO: manipulations
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ public class Penumbra : IDalamudPlugin
|
|||
public static ResourceLoader ResourceLoader { get; private set; } = null!;
|
||||
public static FrameworkManager Framework { get; private set; } = null!;
|
||||
public static ActorManager Actors { get; private set; } = null!;
|
||||
public static IObjectIdentifier Identifier { get; private set; } = null!;
|
||||
|
||||
public static readonly List< Exception > ImcExceptions = new();
|
||||
|
||||
|
|
@ -80,8 +81,8 @@ public class Penumbra : IDalamudPlugin
|
|||
try
|
||||
{
|
||||
Dalamud.Initialize( pluginInterface );
|
||||
Log = new Logger();
|
||||
GameData.GameData.GetIdentifier( Dalamud.GameData );
|
||||
Log = new Logger();
|
||||
Identifier = GameData.GameData.GetIdentifier( Dalamud.PluginInterface, Dalamud.GameData );
|
||||
DevPenumbraExists = CheckDevPluginPenumbra();
|
||||
IsNotInstalledPenumbra = CheckIsNotInstalled();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue