mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +01:00
Some Glamourer stuff.
This commit is contained in:
parent
21e6a17d1c
commit
2ef9d3d56e
7 changed files with 55 additions and 48 deletions
2
OtterGui
2
OtterGui
|
|
@ -1 +1 @@
|
||||||
Subproject commit 43b78fd8dcdc12e0c2ba831bd037ad8e8a415e0e
|
Subproject commit 2c73fd57bf53fc3c9f390db0acc9e176607c2dbc
|
||||||
|
|
@ -50,7 +50,7 @@ public abstract class DataSharer : IDisposable
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
PluginLog.Error($"Error creating shared actor data for {tag}:\n{ex}");
|
PluginLog.Error($"Error creating shared data for {tag}:\n{ex}");
|
||||||
return func();
|
return func();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ public sealed class RestrictedGear : DataSharer
|
||||||
public readonly IReadOnlyDictionary<uint, uint> MaleToFemale;
|
public readonly IReadOnlyDictionary<uint, uint> MaleToFemale;
|
||||||
public readonly IReadOnlyDictionary<uint, uint> FemaleToMale;
|
public readonly IReadOnlyDictionary<uint, uint> FemaleToMale;
|
||||||
|
|
||||||
internal RestrictedGear(DalamudPluginInterface pi, ClientLanguage language, DataManager gameData)
|
public RestrictedGear(DalamudPluginInterface pi, ClientLanguage language, DataManager gameData)
|
||||||
: base(pi, language, 1)
|
: base(pi, language, 1)
|
||||||
{
|
{
|
||||||
_items = gameData.GetExcelSheet<Item>()!;
|
_items = gameData.GetExcelSheet<Item>()!;
|
||||||
|
|
@ -78,14 +78,14 @@ public sealed class RestrictedGear : DataSharer
|
||||||
var f2m = new Dictionary<uint, uint>();
|
var f2m = new Dictionary<uint, uint>();
|
||||||
var rg = RaceGenderGroup.Where(c => c is not 0 and not uint.MaxValue).ToHashSet();
|
var rg = RaceGenderGroup.Where(c => c is not 0 and not uint.MaxValue).ToHashSet();
|
||||||
AddKnown(m2f, f2m);
|
AddKnown(m2f, f2m);
|
||||||
UnhandledRestrictedGear(m2f, f2m, false); // Set this to true to create a print of unassigned gear on launch.
|
UnhandledRestrictedGear(rg, m2f, f2m, false); // Set this to true to create a print of unassigned gear on launch.
|
||||||
return new Tuple<IReadOnlySet<uint>, IReadOnlyDictionary<uint, uint>, IReadOnlyDictionary<uint, uint>>(rg, m2f, f2m);
|
return new Tuple<IReadOnlySet<uint>, IReadOnlyDictionary<uint, uint>, IReadOnlyDictionary<uint, uint>>(rg, m2f, f2m);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Add all unknown restricted gear and pair it with emperor's new gear on start up.
|
// Add all unknown restricted gear and pair it with emperor's new gear on start up.
|
||||||
// Can also print unhandled items.
|
// Can also print unhandled items.
|
||||||
private void UnhandledRestrictedGear(Dictionary<uint, uint> m2f, Dictionary<uint, uint> f2m, bool print)
|
private void UnhandledRestrictedGear(IReadOnlySet<uint> rg, Dictionary<uint, uint> m2f, Dictionary<uint, uint> f2m, bool print)
|
||||||
{
|
{
|
||||||
if (print)
|
if (print)
|
||||||
PluginLog.Information("#### MALE ONLY ######");
|
PluginLog.Information("#### MALE ONLY ######");
|
||||||
|
|
@ -148,7 +148,7 @@ public sealed class RestrictedGear : DataSharer
|
||||||
|
|
||||||
foreach (var item in _items.Where(i => i.EquipRestriction > 3))
|
foreach (var item in _items.Where(i => i.EquipRestriction > 3))
|
||||||
{
|
{
|
||||||
if (RaceGenderSet.Contains((uint)item.ModelMain))
|
if (rg.Contains((uint)item.ModelMain))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
++unhandled;
|
++unhandled;
|
||||||
|
|
@ -409,6 +409,7 @@ public sealed class RestrictedGear : DataSharer
|
||||||
AddItem(m2f, f2m, 38254, 38258); // Valentione Emissary's Jacket <-> Valentione Emissary's Ruffled Dress
|
AddItem(m2f, f2m, 38254, 38258); // Valentione Emissary's Jacket <-> Valentione Emissary's Ruffled Dress
|
||||||
AddItem(m2f, f2m, 38255, 38259); // Valentione Emissary's Bottoms <-> Valentione Emissary's Culottes
|
AddItem(m2f, f2m, 38255, 38259); // Valentione Emissary's Bottoms <-> Valentione Emissary's Culottes
|
||||||
AddItem(m2f, f2m, 38256, 38260); // Valentione Emissary's Boots <-> Valentione Emissary's Boots
|
AddItem(m2f, f2m, 38256, 38260); // Valentione Emissary's Boots <-> Valentione Emissary's Boots
|
||||||
|
AddItem(m2f, f2m, 32393, 39302, false); // Edenmete Gown of Casting <- Gaia's Attire
|
||||||
}
|
}
|
||||||
|
|
||||||
// The racial starter sets are available for all 4 slots each,
|
// The racial starter sets are available for all 4 slots each,
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Penumbra.GameData.Enums
|
namespace Penumbra.GameData.Enums;
|
||||||
{
|
|
||||||
public enum FileType : byte
|
public enum FileType : byte
|
||||||
{
|
{
|
||||||
Unknown,
|
Unknown,
|
||||||
|
|
@ -42,4 +42,3 @@ namespace Penumbra.GameData.Enums
|
||||||
{ ".envb", FileType.Environment },
|
{ ".envb", FileType.Environment },
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -2,7 +2,7 @@ using System;
|
||||||
|
|
||||||
namespace Penumbra.GameData.Structs;
|
namespace Penumbra.GameData.Structs;
|
||||||
|
|
||||||
public readonly struct SetId : IComparable< SetId >
|
public readonly struct SetId : IComparable< SetId >, IEquatable<SetId>, IEquatable<ushort>
|
||||||
{
|
{
|
||||||
public readonly ushort Value;
|
public readonly ushort Value;
|
||||||
|
|
||||||
|
|
@ -15,6 +15,12 @@ public readonly struct SetId : IComparable< SetId >
|
||||||
public static explicit operator ushort( SetId id )
|
public static explicit operator ushort( SetId id )
|
||||||
=> id.Value;
|
=> id.Value;
|
||||||
|
|
||||||
|
public bool Equals(SetId other)
|
||||||
|
=> Value == other.Value;
|
||||||
|
|
||||||
|
public bool Equals(ushort other)
|
||||||
|
=> Value == other;
|
||||||
|
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
=> Value.ToString();
|
=> Value.ToString();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -103,6 +103,7 @@ public class Penumbra : IDalamudPlugin
|
||||||
|
|
||||||
Framework = new FrameworkManager(Dalamud.Framework, Log);
|
Framework = new FrameworkManager(Dalamud.Framework, Log);
|
||||||
CharacterUtility = new CharacterUtility();
|
CharacterUtility = new CharacterUtility();
|
||||||
|
|
||||||
Backup.CreateBackup( pluginInterface.ConfigDirectory, PenumbraBackupFiles() );
|
Backup.CreateBackup( pluginInterface.ConfigDirectory, PenumbraBackupFiles() );
|
||||||
Config = Configuration.Load();
|
Config = Configuration.Load();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue