# Stancer Kit

A full-featured **wheel stancing** system that allows players to adjust wheel spacer, camber, width, and size per-wheel — complete with UI, animations, lift support, and per-vehicle persistence.

## Features

* Per-wheel stancing: spacer, camber, width, size
* Supports up to 10 wheel positions (e.g., trailers, multi-axle)
* Auto-detection of nearest wheel
* Option to reset a single wheel or all wheels
* Supports both `ox_lib` and `qb-input` menu systems
* Progress bar + animation with lift/emote support
* Persistent vehicle status via `ExtraDamageComponents`
* Optional tool breakage (e.g. `stancerkit`) on use
* Pre-cached offsets for vanilla vehicles (faster load)

***

## How It Works

### Menu Flow

* Player uses a stancer item or action (`jim-mechanic:client:stancerMenu`)
* Script detects the **nearest wheel** bone to the player
* Player gets a UI to:
  * Adjust individual values (spacer, camber, etc.)
  * Reset that wheel
  * Reset all wheels on the vehicle
* Validity checks: correct job, location, vehicle class, and proximity

### Adjustments

Each change is stored in `VehicleStatus` and applied live:

* `Spacer`: wheel X offset
* `Camber`: wheel Y rotation
* `Width`: affects tire collider size and appearance
* `Size`: affects actual wheel size

### Live Sync

* Vehicle stancer values are checked every 50ms when changes exist
* Stancer values are reapplied if the vehicle still exists
* Changes persist via state management and saved JSON data

***

### Notes

* Uses `stancerTable` config to define value ranges (+/- camber/space/width/size)
* Lift detection prevents editing while elevated
* Uses `createTempCam` and progress bar with contextual animations

