forked from MapComplete/MapComplete
		
	Chore: formatting
This commit is contained in:
		
							parent
							
								
									1f384e754b
								
							
						
					
					
						commit
						dce838b130
					
				
					 2 changed files with 13 additions and 8 deletions
				
			
		|  | @ -141,21 +141,21 @@ class DownloadNsiLogos extends Script { | ||||||
|         })) |         })) | ||||||
| 
 | 
 | ||||||
|         console.log("Checking for shadow-mappings...") |         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) |             const condition = TagUtils.Tag(mappings[i].if) | ||||||
|             if(i % 100 === 0){ |             if (i % 100 === 0) { | ||||||
|                 console.log("Checking for shadow-mappings...",i,"/",mappings.length ) |                 console.log("Checking for shadow-mappings...", i, "/", mappings.length) | ||||||
| 
 | 
 | ||||||
|             } |             } | ||||||
|             const shadowsSomething = mappings.some((m,j)     => { |             const shadowsSomething = mappings.some((m, j) => { | ||||||
|                 if(i===j ){ |                 if (i === j) { | ||||||
|                     return false |                     return false | ||||||
|                 } |                 } | ||||||
|                 return condition.shadows(TagUtils.Tag(m.if)) |                 return condition.shadows(TagUtils.Tag(m.if)) | ||||||
|             }) |             }) | ||||||
|             // If this one matches, the other one will match as well
 |             // If this one matches, the other one will match as well
 | ||||||
|             // We can thus remove this one in favour of the other one
 |             // We can thus remove this one in favour of the other one
 | ||||||
|             if(shadowsSomething){ |             if (shadowsSomething) { | ||||||
|                 mappings.splice(i, 1) |                 mappings.splice(i, 1) | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|  | @ -178,7 +178,7 @@ class DownloadNsiLogos extends Script { | ||||||
|             ], |             ], | ||||||
|             filter: [ |             filter: [ | ||||||
|                 <any>{ |                 <any>{ | ||||||
|                     "#":"ignore-possible-duplicate", |                     "#": "ignore-possible-duplicate", | ||||||
|                     id: type, |                     id: type, | ||||||
|                     strict: true, |                     strict: true, | ||||||
|                     options: [{ question: type }, ...filterOptions], |                     options: [{ question: type }, ...filterOptions], | ||||||
|  | @ -196,9 +196,11 @@ class DownloadNsiLogos extends Script { | ||||||
|     async main(): Promise<void> { |     async main(): Promise<void> { | ||||||
|         const nsi = await NameSuggestionIndex.getNsiIndex() |         const nsi = await NameSuggestionIndex.getNsiIndex() | ||||||
|         const types = ["brand", "operator"] |         const types = ["brand", "operator"] | ||||||
|  |         for (const type of types) { | ||||||
|  |             await this.downloadFor(type) | ||||||
|  |         } | ||||||
|         for (const type of types) { |         for (const type of types) { | ||||||
|             await this.generateRendering(type) |             await this.generateRendering(type) | ||||||
|             // await this.downloadFor(type)
 |  | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -839,6 +839,9 @@ class LayerOverviewUtils extends Script { | ||||||
|             const themeInfo = themeFiles[i] |             const themeInfo = themeFiles[i] | ||||||
|             const themePath = themeInfo.path |             const themePath = themeInfo.path | ||||||
|             let themeFile = themeInfo.parsed |             let themeFile = themeInfo.parsed | ||||||
|  |             if(!themeFile){ | ||||||
|  |                 throw "Got an empty file for"+themeInfo.path | ||||||
|  |             } | ||||||
|             if (whitelist.size > 0 && !whitelist.has(themeFile.id)) { |             if (whitelist.size > 0 && !whitelist.has(themeFile.id)) { | ||||||
|                 continue |                 continue | ||||||
|             } |             } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue