parts.module
README.md
bots.parts
The catalogue of every part a combat robot can be built from, and the maths every system shares to place them.
- Catalogue: 26 part types in 7 categories:
- Structure: base plate, frame rail, block, ballast.
- Armour: plate, wedge, box, dome and cylinder shells, forks.
- Drive: wheel, tank tread, caster.
- Weapons: vertical and horizontal spinners, drum, flipper, hammer/axe, lifter, crusher, ram spike.
- Power and control: battery, receiver/ESC.
- Utility: self-righter.
- Decor: name plate, status light.
- What each type defines: its shape, size limits, a sizing rule, default material and settings, and paint role. Materials (aluminium, steel, titanium, AR500, Hardox, UHMW, polycarbonate) use real densities and damage behaviour; LiPo and LiFePO4 battery chemistries are included.
- Shared maths: bot space, part transforms (yaw, pitch, roll), corners, bounds, distance to a part, and mirroring across the centre line.
- Per-part physics: mass, hit points and armour from a part's size, material and settings, plus SoftBody dent parameters for armour.
Used by bots.design (whole-bot physics), editor.session, the assembler, the builder screens and the damage system.