Initial MVP: drivable RX-7 vertical slice + server-authoritative systems
CI / quality (push) Failing after 5m53s
CI / quality (push) Failing after 5m53s
- Rojo + Wally project; ProfileStore (loleris) for safe saves - Shared: GameConfig, Cars (RX-7 free starter), ProfileTemplate, Remotes - Server: DataManager, Economy, CarManager, RaceManager, MapBuilder, AntiCheat - Client: neon HUD + Garage/Dealership UI (buy/equip/upgrade), race/daily - Procedural Tokyo expressway (spawn pad, finish line, neon pylons, kill walls) - CI workflow (Gitea/GitHub), Makefile, selene+stylua clean, rojo builds - Docs: README, GDD, realistic solo ROADMAP
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
--!strict
|
||||
--[[
|
||||
ProfileTemplate.luau
|
||||
The canonical shape of a player's saved data. ProfileStore fills any
|
||||
missing keys from this template automatically (safe forward-migration:
|
||||
add a key here and existing players get the default on next load).
|
||||
|
||||
NEVER remove/rename a key without a migration plan — that's how saves break.
|
||||
]]
|
||||
|
||||
local GameConfig = require(script.Parent.GameConfig)
|
||||
|
||||
export type UpgradeLevels = {
|
||||
Engine: number,
|
||||
Tires: number,
|
||||
Nitro: number,
|
||||
}
|
||||
|
||||
export type OwnedCar = {
|
||||
Id: string,
|
||||
Upgrades: UpgradeLevels,
|
||||
}
|
||||
|
||||
export type ProfileData = {
|
||||
Cash: number,
|
||||
Rep: number,
|
||||
OwnedCars: { OwnedCar },
|
||||
EquippedCarId: string,
|
||||
LastDailyClaim: number, -- os.time() of last claim; 0 = never
|
||||
TotalRaces: number,
|
||||
Wins: number,
|
||||
Version: number, -- schema version for future migrations
|
||||
}
|
||||
|
||||
local ProfileTemplate: ProfileData = {
|
||||
Cash = GameConfig.StartingCash,
|
||||
Rep = GameConfig.StartingRep,
|
||||
OwnedCars = {
|
||||
{
|
||||
Id = GameConfig.StartingCarId,
|
||||
Upgrades = { Engine = 0, Tires = 0, Nitro = 0 },
|
||||
},
|
||||
},
|
||||
EquippedCarId = GameConfig.StartingCarId,
|
||||
LastDailyClaim = 0,
|
||||
TotalRaces = 0,
|
||||
Wins = 0,
|
||||
Version = 1,
|
||||
}
|
||||
|
||||
return ProfileTemplate
|
||||
Reference in New Issue
Block a user