mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 10:17:22 +01:00
Fixed some invalid identifications of customizations.
This commit is contained in:
parent
3a7209109a
commit
c26c76fa4d
4 changed files with 89 additions and 32 deletions
|
|
@ -139,6 +139,59 @@ namespace Penumbra.Game.Enums
|
|||
};
|
||||
}
|
||||
|
||||
public static string ToName( this Race race )
|
||||
{
|
||||
return race switch
|
||||
{
|
||||
Race.Midlander => "Midlander",
|
||||
Race.Highlander => "Highlander",
|
||||
Race.Elezen => "Elezen",
|
||||
Race.Lalafell => "Lalafell",
|
||||
Race.Miqote => "Miqo'te",
|
||||
Race.Roegadyn => "Roegadyn",
|
||||
Race.AuRa => "Au Ra",
|
||||
Race.Hrothgar => "Hrothgar",
|
||||
Race.Viera => "Viera",
|
||||
_ => throw new InvalidEnumArgumentException(),
|
||||
};
|
||||
}
|
||||
|
||||
public static string ToName( this Gender gender )
|
||||
{
|
||||
return gender switch
|
||||
{
|
||||
Gender.Male => "Male",
|
||||
Gender.Female => "Female",
|
||||
Gender.MaleNpc => "Male (NPC)",
|
||||
Gender.FemaleNpc => "Female (NPC)",
|
||||
_ => throw new InvalidEnumArgumentException(),
|
||||
};
|
||||
}
|
||||
|
||||
public static string ToName( this SubRace subRace )
|
||||
{
|
||||
return subRace switch
|
||||
{
|
||||
SubRace.Midlander => "Midlander",
|
||||
SubRace.Highlander => "Highlander",
|
||||
SubRace.Wildwood => "Wildwood",
|
||||
SubRace.Duskwright => "Duskwright",
|
||||
SubRace.Plainsfolk => "Plainsfolk",
|
||||
SubRace.Dunesfolk => "Dunesfolk",
|
||||
SubRace.SeekerOfTheSun => "Seeker Of The Sun",
|
||||
SubRace.KeeperOfTheMoon => "Keeper Of The Moon",
|
||||
SubRace.Seawolf => "Seawolf",
|
||||
SubRace.Hellsguard => "Hellsguard",
|
||||
SubRace.Raen => "Raen",
|
||||
SubRace.Xaela => "Xaela",
|
||||
SubRace.Hellion => "Hellion",
|
||||
SubRace.Lost => "Lost",
|
||||
SubRace.Rava => "Rava",
|
||||
SubRace.Veena => "Veena",
|
||||
_ => throw new InvalidEnumArgumentException(),
|
||||
};
|
||||
}
|
||||
|
||||
public static bool FitsRace( this SubRace subRace, Race race )
|
||||
=> subRace.ToRace() == race;
|
||||
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ namespace Penumbra.Game
|
|||
, { ObjectType.DemiHuman, new Regex[]{ new(@"chara/demihuman/d(?'id'\d{4})/obj/equipment/e(?'equip'\d{4})/texture/v(?'variant'\d{2})_d\k'id'e\k'equip'_(?'slot'[a-z]{3})(_[a-z])?_[a-z]\.tex") } }
|
||||
, { ObjectType.Accessory, new Regex[]{ new(@"chara/accessory/a(?'id'\d{4})/texture/v(?'variant'\d{2})_c(?'race'\d{4})a\k'id'_(?'slot'[a-z]{3})_[a-z]\.tex") } }
|
||||
, { ObjectType.Character, new Regex[]{ new(@"chara/human/c(?'race'\d{4})/obj/(?'type'[a-z]+)/(?'typeabr'[a-z])(?'id'\d{4})/texture/(?'minus'(--)?)(v(?'variant'\d{2})_)?c\k'race'\k'typeabr'\k'id'(_(?'slot'[a-z]{3}))?(_[a-z])?_[a-z]\.tex")
|
||||
, new(@"chara/human/c(?'race'\d{4})/obj/(?'type'[a-z]+)/(?'typeabr'[a-z])(?'id'\d{4})/texture")
|
||||
, new(@"chara/common/texture/skin(?'skin'.*)\.tex")
|
||||
, new(@"chara/common/texture/decal_(?'location'[a-z]+)/[-_]?decal_(?'id'\d+).tex") } } } }
|
||||
, { FileType.Model, new Dictionary< ObjectType, Regex[] >()
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ using Lumina.Excel.GeneratedSheets;
|
|||
using Penumbra.Game.Enums;
|
||||
using Penumbra.Util;
|
||||
using Action = Lumina.Excel.GeneratedSheets.Action;
|
||||
using Race = Penumbra.Game.Enums.Race;
|
||||
|
||||
namespace Penumbra.Game
|
||||
{
|
||||
|
|
@ -242,15 +243,17 @@ namespace Penumbra.Game
|
|||
FindWeapon( set, info );
|
||||
break;
|
||||
case ObjectType.Character:
|
||||
var (gender, race) = info.GenderRace.Split();
|
||||
var raceString = race != Race.Unknown ? race.ToName() + " " : "";
|
||||
var genderString = gender != Gender.Unknown ? gender.ToName() + " " : "Player ";
|
||||
if( info.CustomizationType == CustomizationType.Skin )
|
||||
{
|
||||
set[ "Customization: Player Skin" ] = null;
|
||||
set[ $"Customization: {raceString}{genderString}Skin Textures" ] = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
var (gender, race) = info.GenderRace.Split();
|
||||
var customizationString =
|
||||
$"Customization: {race} {gender}s {info.BodySlot} ({info.CustomizationType}) {info.PrimaryId}";
|
||||
$"Customization: {race} {gender} {info.BodySlot} ({info.CustomizationType}) {info.PrimaryId}";
|
||||
set[ customizationString ] = null;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -140,23 +140,23 @@ namespace Penumbra.UI
|
|||
|
||||
private static readonly (string, Race)[] Races = new[]
|
||||
{
|
||||
( "Midlander", Race.Midlander ),
|
||||
( "Highlander", Race.Highlander ),
|
||||
( "Elezen", Race.Elezen ),
|
||||
( "Miqo'te", Race.Miqote ),
|
||||
( "Roegadyn", Race.Roegadyn ),
|
||||
( "Lalafell", Race.Lalafell ),
|
||||
( "Au Ra", Race.AuRa ),
|
||||
( "Viera", Race.Viera ),
|
||||
( "Hrothgar", Race.Hrothgar ),
|
||||
( Race.Midlander.ToName(), Race.Midlander ),
|
||||
( Race.Highlander.ToName(), Race.Highlander ),
|
||||
( Race.Elezen.ToName(), Race.Elezen ),
|
||||
( Race.Miqote.ToName(), Race.Miqote ),
|
||||
( Race.Roegadyn.ToName(), Race.Roegadyn ),
|
||||
( Race.Lalafell.ToName(), Race.Lalafell ),
|
||||
( Race.AuRa.ToName(), Race.AuRa ),
|
||||
( Race.Viera.ToName(), Race.Viera ),
|
||||
( Race.Hrothgar.ToName(), Race.Hrothgar ),
|
||||
};
|
||||
|
||||
private static readonly (string, Gender)[] Genders = new[]
|
||||
{
|
||||
( "Male", Gender.Male ),
|
||||
( "Female", Gender.Female ),
|
||||
( "Male (NPC)", Gender.MaleNpc ),
|
||||
( "Female (NPC)", Gender.FemaleNpc ),
|
||||
( Gender.Male.ToName(), Gender.Male ),
|
||||
( Gender.Female.ToName(), Gender.Female ),
|
||||
( Gender.MaleNpc.ToName(), Gender.MaleNpc ),
|
||||
( Gender.FemaleNpc.ToName(), Gender.FemaleNpc ),
|
||||
};
|
||||
|
||||
private static readonly (string, ObjectType)[] ObjectTypes = new[]
|
||||
|
|
@ -179,22 +179,22 @@ namespace Penumbra.UI
|
|||
|
||||
private static readonly (string, SubRace)[] Subraces = new[]
|
||||
{
|
||||
( "Midlander", SubRace.Midlander ),
|
||||
( "Highlander", SubRace.Highlander ),
|
||||
( "Wildwood", SubRace.Wildwood ),
|
||||
( "Duskwright", SubRace.Duskwright ),
|
||||
( "Seeker Of The Sun", SubRace.SeekerOfTheSun ),
|
||||
( "Keeper Of The Moon", SubRace.KeeperOfTheMoon ),
|
||||
( "Seawolf", SubRace.Seawolf ),
|
||||
( "Hellsguard", SubRace.Hellsguard ),
|
||||
( "Plainsfolk", SubRace.Plainsfolk ),
|
||||
( "Dunesfolk", SubRace.Dunesfolk ),
|
||||
( "Raen", SubRace.Raen ),
|
||||
( "Xaela", SubRace.Xaela ),
|
||||
( "Rava", SubRace.Rava ),
|
||||
( "Veena", SubRace.Veena ),
|
||||
( "Hellion", SubRace.Hellion ),
|
||||
( "Lost", SubRace.Lost ),
|
||||
( SubRace.Midlander.ToName(), SubRace.Midlander ),
|
||||
( SubRace.Highlander.ToName(), SubRace.Highlander ),
|
||||
( SubRace.Wildwood.ToName(), SubRace.Wildwood ),
|
||||
( SubRace.Duskwright.ToName(), SubRace.Duskwright ),
|
||||
( SubRace.SeekerOfTheSun.ToName(), SubRace.SeekerOfTheSun ),
|
||||
( SubRace.KeeperOfTheMoon.ToName(), SubRace.KeeperOfTheMoon ),
|
||||
( SubRace.Seawolf.ToName(), SubRace.Seawolf ),
|
||||
( SubRace.Hellsguard.ToName(), SubRace.Hellsguard ),
|
||||
( SubRace.Plainsfolk.ToName(), SubRace.Plainsfolk ),
|
||||
( SubRace.Dunesfolk.ToName(), SubRace.Dunesfolk ),
|
||||
( SubRace.Raen.ToName(), SubRace.Raen ),
|
||||
( SubRace.Xaela.ToName(), SubRace.Xaela ),
|
||||
( SubRace.Rava.ToName(), SubRace.Rava ),
|
||||
( SubRace.Veena.ToName(), SubRace.Veena ),
|
||||
( SubRace.Hellion.ToName(), SubRace.Hellion ),
|
||||
( SubRace.Lost.ToName(), SubRace.Lost ),
|
||||
};
|
||||
|
||||
private static readonly (string, RspAttribute)[] RspAttributes = new[]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue