Files
tokyo-wangan-racing/src/shared/Cars.luau
T
jesse 07a67204ca
CI / quality (push) Successful in 1m1s
Scope cut: drive-only MVP (remove racing + economy)
Per user direction, the MVP is now simply driving cars on the expressway.
- Removed RaceManager and Economy modules entirely
- Slimmed Remotes to DataUpdated / SpawnCar / EquipCar
- ProfileTemplate now just remembers the last driven car (v2)
- Cars: dropped price/rep/upgrade fields; kept identity + driving stats
- CarManager: stat-based tuning only; RX-7 allowlist via GameConfig.canDrive
- DataManager: assign default car on join; downgrade RX-7 if de-allowlisted
- Client: replaced garage/economy UI with a simple car picker + respawn
- Docs: GDD/ROADMAP/README rewritten for drive-only; added docs/MESH_SWAP.md
- Gates: stylua clean, selene 0/0, rojo builds
2026-07-22 00:11:11 -04:00

89 lines
2.4 KiB
Luau

--!strict
--[[
Cars.luau
The car catalogue. MVP scope (just driving): a car is an identity + driving
feel + look. No prices, no rep gates, no upgrades. Add a car = add a row.
Stat scale 0-100 (relative feel): Speed = top speed, Acceleration = how fast
it gets there, Handling = grip/turn-in. These drive the VehicleSeat tuning.
]]
export type CarStats = {
Speed: number,
Acceleration: number,
Handling: number,
}
export type Car = {
Id: string,
Name: string,
Model: string, -- real-world reference
Tier: number, -- 1 Junk .. 5 Exotic (display/flavour only in MVP)
Stats: CarStats,
Color: { number }, -- {r,g,b} 0-1 for the placeholder body until a real mesh exists
Description: string,
Restricted: boolean?, -- true = allowlist-only (the RX-7 demo lock)
}
local Cars = {}
Cars.List = {
{
Id = "rx7_fc",
Name = "Chick3n's RX-7",
Model = "1993 Mazda RX-7 (FD)",
Tier = 2,
Stats = { Speed = 62, Acceleration = 58, Handling = 70 },
Color = { 0.85, 0.15, 0.12 }, -- classic RX-7 red until the real mesh is imported
Description = "The one that started it all. A rotary-hearted FD RX-7 — light, balanced, iconic.",
Restricted = true, -- demo-locked to the owner + son during testing
},
{
Id = "hatch_junk",
Name = "City Runabout",
Model = "90s econobox hatchback",
Tier = 1,
Stats = { Speed = 34, Acceleration = 40, Handling = 48 },
Color = { 0.5, 0.5, 0.55 },
Description = "Cheap, cheerful, and slow. The public default cruiser.",
},
{
Id = "silv_s15",
Name = "Night Slider",
Model = "Nissan Silvia S15",
Tier = 3,
Stats = { Speed = 74, Acceleration = 70, Handling = 78 },
Color = { 0.1, 0.35, 0.85 },
Description = "A drift-bred coupe with serious mid-corner poise.",
},
{
Id = "gtr_r34",
Name = "Godzilla",
Model = "Nissan Skyline GT-R R34",
Tier = 4,
Stats = { Speed = 88, Acceleration = 86, Handling = 82 },
Color = { 0.15, 0.6, 0.95 },
Description = "AWD, twin-turbo, legendary. People notice when you show up in this.",
},
{
Id = "hyper_x",
Name = "Apex Phantom",
Model = "Exotic hypercar (stylized)",
Tier = 5,
Stats = { Speed = 100, Acceleration = 98, Handling = 90 },
Color = { 0.05, 0.05, 0.06 },
Description = "Top of the food chain. Carbon fibre and neon.",
},
}
Cars.ById = {} :: { [string]: Car }
for _, car in ipairs(Cars.List) do
Cars.ById[car.Id] = car
end
function Cars.Get(id: string): Car?
return Cars.ById[id]
end
return Cars