@@ -125,7 +125,15 @@ public override int GetHashCode()
125
125
126
126
private const string HiResUiExt = "_hr1" ;
127
127
128
- public async Task < Dictionary < string , string > > GetTexPaths ( bool addLowRes , bool addHiRes )
128
+ /// <summary>
129
+ /// Retrieve texture paths.
130
+ /// If both low and high res are false, low res is still returned.
131
+ /// Maps only have a single resolution.
132
+ /// </summary>
133
+ /// <param name="addLowRes"></param>
134
+ /// <param name="addHiRes"></param>
135
+ /// <returns></returns>
136
+ public async Task < Dictionary < string , string > > GetTexPaths ( bool addLowRes = true , bool addHiRes = false )
129
137
{
130
138
var resPaths = new Dictionary < string , string > ( ) ;
131
139
@@ -140,11 +148,17 @@ public async Task<Dictionary<string, string>> GetTexPaths(bool addLowRes, bool a
140
148
//ui/uld/aozactionlearned.tex
141
149
HasHiRes = true ;
142
150
143
- if ( addLowRes )
144
- resPaths . Add ( Name , "ui/uld/" + Name . ToLower ( ) + ".tex" ) ;
145
-
146
- if ( addHiRes )
151
+ if ( addHiRes && ! addLowRes )
152
+ {
147
153
resPaths . Add ( Name , "ui/uld/" + Name . ToLower ( ) + HiResUiExt + ".tex" ) ;
154
+ } else if ( addHiRes && addLowRes )
155
+ {
156
+ resPaths . Add ( Name + "SD" , "ui/uld/" + Name . ToLower ( ) + ".tex" ) ;
157
+ resPaths . Add ( Name + "HD" , "ui/uld/" + Name . ToLower ( ) + HiResUiExt + ".tex" ) ;
158
+ } else
159
+ {
160
+ resPaths . Add ( Name , "ui/uld/" + Name . ToLower ( ) + ".tex" ) ;
161
+ }
148
162
}
149
163
else
150
164
{
@@ -153,11 +167,18 @@ public async Task<Dictionary<string, string>> GetTexPaths(bool addLowRes, bool a
153
167
var block = ( ( IconNumber / 1000 ) * 1000 ) . ToString ( ) . PadLeft ( 6 , '0' ) ;
154
168
var icon = IconNumber . ToString ( ) . PadLeft ( 6 , '0' ) ;
155
169
156
- if ( addLowRes )
157
- resPaths . Add ( Name , "ui/icon/" + block + '/' + icon + ".tex" ) ;
158
-
159
- if ( addHiRes )
170
+ if ( addHiRes && ! addLowRes )
171
+ {
160
172
resPaths . Add ( Name , "ui/icon/" + block + '/' + icon + HiResUiExt + ".tex" ) ;
173
+ }
174
+ else if ( addHiRes && addLowRes )
175
+ {
176
+ resPaths . Add ( Name + "SD" , "ui/icon/" + block + '/' + icon + ".tex" ) ;
177
+ resPaths . Add ( Name + "HD" , "ui/icon/" + block + '/' + icon + HiResUiExt + ".tex" ) ;
178
+ } else
179
+ {
180
+ resPaths . Add ( Name , "ui/icon/" + block + '/' + icon + ".tex" ) ;
181
+ }
161
182
}
162
183
163
184
return resPaths ;
0 commit comments