mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-02-20 14:57:50 +01:00
Remove TryGetValue(MetaManipulation) from MetaDictionary.
This commit is contained in:
parent
5ca9e63a2a
commit
0445ed0ef9
11 changed files with 182 additions and 183 deletions
|
|
@ -2,6 +2,7 @@ using Penumbra.GameData.Enums;
|
|||
using Penumbra.GameData.Structs;
|
||||
using Penumbra.Interop.Services;
|
||||
using Penumbra.Interop.Structs;
|
||||
using Penumbra.Meta.Manipulations;
|
||||
using Penumbra.String.Functions;
|
||||
|
||||
namespace Penumbra.Meta.Files;
|
||||
|
|
@ -126,4 +127,7 @@ public sealed unsafe class ExpandedEqdpFile : MetaBaseFile
|
|||
|
||||
public static EqdpEntry GetDefault(MetaFileManager manager, GenderRace raceCode, bool accessory, PrimaryId primaryId)
|
||||
=> GetDefault(manager, CharacterUtility.ReverseIndices[(int)CharacterUtilityData.EqdpIdx(raceCode, accessory)], primaryId);
|
||||
|
||||
public static EqdpEntry GetDefault(MetaFileManager manager, EqdpIdentifier identifier)
|
||||
=> GetDefault(manager, CharacterUtility.ReverseIndices[(int)identifier.FileIndex()], identifier.SetId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
using Penumbra.GameData.Structs;
|
||||
using Penumbra.Interop.Services;
|
||||
using Penumbra.Interop.Structs;
|
||||
using Penumbra.Meta.Manipulations;
|
||||
using Penumbra.String.Functions;
|
||||
|
||||
namespace Penumbra.Meta.Files;
|
||||
|
|
@ -164,6 +165,9 @@ public sealed class ExpandedGmpFile : ExpandedEqpGmpBase, IEnumerable<GmpEntry>
|
|||
public static GmpEntry GetDefault(MetaFileManager manager, PrimaryId primaryIdx)
|
||||
=> new() { Value = GetDefaultInternal(manager, InternalIndex, primaryIdx, GmpEntry.Default.Value) };
|
||||
|
||||
public static GmpEntry GetDefault(MetaFileManager manager, GmpIdentifier identifier)
|
||||
=> new() { Value = GetDefaultInternal(manager, InternalIndex, identifier.SetId, GmpEntry.Default.Value) };
|
||||
|
||||
public void Reset(IEnumerable<PrimaryId> entries)
|
||||
{
|
||||
foreach (var entry in entries)
|
||||
|
|
|
|||
|
|
@ -184,4 +184,7 @@ public sealed unsafe class EstFile : MetaBaseFile
|
|||
|
||||
public static EstEntry GetDefault(MetaFileManager manager, EstType estType, GenderRace genderRace, PrimaryId primaryId)
|
||||
=> GetDefault(manager, (MetaIndex)estType, genderRace, primaryId);
|
||||
|
||||
public static EstEntry GetDefault(MetaFileManager manager, EstIdentifier identifier)
|
||||
=> GetDefault(manager, identifier.FileIndex(), identifier.GenderRace, identifier.SetId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,6 +65,9 @@ public unsafe class ImcFile : MetaBaseFile
|
|||
return ptr == null ? new ImcEntry() : *ptr;
|
||||
}
|
||||
|
||||
public ImcEntry GetEntry(EquipSlot slot, Variant variantIdx)
|
||||
=> GetEntry(PartIndex(slot), variantIdx);
|
||||
|
||||
public ImcEntry GetEntry(int partIdx, Variant variantIdx, out bool exists)
|
||||
{
|
||||
var ptr = VariantPtr(Data, partIdx, variantIdx);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue