Truck side guards: one length and height, picked by the part's switch #209

Manually merged
github merged 2 commits from gh-pr/209/head into gh-pr/209/base 2026-11-26 20:18:21 +00:00
Owner

@⁠holdmysocks on GitHub · 2026-11-24 21:05 UTC · original
holdmysocks:claude/mule-sideguards → master · +97 −13 · 2 files · 2 commits · merged 2026-11-24 21:33 UTC

What

The mule (and iota, benson, tiptruck, towtruck) showed every side guard at once: three lengths and two heights stacked between the wheels, one of them running through the rear wheel.

  • Cause. A side guard part is a library part with up to 12 elements (high/low x left/right x short/mid/long), all on the bed's two sideguard_attach_l / _r bones. The part's modifier list names two switches (6191ddc2, one per side) whose options pick one element by key: the bed part sets a height key (93a3a3ef on flatbeds, 15354754 on boxes), the truck's chassis part a wheelbase key (77a0c459 tiptruck, 2e440529 iota and benson, 714aaeee mule). vehicles.json carried switches only for a vehicle's own pack, so library parts fitted every element.
  • Library switches. A library part's switch is now added to the vehicles whose configurations name the part, when it is a plain choice of one element (no default, no option without an element) that the vehicle's parts can answer. The elements it chooses from leave the part's element list (switched_elements counts them), so the existing switch code shows one.
  • Keys through the library. A pack's own part can name a key modifier (b21fa2e2) that lives in the library; these were not resolved (only key modifiers in the same pack were). The wheelbase key is such a one, on the chassis part.
  • Viewer. A part whose every model is a switch's stays a selectable part, and a library element's model is found by name hash.

vehicles.json FORMAT 15 -> 16. 22 part entries on 9 vehicles change (side guards and similar on benson, iota, mule, tiptruck, towtruck, one unnamed truck; one part on gauntlet4 and landstalker2).

Checked

  • Viewer, side on, before and after: mule (flatbed: high long guard; box configuration: low long guard), iota and benson (mid): one guard per side, between the wheels.
  • sixng vehicle --config 0 with the old and the new vehicles.json: mule, benson and iota lose 10 guard pieces each and keep 2; bobcatxl and caracara4x4 fit exactly the same pieces as before.
  • cargo test --workspace: 188 + 20 passed, 0 failed, 3 ignored.

Not decoded / not done

  • Library switches that are not a plain choice are still left out, and their parts fit every element as before. Number plates are the main case (179 vehicles): their switches have defaults and empty options, their keys come from bumpers, and the picked bone can be on a fitted bumper rather than the vehicle. A first, wider version of this change dropped plates and rear bumpers on pickups, so it was narrowed.
  • A pack's own non-chassis parts with switches still fit all their elements and the switch's pick on top (unchanged).
  • Which of short/mid/long each wheelbase key means is read from the model names of the elements it picks, not from a name of the key. gauntlet4 and landstalker2 were not rendered; tiptruck's and towtruck's guard configurations were not rendered.
  • The Metal renderer was not built or run. No unit test for the new rule.
**@⁠holdmysocks** on GitHub · 2026-11-24 21:05 UTC · [original](https://github.com/holdmysocks/SixNG/pull/209) `holdmysocks:claude/mule-sideguards` → `master` · +97 −13 · 2 files · 2 commits · merged 2026-11-24 21:33 UTC ## What The mule (and iota, benson, tiptruck, towtruck) showed every side guard at once: three lengths and two heights stacked between the wheels, one of them running through the rear wheel. - **Cause.** A side guard part is a library part with up to 12 elements (high/low x left/right x short/mid/long), all on the bed's two `sideguard_attach_l` / `_r` bones. The part's modifier list names two switches (`6191ddc2`, one per side) whose options pick one element by key: the bed part sets a height key (`93a3a3ef` on flatbeds, `15354754` on boxes), the truck's chassis part a wheelbase key (`77a0c459` tiptruck, `2e440529` iota and benson, `714aaeee` mule). `vehicles.json` carried switches only for a vehicle's own pack, so library parts fitted every element. - **Library switches.** A library part's switch is now added to the vehicles whose configurations name the part, when it is a plain choice of one element (no default, no option without an element) that the vehicle's parts can answer. The elements it chooses from leave the part's element list (`switched_elements` counts them), so the existing switch code shows one. - **Keys through the library.** A pack's own part can name a key modifier (`b21fa2e2`) that lives in the library; these were not resolved (only key modifiers in the same pack were). The wheelbase key is such a one, on the chassis part. - **Viewer.** A part whose every model is a switch's stays a selectable part, and a library element's model is found by name hash. `vehicles.json` FORMAT 15 -> 16. 22 part entries on 9 vehicles change (side guards and similar on benson, iota, mule, tiptruck, towtruck, one unnamed truck; one part on gauntlet4 and landstalker2). ## Checked - Viewer, side on, before and after: mule (flatbed: high long guard; box configuration: low long guard), iota and benson (mid): one guard per side, between the wheels. - `sixng vehicle --config 0` with the old and the new `vehicles.json`: mule, benson and iota lose 10 guard pieces each and keep 2; bobcatxl and caracara4x4 fit exactly the same pieces as before. - `cargo test --workspace`: 188 + 20 passed, 0 failed, 3 ignored. ## Not decoded / not done - Library switches that are not a plain choice are still left out, and their parts fit every element as before. Number plates are the main case (179 vehicles): their switches have defaults and empty options, their keys come from bumpers, and the picked bone can be on a fitted bumper rather than the vehicle. A first, wider version of this change dropped plates and rear bumpers on pickups, so it was narrowed. - A pack's own non-chassis parts with switches still fit all their elements and the switch's pick on top (unchanged). - Which of short/mid/long each wheelbase key means is read from the model names of the elements it picks, not from a name of the key. gauntlet4 and landstalker2 were not rendered; tiptruck's and towtruck's guard configurations were not rendered. - The Metal renderer was not built or run. No unit test for the new rule.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:18:19 +00:00
github manually merged commit 5fcd0f58c7 into gh-pr/209/base 2026-11-26 20:18:21 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.