mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 10:17:22 +01:00
Split special collections.
This commit is contained in:
parent
ef418b6821
commit
1d6d696cb7
9 changed files with 478 additions and 224 deletions
|
|
@ -202,7 +202,7 @@ public static class RaceEnumExtensions
|
|||
SubRace.Midlander => "Midlander",
|
||||
SubRace.Highlander => "Highlander",
|
||||
SubRace.Wildwood => "Wildwood",
|
||||
SubRace.Duskwight => "Duskwright",
|
||||
SubRace.Duskwight => "Duskwight",
|
||||
SubRace.Plainsfolk => "Plainsfolk",
|
||||
SubRace.Dunesfolk => "Dunesfolk",
|
||||
SubRace.SeekerOfTheSun => "Seeker Of The Sun",
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@ public partial class ModCollection
|
|||
public static string ActiveCollectionFile
|
||||
=> Path.Combine( Dalamud.PluginInterface.ConfigDirectory.FullName, "active_collections.json" );
|
||||
|
||||
// Load default, current and character collections from config.
|
||||
// Load default, current, special, and character collections from config.
|
||||
// Then create caches. If a collection does not exist anymore, reset it to an appropriate default.
|
||||
private void LoadCollections()
|
||||
{
|
||||
|
|
@ -246,7 +246,7 @@ public partial class ModCollection
|
|||
}
|
||||
|
||||
// Load special collections.
|
||||
foreach( var type in CollectionTypeExtensions.Special )
|
||||
foreach( var (type, name, _) in CollectionTypeExtensions.Special )
|
||||
{
|
||||
var typeName = jObject[ type.ToString() ]?.ToObject< string >();
|
||||
if( typeName != null )
|
||||
|
|
@ -254,7 +254,7 @@ public partial class ModCollection
|
|||
var idx = GetIndexForCollectionName( typeName );
|
||||
if( idx < 0 )
|
||||
{
|
||||
Penumbra.Log.Error( $"Last choice of {type.ToName()} Collection {typeName} is not available, removed." );
|
||||
Penumbra.Log.Error( $"Last choice of {name} Collection {typeName} is not available, removed." );
|
||||
configChanged = true;
|
||||
}
|
||||
else
|
||||
|
|
@ -288,6 +288,30 @@ public partial class ModCollection
|
|||
}
|
||||
}
|
||||
|
||||
// Migrate ungendered collections to Male and Female for 0.5.9.0.
|
||||
public static void MigrateUngenderedCollections()
|
||||
{
|
||||
if( !ReadActiveCollections( out var jObject ) )
|
||||
return;
|
||||
|
||||
foreach( var (type, _, _) in CollectionTypeExtensions.Special.Where( t => t.Item2.StartsWith( "Male " ) ) )
|
||||
{
|
||||
var oldName = type.ToString()[ 5.. ];
|
||||
var value = jObject[oldName];
|
||||
if( value == null )
|
||||
continue;
|
||||
|
||||
jObject.Remove( oldName );
|
||||
jObject.Add( "Male" + oldName, value );
|
||||
jObject.Add( "Female" + oldName, value );
|
||||
}
|
||||
|
||||
using var stream = File.Open( ActiveCollectionFile, FileMode.Truncate );
|
||||
using var writer = new StreamWriter( stream );
|
||||
using var j = new JsonTextWriter( writer );
|
||||
jObject.WriteTo( j );
|
||||
}
|
||||
|
||||
|
||||
public void SaveActiveCollections()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8,40 +8,91 @@ public enum CollectionType : byte
|
|||
{
|
||||
// Special Collections
|
||||
Yourself = 0,
|
||||
PlayerCharacter,
|
||||
NonPlayerCharacter,
|
||||
Midlander,
|
||||
Highlander,
|
||||
Wildwood,
|
||||
Duskwight,
|
||||
Plainsfolk,
|
||||
Dunesfolk,
|
||||
SeekerOfTheSun,
|
||||
KeeperOfTheMoon,
|
||||
Seawolf,
|
||||
Hellsguard,
|
||||
Raen,
|
||||
Xaela,
|
||||
Helion,
|
||||
Lost,
|
||||
Rava,
|
||||
Veena,
|
||||
MidlanderNpc,
|
||||
HighlanderNpc,
|
||||
WildwoodNpc,
|
||||
DuskwightNpc,
|
||||
PlainsfolkNpc,
|
||||
DunesfolkNpc,
|
||||
SeekerOfTheSunNpc,
|
||||
KeeperOfTheMoonNpc,
|
||||
SeawolfNpc,
|
||||
HellsguardNpc,
|
||||
RaenNpc,
|
||||
XaelaNpc,
|
||||
HelionNpc,
|
||||
LostNpc,
|
||||
RavaNpc,
|
||||
VeenaNpc,
|
||||
|
||||
MalePlayerCharacter,
|
||||
FemalePlayerCharacter,
|
||||
MaleNonPlayerCharacter,
|
||||
FemaleNonPlayerCharacter,
|
||||
|
||||
MaleMidlander,
|
||||
FemaleMidlander,
|
||||
MaleHighlander,
|
||||
FemaleHighlander,
|
||||
|
||||
MaleWildwood,
|
||||
FemaleWildwood,
|
||||
MaleDuskwight,
|
||||
FemaleDuskwight,
|
||||
|
||||
MalePlainsfolk,
|
||||
FemalePlainsfolk,
|
||||
MaleDunesfolk,
|
||||
FemaleDunesfolk,
|
||||
|
||||
MaleSeekerOfTheSun,
|
||||
FemaleSeekerOfTheSun,
|
||||
MaleKeeperOfTheMoon,
|
||||
FemaleKeeperOfTheMoon,
|
||||
|
||||
MaleSeawolf,
|
||||
FemaleSeawolf,
|
||||
MaleHellsguard,
|
||||
FemaleHellsguard,
|
||||
|
||||
MaleRaen,
|
||||
FemaleRaen,
|
||||
MaleXaela,
|
||||
FemaleXaela,
|
||||
|
||||
MaleHelion,
|
||||
FemaleHelion,
|
||||
MaleLost,
|
||||
FemaleLost,
|
||||
|
||||
MaleRava,
|
||||
FemaleRava,
|
||||
MaleVeena,
|
||||
FemaleVeena,
|
||||
|
||||
MaleMidlanderNpc,
|
||||
FemaleMidlanderNpc,
|
||||
MaleHighlanderNpc,
|
||||
FemaleHighlanderNpc,
|
||||
|
||||
MaleWildwoodNpc,
|
||||
FemaleWildwoodNpc,
|
||||
MaleDuskwightNpc,
|
||||
FemaleDuskwightNpc,
|
||||
|
||||
MalePlainsfolkNpc,
|
||||
FemalePlainsfolkNpc,
|
||||
MaleDunesfolkNpc,
|
||||
FemaleDunesfolkNpc,
|
||||
|
||||
MaleSeekerOfTheSunNpc,
|
||||
FemaleSeekerOfTheSunNpc,
|
||||
MaleKeeperOfTheMoonNpc,
|
||||
FemaleKeeperOfTheMoonNpc,
|
||||
|
||||
MaleSeawolfNpc,
|
||||
FemaleSeawolfNpc,
|
||||
MaleHellsguardNpc,
|
||||
FemaleHellsguardNpc,
|
||||
|
||||
MaleRaenNpc,
|
||||
FemaleRaenNpc,
|
||||
MaleXaelaNpc,
|
||||
FemaleXaelaNpc,
|
||||
|
||||
MaleHelionNpc,
|
||||
FemaleHelionNpc,
|
||||
MaleLostNpc,
|
||||
FemaleLostNpc,
|
||||
|
||||
MaleRavaNpc,
|
||||
FemaleRavaNpc,
|
||||
MaleVeenaNpc,
|
||||
FemaleVeenaNpc,
|
||||
|
||||
Inactive, // A collection was added or removed
|
||||
Default, // The default collection was changed
|
||||
|
|
@ -55,52 +106,190 @@ public static class CollectionTypeExtensions
|
|||
public static bool IsSpecial( this CollectionType collectionType )
|
||||
=> collectionType is >= CollectionType.Yourself and < CollectionType.Inactive;
|
||||
|
||||
public static readonly CollectionType[] Special = Enum.GetValues< CollectionType >().Where( IsSpecial ).ToArray();
|
||||
public static readonly (CollectionType, string, string)[] Special = Enum.GetValues< CollectionType >()
|
||||
.Where( IsSpecial )
|
||||
.Select( s => ( s, s.ToName(), s.ToDescription() ) )
|
||||
.ToArray();
|
||||
|
||||
public static CollectionType FromParts( Gender gender, bool npc )
|
||||
{
|
||||
gender = gender switch
|
||||
{
|
||||
Gender.MaleNpc => Gender.Male,
|
||||
Gender.FemaleNpc => Gender.Female,
|
||||
_ => gender,
|
||||
};
|
||||
|
||||
return ( gender, npc ) switch
|
||||
{
|
||||
(Gender.Male, false) => CollectionType.MalePlayerCharacter,
|
||||
(Gender.Female, false) => CollectionType.FemalePlayerCharacter,
|
||||
(Gender.Male, true) => CollectionType.MaleNonPlayerCharacter,
|
||||
(Gender.Female, true) => CollectionType.FemaleNonPlayerCharacter,
|
||||
_ => CollectionType.Inactive,
|
||||
};
|
||||
}
|
||||
|
||||
public static CollectionType FromParts( SubRace race, Gender gender, bool npc )
|
||||
{
|
||||
gender = gender switch
|
||||
{
|
||||
Gender.MaleNpc => Gender.Male,
|
||||
Gender.FemaleNpc => Gender.Female,
|
||||
_ => gender,
|
||||
};
|
||||
|
||||
return ( race, gender, npc ) switch
|
||||
{
|
||||
(SubRace.Midlander, Gender.Male, false) => CollectionType.MaleMidlander,
|
||||
(SubRace.Highlander, Gender.Male, false) => CollectionType.MaleHighlander,
|
||||
(SubRace.Wildwood, Gender.Male, false) => CollectionType.MaleWildwood,
|
||||
(SubRace.Duskwight, Gender.Male, false) => CollectionType.MaleDuskwight,
|
||||
(SubRace.Plainsfolk, Gender.Male, false) => CollectionType.MalePlainsfolk,
|
||||
(SubRace.Dunesfolk, Gender.Male, false) => CollectionType.MaleDunesfolk,
|
||||
(SubRace.SeekerOfTheSun, Gender.Male, false) => CollectionType.MaleSeekerOfTheSun,
|
||||
(SubRace.KeeperOfTheMoon, Gender.Male, false) => CollectionType.MaleKeeperOfTheMoon,
|
||||
(SubRace.Seawolf, Gender.Male, false) => CollectionType.MaleSeawolf,
|
||||
(SubRace.Hellsguard, Gender.Male, false) => CollectionType.MaleHellsguard,
|
||||
(SubRace.Raen, Gender.Male, false) => CollectionType.MaleRaen,
|
||||
(SubRace.Xaela, Gender.Male, false) => CollectionType.MaleXaela,
|
||||
(SubRace.Helion, Gender.Male, false) => CollectionType.MaleHelion,
|
||||
(SubRace.Lost, Gender.Male, false) => CollectionType.MaleLost,
|
||||
(SubRace.Rava, Gender.Male, false) => CollectionType.MaleRava,
|
||||
(SubRace.Veena, Gender.Male, false) => CollectionType.MaleVeena,
|
||||
|
||||
(SubRace.Midlander, Gender.Female, false) => CollectionType.FemaleMidlander,
|
||||
(SubRace.Highlander, Gender.Female, false) => CollectionType.FemaleHighlander,
|
||||
(SubRace.Wildwood, Gender.Female, false) => CollectionType.FemaleWildwood,
|
||||
(SubRace.Duskwight, Gender.Female, false) => CollectionType.FemaleDuskwight,
|
||||
(SubRace.Plainsfolk, Gender.Female, false) => CollectionType.FemalePlainsfolk,
|
||||
(SubRace.Dunesfolk, Gender.Female, false) => CollectionType.FemaleDunesfolk,
|
||||
(SubRace.SeekerOfTheSun, Gender.Female, false) => CollectionType.FemaleSeekerOfTheSun,
|
||||
(SubRace.KeeperOfTheMoon, Gender.Female, false) => CollectionType.FemaleKeeperOfTheMoon,
|
||||
(SubRace.Seawolf, Gender.Female, false) => CollectionType.FemaleSeawolf,
|
||||
(SubRace.Hellsguard, Gender.Female, false) => CollectionType.FemaleHellsguard,
|
||||
(SubRace.Raen, Gender.Female, false) => CollectionType.FemaleRaen,
|
||||
(SubRace.Xaela, Gender.Female, false) => CollectionType.FemaleXaela,
|
||||
(SubRace.Helion, Gender.Female, false) => CollectionType.FemaleHelion,
|
||||
(SubRace.Lost, Gender.Female, false) => CollectionType.FemaleLost,
|
||||
(SubRace.Rava, Gender.Female, false) => CollectionType.FemaleRava,
|
||||
(SubRace.Veena, Gender.Female, false) => CollectionType.FemaleVeena,
|
||||
|
||||
(SubRace.Midlander, Gender.Male, true) => CollectionType.MaleMidlanderNpc,
|
||||
(SubRace.Highlander, Gender.Male, true) => CollectionType.MaleHighlanderNpc,
|
||||
(SubRace.Wildwood, Gender.Male, true) => CollectionType.MaleWildwoodNpc,
|
||||
(SubRace.Duskwight, Gender.Male, true) => CollectionType.MaleDuskwightNpc,
|
||||
(SubRace.Plainsfolk, Gender.Male, true) => CollectionType.MalePlainsfolkNpc,
|
||||
(SubRace.Dunesfolk, Gender.Male, true) => CollectionType.MaleDunesfolkNpc,
|
||||
(SubRace.SeekerOfTheSun, Gender.Male, true) => CollectionType.MaleSeekerOfTheSunNpc,
|
||||
(SubRace.KeeperOfTheMoon, Gender.Male, true) => CollectionType.MaleKeeperOfTheMoonNpc,
|
||||
(SubRace.Seawolf, Gender.Male, true) => CollectionType.MaleSeawolfNpc,
|
||||
(SubRace.Hellsguard, Gender.Male, true) => CollectionType.MaleHellsguardNpc,
|
||||
(SubRace.Raen, Gender.Male, true) => CollectionType.MaleRaenNpc,
|
||||
(SubRace.Xaela, Gender.Male, true) => CollectionType.MaleXaelaNpc,
|
||||
(SubRace.Helion, Gender.Male, true) => CollectionType.MaleHelionNpc,
|
||||
(SubRace.Lost, Gender.Male, true) => CollectionType.MaleLostNpc,
|
||||
(SubRace.Rava, Gender.Male, true) => CollectionType.MaleRavaNpc,
|
||||
(SubRace.Veena, Gender.Male, true) => CollectionType.MaleVeenaNpc,
|
||||
|
||||
(SubRace.Midlander, Gender.Female, true) => CollectionType.FemaleMidlanderNpc,
|
||||
(SubRace.Highlander, Gender.Female, true) => CollectionType.FemaleHighlanderNpc,
|
||||
(SubRace.Wildwood, Gender.Female, true) => CollectionType.FemaleWildwoodNpc,
|
||||
(SubRace.Duskwight, Gender.Female, true) => CollectionType.FemaleDuskwightNpc,
|
||||
(SubRace.Plainsfolk, Gender.Female, true) => CollectionType.FemalePlainsfolkNpc,
|
||||
(SubRace.Dunesfolk, Gender.Female, true) => CollectionType.FemaleDunesfolkNpc,
|
||||
(SubRace.SeekerOfTheSun, Gender.Female, true) => CollectionType.FemaleSeekerOfTheSunNpc,
|
||||
(SubRace.KeeperOfTheMoon, Gender.Female, true) => CollectionType.FemaleKeeperOfTheMoonNpc,
|
||||
(SubRace.Seawolf, Gender.Female, true) => CollectionType.FemaleSeawolfNpc,
|
||||
(SubRace.Hellsguard, Gender.Female, true) => CollectionType.FemaleHellsguardNpc,
|
||||
(SubRace.Raen, Gender.Female, true) => CollectionType.FemaleRaenNpc,
|
||||
(SubRace.Xaela, Gender.Female, true) => CollectionType.FemaleXaelaNpc,
|
||||
(SubRace.Helion, Gender.Female, true) => CollectionType.FemaleHelionNpc,
|
||||
(SubRace.Lost, Gender.Female, true) => CollectionType.FemaleLostNpc,
|
||||
(SubRace.Rava, Gender.Female, true) => CollectionType.FemaleRavaNpc,
|
||||
(SubRace.Veena, Gender.Female, true) => CollectionType.FemaleVeenaNpc,
|
||||
_ => CollectionType.Inactive,
|
||||
};
|
||||
}
|
||||
|
||||
public static string ToName( this CollectionType collectionType )
|
||||
=> collectionType switch
|
||||
{
|
||||
CollectionType.Yourself => "Your Character",
|
||||
CollectionType.PlayerCharacter => "Player Characters",
|
||||
CollectionType.NonPlayerCharacter => "Non-Player Characters",
|
||||
CollectionType.Midlander => SubRace.Midlander.ToName(),
|
||||
CollectionType.Highlander => SubRace.Highlander.ToName(),
|
||||
CollectionType.Wildwood => SubRace.Wildwood.ToName(),
|
||||
CollectionType.Duskwight => SubRace.Duskwight.ToName(),
|
||||
CollectionType.Plainsfolk => SubRace.Plainsfolk.ToName(),
|
||||
CollectionType.Dunesfolk => SubRace.Dunesfolk.ToName(),
|
||||
CollectionType.SeekerOfTheSun => SubRace.SeekerOfTheSun.ToName(),
|
||||
CollectionType.KeeperOfTheMoon => SubRace.KeeperOfTheMoon.ToName(),
|
||||
CollectionType.Seawolf => SubRace.Seawolf.ToName(),
|
||||
CollectionType.Hellsguard => SubRace.Hellsguard.ToName(),
|
||||
CollectionType.Raen => SubRace.Raen.ToName(),
|
||||
CollectionType.Xaela => SubRace.Xaela.ToName(),
|
||||
CollectionType.Helion => SubRace.Helion.ToName(),
|
||||
CollectionType.Lost => SubRace.Lost.ToName(),
|
||||
CollectionType.Rava => SubRace.Rava.ToName(),
|
||||
CollectionType.Veena => SubRace.Veena.ToName(),
|
||||
CollectionType.MidlanderNpc => SubRace.Midlander.ToName() + " (NPC)",
|
||||
CollectionType.HighlanderNpc => SubRace.Highlander.ToName() + " (NPC)",
|
||||
CollectionType.WildwoodNpc => SubRace.Wildwood.ToName() + " (NPC)",
|
||||
CollectionType.DuskwightNpc => SubRace.Duskwight.ToName() + " (NPC)",
|
||||
CollectionType.PlainsfolkNpc => SubRace.Plainsfolk.ToName() + " (NPC)",
|
||||
CollectionType.DunesfolkNpc => SubRace.Dunesfolk.ToName() + " (NPC)",
|
||||
CollectionType.SeekerOfTheSunNpc => SubRace.SeekerOfTheSun.ToName() + " (NPC)",
|
||||
CollectionType.KeeperOfTheMoonNpc => SubRace.KeeperOfTheMoon.ToName() + " (NPC)",
|
||||
CollectionType.SeawolfNpc => SubRace.Seawolf.ToName() + " (NPC)",
|
||||
CollectionType.HellsguardNpc => SubRace.Hellsguard.ToName() + " (NPC)",
|
||||
CollectionType.RaenNpc => SubRace.Raen.ToName() + " (NPC)",
|
||||
CollectionType.XaelaNpc => SubRace.Xaela.ToName() + " (NPC)",
|
||||
CollectionType.HelionNpc => SubRace.Helion.ToName() + " (NPC)",
|
||||
CollectionType.LostNpc => SubRace.Lost.ToName() + " (NPC)",
|
||||
CollectionType.RavaNpc => SubRace.Rava.ToName() + " (NPC)",
|
||||
CollectionType.VeenaNpc => SubRace.Veena.ToName() + " (NPC)",
|
||||
CollectionType.Inactive => "Collection",
|
||||
CollectionType.Default => "Default",
|
||||
CollectionType.Interface => "Interface",
|
||||
CollectionType.Character => "Character",
|
||||
CollectionType.Current => "Current",
|
||||
_ => string.Empty,
|
||||
CollectionType.Yourself => "Your Character",
|
||||
CollectionType.MalePlayerCharacter => "Male Player Characters",
|
||||
CollectionType.MaleNonPlayerCharacter => "Male Non-Player Characters",
|
||||
CollectionType.MaleMidlander => $"Male {SubRace.Midlander.ToName()}",
|
||||
CollectionType.MaleHighlander => $"Male {SubRace.Highlander.ToName()}",
|
||||
CollectionType.MaleWildwood => $"Male {SubRace.Wildwood.ToName()}",
|
||||
CollectionType.MaleDuskwight => $"Male {SubRace.Duskwight.ToName()}",
|
||||
CollectionType.MalePlainsfolk => $"Male {SubRace.Plainsfolk.ToName()}",
|
||||
CollectionType.MaleDunesfolk => $"Male {SubRace.Dunesfolk.ToName()}",
|
||||
CollectionType.MaleSeekerOfTheSun => $"Male {SubRace.SeekerOfTheSun.ToName()}",
|
||||
CollectionType.MaleKeeperOfTheMoon => $"Male {SubRace.KeeperOfTheMoon.ToName()}",
|
||||
CollectionType.MaleSeawolf => $"Male {SubRace.Seawolf.ToName()}",
|
||||
CollectionType.MaleHellsguard => $"Male {SubRace.Hellsguard.ToName()}",
|
||||
CollectionType.MaleRaen => $"Male {SubRace.Raen.ToName()}",
|
||||
CollectionType.MaleXaela => $"Male {SubRace.Xaela.ToName()}",
|
||||
CollectionType.MaleHelion => $"Male {SubRace.Helion.ToName()}",
|
||||
CollectionType.MaleLost => $"Male {SubRace.Lost.ToName()}",
|
||||
CollectionType.MaleRava => $"Male {SubRace.Rava.ToName()}",
|
||||
CollectionType.MaleVeena => $"Male {SubRace.Veena.ToName()}",
|
||||
CollectionType.MaleMidlanderNpc => $"Male {SubRace.Midlander.ToName()} (NPC)",
|
||||
CollectionType.MaleHighlanderNpc => $"Male {SubRace.Highlander.ToName()} (NPC)",
|
||||
CollectionType.MaleWildwoodNpc => $"Male {SubRace.Wildwood.ToName()} (NPC)",
|
||||
CollectionType.MaleDuskwightNpc => $"Male {SubRace.Duskwight.ToName()} (NPC)",
|
||||
CollectionType.MalePlainsfolkNpc => $"Male {SubRace.Plainsfolk.ToName()} (NPC)",
|
||||
CollectionType.MaleDunesfolkNpc => $"Male {SubRace.Dunesfolk.ToName()} (NPC)",
|
||||
CollectionType.MaleSeekerOfTheSunNpc => $"Male {SubRace.SeekerOfTheSun.ToName()} (NPC)",
|
||||
CollectionType.MaleKeeperOfTheMoonNpc => $"Male {SubRace.KeeperOfTheMoon.ToName()} (NPC)",
|
||||
CollectionType.MaleSeawolfNpc => $"Male {SubRace.Seawolf.ToName()} (NPC)",
|
||||
CollectionType.MaleHellsguardNpc => $"Male {SubRace.Hellsguard.ToName()} (NPC)",
|
||||
CollectionType.MaleRaenNpc => $"Male {SubRace.Raen.ToName()} (NPC)",
|
||||
CollectionType.MaleXaelaNpc => $"Male {SubRace.Xaela.ToName()} (NPC)",
|
||||
CollectionType.MaleHelionNpc => $"Male {SubRace.Helion.ToName()} (NPC)",
|
||||
CollectionType.MaleLostNpc => $"Male {SubRace.Lost.ToName()} (NPC)",
|
||||
CollectionType.MaleRavaNpc => $"Male {SubRace.Rava.ToName()} (NPC)",
|
||||
CollectionType.MaleVeenaNpc => $"Male {SubRace.Veena.ToName()} (NPC)",
|
||||
CollectionType.FemalePlayerCharacter => "Female Player Characters",
|
||||
CollectionType.FemaleNonPlayerCharacter => "Female Non-Player Characters",
|
||||
CollectionType.FemaleMidlander => $"Female {SubRace.Midlander.ToName()}",
|
||||
CollectionType.FemaleHighlander => $"Female {SubRace.Highlander.ToName()}",
|
||||
CollectionType.FemaleWildwood => $"Female {SubRace.Wildwood.ToName()}",
|
||||
CollectionType.FemaleDuskwight => $"Female {SubRace.Duskwight.ToName()}",
|
||||
CollectionType.FemalePlainsfolk => $"Female {SubRace.Plainsfolk.ToName()}",
|
||||
CollectionType.FemaleDunesfolk => $"Female {SubRace.Dunesfolk.ToName()}",
|
||||
CollectionType.FemaleSeekerOfTheSun => $"Female {SubRace.SeekerOfTheSun.ToName()}",
|
||||
CollectionType.FemaleKeeperOfTheMoon => $"Female {SubRace.KeeperOfTheMoon.ToName()}",
|
||||
CollectionType.FemaleSeawolf => $"Female {SubRace.Seawolf.ToName()}",
|
||||
CollectionType.FemaleHellsguard => $"Female {SubRace.Hellsguard.ToName()}",
|
||||
CollectionType.FemaleRaen => $"Female {SubRace.Raen.ToName()}",
|
||||
CollectionType.FemaleXaela => $"Female {SubRace.Xaela.ToName()}",
|
||||
CollectionType.FemaleHelion => $"Female {SubRace.Helion.ToName()}",
|
||||
CollectionType.FemaleLost => $"Female {SubRace.Lost.ToName()}",
|
||||
CollectionType.FemaleRava => $"Female {SubRace.Rava.ToName()}",
|
||||
CollectionType.FemaleVeena => $"Female {SubRace.Veena.ToName()}",
|
||||
CollectionType.FemaleMidlanderNpc => $"Female {SubRace.Midlander.ToName()} (NPC)",
|
||||
CollectionType.FemaleHighlanderNpc => $"Female {SubRace.Highlander.ToName()} (NPC)",
|
||||
CollectionType.FemaleWildwoodNpc => $"Female {SubRace.Wildwood.ToName()} (NPC)",
|
||||
CollectionType.FemaleDuskwightNpc => $"Female {SubRace.Duskwight.ToName()} (NPC)",
|
||||
CollectionType.FemalePlainsfolkNpc => $"Female {SubRace.Plainsfolk.ToName()} (NPC)",
|
||||
CollectionType.FemaleDunesfolkNpc => $"Female {SubRace.Dunesfolk.ToName()} (NPC)",
|
||||
CollectionType.FemaleSeekerOfTheSunNpc => $"Female {SubRace.SeekerOfTheSun.ToName()} (NPC)",
|
||||
CollectionType.FemaleKeeperOfTheMoonNpc => $"Female {SubRace.KeeperOfTheMoon.ToName()} (NPC)",
|
||||
CollectionType.FemaleSeawolfNpc => $"Female {SubRace.Seawolf.ToName()} (NPC)",
|
||||
CollectionType.FemaleHellsguardNpc => $"Female {SubRace.Hellsguard.ToName()} (NPC)",
|
||||
CollectionType.FemaleRaenNpc => $"Female {SubRace.Raen.ToName()} (NPC)",
|
||||
CollectionType.FemaleXaelaNpc => $"Female {SubRace.Xaela.ToName()} (NPC)",
|
||||
CollectionType.FemaleHelionNpc => $"Female {SubRace.Helion.ToName()} (NPC)",
|
||||
CollectionType.FemaleLostNpc => $"Female {SubRace.Lost.ToName()} (NPC)",
|
||||
CollectionType.FemaleRavaNpc => $"Female {SubRace.Rava.ToName()} (NPC)",
|
||||
CollectionType.FemaleVeenaNpc => $"Female {SubRace.Veena.ToName()} (NPC)",
|
||||
CollectionType.Inactive => "Collection",
|
||||
CollectionType.Default => "Default",
|
||||
CollectionType.Interface => "Interface",
|
||||
CollectionType.Character => "Character",
|
||||
CollectionType.Current => "Current",
|
||||
_ => string.Empty,
|
||||
};
|
||||
|
||||
public static string ToDescription( this CollectionType collectionType )
|
||||
|
|
@ -108,74 +297,142 @@ public static class CollectionTypeExtensions
|
|||
{
|
||||
CollectionType.Yourself => "This collection applies to your own character, regardless of its name.\n"
|
||||
+ "It takes precedence before all other collections except for explicitly named character collections.",
|
||||
CollectionType.PlayerCharacter =>
|
||||
"This collection applies to all player characters that do not have a more specific character or racial collections associated.",
|
||||
CollectionType.NonPlayerCharacter =>
|
||||
"This collection applies to all human non-player characters except those explicitly named. It takes precedence before the default and racial collections.",
|
||||
CollectionType.Midlander =>
|
||||
"This collection applies to all player character Midlander Hyur that do not have a more specific character collection associated.",
|
||||
CollectionType.Highlander =>
|
||||
"This collection applies to all player character Highlander Hyur that do not have a more specific character collection associated.",
|
||||
CollectionType.Wildwood =>
|
||||
"This collection applies to all player character Wildwood Elezen that do not have a more specific character collection associated.",
|
||||
CollectionType.Duskwight =>
|
||||
"This collection applies to all player character Duskwight Elezen that do not have a more specific character collection associated.",
|
||||
CollectionType.Plainsfolk =>
|
||||
"This collection applies to all player character Plainsfolk Lalafell that do not have a more specific character collection associated.",
|
||||
CollectionType.Dunesfolk =>
|
||||
"This collection applies to all player character Dunesfolk Lalafell that do not have a more specific character collection associated.",
|
||||
CollectionType.SeekerOfTheSun =>
|
||||
"This collection applies to all player character Seekers of the Sun that do not have a more specific character collection associated.",
|
||||
CollectionType.KeeperOfTheMoon =>
|
||||
"This collection applies to all player character Keepers of the Moon that do not have a more specific character collection associated.",
|
||||
CollectionType.Seawolf =>
|
||||
"This collection applies to all player character Sea Wolf Roegadyn that do not have a more specific character collection associated.",
|
||||
CollectionType.Hellsguard =>
|
||||
"This collection applies to all player character Hellsguard Roegadyn that do not have a more specific character collection associated.",
|
||||
CollectionType.Raen =>
|
||||
"This collection applies to all player character Raen Au Ra that do not have a more specific character collection associated.",
|
||||
CollectionType.Xaela =>
|
||||
"This collection applies to all player character Xaela Au Ra that do not have a more specific character collection associated.",
|
||||
CollectionType.Helion =>
|
||||
"This collection applies to all player character Helion Hrothgar that do not have a more specific character collection associated.",
|
||||
CollectionType.Lost =>
|
||||
"This collection applies to all player character Lost Hrothgar that do not have a more specific character collection associated.",
|
||||
CollectionType.Rava =>
|
||||
"This collection applies to all player character Rava Viera that do not have a more specific character collection associated.",
|
||||
CollectionType.Veena =>
|
||||
"This collection applies to all player character Veena Viera that do not have a more specific character collection associated.",
|
||||
CollectionType.MidlanderNpc =>
|
||||
"This collection applies to all non-player character Midlander Hyur that do not have a more specific character collection associated.",
|
||||
CollectionType.HighlanderNpc =>
|
||||
"This collection applies to all non-player character Highlander Hyur that do not have a more specific character collection associated.",
|
||||
CollectionType.WildwoodNpc =>
|
||||
"This collection applies to all non-player character Wildwood Elezen that do not have a more specific character collection associated.",
|
||||
CollectionType.DuskwightNpc =>
|
||||
"This collection applies to all non-player character Duskwight Elezen that do not have a more specific character collection associated.",
|
||||
CollectionType.PlainsfolkNpc =>
|
||||
"This collection applies to all non-player character Plainsfolk Lalafell that do not have a more specific character collection associated.",
|
||||
CollectionType.DunesfolkNpc =>
|
||||
"This collection applies to all non-player character Dunesfolk Lalafell that do not have a more specific character collection associated.",
|
||||
CollectionType.SeekerOfTheSunNpc =>
|
||||
"This collection applies to all non-player character Seekers of the Sun that do not have a more specific character collection associated.",
|
||||
CollectionType.KeeperOfTheMoonNpc =>
|
||||
"This collection applies to all non-player character Keepers of the Moon that do not have a more specific character collection associated.",
|
||||
CollectionType.SeawolfNpc =>
|
||||
"This collection applies to all non-player character Sea Wolf Roegadyn that do not have a more specific character collection associated.",
|
||||
CollectionType.HellsguardNpc =>
|
||||
"This collection applies to all non-player character Hellsguard Roegadyn that do not have a more specific character collection associated.",
|
||||
CollectionType.RaenNpc =>
|
||||
"This collection applies to all non-player character Raen Au Ra that do not have a more specific character collection associated.",
|
||||
CollectionType.XaelaNpc =>
|
||||
"This collection applies to all non-player character Xaela Au Ra that do not have a more specific character collection associated.",
|
||||
CollectionType.HelionNpc =>
|
||||
"This collection applies to all non-player character Helion Hrothgar that do not have a more specific character collection associated.",
|
||||
CollectionType.LostNpc =>
|
||||
"This collection applies to all non-player character Lost Hrothgar that do not have a more specific character collection associated.",
|
||||
CollectionType.RavaNpc =>
|
||||
"This collection applies to all non-player character Rava Viera that do not have a more specific character collection associated.",
|
||||
CollectionType.VeenaNpc =>
|
||||
"This collection applies to all non-player character Veena Viera that do not have a more specific character collection associated.",
|
||||
CollectionType.MalePlayerCharacter =>
|
||||
"This collection applies to all male player characters that do not have a more specific character or racial collections associated.",
|
||||
CollectionType.MaleNonPlayerCharacter =>
|
||||
"This collection applies to all human male non-player characters except those explicitly named. It takes precedence before the default and racial collections.",
|
||||
CollectionType.MaleMidlander =>
|
||||
"This collection applies to all male player character Midlander Hyur that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleHighlander =>
|
||||
"This collection applies to all male player character Highlander Hyur that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleWildwood =>
|
||||
"This collection applies to all male player character Wildwood Elezen that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleDuskwight =>
|
||||
"This collection applies to all male player character Duskwight Elezen that do not have a more specific character collection associated.",
|
||||
CollectionType.MalePlainsfolk =>
|
||||
"This collection applies to all male player character Plainsfolk Lalafell that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleDunesfolk =>
|
||||
"This collection applies to all male player character Dunesfolk Lalafell that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleSeekerOfTheSun =>
|
||||
"This collection applies to all male player character Seekers of the Sun that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleKeeperOfTheMoon =>
|
||||
"This collection applies to all male player character Keepers of the Moon that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleSeawolf =>
|
||||
"This collection applies to all male player character Sea Wolf Roegadyn that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleHellsguard =>
|
||||
"This collection applies to all male player character Hellsguard Roegadyn that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleRaen =>
|
||||
"This collection applies to all male player character Raen Au Ra that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleXaela =>
|
||||
"This collection applies to all male player character Xaela Au Ra that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleHelion =>
|
||||
"This collection applies to all male player character Helion Hrothgar that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleLost =>
|
||||
"This collection applies to all male player character Lost Hrothgar that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleRava =>
|
||||
"This collection applies to all male player character Rava Viera that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleVeena =>
|
||||
"This collection applies to all male player character Veena Viera that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleMidlanderNpc =>
|
||||
"This collection applies to all male non-player character Midlander Hyur that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleHighlanderNpc =>
|
||||
"This collection applies to all male non-player character Highlander Hyur that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleWildwoodNpc =>
|
||||
"This collection applies to all male non-player character Wildwood Elezen that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleDuskwightNpc =>
|
||||
"This collection applies to all male non-player character Duskwight Elezen that do not have a more specific character collection associated.",
|
||||
CollectionType.MalePlainsfolkNpc =>
|
||||
"This collection applies to all male non-player character Plainsfolk Lalafell that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleDunesfolkNpc =>
|
||||
"This collection applies to all male non-player character Dunesfolk Lalafell that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleSeekerOfTheSunNpc =>
|
||||
"This collection applies to all male non-player character Seekers of the Sun that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleKeeperOfTheMoonNpc =>
|
||||
"This collection applies to all male non-player character Keepers of the Moon that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleSeawolfNpc =>
|
||||
"This collection applies to all male non-player character Sea Wolf Roegadyn that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleHellsguardNpc =>
|
||||
"This collection applies to all male non-player character Hellsguard Roegadyn that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleRaenNpc =>
|
||||
"This collection applies to all male non-player character Raen Au Ra that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleXaelaNpc =>
|
||||
"This collection applies to all male non-player character Xaela Au Ra that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleHelionNpc =>
|
||||
"This collection applies to all male non-player character Helion Hrothgar that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleLostNpc =>
|
||||
"This collection applies to all male non-player character Lost Hrothgar that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleRavaNpc =>
|
||||
"This collection applies to all male non-player character Rava Viera that do not have a more specific character collection associated.",
|
||||
CollectionType.MaleVeenaNpc =>
|
||||
"This collection applies to all male non-player character Veena Viera that do not have a more specific character collection associated.",
|
||||
CollectionType.FemalePlayerCharacter =>
|
||||
"This collection applies to all female player characters that do not have a more specific character or racial collections associated.",
|
||||
CollectionType.FemaleNonPlayerCharacter =>
|
||||
"This collection applies to all human female non-player characters except those explicitly named. It takes precedence before the default and racial collections.",
|
||||
CollectionType.FemaleMidlander =>
|
||||
"This collection applies to all female player character Midlander Hyur that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleHighlander =>
|
||||
"This collection applies to all female player character Highlander Hyur that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleWildwood =>
|
||||
"This collection applies to all female player character Wildwood Elezen that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleDuskwight =>
|
||||
"This collection applies to all female player character Duskwight Elezen that do not have a more specific character collection associated.",
|
||||
CollectionType.FemalePlainsfolk =>
|
||||
"This collection applies to all female player character Plainsfolk Lalafell that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleDunesfolk =>
|
||||
"This collection applies to all female player character Dunesfolk Lalafell that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleSeekerOfTheSun =>
|
||||
"This collection applies to all female player character Seekers of the Sun that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleKeeperOfTheMoon =>
|
||||
"This collection applies to all female player character Keepers of the Moon that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleSeawolf =>
|
||||
"This collection applies to all female player character Sea Wolf Roegadyn that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleHellsguard =>
|
||||
"This collection applies to all female player character Hellsguard Roegadyn that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleRaen =>
|
||||
"This collection applies to all female player character Raen Au Ra that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleXaela =>
|
||||
"This collection applies to all female player character Xaela Au Ra that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleHelion =>
|
||||
"This collection applies to all female player character Helion Hrothgar that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleLost =>
|
||||
"This collection applies to all female player character Lost Hrothgar that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleRava =>
|
||||
"This collection applies to all female player character Rava Viera that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleVeena =>
|
||||
"This collection applies to all female player character Veena Viera that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleMidlanderNpc =>
|
||||
"This collection applies to all female non-player character Midlander Hyur that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleHighlanderNpc =>
|
||||
"This collection applies to all female non-player character Highlander Hyur that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleWildwoodNpc =>
|
||||
"This collection applies to all female non-player character Wildwood Elezen that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleDuskwightNpc =>
|
||||
"This collection applies to all female non-player character Duskwight Elezen that do not have a more specific character collection associated.",
|
||||
CollectionType.FemalePlainsfolkNpc =>
|
||||
"This collection applies to all female non-player character Plainsfolk Lalafell that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleDunesfolkNpc =>
|
||||
"This collection applies to all female non-player character Dunesfolk Lalafell that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleSeekerOfTheSunNpc =>
|
||||
"This collection applies to all female non-player character Seekers of the Sun that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleKeeperOfTheMoonNpc =>
|
||||
"This collection applies to all female non-player character Keepers of the Moon that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleSeawolfNpc =>
|
||||
"This collection applies to all female non-player character Sea Wolf Roegadyn that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleHellsguardNpc =>
|
||||
"This collection applies to all female non-player character Hellsguard Roegadyn that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleRaenNpc =>
|
||||
"This collection applies to all female non-player character Raen Au Ra that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleXaelaNpc =>
|
||||
"This collection applies to all female non-player character Xaela Au Ra that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleHelionNpc =>
|
||||
"This collection applies to all female non-player character Helion Hrothgar that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleLostNpc =>
|
||||
"This collection applies to all female non-player character Lost Hrothgar that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleRavaNpc =>
|
||||
"This collection applies to all female non-player character Rava Viera that do not have a more specific character collection associated.",
|
||||
CollectionType.FemaleVeenaNpc =>
|
||||
"This collection applies to all female non-player character Veena Viera that do not have a more specific character collection associated.",
|
||||
_ => string.Empty,
|
||||
};
|
||||
}
|
||||
|
|
@ -48,8 +48,20 @@ public partial class Configuration
|
|||
m.Version3To4();
|
||||
m.Version4To5();
|
||||
m.Version5To6();
|
||||
m.Version6To7();
|
||||
}
|
||||
|
||||
// Gendered special collections were added.
|
||||
private void Version6To7()
|
||||
{
|
||||
if( _config.Version != 6 )
|
||||
return;
|
||||
|
||||
ModCollection.Manager.MigrateUngenderedCollections();
|
||||
_config.Version = 7;
|
||||
}
|
||||
|
||||
|
||||
// A new tutorial step was inserted in the middle.
|
||||
// The UI collection and a new tutorial for it was added.
|
||||
// The migration for the UI collection itself happens in the ActiveCollections file.
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ public partial class Configuration : IPluginConfiguration
|
|||
// Contains some default values or boundaries for config values.
|
||||
public static class Constants
|
||||
{
|
||||
public const int CurrentVersion = 6;
|
||||
public const int CurrentVersion = 7;
|
||||
public const float MaxAbsoluteSize = 600;
|
||||
public const int DefaultAbsoluteSize = 250;
|
||||
public const float MinAbsoluteSize = 50;
|
||||
|
|
|
|||
|
|
@ -241,9 +241,9 @@ public unsafe partial class PathResolver
|
|||
{
|
||||
collection = null;
|
||||
// Check for the Yourself collection.
|
||||
if( actor->ObjectIndex == 0
|
||||
|| Cutscenes.GetParentIndex(actor->ObjectIndex) == 0
|
||||
|| name == Dalamud.ClientState.LocalPlayer?.Name.ToString() )
|
||||
if( actor->ObjectIndex == 0
|
||||
|| Cutscenes.GetParentIndex( actor->ObjectIndex ) == 0
|
||||
|| name == Dalamud.ClientState.LocalPlayer?.Name.ToString() )
|
||||
{
|
||||
collection = Penumbra.CollectionManager.ByType( CollectionType.Yourself );
|
||||
if( collection != null )
|
||||
|
|
@ -258,64 +258,16 @@ public unsafe partial class PathResolver
|
|||
// Only handle human models.
|
||||
if( character->ModelCharaId == 0 )
|
||||
{
|
||||
// Check if the object is a non-player human NPC.
|
||||
if( actor->ObjectKind == ( byte )ObjectKind.Player )
|
||||
var race = ( SubRace )character->CustomizeData[ 4 ];
|
||||
var gender = ( Gender )( character->CustomizeData[ 1 ] + 1 );
|
||||
var isNpc = actor->ObjectKind != ( byte )ObjectKind.Player;
|
||||
|
||||
var type = CollectionTypeExtensions.FromParts( race, gender, isNpc );
|
||||
collection = Penumbra.CollectionManager.ByType( type );
|
||||
collection ??= Penumbra.CollectionManager.ByType( CollectionTypeExtensions.FromParts( gender, isNpc ) );
|
||||
if( collection != null )
|
||||
{
|
||||
// Check the subrace. If it does not fit any or no subrace collection is set, check the player character collection.
|
||||
collection = ( SubRace )( ( Character* )actor )->CustomizeData[ 4 ] switch
|
||||
{
|
||||
SubRace.Midlander => Penumbra.CollectionManager.ByType( CollectionType.Midlander ),
|
||||
SubRace.Highlander => Penumbra.CollectionManager.ByType( CollectionType.Highlander ),
|
||||
SubRace.Wildwood => Penumbra.CollectionManager.ByType( CollectionType.Wildwood ),
|
||||
SubRace.Duskwight => Penumbra.CollectionManager.ByType( CollectionType.Duskwight ),
|
||||
SubRace.Plainsfolk => Penumbra.CollectionManager.ByType( CollectionType.Plainsfolk ),
|
||||
SubRace.Dunesfolk => Penumbra.CollectionManager.ByType( CollectionType.Dunesfolk ),
|
||||
SubRace.SeekerOfTheSun => Penumbra.CollectionManager.ByType( CollectionType.SeekerOfTheSun ),
|
||||
SubRace.KeeperOfTheMoon => Penumbra.CollectionManager.ByType( CollectionType.KeeperOfTheMoon ),
|
||||
SubRace.Seawolf => Penumbra.CollectionManager.ByType( CollectionType.Seawolf ),
|
||||
SubRace.Hellsguard => Penumbra.CollectionManager.ByType( CollectionType.Hellsguard ),
|
||||
SubRace.Raen => Penumbra.CollectionManager.ByType( CollectionType.Raen ),
|
||||
SubRace.Xaela => Penumbra.CollectionManager.ByType( CollectionType.Xaela ),
|
||||
SubRace.Helion => Penumbra.CollectionManager.ByType( CollectionType.Helion ),
|
||||
SubRace.Lost => Penumbra.CollectionManager.ByType( CollectionType.Lost ),
|
||||
SubRace.Rava => Penumbra.CollectionManager.ByType( CollectionType.Rava ),
|
||||
SubRace.Veena => Penumbra.CollectionManager.ByType( CollectionType.Veena ),
|
||||
_ => null,
|
||||
};
|
||||
collection ??= Penumbra.CollectionManager.ByType( CollectionType.PlayerCharacter );
|
||||
if( collection != null )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Check the subrace. If it does not fit any or no subrace collection is set, check the npn-player character collection.
|
||||
collection = ( SubRace )( ( Character* )actor )->CustomizeData[ 4 ] switch
|
||||
{
|
||||
SubRace.Midlander => Penumbra.CollectionManager.ByType( CollectionType.MidlanderNpc ),
|
||||
SubRace.Highlander => Penumbra.CollectionManager.ByType( CollectionType.HighlanderNpc ),
|
||||
SubRace.Wildwood => Penumbra.CollectionManager.ByType( CollectionType.WildwoodNpc ),
|
||||
SubRace.Duskwight => Penumbra.CollectionManager.ByType( CollectionType.DuskwightNpc ),
|
||||
SubRace.Plainsfolk => Penumbra.CollectionManager.ByType( CollectionType.PlainsfolkNpc ),
|
||||
SubRace.Dunesfolk => Penumbra.CollectionManager.ByType( CollectionType.DunesfolkNpc ),
|
||||
SubRace.SeekerOfTheSun => Penumbra.CollectionManager.ByType( CollectionType.SeekerOfTheSunNpc ),
|
||||
SubRace.KeeperOfTheMoon => Penumbra.CollectionManager.ByType( CollectionType.KeeperOfTheMoonNpc ),
|
||||
SubRace.Seawolf => Penumbra.CollectionManager.ByType( CollectionType.SeawolfNpc ),
|
||||
SubRace.Hellsguard => Penumbra.CollectionManager.ByType( CollectionType.HellsguardNpc ),
|
||||
SubRace.Raen => Penumbra.CollectionManager.ByType( CollectionType.RaenNpc ),
|
||||
SubRace.Xaela => Penumbra.CollectionManager.ByType( CollectionType.XaelaNpc ),
|
||||
SubRace.Helion => Penumbra.CollectionManager.ByType( CollectionType.HelionNpc ),
|
||||
SubRace.Lost => Penumbra.CollectionManager.ByType( CollectionType.LostNpc ),
|
||||
SubRace.Rava => Penumbra.CollectionManager.ByType( CollectionType.RavaNpc ),
|
||||
SubRace.Veena => Penumbra.CollectionManager.ByType( CollectionType.VeenaNpc ),
|
||||
_ => null,
|
||||
};
|
||||
collection ??= Penumbra.CollectionManager.ByType( CollectionType.NonPlayerCharacter );
|
||||
if( collection != null )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -483,12 +483,12 @@ public class Penumbra : IDalamudPlugin
|
|||
sb.AppendFormat( "> **`Base Collection: `** {0}\n", CollectionManager.Default.AnonymizedName );
|
||||
sb.AppendFormat( "> **`Interface Collection: `** {0}\n", CollectionManager.Interface.AnonymizedName );
|
||||
sb.AppendFormat( "> **`Selected Collection: `** {0}\n", CollectionManager.Current.AnonymizedName );
|
||||
foreach( var type in CollectionTypeExtensions.Special )
|
||||
foreach( var (type, name, _) in CollectionTypeExtensions.Special )
|
||||
{
|
||||
var collection = CollectionManager.ByType( type );
|
||||
if( collection != null )
|
||||
{
|
||||
sb.AppendFormat( "> **`{0,-29}`** {1}\n", type.ToName(), collection.AnonymizedName );
|
||||
sb.AppendFormat( "> **`{0,-29}`** {1}\n", name, collection.AnonymizedName );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,10 +20,17 @@ public partial class ConfigWindow
|
|||
Add5_7_1( ret );
|
||||
Add5_8_0( ret );
|
||||
Add5_8_7( ret );
|
||||
Add5_9_0( ret );
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
private static void Add5_9_0( Changelog log )
|
||||
=> log.NextVersion( "Version 0.5.9.0" )
|
||||
.RegisterEntry( "Special Collections are now split between male and female." )
|
||||
.RegisterEntry( "Fix a bug where the Base and Interface Collection were set to None instead of Default on a fresh install." )
|
||||
.RegisterEntry( "TexTools .meta and .rgsp files are now incorporated based on file- and game path extensions." );
|
||||
|
||||
private static void Add5_8_7( Changelog log )
|
||||
=> log.NextVersion( "Version 0.5.8.7" )
|
||||
.RegisterEntry( "Fixed some problems with metadata reloading and reverting and IMC files. (5.8.1 to 5.8.7)." )
|
||||
|
|
|
|||
|
|
@ -38,10 +38,10 @@ public partial class ConfigWindow
|
|||
|
||||
|
||||
// Input text fields.
|
||||
private string _newCollectionName = string.Empty;
|
||||
private bool _canAddCollection = false;
|
||||
private string _newCharacterName = string.Empty;
|
||||
private CollectionType? _currentType = CollectionType.Yourself;
|
||||
private string _newCollectionName = string.Empty;
|
||||
private bool _canAddCollection = false;
|
||||
private string _newCharacterName = string.Empty;
|
||||
private (CollectionType, string, string)? _currentType = CollectionTypeExtensions.Special.First();
|
||||
|
||||
// Create a new collection that is either empty or a duplicate of the current collection.
|
||||
// Resets the new collection name.
|
||||
|
|
@ -150,9 +150,10 @@ public partial class ConfigWindow
|
|||
+ $"but all {IndividualAssignments} take precedence before them.";
|
||||
|
||||
ImGui.SetNextItemWidth( _window._inputTextWidth.X );
|
||||
if( _currentType == null || Penumbra.CollectionManager.ByType( _currentType.Value ) != null )
|
||||
if( _currentType == null || Penumbra.CollectionManager.ByType( _currentType.Value.Item1 ) != null )
|
||||
{
|
||||
_currentType = CollectionTypeExtensions.Special.FindFirst( t => Penumbra.CollectionManager.ByType( t ) == null, out var t2 )
|
||||
_currentType = CollectionTypeExtensions.Special.FindFirst( t => Penumbra.CollectionManager.ByType( t.Item1 ) == null,
|
||||
out var t2 )
|
||||
? t2
|
||||
: null;
|
||||
}
|
||||
|
|
@ -162,16 +163,17 @@ public partial class ConfigWindow
|
|||
return;
|
||||
}
|
||||
|
||||
using( var combo = ImRaii.Combo( "##NewSpecial", _currentType.Value.ToName() ) )
|
||||
using( var combo = ImRaii.Combo( "##NewSpecial", _currentType.Value.Item2 ) )
|
||||
{
|
||||
if( combo )
|
||||
{
|
||||
foreach( var type in CollectionTypeExtensions.Special.Where( t => Penumbra.CollectionManager.ByType( t ) == null ) )
|
||||
foreach( var type in CollectionTypeExtensions.Special.Where( t => Penumbra.CollectionManager.ByType( t.Item1 ) == null ) )
|
||||
{
|
||||
if( ImGui.Selectable( type.ToName(), type == _currentType.Value ) )
|
||||
if( ImGui.Selectable( type.Item2, type.Item1 == _currentType.Value.Item1 ) )
|
||||
{
|
||||
_currentType = type;
|
||||
}
|
||||
ImGuiUtil.HoverTooltip( type.Item3 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -183,7 +185,7 @@ public partial class ConfigWindow
|
|||
: description;
|
||||
if( ImGuiUtil.DrawDisabledButton( $"Assign {ConditionalGroup}", new Vector2( 120 * ImGuiHelpers.GlobalScale, 0 ), tt, disabled ) )
|
||||
{
|
||||
Penumbra.CollectionManager.CreateSpecialCollection( _currentType!.Value );
|
||||
Penumbra.CollectionManager.CreateSpecialCollection( _currentType!.Value.Item1 );
|
||||
_currentType = null;
|
||||
}
|
||||
}
|
||||
|
|
@ -212,7 +214,7 @@ public partial class ConfigWindow
|
|||
|
||||
private void DrawSpecialCollections()
|
||||
{
|
||||
foreach( var type in CollectionTypeExtensions.Special )
|
||||
foreach( var (type, name, desc) in CollectionTypeExtensions.Special )
|
||||
{
|
||||
var collection = Penumbra.CollectionManager.ByType( type );
|
||||
if( collection != null )
|
||||
|
|
@ -228,7 +230,7 @@ public partial class ConfigWindow
|
|||
|
||||
ImGui.SameLine();
|
||||
ImGui.AlignTextToFramePadding();
|
||||
ImGuiUtil.LabeledHelpMarker( type.ToName(), type.ToDescription() );
|
||||
ImGuiUtil.LabeledHelpMarker( name, desc );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -246,7 +248,7 @@ public partial class ConfigWindow
|
|||
private void DrawIndividualAssignments()
|
||||
{
|
||||
using var _ = ImRaii.Group();
|
||||
ImGui.TextUnformatted( $"Individual {ConditionalIndividual}s" );
|
||||
ImGui.TextUnformatted( $"Individual {ConditionalIndividual}s" );
|
||||
ImGui.Separator();
|
||||
foreach( var name in Penumbra.CollectionManager.Characters.Keys.OrderBy( k => k ).ToArray() )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue