@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.js CHANGED
@@ -3279,6 +3279,15 @@ function moduleConversionReport(doc, library = BUILT_IN_TRACK_PARTS) {
3279
3279
  candidates
3280
3280
  };
3281
3281
  });
3282
+ const mainIds = new Set((doc.tracks ?? []).filter((t) => t.role === "main").map((t) => t.id));
3283
+ for (const t of doc.turnouts ?? []) {
3284
+ if (!mainIds.has(t.divergeTrack)) continue;
3285
+ blockers.push({
3286
+ kind: "turnout-opens-a-main",
3287
+ ref: t.id,
3288
+ 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`
3289
+ });
3290
+ }
3282
3291
  for (const c of doc.crossings ?? [])
3283
3292
  blockers.push({
3284
3293
  kind: "crossing",