mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-02-20 06:47:46 +01:00
Start rework of identified objects.
This commit is contained in:
parent
4454ac48da
commit
da3f3b8df3
41 changed files with 342 additions and 389 deletions
|
|
@ -45,7 +45,7 @@ public interface IModGroup
|
|||
public IModGroupEditDrawer EditDrawer(ModGroupEditDrawer editDrawer);
|
||||
|
||||
public void AddData(Setting setting, Dictionary<Utf8GamePath, FullPath> redirections, MetaDictionary manipulations);
|
||||
public void AddChangedItems(ObjectIdentification identifier, IDictionary<string, object?> changedItems);
|
||||
public void AddChangedItems(ObjectIdentification identifier, IDictionary<string, IIdentifiedObjectData?> changedItems);
|
||||
|
||||
/// <summary> Ensure that a value is valid for a group. </summary>
|
||||
public Setting FixSetting(Setting setting);
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ public class ImcModGroup(Mod mod) : IModGroup
|
|||
}
|
||||
}
|
||||
|
||||
public void AddChangedItems(ObjectIdentification identifier, IDictionary<string, object?> changedItems)
|
||||
public void AddChangedItems(ObjectIdentification identifier, IDictionary<string, IIdentifiedObjectData?> changedItems)
|
||||
=> Identifier.AddChangedItems(identifier, changedItems, AllVariants);
|
||||
|
||||
public Setting FixSetting(Setting setting)
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ public sealed class MultiModGroup(Mod mod) : IModGroup, ITexToolsGroup
|
|||
}
|
||||
}
|
||||
|
||||
public void AddChangedItems(ObjectIdentification identifier, IDictionary<string, object?> changedItems)
|
||||
public void AddChangedItems(ObjectIdentification identifier, IDictionary<string, IIdentifiedObjectData?> changedItems)
|
||||
{
|
||||
foreach (var container in DataContainers)
|
||||
identifier.AddChangedItems(container, changedItems);
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ public sealed class SingleModGroup(Mod mod) : IModGroup, ITexToolsGroup
|
|||
OptionData[setting.AsIndex].AddDataTo(redirections, manipulations);
|
||||
}
|
||||
|
||||
public void AddChangedItems(ObjectIdentification identifier, IDictionary<string, object?> changedItems)
|
||||
public void AddChangedItems(ObjectIdentification identifier, IDictionary<string, IIdentifiedObjectData?> changedItems)
|
||||
{
|
||||
foreach (var container in DataContainers)
|
||||
identifier.AddChangedItems(container, changedItems);
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ public static class EquipmentSwap
|
|||
PrimaryId idTo, byte mtrlTo)
|
||||
{
|
||||
var eqdpFromIdentifier = new EqdpIdentifier(idFrom, slotFrom, gr);
|
||||
var eqdpToIdentifier = new EqdpIdentifier(idTo, slotTo, gr);
|
||||
var eqdpToIdentifier = new EqdpIdentifier(idTo, slotTo, gr);
|
||||
var eqdpFromDefault = new EqdpEntryInternal(ExpandedEqdpFile.GetDefault(manager, eqdpFromIdentifier), slotFrom);
|
||||
var eqdpToDefault = new EqdpEntryInternal(ExpandedEqdpFile.GetDefault(manager, eqdpToIdentifier), slotTo);
|
||||
var meta = new MetaSwap<EqdpIdentifier, EqdpEntryInternal>(i => manips.TryGetValue(i, out var e) ? e : null, eqdpFromIdentifier,
|
||||
|
|
@ -255,7 +255,8 @@ public static class EquipmentSwap
|
|||
{
|
||||
items = identifier.Identify(slotFrom.IsEquipment()
|
||||
? GamePaths.Equipment.Mdl.Path(idFrom, GenderRace.MidlanderMale, slotFrom)
|
||||
: GamePaths.Accessory.Mdl.Path(idFrom, GenderRace.MidlanderMale, slotFrom)).Select(kvp => kvp.Value).OfType<EquipItem>()
|
||||
: GamePaths.Accessory.Mdl.Path(idFrom, GenderRace.MidlanderMale, slotFrom))
|
||||
.Select(kvp => kvp.Value).OfType<IdentifiedItem>().Select(i => i.Item)
|
||||
.ToArray();
|
||||
variants = Enumerable.Range(0, imc.Count + 1).Select(i => (Variant)i).ToArray();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using OtterGui;
|
||||
using OtterGui.Classes;
|
||||
using Penumbra.GameData.Data;
|
||||
using Penumbra.Meta.Manipulations;
|
||||
using Penumbra.Mods.Editor;
|
||||
using Penumbra.Mods.Groups;
|
||||
|
|
@ -100,7 +101,7 @@ public sealed class Mod : IMod
|
|||
}
|
||||
|
||||
// Cache
|
||||
public readonly SortedList<string, object?> ChangedItems = new();
|
||||
public readonly SortedList<string, IIdentifiedObjectData?> ChangedItems = new();
|
||||
|
||||
public string LowerChangedItemsString { get; internal set; } = string.Empty;
|
||||
public string AllTagsLower { get; internal set; } = string.Empty;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue