Replace selectable name sets with a country that owns names and climate presets.
Create picks a country; climate is rolled from the school seed and stored. Old Slavic saves lift as Russia. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+16
-16
@@ -12,32 +12,32 @@ Create выбирает страну, а не набор имён. Имена и
|
||||
|
||||
## Задачи
|
||||
|
||||
- [ ] `CountryDef` и `ClimatePresetDef` в `HSchool.Content`: страна вкладывает нынешние поля
|
||||
- [x] `CountryDef` и `ClimatePresetDef` в `HSchool.Content`: страна вкладывает нынешние поля
|
||||
набора имён в `names`, ссылается на пресеты списками id
|
||||
- [ ] Набор имён больше не выбираемый вид; папка `namesets/` в `core` уезжает в страну
|
||||
- [ ] Ваниль: одна страна `Russia` с нынешним славянским набором и хотя бы одним пресетом
|
||||
- [x] Набор имён больше не выбираемый вид; папка `namesets/` в `core` уезжает в страну
|
||||
- [x] Ваниль: одна страна `Russia` с нынешним славянским набором и хотя бы одним пресетом
|
||||
(числа погоды можно заглушить — живая улица в фазе 32)
|
||||
- [ ] `GET /api/catalog` отдаёт `countries` (`defName`, подпись, `nativeLanguages`,
|
||||
- [x] `GET /api/catalog` отдаёт `countries` (`defName`, подпись, `nativeLanguages`,
|
||||
`climatePresets`) вместо `nameSets`
|
||||
- [ ] `POST /api/schools` принимает `countryId`; неизвестный — `400` `unknown-country`.
|
||||
- [x] `POST /api/schools` принимает `countryId`; неизвестный — `400` `unknown-country`.
|
||||
`nameSetId` не принимается
|
||||
- [ ] Пресет климата записывается на школу: случайный из списка страны, от сида. Живой школе
|
||||
- [x] Пресет климата записывается на школу: случайный из списка страны, от сида. Живой школе
|
||||
его не сменить
|
||||
- [ ] Форма создания: подпись «Страна»; язык — если у страны их несколько
|
||||
- [ ] Старый сейв с `nameSetId: Slavic` поднимается как `Russia` + первый пресет; формат
|
||||
- [x] Форма создания: подпись «Страна»; язык — если у страны их несколько
|
||||
- [x] Старый сейв с `nameSetId: Slavic` поднимается как `Russia` + первый пресет; формат
|
||||
новее без `countryId` — как с прочими полями сейва, школа не стартует
|
||||
- [ ] `docs/protocol.md` и `AGENTS.md` (ориентир create / каталог) в том же коммите
|
||||
- [ ] Золотой отпечаток ростера обновляется, если вход генератора сменил имя поля
|
||||
- [x] `docs/protocol.md` и `AGENTS.md` (ориентир create / каталог) в том же коммите
|
||||
- [x] Золотой отпечаток ростера обновляется, если вход генератора сменил имя поля
|
||||
|
||||
## Тесты, без которых фаза не закрыта
|
||||
|
||||
- [ ] Каталог `core` грузится; страна без имён или с неизвестным пресетом — ошибка загрузки
|
||||
- [ ] Create с `countryId: Russia` и без языка даёт тот же родной язык, что прежний сид без
|
||||
- [x] Каталог `core` грузится; страна без имён или с неизвестным пресетом — ошибка загрузки
|
||||
- [x] Create с `countryId: Russia` и без языка даёт тот же родной язык, что прежний сид без
|
||||
`nativeLanguage`
|
||||
- [ ] Create с неизвестной страной — `400` `unknown-country`
|
||||
- [ ] Два create с одним сидом получают один и тот же пресет
|
||||
- [ ] Старый сейв без страны поднимается
|
||||
- [ ] Диалог создания показывает страны, не наборы имён; смена страны обновляет список языков
|
||||
- [x] Create с неизвестной страной — `400` `unknown-country`
|
||||
- [x] Два create с одним сидом получают один и тот же пресет
|
||||
- [x] Старый сейв без страны поднимается
|
||||
- [x] Диалог создания показывает страны, не наборы имён; смена страны обновляет список языков
|
||||
|
||||
## Критерий готовности
|
||||
|
||||
|
||||
+16
-14
@@ -89,13 +89,15 @@ single seats field on a homeroom and the old slot rows on everything else.
|
||||
Things carry `pupilSlots` — how many pupils that thing hosts. The snapshot's per-node pupil-slot
|
||||
total is computed on the server.
|
||||
|
||||
`nameSets` is the list of placeable name packs (`defName` + label + `nativeLanguages`). Each
|
||||
`nativeLanguages` entry is a skill (`defName` + label). The create dialog picks a name set and a
|
||||
native language; the language list comes from that set (vanilla Slavic: Russian, Belarusian,
|
||||
Ukrainian). It is independent of the UI language. Everyone in the school is generated with that
|
||||
native. Other languages of the same set often appear at a low skill — a Russian speaker who
|
||||
understands Belarusian. Those rolls live on the `NameSetDef` (`relatedLanguageChance` and
|
||||
neighbours), not on this catalog payload.
|
||||
`countries` is the list of placeable countries (`defName` + label + `nativeLanguages` +
|
||||
`climatePresets`). Each `nativeLanguages` entry is a skill (`defName` + label). The create
|
||||
dialog picks a country and, when that country lists more than one tongue, a native language;
|
||||
the language list comes from that country (vanilla Russia: Russian, Belarusian, Ukrainian).
|
||||
It is independent of the UI language. Everyone in the school is generated with that native.
|
||||
Other languages of the same country often appear at a low skill — a Russian speaker who
|
||||
understands Belarusian. Those rolls live on the nested names of the `CountryDef`
|
||||
(`relatedLanguageChance` and neighbours), not on this catalog payload. `climatePresets` are
|
||||
ids; the school rolls one at create from its seed and keeps it.
|
||||
|
||||
`subjects` is the list of placeable subjects (`defName`, label, `gradeMin`/`gradeMax`,
|
||||
`hoursPerWeek`, `skills` with shares, and optional `room`). `room` is the RoomDef the lesson
|
||||
@@ -121,7 +123,7 @@ Body:
|
||||
"startDate": "2012-03-31T06:00:00Z",
|
||||
"modIds": [],
|
||||
"map": null,
|
||||
"nameSetId": "Slavic",
|
||||
"countryId": "Russia",
|
||||
"nativeLanguage": null,
|
||||
"seed": null
|
||||
}
|
||||
@@ -131,10 +133,10 @@ Body:
|
||||
pack's `requires` load first (stable topological sort over the player's order). The resolved
|
||||
order is returned as `modIds` on the created school and written to the save, so a restart loads
|
||||
the same catalog. Omit `map` (or send `null`) to use that pack set's default layout. A supplied map is validated as a connected yard-and-rooms graph.
|
||||
`nameSetId` is a `NameSetDef`; omit it to use the first placeable set in the catalog (vanilla:
|
||||
`Slavic`). Unknown ids return `400` `unknown-name-set`.
|
||||
`nativeLanguage` is a skill from that set's `nativeLanguages`. Omit it (or send `null`) to pick
|
||||
one from the school seed. An id that is not in the set returns `400` `unknown-native-language`.
|
||||
`countryId` is a `CountryDef`; omit it to use the first placeable country in the catalog (vanilla:
|
||||
`Russia`). Unknown ids return `400` `unknown-country`. The old `nameSetId` field is not accepted.
|
||||
`nativeLanguage` is a skill from that country's `nativeLanguages`. Omit it (or send `null`) to pick
|
||||
one from the school seed. An id that is not in the country returns `400` `unknown-native-language`.
|
||||
`seed` is an optional integer. Send it to reproduce a known school; omit it (or send `null`) and
|
||||
the server rolls one. Existing saves keep the seed already stored in the people file.
|
||||
|
||||
@@ -148,8 +150,8 @@ the server rolls one. Existing saves keep the seed already stored in the people
|
||||
| `400` `missing-mod` | A selected pack `requires` an id that was not selected. `missing` is that id. |
|
||||
| `400` `mod-cycle` | Selected packs require each other in a cycle. |
|
||||
| `400` `invalid-catalog` | The selected packs could not be loaded. |
|
||||
| `400` `unknown-name-set` | `nameSetId` is not a placeable `NameSetDef` in those packs. |
|
||||
| `400` `unknown-native-language` | `nativeLanguage` is not in that name set's `nativeLanguages`. |
|
||||
| `400` `unknown-country` | `countryId` is not a placeable `CountryDef` in those packs. |
|
||||
| `400` `unknown-native-language` | `nativeLanguage` is not in that country's `nativeLanguages`. |
|
||||
| `409` `school-limit-reached` | `maxSchools` schools already exist. |
|
||||
|
||||
Failures are RFC 7807 problem details with an extra `code` field — that is what the UI switches on.
|
||||
|
||||
Reference in New Issue
Block a user