make generic response status optional
This commit is contained in:
@@ -4,7 +4,7 @@ export function generic(res: GenericResponse) {
|
||||
const buf = Buffer.alloc(0x0020);
|
||||
|
||||
buf.writeInt16LE(0x0001, 0x0000);
|
||||
buf.writeInt32LE(res.status, 0x0004);
|
||||
buf.writeInt32LE(res.status || 0, 0x0004);
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ export async function createProfile(
|
||||
};
|
||||
|
||||
const settings = {
|
||||
bgMusic: 15,
|
||||
bgMusic: 0,
|
||||
forceQuitEn: false,
|
||||
steeringForce: 4,
|
||||
bgVolume: 10,
|
||||
|
||||
@@ -7,8 +7,5 @@ export function loadGeneralReward(
|
||||
req: LoadGeneralRewardRequest
|
||||
): GenericResponse {
|
||||
// A non-generic response is also accepted, but why bother
|
||||
return {
|
||||
type: "generic_res",
|
||||
status: 1, // not even checked but let's be consistent
|
||||
};
|
||||
return { type: "generic_res" };
|
||||
}
|
||||
|
||||
@@ -3,8 +3,5 @@ import { GenericResponse } from "../response/generic";
|
||||
import { World } from "../world";
|
||||
|
||||
export function lockGarage(w: World, req: LockGarageRequest): GenericResponse {
|
||||
return {
|
||||
type: "generic_res",
|
||||
status: 1, // ignored
|
||||
};
|
||||
return { type: "generic_res" };
|
||||
}
|
||||
|
||||
@@ -8,8 +8,5 @@ export async function saveSettings(
|
||||
): Promise<GenericResponse> {
|
||||
await w.settings().save(req.profileId, req.settings);
|
||||
|
||||
return {
|
||||
type: "generic_res",
|
||||
status: 1, // ignored but whatever
|
||||
};
|
||||
return { type: "generic_res" };
|
||||
}
|
||||
|
||||
@@ -9,8 +9,5 @@ export async function saveStocker(
|
||||
await w.backgrounds().save(req.profileId, req.backgrounds);
|
||||
await w.chara().save(req.profileId, req.chara);
|
||||
|
||||
return {
|
||||
type: "generic_res",
|
||||
status: 1, // ignored
|
||||
};
|
||||
return { type: "generic_res" };
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export interface GenericResponse {
|
||||
type: "generic_res";
|
||||
status: number;
|
||||
status?: number;
|
||||
// a bunch of other stuff here! total size is 0x20
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user