mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +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 )
|
public static bool FitsRace( this SubRace subRace, Race race )
|
||||||
=> subRace.ToRace() == 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.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.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")
|
, { 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/skin(?'skin'.*)\.tex")
|
||||||
, new(@"chara/common/texture/decal_(?'location'[a-z]+)/[-_]?decal_(?'id'\d+).tex") } } } }
|
, new(@"chara/common/texture/decal_(?'location'[a-z]+)/[-_]?decal_(?'id'\d+).tex") } } } }
|
||||||
, { FileType.Model, new Dictionary< ObjectType, Regex[] >()
|
, { FileType.Model, new Dictionary< ObjectType, Regex[] >()
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ using Lumina.Excel.GeneratedSheets;
|
||||||
using Penumbra.Game.Enums;
|
using Penumbra.Game.Enums;
|
||||||
using Penumbra.Util;
|
using Penumbra.Util;
|
||||||
using Action = Lumina.Excel.GeneratedSheets.Action;
|
using Action = Lumina.Excel.GeneratedSheets.Action;
|
||||||
|
using Race = Penumbra.Game.Enums.Race;
|
||||||
|
|
||||||
namespace Penumbra.Game
|
namespace Penumbra.Game
|
||||||
{
|
{
|
||||||
|
|
@ -242,15 +243,17 @@ namespace Penumbra.Game
|
||||||
FindWeapon( set, info );
|
FindWeapon( set, info );
|
||||||
break;
|
break;
|
||||||
case ObjectType.Character:
|
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 )
|
if( info.CustomizationType == CustomizationType.Skin )
|
||||||
{
|
{
|
||||||
set[ "Customization: Player Skin" ] = null;
|
set[ $"Customization: {raceString}{genderString}Skin Textures" ] = null;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var (gender, race) = info.GenderRace.Split();
|
|
||||||
var customizationString =
|
var customizationString =
|
||||||
$"Customization: {race} {gender}s {info.BodySlot} ({info.CustomizationType}) {info.PrimaryId}";
|
$"Customization: {race} {gender} {info.BodySlot} ({info.CustomizationType}) {info.PrimaryId}";
|
||||||
set[ customizationString ] = null;
|
set[ customizationString ] = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -140,23 +140,23 @@ namespace Penumbra.UI
|
||||||
|
|
||||||
private static readonly (string, Race)[] Races = new[]
|
private static readonly (string, Race)[] Races = new[]
|
||||||
{
|
{
|
||||||
( "Midlander", Race.Midlander ),
|
( Race.Midlander.ToName(), Race.Midlander ),
|
||||||
( "Highlander", Race.Highlander ),
|
( Race.Highlander.ToName(), Race.Highlander ),
|
||||||
( "Elezen", Race.Elezen ),
|
( Race.Elezen.ToName(), Race.Elezen ),
|
||||||
( "Miqo'te", Race.Miqote ),
|
( Race.Miqote.ToName(), Race.Miqote ),
|
||||||
( "Roegadyn", Race.Roegadyn ),
|
( Race.Roegadyn.ToName(), Race.Roegadyn ),
|
||||||
( "Lalafell", Race.Lalafell ),
|
( Race.Lalafell.ToName(), Race.Lalafell ),
|
||||||
( "Au Ra", Race.AuRa ),
|
( Race.AuRa.ToName(), Race.AuRa ),
|
||||||
( "Viera", Race.Viera ),
|
( Race.Viera.ToName(), Race.Viera ),
|
||||||
( "Hrothgar", Race.Hrothgar ),
|
( Race.Hrothgar.ToName(), Race.Hrothgar ),
|
||||||
};
|
};
|
||||||
|
|
||||||
private static readonly (string, Gender)[] Genders = new[]
|
private static readonly (string, Gender)[] Genders = new[]
|
||||||
{
|
{
|
||||||
( "Male", Gender.Male ),
|
( Gender.Male.ToName(), Gender.Male ),
|
||||||
( "Female", Gender.Female ),
|
( Gender.Female.ToName(), Gender.Female ),
|
||||||
( "Male (NPC)", Gender.MaleNpc ),
|
( Gender.MaleNpc.ToName(), Gender.MaleNpc ),
|
||||||
( "Female (NPC)", Gender.FemaleNpc ),
|
( Gender.FemaleNpc.ToName(), Gender.FemaleNpc ),
|
||||||
};
|
};
|
||||||
|
|
||||||
private static readonly (string, ObjectType)[] ObjectTypes = new[]
|
private static readonly (string, ObjectType)[] ObjectTypes = new[]
|
||||||
|
|
@ -179,22 +179,22 @@ namespace Penumbra.UI
|
||||||
|
|
||||||
private static readonly (string, SubRace)[] Subraces = new[]
|
private static readonly (string, SubRace)[] Subraces = new[]
|
||||||
{
|
{
|
||||||
( "Midlander", SubRace.Midlander ),
|
( SubRace.Midlander.ToName(), SubRace.Midlander ),
|
||||||
( "Highlander", SubRace.Highlander ),
|
( SubRace.Highlander.ToName(), SubRace.Highlander ),
|
||||||
( "Wildwood", SubRace.Wildwood ),
|
( SubRace.Wildwood.ToName(), SubRace.Wildwood ),
|
||||||
( "Duskwright", SubRace.Duskwright ),
|
( SubRace.Duskwright.ToName(), SubRace.Duskwright ),
|
||||||
( "Seeker Of The Sun", SubRace.SeekerOfTheSun ),
|
( SubRace.SeekerOfTheSun.ToName(), SubRace.SeekerOfTheSun ),
|
||||||
( "Keeper Of The Moon", SubRace.KeeperOfTheMoon ),
|
( SubRace.KeeperOfTheMoon.ToName(), SubRace.KeeperOfTheMoon ),
|
||||||
( "Seawolf", SubRace.Seawolf ),
|
( SubRace.Seawolf.ToName(), SubRace.Seawolf ),
|
||||||
( "Hellsguard", SubRace.Hellsguard ),
|
( SubRace.Hellsguard.ToName(), SubRace.Hellsguard ),
|
||||||
( "Plainsfolk", SubRace.Plainsfolk ),
|
( SubRace.Plainsfolk.ToName(), SubRace.Plainsfolk ),
|
||||||
( "Dunesfolk", SubRace.Dunesfolk ),
|
( SubRace.Dunesfolk.ToName(), SubRace.Dunesfolk ),
|
||||||
( "Raen", SubRace.Raen ),
|
( SubRace.Raen.ToName(), SubRace.Raen ),
|
||||||
( "Xaela", SubRace.Xaela ),
|
( SubRace.Xaela.ToName(), SubRace.Xaela ),
|
||||||
( "Rava", SubRace.Rava ),
|
( SubRace.Rava.ToName(), SubRace.Rava ),
|
||||||
( "Veena", SubRace.Veena ),
|
( SubRace.Veena.ToName(), SubRace.Veena ),
|
||||||
( "Hellion", SubRace.Hellion ),
|
( SubRace.Hellion.ToName(), SubRace.Hellion ),
|
||||||
( "Lost", SubRace.Lost ),
|
( SubRace.Lost.ToName(), SubRace.Lost ),
|
||||||
};
|
};
|
||||||
|
|
||||||
private static readonly (string, RspAttribute)[] RspAttributes = new[]
|
private static readonly (string, RspAttribute)[] RspAttributes = new[]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue