diff options
| author | aslan2142 <jan.trencansky@protonmail.com> | 2026-11-25 18:28:59 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-11-25 18:28:59 +0100 |
| commit | aeec1ddc6fdaccc10c2b4d14cfdc56512220fe94 (patch) | |
| tree | 14796cf835177c15b3c217ace1ae2f98f8efe15d /docs | |
| parent | 6ade9f225b773533ffd34e6a829a803e561fc35a (diff) | |
| parent | 6e85823da41528fd8fcc21379b3a9f58a2d44f24 (diff) | |
Merge pull request #1850 from cheltyi/fix/gamedata-empty-typed-objects
gamedata_reader: preserve empty polymorphic objects (GAMEDATA-EMPTY-TYPED-OBJECTS)
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/gamedata.md | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/docs/gamedata.md b/docs/gamedata.md index a05fd1ea5..bcaa55f4d 100644 --- a/docs/gamedata.md +++ b/docs/gamedata.md | |||
| @@ -1416,7 +1416,8 @@ bounded by the largest field. The generic conversion follows the parser's own co | |||
| 1416 | - `x/y/z/w` is a vector tuple. | 1416 | - `x/y/z/w` is a vector tuple. |
| 1417 | - `content=` is the array body. `short_array`, `float_array` and `float16_array` give number lists; | 1417 | - `content=` is the array body. `short_array`, `float_array` and `float16_array` give number lists; |
| 1418 | `vector2_array`, `vec3v_array`, `matrix33` and `matrix34` give tuples. | 1418 | `vector2_array`, `vec3v_array`, `matrix33` and `matrix34` give tuples. |
| 1419 | - `type="Class"` is a polymorphic object `{"$type": ...}`, and `type="NULL"` is `None`. | 1419 | - `type="Class"` is a polymorphic object `{"$type": ...}`, including an empty object with no fields or text. |
| 1420 | Explicit scalar/vector/array/reference conventions and nonempty text keep their values; `type="NULL"` is `None`. | ||
| 1420 | - `ref=` is `{"$ref": ...}`. | 1421 | - `ref=` is `{"$ref": ...}`. |
| 1421 | - All-`Item` children are a list, or a dict when every one carries `key=`. A repeated tag is a list. A text-only | 1422 | - All-`Item` children are a list, or a dict when every one carries `key=`. A repeated tag is a list. A text-only |
| 1422 | element is its text. Any other attribute is kept as `"@name"`. | 1423 | element is its text. Any other attribute is kept as `"@name"`. |
| @@ -1440,11 +1441,13 @@ On the 1.0.2.1 carve of `common.rpf` the run takes about 5 s, with 0 conversion | |||
| 1440 | | arrays | 13,449 | | 1441 | | arrays | 13,449 | |
| 1441 | | lists | 13,465 | | 1442 | | lists | 13,465 | |
| 1442 | | keyed maps | 526 | | 1443 | | keyed maps | 526 | |
| 1443 | | polymorphic objects | 6,490 (317 `type` classes over 6,903 typed elements) | | 1444 | | polymorphic objects | 6,663 (317 `type` classes over 6,903 typed elements) | |
| 1444 | | `NULL` pointers | 278 | | 1445 | | `NULL` pointers | 278 | |
| 1445 | | references | 924 | | 1446 | | references | 924 | |
| 1446 | | elements with extra attributes | 5,262 | | 1447 | | elements with extra attributes | 5,262 | |
| 1447 | 1448 | ||
| 1449 | The object count includes 173 empty instances across 13 documents (54 types). | ||
| 1450 | |||
| 1448 | The 7 roots missing from the 118 occur only in documents that are not well-formed. Counts only: the JSON that | 1451 | The 7 roots missing from the 118 occur only in documents that are not well-formed. Counts only: the JSON that |
| 1449 | `--out` writes is the game's data and stays local. `tests/test_gamedata_reader.py` checks every convention, | 1452 | `--out` writes is the game's data and stays local. `tests/test_gamedata_reader.py` checks every convention, |
| 1450 | both dispatch tables, that streaming equals a whole-tree conversion, and the CLI, on synthetic XML. | 1453 | both dispatch tables, that streaming equals a whole-tree conversion, and the CLI, on synthetic XML. |