Meta: enum value names from the executable's enum tables #426

Manually merged
github merged 15 commits from github-bot/gh-426 into gh-pr/426/base 2026-11-27 02:56:29 +00:00 AGit
Owner

@⁠holdmysocks on GitHub · 2026-11-26 23:58 UTC · original
holdmysocks:claude/enum-value-names → master · +4494 −144 · 25 files · 15 commits · merged 2026-11-27 02:55 UTC

What it adds

  • enum_values.txt: 3,253 named values of 919 enums.
    • The value hashes come from the executable's parser enum tables (#400).
    • They are matched against names_exe.txt and the names the tables already resolve. Only exact case-sensitive joaat matches are listed.
  • meta7a::enum_values() and enum_value_name(enum_hash, value). The enum hash is the member's extra.
  • Meta::enum_names(), and an enum_names section in sixng meta --dump output: field name → value → name, for the resource's enum members and arrays of enums.
  • No decoded value changes, so existing readers are unaffected. With #422, enum fields read as plain numbers, which this section names.

Coverage

  • The enums used in meta files have 3,184 values, of which 285 are named.
  • Fully named enums include the entity priority and LOD enums, vehicle class, ladder rail type and a tyre-grip enum (Default, OnRoadHighGrip …).
  • Unlisted values are unknown, not invalid.

Checked

  • meta data and meta packs --dump: 399 of the 20,442 resources get enum_names, over 14 fields.
  • cargo test -p sixng-core --lib meta7a::, including the new test enum_value_table.
**@⁠holdmysocks** on GitHub · 2026-11-26 23:58 UTC · [original](https://github.com/holdmysocks/SixNG/pull/426) `holdmysocks:claude/enum-value-names` → `master` · +4494 −144 · 25 files · 15 commits · merged 2026-11-27 02:55 UTC **What it adds** - `enum_values.txt`: 3,253 named values of 919 enums. - The value hashes come from the executable's parser enum tables (#400). - They are matched against `names_exe.txt` and the names the tables already resolve. Only exact case-sensitive joaat matches are listed. - `meta7a::enum_values()` and `enum_value_name(enum_hash, value)`. The enum hash is the member's `extra`. - `Meta::enum_names()`, and an `enum_names` section in `sixng meta --dump` output: field name → value → name, for the resource's enum members and arrays of enums. - No decoded value changes, so existing readers are unaffected. With #422, enum fields read as plain numbers, which this section names. **Coverage** - The enums used in meta files have 3,184 values, of which 285 are named. - Fully named enums include the entity priority and LOD enums, vehicle class, ladder rail type and a tyre-grip enum (Default, OnRoadHighGrip …). - Unlisted values are unknown, not invalid. **Checked** - `meta data` and `meta packs --dump`: 399 of the 20,442 resources get `enum_names`, over 14 fields. - `cargo test -p sixng-core --lib meta7a::`, including the new test `enum_value_table`.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 00:39:48 +00:00
# Conflicts:
#	crates/sixng-core/src/meta7a.rs
github-bot changed target branch from master to gh-pr/426/base 2026-11-27 02:56:27 +00:00
github manually merged commit 8297275cf1 into gh-pr/426/base 2026-11-27 02:56:29 +00:00
Author
Owner

@⁠holdmysocks on GitHub · 2026-11-27 04:25 UTC · original

#426 merged before these names were pushed. They are in #454 instead.

**@⁠holdmysocks** on GitHub · 2026-11-27 04:25 UTC · [original](https://github.com/holdmysocks/SixNG/pull/426#issuecomment-7209788075) #426 merged before these names were pushed. They are in #454 instead.
This discussion has been locked. Commenting is limited to contributors.
No description provided.