This commit is contained in:
Leonid Pershin
2026-08-18 23:51:10 +03:00
parent d8f8db6a48
commit 65feda3756
50 changed files with 1485 additions and 224 deletions
+16 -5
View File
@@ -47,10 +47,7 @@ internal static class Fixtures
Building = "main",
Floor = "floor-1",
Label = $"{101 + i}",
Slots =
[
new SlotFill { Key = "studentDesks", Thing = "StudentDesk", Count = desks },
],
Seats = desks,
};
}
@@ -72,7 +69,7 @@ internal static class Fixtures
Building = "main",
Floor = "floor-1",
Label = "101",
Slots = [new SlotFill { Key = "studentDesks", Thing = "StudentDesk", Count = 1 }],
Seats = 1,
},
};
@@ -84,6 +81,20 @@ internal static class Fixtures
return new MapLayout { Rooms = rooms };
}
public static MapLayout VanillaMap()
{
var root = Path.Combine(AppContext.BaseDirectory, "vanilla");
var map = CatalogLoader.LastDefaultMap(
[CatalogLoader.CorePackId],
PackDocuments.FromDirectory(CatalogLoader.CorePackId, root));
if (map is null)
{
throw new InvalidOperationException("Vanilla default map is missing.");
}
return map;
}
public static Roster Generate(MapLayout map, int seed = SchoolSeed) =>
RosterGenerator.Generate(Catalog(), map, seed, "Slavic", AsOf);