@willcgage/module-schematic 0.107.0 → 0.108.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -3281,6 +3281,15 @@ function moduleConversionReport(doc, library = BUILT_IN_TRACK_PARTS) {
3281
3281
  candidates
3282
3282
  };
3283
3283
  });
3284
+ const mainIds = new Set((doc.tracks ?? []).filter((t) => t.role === "main").map((t) => t.id));
3285
+ for (const t of doc.turnouts ?? []) {
3286
+ if (!mainIds.has(t.divergeTrack)) continue;
3287
+ blockers.push({
3288
+ kind: "turnout-opens-a-main",
3289
+ ref: t.id,
3290
+ why: `${t.name || t.id} opens ${t.divergeTrack}, which is a main \u2014 a main that begins at a turnout cannot be laid as pieces yet, and converting anyway would drop both it and the turnout`
3291
+ });
3292
+ }
3284
3293
  for (const c of doc.crossings ?? [])
3285
3294
  blockers.push({
3286
3295
  kind: "crossing",