Add HSchool.Content project for JSONC definitions, catalog, and map validation. Update solution structure to include new content and tests projects. Enhance school management to support mod packs and map instances, ensuring proper loading and validation. Revise documentation to reflect these changes and update tests for new functionality.
ci / server (push) Failing after 3m36s
ci / client (push) Successful in 13s

This commit is contained in:
Leonid Pershin
2026-08-18 14:35:09 +03:00
parent 37c39a3beb
commit 1bc75244e8
55 changed files with 2289 additions and 59 deletions
+9 -3
View File
@@ -74,6 +74,7 @@ dotnet test
```
- `tests/HSchool.Protocol.Tests` — wire-format round-trips and byte layouts.
- `tests/HSchool.Content.Tests` — JSONC catalog, inheritance, patches, map connectivity. No host.
- `tests/HSchool.Simulation.Tests` — the game clock, school load/create, and the school registry, no host involved.
- `tests/HSchool.AppHost.Tests` — boots the real Aspire graph, drives the menu API and the
WebSocket clock. Runs headless (`--HSchool:Headless=true`), so no Node install is needed.
@@ -89,8 +90,10 @@ Vitest covers the client codec, the calendar formatting and the RU/EN dictionari
```
src/
HSchool.Protocol/ binary wire format (shared contract with the client)
HSchool.Content/ JSONC defs, patches, map validation
HSchool.Simulation/ schools, the game clock, the Arch ECS world
HSchool.Server/ ASP.NET Core host, menu API, WebSocket endpoint, game loop
HSchool.Server/ ASP.NET Core host, menu API, WebSocket, workers
HSchool.Server/mods/ pack folders; `core` is always on
HSchool.ServiceDefaults/ Aspire telemetry, health checks, resilience
HSchool.AppHost/ Aspire orchestration
HSchool.Client/ Vite + TypeScript UI
@@ -112,9 +115,12 @@ Simulation tunables live under the `Simulation` section of
| `MaxSchools` | 6 | how many schools may exist at once |
| `GameMinutesPerRealSecond` | 5 | game minutes per real second at ×1 |
| `DefaultStartDate` | `2012-04-03T06:00:00` | prefilled start of a new school |
| `SavesDirectory` | `saves` | per-school JSON files |
| `ModsDirectory` | `mods` | pack folders; `core` is required |
| `SaveIntervalSeconds` | 30 | rare clock snapshot; not every tick |
## What is deliberately missing
No persistence, no authentication, and nothing inside a school yet — every school owns an empty
ECS world waiting for its first entities. Each of these has a seam described in
No authentication, no action execution, and the create dialog does not yet pick mods or edit the
map — every new school gets the vanilla `core` layout. Each of these has a seam described in
[`docs/architecture.md`](docs/architecture.md).