Skip to content

Commit

Permalink
file validation: fixed an incorrect alert for suffixes
Browse files Browse the repository at this point in the history
  • Loading branch information
manavortex committed Jan 6, 2024
1 parent 59af389 commit 1ce8c19
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Scripts/Wolvenkit_FileValidation.wscript
Original file line number Diff line number Diff line change
Expand Up @@ -1320,19 +1320,19 @@ export function validateEntFile(ent, _entSettings) {

const _pathToCurrentFile = pathToCurrentFile;

let isUsingSuffixesOnDynamicEnt = false;
let isUsingSuffixesOnRootEntityNames = false;

for (let i = 0; i < ent.appearances.length; i++) {
const appearance = ent.appearances[i];
entFile_validateAppearance(appearance, i);
const name = (stringifyPotentialCName(appearance.name) || '');
entAppearanceNames.push(name);
isUsingSuffixesOnDynamicEnt ||= (stringifyPotentialCName(appearance.appearanceName, '', true) || '').includes('&');
isUsingSuffixesOnDynamicEnt ||= name.includes('&');
isUsingSuffixesOnRootEntityNames ||= (stringifyPotentialCName(appearance.appearanceName, '', true) || '').includes('&');
isUsingSuffixesOnRootEntityNames ||= name.includes('&');
pathToCurrentFile = _pathToCurrentFile;
}

if (isUsingSuffixesOnDynamicEnt) {
if (isUsingSuffixesOnRootEntityNames && isDynamicAppearance && isRootEntity) {
Logger.Warning('Dynamic appearances: You\'re not supposed to use suffixes (&something) in names or appearance names in your root entity!');
}
if (isRootEntity && isDynamicAppearance && visualTagList.includes('EmptyAppearance:FPP')) {
Expand Down

0 comments on commit 1ce8c19

Please sign in to comment.