Vehicles: merge a chassis-named record into its model's empty record (tankercar, freight) #541

Manually merged
github merged 5 commits from github-bot/gh-541 into gh-pr/541/base 2026-11-28 13:09:56 +00:00 AGit
Owner

@⁠holdmysocks on GitHub · 2026-11-28 05:18 UTC · original
holdmysocks:chassis-merge → master · +50 −21 · 1 files · 5 commits · merged 2026-11-28 13:05 UTC

The freight tanker car and the freight car now open with their configurations, palettes, parts and game liveries. That makes 403 more brand stickers placeable.

Builds on PR 523, which builds on PR 515.

Why

  • Several freight-car model infos share the gameName freight and point at each other's handlingIds. The handlingId merge in PR 515 therefore leaves these records apart, and so does the chassis naming in PR 523, because the model already has a record. tankercar and freight each had a record with only a model info. Their configurations, palettes, parts and liveries sat under hashes with no model: 045b363c (303 stickers) and acfad21b (100).
  • The chassis parts settle it. 045b363c's chassis element is tankercar, and acfad21b's is freight.

Changes

  • name_by_chassis: when the chassis model already has a record with no configurations and no parts, the record is merged into it. It fills what the record leaves unset, joins lists both have, and adds records_from. A model record with configurations or parts of its own still stays as it is.
  • The copy step of the handlingId merge is now a shared merge_into, used by both.

Tests

  • The chassis test now also covers merging into a model record that has no configurations, and leaving one that has some.
  • cargo test -p sixng-core vehicles::: 4 pass. cargo test -p sixng-gui: 68 pass.
  • sixng vehicles into a scratch folder: tankercar has 2 configurations, 3 palettes, 13 parts and 3 brands (303 stickers). freight has 1 configuration, 5 palettes, 11 parts and 4 brands (100 stickers). The nine records named in PR 523 and the six merges from PR 515 are unchanged.
  • Rendered tankercar with brand 3804c5df. Master shows "no game livery", no configurations and car wheels. With this change it shows the Xero Gas logo, its configurations and the train wheels.
**@⁠holdmysocks** on GitHub · 2026-11-28 05:18 UTC · [original](https://github.com/holdmysocks/SixNG/pull/541) `holdmysocks:chassis-merge` → `master` · +50 −21 · 1 files · 5 commits · merged 2026-11-28 13:05 UTC The freight tanker car and the freight car now open with their configurations, palettes, parts and game liveries. That makes 403 more brand stickers placeable. Builds on PR 523, which builds on PR 515. ## Why - Several freight-car model infos share the gameName `freight` and point at each other's handlingIds. The handlingId merge in PR 515 therefore leaves these records apart, and so does the chassis naming in PR 523, because the model already has a record. `tankercar` and `freight` each had a record with only a model info. Their configurations, palettes, parts and liveries sat under hashes with no model: 045b363c (303 stickers) and acfad21b (100). - The chassis parts settle it. 045b363c's chassis element is `tankercar`, and acfad21b's is `freight`. ## Changes - `name_by_chassis`: when the chassis model already has a record with no configurations and no parts, the record is merged into it. It fills what the record leaves unset, joins lists both have, and adds `records_from`. A model record with configurations or parts of its own still stays as it is. - The copy step of the handlingId merge is now a shared `merge_into`, used by both. ## Tests - The chassis test now also covers merging into a model record that has no configurations, and leaving one that has some. - `cargo test -p sixng-core vehicles::`: 4 pass. `cargo test -p sixng-gui`: 68 pass. - `sixng vehicles` into a scratch folder: tankercar has 2 configurations, 3 palettes, 13 parts and 3 brands (303 stickers). freight has 1 configuration, 5 palettes, 11 parts and 4 brands (100 stickers). The nine records named in PR 523 and the six merges from PR 515 are unchanged. - Rendered tankercar with brand 3804c5df. Master shows "no game livery", no configurations and car wheels. With this change it shows the Xero Gas logo, its configurations and the train wheels.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 05:18:53 +00:00
# Conflicts:
#	crates/sixng-core/src/vehicles.rs
github-bot changed target branch from master to gh-pr/541/base 2026-11-28 13:09:54 +00:00
github manually merged commit dc37c739b6 into gh-pr/541/base 2026-11-28 13:09:56 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.