Extract map-specific data into a generic MapSource interface
One interface (nd_mapsource.h) now owns everything map-specific: tiles, rooms/doors/cameras, the network graph (nodes + edges with roles replacing the hardcoded N_AIRLK/N_DOOR/N_HIVE indices) and the entity spawn list. The scenario populates its structures once via selectMap() and never checks which map is active. - DemoMapSource: self-contained demo grid (moved out of the sketch), demo node/edge/spawn tables - GenMapSource: adapts the random MapGenerator — now with L-corridors for guaranteed connectivity, doors that lead somewhere, airlock pad, terminal and crates (never on corridor tiles); network graph derived from the room chain, marine-first spawn list with droid patrols - NetDeck.ino: all source branching removed; red trace follows the real active-link path (BFS HIVE->ROOT); reinforcement spawns near the blast door - Tests: MapTest validates 50 generated runs + demo via the interface with an airlock flood-fill; new generated-map integration journey; test node handles resolve through the source (no hardcoded indices)
This commit is contained in:
@@ -154,7 +154,7 @@ TEST(e2e/network_journey)
|
||||
EXPECT(pumpUntil(30.0, spikeSeen)); // ... trace ... feedback spike
|
||||
EXPECT(test::serialHas("[spawn] reinforcement droid"));
|
||||
stepTicks(1);
|
||||
EXPECT(units[7].alive);
|
||||
EXPECT(units[g_reinforceIdx].alive);
|
||||
EXPECT(heatT > 0); // OVERHEAT lockout engaged
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user