mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2025-12-12 10:17:23 +01:00
Fix some data issues. 0.1.3.1.
This commit is contained in:
parent
579ef97dcc
commit
9ec597cf2a
7 changed files with 197 additions and 201 deletions
|
|
@ -51,7 +51,7 @@ namespace Glamourer
|
|||
=> new(sheet.First(), "Nothing", slot);
|
||||
|
||||
static Item EmptyNpc(EquipSlot slot)
|
||||
=> new(new Lumina.Excel.GeneratedSheets.Item() { ModelMain = 9903 }, "Smallclothes (NPC)", slot);
|
||||
=> new(new Lumina.Excel.GeneratedSheets.Item() { ModelMain = 9903, RowId = 1 }, "Smallclothes (NPC)", slot);
|
||||
|
||||
_itemsBySlot = new Dictionary<EquipSlot, List<Item>>()
|
||||
{
|
||||
|
|
|
|||
BIN
Glamourer.zip
BIN
Glamourer.zip
Binary file not shown.
|
|
@ -5,8 +5,8 @@
|
|||
<PlatformTarget>x64</PlatformTarget>
|
||||
<RootNamespace>Glamourer</RootNamespace>
|
||||
<AssemblyName>Glamourer</AssemblyName>
|
||||
<FileVersion>0.1.3.0</FileVersion>
|
||||
<AssemblyVersion>0.1.3.0</AssemblyVersion>
|
||||
<FileVersion>0.1.3.1</FileVersion>
|
||||
<AssemblyVersion>0.1.3.1</AssemblyVersion>
|
||||
<Company>SoftOtter</Company>
|
||||
<Product>Glamourer</Product>
|
||||
<Copyright>Copyright © 2020</Copyright>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
"Description": "Adds functionality to change and store appearance of players, customization and equip. Requires Penumbra to be installed and activated to work. Can also add preview options to the Changed Items tab for Penumbra.",
|
||||
"Tags": [ "Appearance", "Glamour", "Race", "Outfit", "Armor", "Clothes", "Skins", "Customization", "Design", "Character" ],
|
||||
"InternalName": "Glamourer",
|
||||
"AssemblyVersion": "0.1.3.0",
|
||||
"AssemblyVersion": "0.1.3.1",
|
||||
"RepoUrl": "https://github.com/Ottermandias/Glamourer",
|
||||
"ApplicableVersion": "any",
|
||||
"DalamudApiLevel": 8,
|
||||
|
|
|
|||
|
|
@ -1,9 +1,6 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
using System.Reflection;
|
||||
using Dalamud.Game.ClientState.Objects.Enums;
|
||||
using Dalamud.Game.ClientState.Objects.SubKinds;
|
||||
using Dalamud.Game.ClientState.Objects.Types;
|
||||
using Dalamud.Interface;
|
||||
using Dalamud.Logging;
|
||||
|
|
@ -11,7 +8,6 @@ using Glamourer.Customization;
|
|||
using Glamourer.Designs;
|
||||
using Glamourer.FileSystem;
|
||||
using ImGuiNET;
|
||||
using Penumbra.GameData.Structs;
|
||||
using Penumbra.PlayerWatch;
|
||||
|
||||
namespace Glamourer.Gui
|
||||
|
|
|
|||
|
|
@ -1,14 +1,12 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using ImGuiNET;
|
||||
using Lumina.Text;
|
||||
using Penumbra.GameData.Enums;
|
||||
using Penumbra.GameData.Structs;
|
||||
using Penumbra.PlayerWatch;
|
||||
|
||||
namespace Glamourer.Gui
|
||||
{
|
||||
namespace Glamourer.Gui;
|
||||
|
||||
internal partial class Interface
|
||||
{
|
||||
private bool DrawStainSelector(ComboWithFilter<Stain> stainCombo, EquipSlot slot, StainId stainIdx)
|
||||
|
|
@ -40,7 +38,6 @@ namespace Glamourer.Gui
|
|||
Glamourer.RevertableDesigns.Add(_player);
|
||||
newStain.Write(_player.Address, slot);
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
private bool DrawGlobalStainSelector(ComboWithFilter<Stain> stainCombo)
|
||||
|
|
@ -69,25 +66,25 @@ namespace Glamourer.Gui
|
|||
{
|
||||
if (key is EquipSlot.OffHand && _selection?.Data.Equipment.OffHand.Set.Value == 0)
|
||||
continue;
|
||||
|
||||
_selection?.Data.WriteStain(key, newStain.RowIndex);
|
||||
}
|
||||
|
||||
return _inDesignMode;
|
||||
}
|
||||
|
||||
Glamourer.RevertableDesigns.Add(_player);
|
||||
foreach (var key in GetEquipSlotNames().Keys)
|
||||
{
|
||||
newStain.Write(_player.Address, key);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private bool DrawItemSelector(ComboWithFilter<Item> equipCombo, Lumina.Excel.GeneratedSheets.Item item, EquipSlot slot = EquipSlot.Unknown)
|
||||
private bool DrawItemSelector(ComboWithFilter<Item> equipCombo, EquipItem item, EquipSlot slot = EquipSlot.Unknown)
|
||||
{
|
||||
var currentName = item.Name.ToString();
|
||||
var change = equipCombo.Draw(currentName, out var newItem, _itemComboWidth) && newItem.Base.RowId != item.RowId;
|
||||
if (!change && !ReferenceEquals(item, SmallClothes))
|
||||
var currentName = item.Name;
|
||||
var change = equipCombo.Draw(currentName, out var newItem, _itemComboWidth) && newItem.Base.RowId != item.Id;
|
||||
if (!change && item.Name != SmallClothes.Name)
|
||||
{
|
||||
ImGuiCustom.HoverTooltip("Right-click to clear.");
|
||||
if (ImGui.IsItemClicked(ImGuiMouseButton.Right))
|
||||
|
|
@ -107,7 +104,6 @@ namespace Glamourer.Gui
|
|||
Glamourer.RevertableDesigns.Add(_player);
|
||||
newItem.Write(_player.Address);
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
private static bool DrawCheckbox(CharacterEquipMask flag, ref CharacterEquipMask mask)
|
||||
|
|
@ -125,11 +121,11 @@ namespace Glamourer.Gui
|
|||
return ret;
|
||||
}
|
||||
|
||||
private static readonly Lumina.Excel.GeneratedSheets.Item SmallClothes = new(){ Name = new SeString("Nothing"), RowId = 0 };
|
||||
private static readonly Lumina.Excel.GeneratedSheets.Item SmallClothesNpc = new(){ Name = new SeString("Smallclothes (NPC)"), RowId = 1 };
|
||||
private static readonly Lumina.Excel.GeneratedSheets.Item Unknown = new(){ Name = new SeString("Unknown"), RowId = 2 };
|
||||
private static readonly EquipItem SmallClothes = new("Nothing", 0, 0, 0, 0, 0, 0, EquipSlot.Unknown);
|
||||
private static readonly EquipItem SmallClothesNpc = new("Smallclothes (NPC)", 1, 0, 9903, 0, 1, 0, EquipSlot.Unknown);
|
||||
private static readonly EquipItem Unknown = new("Unknown", 3, 0, 0, 0, 0, 0, EquipSlot.Unknown);
|
||||
|
||||
private Lumina.Excel.GeneratedSheets.Item Identify(SetId set, WeaponType weapon, ushort variant, EquipSlot slot)
|
||||
private EquipItem Identify(SetId set, WeaponType weapon, ushort variant, EquipSlot slot)
|
||||
{
|
||||
return (uint)set switch
|
||||
{
|
||||
|
|
@ -139,11 +135,11 @@ namespace Glamourer.Gui
|
|||
};
|
||||
}
|
||||
|
||||
private Lumina.Excel.GeneratedSheets.Item ToItem(IEnumerable<EquipItem> items)
|
||||
private static EquipItem ToItem(IEnumerable<EquipItem> items)
|
||||
{
|
||||
var item = items.FirstOrDefault();
|
||||
if (item.Valid)
|
||||
return Dalamud.GameData.GetExcelSheet<Lumina.Excel.GeneratedSheets.Item>()!.GetRow(item.Id) ?? Unknown;
|
||||
return item;
|
||||
|
||||
return Unknown;
|
||||
}
|
||||
|
|
@ -155,6 +151,9 @@ namespace Glamourer.Gui
|
|||
var ret = DrawStainSelector(stainCombo, slot, equip.Stain);
|
||||
ImGui.SameLine();
|
||||
var item = Identify(equip.Set, new WeaponType(), equip.Variant, slot);
|
||||
if (item.Name == Unknown.Name)
|
||||
item = new EquipItem($"Unknown ({item.ModelId.Value}, {item.Variant})", 0, 0, equip.Set, 0, equip.Variant,
|
||||
FullEquipType.Unknown, slot);
|
||||
ret |= DrawItemSelector(equipCombo, item, slot);
|
||||
|
||||
return ret;
|
||||
|
|
@ -175,6 +174,8 @@ namespace Glamourer.Gui
|
|||
var ret = DrawStainSelector(stainCombo, slot, weapon.Stain);
|
||||
ImGui.SameLine();
|
||||
var item = Identify(weapon.Set, weapon.Type, weapon.Variant, slot);
|
||||
if (item.Name == Unknown.Name)
|
||||
item = new EquipItem($"Unknown ({weapon.Set.Value}, {weapon.Type.Value}, {weapon.Variant})", 0, 0, weapon.Set, weapon.Type, (byte) weapon.Variant, FullEquipType.Unknown, slot);
|
||||
ret |= DrawItemSelector(equipCombo, item, slot);
|
||||
|
||||
return ret;
|
||||
|
|
@ -234,4 +235,3 @@ namespace Glamourer.Gui
|
|||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@
|
|||
"Description": "Adds functionality to change and store appearance of players, customization and equip. Requires Penumbra to be installed and activated to work. Can also add preview options to the Changed Items tab for Penumbra.",
|
||||
"Tags": [ "Appearance", "Glamour", "Race", "Outfit", "Armor", "Clothes", "Skins", "Customization", "Design", "Character" ],
|
||||
"InternalName": "Glamourer",
|
||||
"AssemblyVersion": "0.1.3.0",
|
||||
"TestingAssemblyVersion": "0.1.3.0",
|
||||
"AssemblyVersion": "0.1.3.1",
|
||||
"TestingAssemblyVersion": "0.1.3.1",
|
||||
"RepoUrl": "https://github.com/Ottermandias/Glamourer",
|
||||
"ApplicableVersion": "any",
|
||||
"DalamudApiLevel": 8,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue