forked from MapComplete/MapComplete
Studio: studio now supports loading self-made layers in themes
This commit is contained in:
parent
9716bc5425
commit
28bf8cca9f
24 changed files with 826 additions and 464 deletions
|
|
@ -39,7 +39,7 @@ export abstract class Conversion<TIn, TOut> {
|
|||
ConversionContext.print(msg)
|
||||
}
|
||||
if (context.hasErrors()) {
|
||||
throw "Detected one or more errors, stopping now"
|
||||
throw new Error(["Detected one or more errors, stopping now:", context.getAll("error").map(e => e.context.path.join(".")+": "+e.message)].join("\n\t"))
|
||||
}
|
||||
return fixed
|
||||
}
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ class AddDefaultLayers extends DesugaringStep<LayoutConfigJson> {
|
|||
|
||||
convert(json: LayoutConfigJson, context: ConversionContext): LayoutConfigJson {
|
||||
const state = this._state
|
||||
json.layers = [...(json.layers ?? [])]
|
||||
json.layers = Utils.NoNull([...(json.layers ?? [])])
|
||||
const alreadyLoaded = new Set(json.layers.map((l) => l["id"]))
|
||||
|
||||
for (const layerName of Constants.added_by_default) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue