1
0
mirror of synced 2024-11-14 10:17:37 +01:00
This commit is contained in:
Shiroi Kitsu 2023-03-29 20:19:36 +07:00
parent a7941a5619
commit 83a2ba017a
3 changed files with 25 additions and 16 deletions

View File

@ -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,
}
});

View File

@ -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;

View File

@ -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 }