@@ -109,7 +109,6 @@ export function stringifyPotentialCName(cnameOrString, _info = '', suppressSpace
109109 * @param _info info string for the user
110110 * @param allowEmpty suppress warning if depot path is unset (partsOverrides will target player entity)
111111 * @param suppressLogOutput suppress log output (because they'll be gathered in other places)
112- * @param isSoft It's okay if soft references start with an * and don't contain substitution
113112 *
114113 * @return true if the depot path exists and can be resolved.
115114 */
@@ -135,6 +134,7 @@ export function checkDepotPath(_depotPath, _info, allowEmpty = false, suppressLo
135134
136135 // check if the path has uppercase characters
137136 if (hasUppercase(depotPath)) {
137+ hasUppercasePaths = true;
138138 return false;
139139 }
140140
@@ -152,13 +152,13 @@ export function checkDepotPath(_depotPath, _info, allowEmpty = false, suppressLo
152152 }
153153
154154 // ArchiveXL 1.5 variant magic requires checking this in a loop
155- const archiveXlResolvedPaths = getArchiveXlResolvedPaths(stringifyPotentialCName( depotPath) );
155+ const archiveXlResolvedPaths = getArchiveXlResolvedPaths(depotPath);
156156 let ret = true;
157157
158158 let warnAboutSubstitution = false;
159159 switch (getPathToCurrentFile().split('.').pop()) {
160160 case 'ent':
161- warnAboutSubstitution = entSettings.warnAboutSubstitution ;
161+ warnAboutSubstitution = entSettings.warnAboutIncompleteSubstitution ;
162162 break;
163163 case 'mesh':
164164 warnAboutSubstitution = meshSettings.enabled;
@@ -170,40 +170,39 @@ export function checkDepotPath(_depotPath, _info, allowEmpty = false, suppressLo
170170 if (archiveXlResolvedPaths.length > 1 && !!archiveXlResolvedPaths.find(p => wkit.FileExists(p) && p.includes("base"))) {
171171 return;
172172 }
173-
173+
174174 archiveXlResolvedPaths.forEach((resolvedPath) => {
175175 if (getPathToCurrentFile() === resolvedPath) {
176176 if (!suppressLogOutput) {
177- Logger.Error (`${info}Depot path ${resolvedPath} references itself. This _will_ crash the game!`);
177+ Logger.Warning (`${info}Depot path ${resolvedPath} references itself. This _will_ crash the game! (Ignore this irf everything works) `);
178178 }
179179 ret = false;
180180 return;
181181 }
182- // all fine
183- if (wkit.FileExists(resolvedPath)) {
184- return;
185- }
186182
187- if (suppressLogOutput) {
183+ // all fine, or we don't care
184+ if (wkit.FileExists(resolvedPath) || suppressLogOutput) {
188185 return;
189186 }
190-
191- // File does not exist
192- ret = false;
193187
188+ // ignore ArchiveXL hair profiles
194189 if (resolvedPath.startsWith("archive_xl\\characters\\common\\hair\\textures\\hair_profiles")) {
195190 ret = true;
196191 return;
197192 }
193+
198194 if (warnAboutSubstitution && shouldHaveSubstitution(resolvedPath, true)) {
195+ ret = false;
199196 Logger.Info(`${info}${resolvedPath}: substitution couldn't be resolved. It's either invalid or not yet supported in wkit.`);
200197 return;
201198 }
202199
203200 if (!!currentMaterialName) {
201+ ret = false;
204202 Logger.Info(`${info}${resolvedPath}: substitution couldn't be resolved. It may not be defined yet, or the file is in a different mod.`);
205203 return;
206204 }
205+ ret = false;
207206 Logger.Warning(`${info}${resolvedPath} not found in project or game files`);
208207 })
209208 return ret;
0 commit comments