Chore: formatting

This commit is contained in:
Pieter Vander Vennet 2025-01-11 02:38:18 +01:00
parent 1f384e754b
commit dce838b130
2 changed files with 13 additions and 8 deletions

View file

@ -141,21 +141,21 @@ class DownloadNsiLogos extends Script {
}))
console.log("Checking for shadow-mappings...")
for (let i = mappings.length - 1; i >= 0 ; i--) {
for (let i = mappings.length - 1; i >= 0; i--) {
const condition = TagUtils.Tag(mappings[i].if)
if(i % 100 === 0){
console.log("Checking for shadow-mappings...",i,"/",mappings.length )
if (i % 100 === 0) {
console.log("Checking for shadow-mappings...", i, "/", mappings.length)
}
const shadowsSomething = mappings.some((m,j) => {
if(i===j ){
const shadowsSomething = mappings.some((m, j) => {
if (i === j) {
return false
}
return condition.shadows(TagUtils.Tag(m.if))
})
// If this one matches, the other one will match as well
// We can thus remove this one in favour of the other one
if(shadowsSomething){
if (shadowsSomething) {
mappings.splice(i, 1)
}
}
@ -178,7 +178,7 @@ class DownloadNsiLogos extends Script {
],
filter: [
<any>{
"#":"ignore-possible-duplicate",
"#": "ignore-possible-duplicate",
id: type,
strict: true,
options: [{ question: type }, ...filterOptions],
@ -196,9 +196,11 @@ class DownloadNsiLogos extends Script {
async main(): Promise<void> {
const nsi = await NameSuggestionIndex.getNsiIndex()
const types = ["brand", "operator"]
for (const type of types) {
await this.downloadFor(type)
}
for (const type of types) {
await this.generateRendering(type)
// await this.downloadFor(type)
}
}

View file

@ -839,6 +839,9 @@ class LayerOverviewUtils extends Script {
const themeInfo = themeFiles[i]
const themePath = themeInfo.path
let themeFile = themeInfo.parsed
if(!themeFile){
throw "Got an empty file for"+themeInfo.path
}
if (whitelist.size > 0 && !whitelist.has(themeFile.id)) {
continue
}