consolidate car load/save
This commit is contained in:
@@ -8,6 +8,6 @@ export function discoverProfile(
|
||||
): DiscoverProfileResponse {
|
||||
return {
|
||||
type: "discover_profile_res",
|
||||
result: true,
|
||||
exists: true,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ import { loadTopTen } from "./loadTopTen";
|
||||
import { lockGarage } from "./lockGarage";
|
||||
import { lockProfile } from "./lockProfile";
|
||||
import { saveExpedition } from "./saveExpedition";
|
||||
import { saveGarage } from "./saveGarage";
|
||||
import { saveProfile } from "./saveProfile";
|
||||
import { saveSettings } from "./saveSettings";
|
||||
import { saveStocker } from "./saveStocker";
|
||||
@@ -81,6 +82,9 @@ export function dispatch(w: World, req: Request): Response {
|
||||
case "update_provisional_store_rank_req":
|
||||
return updateProvisionalStoreRank(w, req);
|
||||
|
||||
case "save_garage_req":
|
||||
return saveGarage(w, req);
|
||||
|
||||
case "save_profile_req":
|
||||
return saveProfile(w, req);
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { LoadProfileRequest } from "../request/loadProfile";
|
||||
import { LoadProfileResponse2 } from "../response/loadProfile2";
|
||||
import { World } from "../world";
|
||||
import { Car } from "../model/car";
|
||||
|
||||
export function loadProfile(
|
||||
w: World,
|
||||
@@ -25,5 +26,22 @@ export function loadProfile(
|
||||
ghostEn: false,
|
||||
taResultSkip: false,
|
||||
},
|
||||
car: {
|
||||
field_00: 0,
|
||||
field_02: 0,
|
||||
field_04: [],
|
||||
model: 0,
|
||||
color: 0,
|
||||
transmission: 0,
|
||||
field_4A: 0,
|
||||
field_4C: 21527,
|
||||
field_50_lo: 3674393,
|
||||
field_50_hi: 6407,
|
||||
field_58: 0,
|
||||
field_5A: 0,
|
||||
field_5B: 0,
|
||||
field_5C: 1,
|
||||
field_5E: 0,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
import { SaveGarageRequest } from "../request/saveGarage";
|
||||
import { SaveGarageResponse } from "../response/saveGarage";
|
||||
import { World } from "../world";
|
||||
|
||||
export function saveGarage(
|
||||
w: World,
|
||||
req: SaveGarageRequest
|
||||
): SaveGarageResponse {
|
||||
return {
|
||||
type: "save_garage_res",
|
||||
status: 0, // Zero means success for this particular message -.-
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user