@@ -62,14 +62,14 @@ public struct UpgradeInfo
62
62
/// Returns a collection of file upgrade information.
63
63
/// </summary>
64
64
/// <param name="filePaths"></param>
65
- /// <param name="source "></param>
65
+ /// <param name="sourceApplication "></param>
66
66
/// <param name="states"></param>
67
67
/// <param name="progress"></param>
68
68
/// <param name="tx"></param>
69
69
/// <returns></returns>
70
- public static async Task < Dictionary < string , UpgradeInfo > > UpdateEndwalkerFiles ( IEnumerable < string > paths , string source , bool includePartials = true , IProgress < ( int current , int total , string message ) > progress = null , ModTransaction tx = null )
70
+ public static async Task < Dictionary < string , UpgradeInfo > > UpdateEndwalkerFiles ( IEnumerable < string > paths , string sourceApplication , bool includePartials = true , IProgress < ( int current , int total , string message ) > progress = null , ModTransaction tx = null )
71
71
{
72
- var filePaths = paths . ToList ( ) ;
72
+ var filePaths = new HashSet < string > ( paths ) ;
73
73
var ret = new Dictionary < string , UpgradeInfo > ( ) ;
74
74
75
75
HashSet < string > _ConvertedTextures = new HashSet < string > ( ) ;
@@ -80,34 +80,44 @@ public static async Task<Dictionary<string, UpgradeInfo>> UpdateEndwalkerFiles(I
80
80
var fixableMtrlsRegex = new Regex ( "chara\\ /.*\\ .mtrl" ) ;
81
81
var fixableMtrls = filePaths . Where ( x => fixableMtrlsRegex . Match ( x ) . Success ) . ToList ( ) ;
82
82
83
- ret = await EndwalkerUpgrade . UpdateEndwalkerMaterials ( fixableMtrls , source , tx , progress , _ConvertedTextures ) ;
83
+ ret = await EndwalkerUpgrade . UpdateEndwalkerMaterials ( fixableMtrls , sourceApplication , tx , progress , _ConvertedTextures ) ;
84
84
85
85
var idx = 0 ;
86
86
var total = fixableMdls . Count ;
87
87
foreach ( var path in fixableMdls )
88
88
{
89
89
progress ? . Report ( ( idx , total , "Updating Endwalker Models..." ) ) ;
90
90
idx ++ ;
91
- await EndwalkerUpgrade . UpdateEndwalkerModel ( path , source , tx ) ;
91
+ await EndwalkerUpgrade . UpdateEndwalkerModel ( path , sourceApplication , tx ) ;
92
92
}
93
93
94
94
if ( includePartials )
95
95
{
96
96
progress ? . Report ( ( 0 , total , "Updating Endwalker partial Hair Mods..." ) ) ;
97
- await EndwalkerUpgrade . UpdateUnclaimedHairTextures ( filePaths , source , tx , _ConvertedTextures ) ;
97
+ await EndwalkerUpgrade . UpdateUnclaimedHairTextures ( filePaths . ToList ( ) , sourceApplication , tx , _ConvertedTextures ) ;
98
98
99
99
progress ? . Report ( ( 0 , total , "Updating Endwalker partial Eye Mods..." ) ) ;
100
100
foreach ( var path in filePaths )
101
101
{
102
102
try
103
103
{
104
- await EndwalkerUpgrade . UpdateEyeMask ( path , source , tx , _ConvertedTextures ) ;
104
+ await EndwalkerUpgrade . UpdateEyeMask ( path , sourceApplication , tx , _ConvertedTextures ) ;
105
105
}
106
106
catch ( Exception ex )
107
107
{
108
108
Trace . WriteLine ( ex ) ;
109
109
}
110
110
}
111
+
112
+ progress ? . Report ( ( 0 , total , "Updating Endwalker partial Skin Mods..." ) ) ;
113
+ foreach ( var path in filePaths )
114
+ {
115
+ if ( SkinRepathDict . ContainsKey ( path ) )
116
+ {
117
+ var target = SkinRepathDict [ path ] ;
118
+ await Dat . CopyFile ( path , target , sourceApplication , true , null , tx ) ;
119
+ }
120
+ }
111
121
}
112
122
113
123
@@ -2050,5 +2060,50 @@ public static async Task<FileStorageInformation> ValidateTextureSizes(FileStorag
2050
2060
return info ;
2051
2061
}
2052
2062
2063
+
2064
+ public static readonly Dictionary < string , string > SkinRepathDict = new Dictionary < string , string > ( )
2065
+ {
2066
+ // Base Game
2067
+ { "chara/human/c0201/obj/body/b0001/texture/--c0201b0001_d.tex" , "chara/human/c0201/obj/body/b0001/texture/c0201b0001_base.tex" } ,
2068
+ { "chara/human/c0401/obj/body/b0001/texture/--c0401b0001_d.tex" , "chara/human/c0401/obj/body/b0001/texture/c0401b0001_base.tex" } ,
2069
+ { "chara/human/c1401/obj/body/b0001/texture/--c1401b0001_d.tex" , "chara/human/c1401/obj/body/b0001/texture/c1401b0001_base.tex" } ,
2070
+ { "chara/human/c1401/obj/body/b0101/texture/--c1401b0101_d.tex" , "chara/human/c1401/obj/body/b0101/texture/c1401b0101_base.tex" } ,
2071
+ { "chara/human/c1801/obj/body/b0001/texture/--c1801b0001_d.tex" , "chara/human/c1801/obj/body/b0001/texture/c1801b0001_base.tex" } ,
2072
+
2073
+ // Base Game Norms
2074
+ { "chara/human/c0201/obj/body/b0001/texture/--c0201b0001_n.tex" , "chara/human/c0201/obj/body/b0001/texture/c0201b0001_norm.tex" } ,
2075
+ { "chara/human/c0401/obj/body/b0001/texture/--c0401b0001_n.tex" , "chara/human/c0401/obj/body/b0001/texture/c0401b0001_norm.tex" } ,
2076
+ { "chara/human/c1401/obj/body/b0001/texture/--c1401b0001_n.tex" , "chara/human/c1401/obj/body/b0001/texture/c1401b0001_norm.tex" } ,
2077
+ { "chara/human/c1401/obj/body/b0101/texture/--c1401b0101_n.tex" , "chara/human/c1401/obj/body/b0101/texture/c1401b0101_norm.tex" } ,
2078
+ { "chara/human/c1801/obj/body/b0001/texture/--c1801b0001_n.tex" , "chara/human/c1801/obj/body/b0001/texture/c1801b0001_norm.tex" } ,
2079
+
2080
+ // Bibo
2081
+ { "chara/bibo/midlander_d.tex" , "chara/bibo_mid_base.tex" } ,
2082
+ { "chara/bibo/raen_d.tex" , "chara/bibo_raen_base.tex" } ,
2083
+ { "chara/bibo/xaela_d.tex" , "chara/bibo_xaela_base.tex" } ,
2084
+ { "chara/bibo/viera_d.tex" , "chara/bibo_viera_base.tex" } ,
2085
+ { "chara/bibo/highlander_d.tex" , "chara/bibo_high_base.tex" } ,
2086
+
2087
+ // Bibo Norms
2088
+ { "chara/bibo/midlander_n.tex" , "chara/bibo_mid_norm.tex" } ,
2089
+ { "chara/bibo/raen_n.tex" , "chara/bibo_raen_norm.tex" } ,
2090
+ { "chara/bibo/xaela_n.tex" , "chara/bibo_xaela_norm.tex" } ,
2091
+ { "chara/bibo/viera_n.tex" , "chara/bibo_viera_norm.tex" } ,
2092
+ { "chara/bibo/highlander_n.tex" , "chara/bibo_high_norm.tex" } ,
2093
+
2094
+ // TBSE
2095
+ { "chara/human/c0101/obj/body/b0001/texture/--c0101b0001_b_d.tex" , "chara/human/c0101/obj/body/b0001/texture/c0101b0001_b_d.tex" } ,
2096
+ { "chara/human/c1301/obj/body/b0001/texture/--c1301b0001_b_d.tex" , "chara/human/c1301/obj/body/b0001/texture/c1301b0001_b_d.tex" } ,
2097
+ { "chara/human/c1301/obj/body/b0101/texture/--c1301b0101_b_d.tex" , "chara/human/c1301/obj/body/b0101/texture/c1301b0101_b_d.tex" } ,
2098
+ { "chara/human/c1701/obj/body/b0001/texture/--c1701b0001_b_d.tex" , "chara/human/c1701/obj/body/b0001/texture/c1701b0001_b_d.tex" } ,
2099
+ { "chara/human/c0301/obj/body/b0001/texture/--c0301b0001_b_d.tex" , "chara/human/c0301/obj/body/b0001/texture/c0301b0001_b_d.tex" } ,
2100
+
2101
+ // TBSE Norms
2102
+ { "chara/human/c0101/obj/body/b0001/texture/--c0101b0001_b_n.tex" , "chara/human/c0101/obj/body/b0001/texture/c0101b0001_b_n.tex" } ,
2103
+ { "chara/human/c1301/obj/body/b0001/texture/--c1301b0001_b_n.tex" , "chara/human/c1301/obj/body/b0001/texture/c1301b0001_b_n.tex" } ,
2104
+ { "chara/human/c1301/obj/body/b0101/texture/--c1301b0101_b_n.tex" , "chara/human/c1301/obj/body/b0101/texture/c1301b0101_b_n.tex" } ,
2105
+ { "chara/human/c1701/obj/body/b0001/texture/--c1701b0001_b_n.tex" , "chara/human/c1701/obj/body/b0001/texture/c1701b0001_b_n.tex" } ,
2106
+ { "chara/human/c0301/obj/body/b0001/texture/--c0301b0001_b_n.tex" , "chara/human/c0301/obj/body/b0001/texture/c0301b0001_b_n.tex" } ,
2107
+ } ;
2053
2108
}
2054
2109
}
0 commit comments