mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 10:17:22 +01:00
Some further small Glamourer changes, increment versioning of gamedata stuff.
This commit is contained in:
parent
0fb9e77c3c
commit
62f71df28c
10 changed files with 39 additions and 11 deletions
2
OtterGui
2
OtterGui
|
|
@ -1 +1 @@
|
||||||
Subproject commit f94bb0541e422a3e61a7117e8ad5bbba2f8ed6c0
|
Subproject commit b18fdb0d39016e783923d5956ae6c07a89e53f30
|
||||||
|
|
@ -48,7 +48,7 @@ public sealed partial class ActorManager : IDisposable
|
||||||
public IReadOnlyDictionary<uint, string> ENpcs { get; }
|
public IReadOnlyDictionary<uint, string> ENpcs { get; }
|
||||||
|
|
||||||
public ActorManagerData(DalamudPluginInterface pluginInterface, DataManager gameData, ClientLanguage language)
|
public ActorManagerData(DalamudPluginInterface pluginInterface, DataManager gameData, ClientLanguage language)
|
||||||
: base(pluginInterface, language, 1)
|
: base(pluginInterface, language, 2)
|
||||||
{
|
{
|
||||||
var worldTask = TryCatchDataAsync("Worlds", CreateWorldData(gameData));
|
var worldTask = TryCatchDataAsync("Worlds", CreateWorldData(gameData));
|
||||||
var mountsTask = TryCatchDataAsync("Mounts", CreateMountData(gameData));
|
var mountsTask = TryCatchDataAsync("Mounts", CreateMountData(gameData));
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ namespace Penumbra.GameData.Data;
|
||||||
public sealed class HumanModelList : DataSharer
|
public sealed class HumanModelList : DataSharer
|
||||||
{
|
{
|
||||||
public const string Tag = "HumanModels";
|
public const string Tag = "HumanModels";
|
||||||
public const int CurrentVersion = 1;
|
public const int CurrentVersion = 2;
|
||||||
|
|
||||||
private readonly BitArray _humanModels;
|
private readonly BitArray _humanModels;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,12 +26,12 @@ public sealed class ItemData : DataSharer, IReadOnlyDictionary<FullEquipType, IR
|
||||||
foreach (var item in itemSheet.Where(i => i.Name.RawData.Length > 1))
|
foreach (var item in itemSheet.Where(i => i.Name.RawData.Length > 1))
|
||||||
{
|
{
|
||||||
var type = item.ToEquipType();
|
var type = item.ToEquipType();
|
||||||
if (type.IsWeapon())
|
if (type.IsWeapon() || type.IsTool())
|
||||||
{
|
{
|
||||||
if (item.ModelMain != 0)
|
if (item.ModelMain != 0)
|
||||||
tmp[(int)type].Add(EquipItem.FromMainhand(item));
|
tmp[(int)type].Add(EquipItem.FromMainhand(item));
|
||||||
if (item.ModelSub != 0)
|
if (item.ModelSub != 0)
|
||||||
tmp[(int)type.Offhand()].Add(EquipItem.FromOffhand(item));
|
tmp[(int)type.ValidOffhand()].Add(EquipItem.FromOffhand(item));
|
||||||
}
|
}
|
||||||
else if (type != FullEquipType.Unknown)
|
else if (type != FullEquipType.Unknown)
|
||||||
{
|
{
|
||||||
|
|
@ -76,7 +76,7 @@ public sealed class ItemData : DataSharer, IReadOnlyDictionary<FullEquipType, IR
|
||||||
}
|
}
|
||||||
|
|
||||||
public ItemData(DalamudPluginInterface pluginInterface, DataManager dataManager, ClientLanguage language)
|
public ItemData(DalamudPluginInterface pluginInterface, DataManager dataManager, ClientLanguage language)
|
||||||
: base(pluginInterface, language, 1)
|
: base(pluginInterface, language, 2)
|
||||||
{
|
{
|
||||||
_byType = TryCatchData("ItemList", () => CreateItems(dataManager, language));
|
_byType = TryCatchData("ItemList", () => CreateItems(dataManager, language));
|
||||||
_mainItems = TryCatchData("ItemDictMain", () => CreateMainItems(_byType));
|
_mainItems = TryCatchData("ItemDictMain", () => CreateMainItems(_byType));
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ namespace Penumbra.GameData.Data;
|
||||||
|
|
||||||
internal sealed class ObjectIdentification : DataSharer, IObjectIdentifier
|
internal sealed class ObjectIdentification : DataSharer, IObjectIdentifier
|
||||||
{
|
{
|
||||||
public const int IdentificationVersion = 1;
|
public const int IdentificationVersion = 2;
|
||||||
|
|
||||||
public IGamePathParser GamePathParser { get; } = new GamePathParser();
|
public IGamePathParser GamePathParser { get; } = new GamePathParser();
|
||||||
public readonly IReadOnlyList<IReadOnlyList<uint>> BnpcNames;
|
public readonly IReadOnlyList<IReadOnlyList<uint>> BnpcNames;
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ public sealed class RestrictedGear : DataSharer
|
||||||
public readonly IReadOnlyDictionary<uint, uint> FemaleToMale;
|
public readonly IReadOnlyDictionary<uint, uint> FemaleToMale;
|
||||||
|
|
||||||
public RestrictedGear(DalamudPluginInterface pi, ClientLanguage language, DataManager gameData)
|
public RestrictedGear(DalamudPluginInterface pi, ClientLanguage language, DataManager gameData)
|
||||||
: base(pi, language, 1)
|
: base(pi, language, 2)
|
||||||
{
|
{
|
||||||
_items = gameData.GetExcelSheet<Item>()!;
|
_items = gameData.GetExcelSheet<Item>()!;
|
||||||
_categories = gameData.GetExcelSheet<EquipRaceCategory>()!;
|
_categories = gameData.GetExcelSheet<EquipRaceCategory>()!;
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ public sealed class StainData : DataSharer, IReadOnlyDictionary<StainId, Stain>
|
||||||
public readonly IReadOnlyDictionary<byte, (string Name, uint Dye, bool Gloss)> Data;
|
public readonly IReadOnlyDictionary<byte, (string Name, uint Dye, bool Gloss)> Data;
|
||||||
|
|
||||||
public StainData(DalamudPluginInterface pluginInterface, DataManager dataManager, ClientLanguage language)
|
public StainData(DalamudPluginInterface pluginInterface, DataManager dataManager, ClientLanguage language)
|
||||||
: base(pluginInterface, language, 1)
|
: base(pluginInterface, language, 2)
|
||||||
{
|
{
|
||||||
Data = TryCatchData("Stains", () => CreateStainData(dataManager));
|
Data = TryCatchData("Stains", () => CreateStainData(dataManager));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -123,6 +123,17 @@ public static class FullEquipTypeExtensions
|
||||||
FullEquipType.Pickaxe => true,
|
FullEquipType.Pickaxe => true,
|
||||||
FullEquipType.Hatchet => true,
|
FullEquipType.Hatchet => true,
|
||||||
FullEquipType.FishingRod => true,
|
FullEquipType.FishingRod => true,
|
||||||
|
FullEquipType.ClawHammer => true,
|
||||||
|
FullEquipType.File => true,
|
||||||
|
FullEquipType.Pliers => true,
|
||||||
|
FullEquipType.GrindingWheel => true,
|
||||||
|
FullEquipType.Awl => true,
|
||||||
|
FullEquipType.SpinningWheel => true,
|
||||||
|
FullEquipType.Mortar => true,
|
||||||
|
FullEquipType.CulinaryKnife => true,
|
||||||
|
FullEquipType.Sledgehammer => true,
|
||||||
|
FullEquipType.GardenScythe => true,
|
||||||
|
FullEquipType.Gig => true,
|
||||||
_ => false,
|
_ => false,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -362,6 +373,22 @@ public static class FullEquipTypeExtensions
|
||||||
_ => FullEquipType.Unknown,
|
_ => FullEquipType.Unknown,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
public static FullEquipType ValidOffhand(this FullEquipType type)
|
||||||
|
=> type switch
|
||||||
|
{
|
||||||
|
FullEquipType.Fists => FullEquipType.FistsOff,
|
||||||
|
FullEquipType.Sword => FullEquipType.Shield,
|
||||||
|
FullEquipType.Wand => FullEquipType.Shield,
|
||||||
|
FullEquipType.Daggers => FullEquipType.DaggersOff,
|
||||||
|
FullEquipType.Gun => FullEquipType.GunOff,
|
||||||
|
FullEquipType.Orrery => FullEquipType.OrreryOff,
|
||||||
|
FullEquipType.Rapier => FullEquipType.RapierOff,
|
||||||
|
FullEquipType.Glaives => FullEquipType.GlaivesOff,
|
||||||
|
FullEquipType.Bow => FullEquipType.BowOff,
|
||||||
|
FullEquipType.Katana => FullEquipType.KatanaOff,
|
||||||
|
_ => FullEquipType.Unknown,
|
||||||
|
};
|
||||||
|
|
||||||
public static FullEquipType Offhand(this FullEquipType type)
|
public static FullEquipType Offhand(this FullEquipType type)
|
||||||
=> type switch
|
=> type switch
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ public readonly struct EquipItem
|
||||||
|
|
||||||
public static EquipItem FromOffhand(Item item)
|
public static EquipItem FromOffhand(Item item)
|
||||||
{
|
{
|
||||||
var type = item.ToEquipType().Offhand();
|
var type = item.ToEquipType().ValidOffhand();
|
||||||
var name = item.Name.ToDalamudString().TextValue + type.OffhandTypeSuffix();
|
var name = item.Name.ToDalamudString().TextValue + type.OffhandTypeSuffix();
|
||||||
var id = item.RowId;
|
var id = item.RowId;
|
||||||
var icon = item.Icon;
|
var icon = item.Icon;
|
||||||
|
|
|
||||||
|
|
@ -203,7 +203,8 @@ public class ItemSwapTab : IDisposable, ITab
|
||||||
case SwapType.Bracelet:
|
case SwapType.Bracelet:
|
||||||
case SwapType.Ring:
|
case SwapType.Ring:
|
||||||
var values = _selectors[_lastTab];
|
var values = _selectors[_lastTab];
|
||||||
if (values.Source.CurrentSelection.Type != FullEquipType.Unknown && values.Target.CurrentSelection.Type != FullEquipType.Unknown)
|
if (values.Source.CurrentSelection.Type != FullEquipType.Unknown
|
||||||
|
&& values.Target.CurrentSelection.Type != FullEquipType.Unknown)
|
||||||
_affectedItems = _swapData.LoadEquipment(values.Target.CurrentSelection, values.Source.CurrentSelection,
|
_affectedItems = _swapData.LoadEquipment(values.Target.CurrentSelection, values.Source.CurrentSelection,
|
||||||
_useCurrentCollection ? _collectionManager.Active.Current : null, _useRightRing, _useLeftRing);
|
_useCurrentCollection ? _collectionManager.Active.Current : null, _useRightRing, _useLeftRing);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue