vehicles: a kind's numbers are a VehicleSpec the game hands over (vehicles_spec), not constants

The seat height, the horse's walk, gallop, acceleration and turn (VE_HORSE_*), its stamina (a gallop
over 6 m/s spends 6 a second, a walk gives back 3, 5 needed to gallop) and hay (0.02 a metre,
VEHICLE_HAY_MIN), the boat's stroke, turn and wind (VE_ROW, VE_ROW_TURN, VE_WIND) and where a rider
gets off (the horse's 1.2 m flank, the boat's 1.25 m wade) move into VehicleSpec (spec.ludic), held
per kind in VehiclesState.ve_specs and kept across a reset. vehicles_spec(kind, spec) sets one,
vehicle_spec(kind) asks it; a kind with no spec cannot be called. VEHICLE_HORSE and VEHICLE_BOAT stay
the kinds. The tests hand Maroon Lake's numbers in, and a new one holds a spec's walk and seat_h.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-29 20:17:31 +03:00
parent a87f20c66e
commit 668a9ecf69
10 changed files with 137 additions and 34 deletions

8
changes/vehicles-spec.md Normal file
View file

@ -0,0 +1,8 @@
bump: minor
type: feature
**`ludic.vehicles`: a kind's numbers are the game's.** The seat height, a horse's walk, gallop,
acceleration and turn, its stamina and hay, a boat's stroke, turn and the wind on it, and where a rider
gets off (the horse's flank, the boat's wade) were constants in the package; they are a `VehicleSpec` a
game hands each kind with `vehicles_spec(kind, spec)` before any vehicle of it is called, and
`vehicle_spec(kind)` asks them. A kind with no spec cannot be called, and a reset keeps the specs.
`VEHICLE_HAY_MIN` is gone: it is the horse spec's `hay_min`.