fix bug
This commit is contained in:
parent
a7941a5619
commit
83a2ba017a
@ -125,12 +125,30 @@ export default class CarModule extends Module {
|
||||
return;
|
||||
}
|
||||
|
||||
// Generate blank car settings object
|
||||
let settings = await prisma.carSettings.create({
|
||||
data: {}
|
||||
});
|
||||
|
||||
// Generate blank car state object
|
||||
let state = await prisma.carState.create({
|
||||
data: {}
|
||||
});
|
||||
|
||||
let gtWing = await prisma.carGTWing.create({
|
||||
data: {}
|
||||
});
|
||||
|
||||
// Insert the car into the database
|
||||
let car = await prisma.car.create({
|
||||
data: {
|
||||
...carInsert,
|
||||
...additionalInsert,
|
||||
...additionalWindowStickerInsert
|
||||
...additionalWindowStickerInsert,
|
||||
|
||||
carSettingsDbId: settings.dbId,
|
||||
carStateDbId: state.dbId,
|
||||
carGTWingDbId: gtWing.dbId,
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -287,20 +287,6 @@ export async function createCar(body: wm.protobuf.CreateCarRequest)
|
||||
// User not found, terminate
|
||||
if (!user) throw new Error();
|
||||
|
||||
// Generate blank car settings object
|
||||
let settings = await prisma.carSettings.create({
|
||||
data: {}
|
||||
});
|
||||
|
||||
// Generate blank car state object
|
||||
let state = await prisma.carState.create({
|
||||
data: {}
|
||||
});
|
||||
|
||||
let gtWing = await prisma.carGTWing.create({
|
||||
data: {}
|
||||
});
|
||||
|
||||
// Sets if full tune is used or not
|
||||
// let fullyTuned = false;
|
||||
|
||||
|
@ -536,7 +536,6 @@ export async function saveGhostBattleResult(body: wm.protobuf.SaveGameResultRequ
|
||||
// Retiring Ghost Battle
|
||||
else if(body.rgResult!.selectionMethod === wmproto.wm.protobuf.GhostSelectionMethod.GHOST_SEARCH_BY_REGION ||
|
||||
body.rgResult!.selectionMethod === wmproto.wm.protobuf.GhostSelectionMethod.GHOST_SELECT_BY_LEVEL ||
|
||||
body.rgResult!.selectionMethod === wmproto.wm.protobuf.GhostSelectionMethod.GHOST_SELECT_CROWN_MATCH ||
|
||||
body.rgResult!.selectionMethod === wmproto.wm.protobuf.GhostSelectionMethod.GHOST_SELECT_STAMP_MATCH ||
|
||||
body.rgResult!.selectionMethod === wmproto.wm.protobuf.GhostSelectionMethod.GHOST_SELECT_FROM_HISTORY ||
|
||||
body.rgResult!.selectionMethod === wmproto.wm.protobuf.GhostSelectionMethod.GHOST_SEARCH_BY_SHOP ||
|
||||
@ -659,6 +658,12 @@ export async function saveGhostBattleResult(body: wm.protobuf.SaveGameResultRequ
|
||||
}
|
||||
});
|
||||
}
|
||||
// Retiring Crown Mode
|
||||
else if(body.rgResult!.selectionMethod === wmproto.wm.protobuf.GhostSelectionMethod.GHOST_SELECT_CROWN_MATCH)
|
||||
{
|
||||
// TODO
|
||||
console.log('Crown Ghost Mode Found but Retiring');
|
||||
}
|
||||
|
||||
// Return the value to 'BASE_PATH/src/modules/game.ts'
|
||||
return { ghostModePlay, updateNewTrail, OCMModePlay }
|
||||
|
Loading…
Reference in New Issue
Block a user