Merge pull request #43 from ghkkk090/master
More OCM Data (old event before mt6 and dev ghost), fix terminal ocm
This commit is contained in:
commit
ee83a32ad4
File diff suppressed because one or more lines are too long
236
src/api.ts
236
src/api.ts
@ -1,236 +0,0 @@
|
||||
import express, { Application } from "express";
|
||||
import { prisma } from ".";
|
||||
import { Module } from "./module";
|
||||
|
||||
|
||||
export default class ApiModule extends Module {
|
||||
register(app: Application): void {
|
||||
|
||||
app.use(express.urlencoded({
|
||||
type: '*/*',
|
||||
extended: true
|
||||
}));
|
||||
|
||||
|
||||
app.use(express.json({
|
||||
type: '*/*'
|
||||
}));
|
||||
|
||||
|
||||
// API Get Requests
|
||||
// Get Current Bayshore Version
|
||||
app.get('/api/bayshore_version', async (req, res) => {
|
||||
let message: any = {
|
||||
error: null,
|
||||
version: null
|
||||
};
|
||||
|
||||
let myJSON = '{'+
|
||||
'"version": "v1.0.0",'+
|
||||
'"log":'+
|
||||
'['+
|
||||
'"• Fix ghost play count when retiring ocm",'+
|
||||
'"• API for ocm ranking",'+
|
||||
'"• Fix unlimited ghost stamp return (hopefully no more of this)",'+
|
||||
'"• Fix give meter reward bug if playCount still 0",'+
|
||||
'"• Hopefully fix ocm HoF bug"'+
|
||||
'"• Fix duplicate id in carOrder"'+
|
||||
'"• Fix OCM HoF wrong shopName"'+
|
||||
']'+
|
||||
'}';
|
||||
message.version = JSON.parse(myJSON);
|
||||
|
||||
// Send the response to the client
|
||||
res.send(message);
|
||||
})
|
||||
|
||||
// Post Login
|
||||
app.post('/api/login', async (req, res) => {
|
||||
|
||||
// Get the request body
|
||||
let query = req.query;
|
||||
|
||||
// Message Response
|
||||
let message: any = {
|
||||
error: null,
|
||||
user: null
|
||||
};
|
||||
|
||||
// Get the user from the database
|
||||
let user = await prisma.user.findFirst({
|
||||
where: {
|
||||
chipId: {
|
||||
startsWith: query.cardChipId?.toString()
|
||||
},
|
||||
accessCode: query.accessCode?.toString()
|
||||
},
|
||||
include: {
|
||||
cars: {
|
||||
select: {
|
||||
state: true,
|
||||
gtWing: true,
|
||||
lastPlayedPlace: true,
|
||||
carId: true,
|
||||
name: true,
|
||||
defaultColor: true,
|
||||
visualModel: true,
|
||||
level: true,
|
||||
title: true,
|
||||
regionId: true,
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if(user)
|
||||
{
|
||||
message.user = user;
|
||||
}
|
||||
else
|
||||
{
|
||||
message.error = 404
|
||||
}
|
||||
|
||||
// Send the response to the client
|
||||
res.send(message);
|
||||
})
|
||||
|
||||
|
||||
// Get Current Competition Id
|
||||
app.get('/api/get_competition_id', async (req, res) => {
|
||||
|
||||
// Get current date
|
||||
let date = Math.floor(new Date().getTime() / 1000);
|
||||
|
||||
// Message Response
|
||||
let message: any = {
|
||||
error: null,
|
||||
competitionId: 1 // default
|
||||
};
|
||||
|
||||
// Get current / previous active OCM Event
|
||||
let ocmEventDate = await prisma.oCMEvent.findFirst({
|
||||
where: {
|
||||
// qualifyingPeriodStartAt is less than current date
|
||||
qualifyingPeriodStartAt: { lte: date },
|
||||
|
||||
// competitionEndAt is greater than current date
|
||||
competitionEndAt: { gte: date },
|
||||
},
|
||||
orderBy: [
|
||||
{
|
||||
dbId: 'desc'
|
||||
},
|
||||
{
|
||||
competitionEndAt: 'desc',
|
||||
},
|
||||
],
|
||||
select:{
|
||||
competitionId: true
|
||||
}
|
||||
});
|
||||
|
||||
if(ocmEventDate)
|
||||
{
|
||||
message.competitionId = ocmEventDate.competitionId;
|
||||
}
|
||||
else{
|
||||
ocmEventDate = await prisma.oCMEvent.findFirst({
|
||||
orderBy: {
|
||||
dbId: 'desc'
|
||||
},
|
||||
select:{
|
||||
competitionId: true
|
||||
}
|
||||
});
|
||||
|
||||
message.competitionId = ocmEventDate!.competitionId;
|
||||
}
|
||||
|
||||
// Send the response to the client
|
||||
res.send(message);
|
||||
});
|
||||
|
||||
|
||||
// Get Current Competition Id
|
||||
app.get('/api/get_hof_competition_id', async (req, res) => {
|
||||
|
||||
// Message Response
|
||||
let message: any = {
|
||||
error: null,
|
||||
competitionId: 1 // default
|
||||
};
|
||||
|
||||
// Get current / previous active OCM Event
|
||||
let ocmEventDate = await prisma.oCMTally.findFirst({
|
||||
where:{
|
||||
periodId: 999999999
|
||||
},
|
||||
orderBy: {
|
||||
competitionId: 'desc'
|
||||
},
|
||||
select:{
|
||||
competitionId: true
|
||||
}
|
||||
});
|
||||
|
||||
if(ocmEventDate)
|
||||
{
|
||||
message.competitionId = ocmEventDate.competitionId;
|
||||
}
|
||||
|
||||
// Send the response to the client
|
||||
res.send(message);
|
||||
});
|
||||
|
||||
|
||||
// Get Competition Ranking
|
||||
app.get('/api/get_competition_ranking', async (req, res) => {
|
||||
|
||||
// Get url query
|
||||
let competitionId = Number(req.query.competitionId);
|
||||
|
||||
// Message Response
|
||||
let message: any = {
|
||||
error: null,
|
||||
cars: [],
|
||||
lastPlayedPlace: 'Bayshore'
|
||||
};
|
||||
|
||||
// Get all of the cars matching the query
|
||||
message.cars = await prisma.oCMTally.findMany({
|
||||
where:{
|
||||
competitionId: competitionId
|
||||
},
|
||||
orderBy: {
|
||||
result: 'desc'
|
||||
},
|
||||
include:{
|
||||
car: {
|
||||
select:{
|
||||
carId: true,
|
||||
name: true,
|
||||
defaultColor: true,
|
||||
visualModel: true,
|
||||
level: true,
|
||||
title: true,
|
||||
regionId: true,
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
let getLastPlayedPlace = await prisma.oCMGhostBattleRecord.findFirst({
|
||||
where:{
|
||||
carId: message.cars[0].carId,
|
||||
competitionId: competitionId
|
||||
}
|
||||
})
|
||||
|
||||
message.lastPlayedPlace = getLastPlayedPlace?.playedShopName;
|
||||
|
||||
// Send the response to the client
|
||||
res.send(message);
|
||||
});
|
||||
}
|
||||
}
|
15
src/index.ts
15
src/index.ts
@ -9,7 +9,6 @@ import fs from 'fs';
|
||||
import bodyParser from 'body-parser';
|
||||
import AllnetModule from './allnet';
|
||||
import MuchaModule from './mucha';
|
||||
import ApiModule from './api';
|
||||
import { Config } from './config';
|
||||
import process from 'process';
|
||||
import * as Sentry from '@sentry/node';
|
||||
@ -36,7 +35,6 @@ const PORT_API = 9003;
|
||||
const app = express();
|
||||
const muchaApp = express();
|
||||
const allnetApp = express();
|
||||
const apiApp = express();
|
||||
|
||||
app.use(bodyParser.raw({
|
||||
type: '*/*'
|
||||
@ -80,11 +78,6 @@ allnetApp.use((req, res, next) => {
|
||||
next()
|
||||
});
|
||||
|
||||
/*apiApp.use((req, res, next) => {
|
||||
console.log(timestamp+` [ API] ${req.method} ${req.url}`);
|
||||
next()
|
||||
});*/
|
||||
|
||||
// Get all of the files in the modules directory
|
||||
let dirs = fs.readdirSync('dist/modules');
|
||||
// Loop over the files
|
||||
@ -116,7 +109,6 @@ app.all('*', (req, res) => {
|
||||
// Register the ALL.NET / Mucha Server
|
||||
new AllnetModule().register(allnetApp);
|
||||
new MuchaModule().register(muchaApp);
|
||||
new ApiModule().register(apiApp);
|
||||
|
||||
// Sentry is in use
|
||||
if (useSentry)
|
||||
@ -149,9 +141,4 @@ https.createServer({key, cert}, muchaApp).listen(PORT_MUCHA, '0.0.0.0', 511, ()
|
||||
// Create the game server
|
||||
https.createServer({key, cert}, app).listen(PORT_BNGI, '0.0.0.0', 511, () => {
|
||||
console.log(`Game server listening on port ${PORT_BNGI}!`);
|
||||
})
|
||||
|
||||
// Create the API server
|
||||
http.createServer(apiApp).listen(PORT_API, '0.0.0.0', 4369, () => {
|
||||
console.log(`API server listening on port ${PORT_API}!`);
|
||||
})
|
||||
})
|
@ -711,6 +711,8 @@ export default class GhostModule extends Module {
|
||||
// Query parameter from OCM Battle available
|
||||
if(pTrailId)
|
||||
{
|
||||
console.log('Requesting OCM Ghost Trail');
|
||||
|
||||
// Get the trail data
|
||||
let ghost_trails = await ghost_trail.getOCMGhostTrail(pCarId, pTrailId);
|
||||
|
||||
@ -723,6 +725,8 @@ export default class GhostModule extends Module {
|
||||
// Query parameter from Crown Ghost Battle available
|
||||
else
|
||||
{
|
||||
console.log('Requesting Crown Ghost Trail');
|
||||
|
||||
// Get the crown trail data
|
||||
let ghost_trails = await ghost_trail.getCrownGhostTrail(pCarId, pArea);
|
||||
|
||||
|
@ -226,7 +226,7 @@ export default class GhostModule extends Module {
|
||||
{
|
||||
let itemId = 0;
|
||||
|
||||
// 16th - C1
|
||||
// 16th - C1 Outbound
|
||||
if(ocmEventDate.competitionId === 1)
|
||||
{
|
||||
itemId = 204;
|
||||
@ -246,7 +246,7 @@ export default class GhostModule extends Module {
|
||||
{
|
||||
itemId = 222;
|
||||
}
|
||||
// 6th - C1
|
||||
// 6th - C1 Inbound
|
||||
else if(ocmEventDate.competitionId === 5)
|
||||
{
|
||||
itemId = 35;
|
||||
@ -271,7 +271,7 @@ export default class GhostModule extends Module {
|
||||
{
|
||||
itemId = 47;
|
||||
}
|
||||
// 1st - C1
|
||||
// 1st - C1 Outbound
|
||||
else if(ocmEventDate.competitionId === 10)
|
||||
{
|
||||
itemId = 5;
|
||||
@ -607,88 +607,86 @@ export default class GhostModule extends Module {
|
||||
carId: checkGhostTrail!.carId
|
||||
},
|
||||
include:{
|
||||
lastPlayedPlace: true,
|
||||
gtWing: true
|
||||
gtWing: true,
|
||||
lastPlayedPlace: true
|
||||
}
|
||||
});
|
||||
|
||||
if(cars)
|
||||
// If regionId is 0 or not set, game will crash after defeating the ghost
|
||||
if(cars!.regionId === 0)
|
||||
{
|
||||
// If regionId is 0 or not set, game will crash after defeating the ghost
|
||||
if(cars.regionId === 0)
|
||||
{
|
||||
let randomRegionId = Math.floor(Math.random() * 47) + 1;
|
||||
cars.regionId = randomRegionId;
|
||||
let randomRegionId = Math.floor(Math.random() * 47) + 1;
|
||||
cars!.regionId = randomRegionId;
|
||||
}
|
||||
|
||||
// Set the tunePower used when playing ghost crown
|
||||
cars!.tunePower = ocmTallyRecord!.tunePower;
|
||||
|
||||
// Set the tuneHandling used when playing ghost crown
|
||||
cars!.tuneHandling = ocmTallyRecord!.tuneHandling;
|
||||
|
||||
// Set Ghost stuff Value
|
||||
cars!.lastPlayedAt = checkGhostTrail.playedAt
|
||||
ghostTrailId = checkGhostTrail.dbId!;
|
||||
ghostTypes = wm.wm.protobuf.GhostType.GHOST_NORMAL;
|
||||
|
||||
let checkShopName = await prisma.oCMGhostBattleRecord.findFirst({
|
||||
where:{
|
||||
carId: checkGhostTrail!.carId,
|
||||
competitionId: competition_id
|
||||
},
|
||||
select:{
|
||||
playedShopName: true
|
||||
}
|
||||
})
|
||||
|
||||
// Set the tunePower used when playing ghost crown
|
||||
cars.tunePower = ocmTallyRecord!.tunePower;
|
||||
if(checkShopName)
|
||||
{
|
||||
cars!.lastPlayedPlace!.shopName = checkShopName.playedShopName;
|
||||
}
|
||||
|
||||
// Set the tuneHandling used when playing ghost crown
|
||||
cars.tuneHandling = ocmTallyRecord!.tuneHandling;
|
||||
|
||||
// Set Ghost stuff Value
|
||||
cars.lastPlayedAt = checkGhostTrail.playedAt;
|
||||
ghostTrailId = checkGhostTrail.dbId!;
|
||||
ghostTypes = wm.wm.protobuf.GhostType.GHOST_NORMAL;
|
||||
|
||||
let checkShopName = await prisma.oCMGhostBattleRecord.findFirst({
|
||||
where:{
|
||||
carId: checkGhostTrail!.carId,
|
||||
competitionId: competition_id
|
||||
},
|
||||
select:{
|
||||
playedShopName: true
|
||||
}
|
||||
})
|
||||
|
||||
if(checkShopName)
|
||||
{
|
||||
cars.lastPlayedPlace!.shopName = checkShopName.playedShopName;
|
||||
let ocmEventDate = await prisma.oCMEvent.findFirst({
|
||||
where: {
|
||||
competitionId: competition_id
|
||||
}
|
||||
});
|
||||
|
||||
let ocmEventDate = await prisma.oCMEvent.findFirst({
|
||||
where: {
|
||||
competitionId: competition_id
|
||||
}
|
||||
if(ocmEventDate)
|
||||
{
|
||||
// Creating GhostCompetitionSchedule
|
||||
competitionSchedule = wm.wm.protobuf.GhostCompetitionSchedule.create({
|
||||
|
||||
// OCM Competition ID (1 = C1 (Round 16), 4 = Nagoya (Round 19), 8 = Hiroshima (Round 21))
|
||||
competitionId: ocmEventDate.competitionId,
|
||||
|
||||
// OCM Qualifying Start Timestamp
|
||||
qualifyingPeriodStartAt: ocmEventDate.qualifyingPeriodStartAt,
|
||||
|
||||
// OCM Qualifying Close Timestamp
|
||||
qualifyingPeriodCloseAt: ocmEventDate.qualifyingPeriodCloseAt,
|
||||
|
||||
// OCM Competition (Main Draw) Start Timestamp
|
||||
competitionStartAt: ocmEventDate.competitionStartAt,
|
||||
|
||||
// OCM Competition (Main Draw) Close Timestamp
|
||||
competitionCloseAt: ocmEventDate.competitionCloseAt,
|
||||
|
||||
// OCM Competition (Main Draw) End Timestamp
|
||||
competitionEndAt: ocmEventDate.competitionEndAt,
|
||||
|
||||
// idk what this is
|
||||
lengthOfPeriod: ocmEventDate.lengthOfPeriod,
|
||||
|
||||
// idk what this is
|
||||
lengthOfInterval: ocmEventDate.lengthOfInterval,
|
||||
|
||||
// Area for the event (GID_RUNAREA_*, 8 is GID_RUNAREA_NAGOYA)
|
||||
area: ocmEventDate.area,
|
||||
|
||||
// idk what this is
|
||||
minigamePatternId: ocmEventDate.minigamePatternId
|
||||
});
|
||||
|
||||
if(ocmEventDate)
|
||||
{
|
||||
// Creating GhostCompetitionSchedule
|
||||
competitionSchedule = wm.wm.protobuf.GhostCompetitionSchedule.create({
|
||||
|
||||
// OCM Competition ID (1 = C1 (Round 16), 4 = Nagoya (Round 19), 8 = Hiroshima (Round 21))
|
||||
competitionId: ocmEventDate.competitionId,
|
||||
|
||||
// OCM Qualifying Start Timestamp
|
||||
qualifyingPeriodStartAt: ocmEventDate.qualifyingPeriodStartAt,
|
||||
|
||||
// OCM Qualifying Close Timestamp
|
||||
qualifyingPeriodCloseAt: ocmEventDate.qualifyingPeriodCloseAt,
|
||||
|
||||
// OCM Competition (Main Draw) Start Timestamp
|
||||
competitionStartAt: ocmEventDate.competitionStartAt,
|
||||
|
||||
// OCM Competition (Main Draw) Close Timestamp
|
||||
competitionCloseAt: ocmEventDate.competitionCloseAt,
|
||||
|
||||
// OCM Competition (Main Draw) End Timestamp
|
||||
competitionEndAt: ocmEventDate.competitionEndAt,
|
||||
|
||||
// idk what this is
|
||||
lengthOfPeriod: ocmEventDate.lengthOfPeriod,
|
||||
|
||||
// idk what this is
|
||||
lengthOfInterval: ocmEventDate.lengthOfInterval,
|
||||
|
||||
// Area for the event (GID_RUNAREA_*, 8 is GID_RUNAREA_NAGOYA)
|
||||
area: ocmEventDate.area,
|
||||
|
||||
// idk what this is
|
||||
minigamePatternId: ocmEventDate.minigamePatternId
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -582,7 +582,8 @@ export default class TerminalModule extends Module {
|
||||
let compeSch;
|
||||
let msg: any;
|
||||
|
||||
if(ocmEventDate){
|
||||
if(ocmEventDate)
|
||||
{
|
||||
// Creating GhostCompetitionSchedule
|
||||
compeSch = wm.wm.protobuf.GhostCompetitionSchedule.create({
|
||||
|
||||
@ -623,6 +624,7 @@ export default class TerminalModule extends Module {
|
||||
let periodId: number = 0;
|
||||
let ownRecords;
|
||||
let topRecords: wm.wm.protobuf.LoadGhostCompetitionRankingResponse.Entry[] = [];
|
||||
let playedShopName = Config.getConfig().shopName;
|
||||
|
||||
// Current date is OCM main draw
|
||||
if(ocmEventDate!.competitionStartAt < date && ocmEventDate!.competitionCloseAt > date)
|
||||
@ -675,11 +677,16 @@ export default class TerminalModule extends Module {
|
||||
|
||||
let ocmGhostrecord = await prisma.oCMGhostBattleRecord.findFirst({
|
||||
where:{
|
||||
carId: ocmParticipant[i].carId,
|
||||
carId: ocmParticipant[0].carId,
|
||||
competitionId: ocmEventDate!.competitionId,
|
||||
}
|
||||
});
|
||||
|
||||
if(ocmGhostrecord?.playedShopName !== null && ocmGhostrecord?.playedShopName !== undefined)
|
||||
{
|
||||
playedShopName = ocmGhostrecord.playedShopName;
|
||||
}
|
||||
|
||||
if(ocmParticipant[i].carId === body.carId && ranking === 0)
|
||||
{
|
||||
// User car setting
|
||||
@ -695,7 +702,7 @@ export default class TerminalModule extends Module {
|
||||
title: cars!.title,
|
||||
level: cars!.level,
|
||||
windowStickerString: cars!.windowStickerString,
|
||||
playedShopName: ocmGhostrecord!.playedShopName,
|
||||
playedShopName: playedShopName,
|
||||
playedAt: ocmGhostrecord!.playedAt
|
||||
});
|
||||
|
||||
@ -715,7 +722,7 @@ export default class TerminalModule extends Module {
|
||||
title: cars!.title,
|
||||
level: cars!.level,
|
||||
windowStickerString: cars!.windowStickerString,
|
||||
playedShopName: ocmGhostrecord!.playedShopName,
|
||||
playedShopName: playedShopName,
|
||||
playedAt: ocmGhostrecord!.playedAt
|
||||
}));
|
||||
}
|
||||
@ -829,7 +836,7 @@ export default class TerminalModule extends Module {
|
||||
|
||||
let ocmGhostrecord = await prisma.oCMGhostBattleRecord.findFirst({
|
||||
where:{
|
||||
carId: ocmParticipant[i].carId,
|
||||
carId: ocmParticipant[0].carId,
|
||||
competitionId: ocmEventDate!.competitionId,
|
||||
}
|
||||
});
|
||||
|
@ -1,5 +1,3 @@
|
||||
import { wm } from "../../wmmt/wm.proto";
|
||||
|
||||
// OCM Area
|
||||
export async function GhostArea(area: number)
|
||||
{
|
||||
|
@ -125,6 +125,7 @@ export async function ocmTallying(body: wm.protobuf.LoadGhostCompetitionInfoRequ
|
||||
// Check if someone is retiring or use cheat engine time up
|
||||
let checkPlayRecord = await prisma.oCMPlayRecord.findMany({
|
||||
where:{
|
||||
competitionId: body.competitionId,
|
||||
NOT: {
|
||||
carId:{ in: arr }
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ export async function OCMArea(competition_id: number)
|
||||
let rampVal = 0;
|
||||
let pathVal = 0;
|
||||
|
||||
// 16th - C1
|
||||
// 16th - C1 Outbound
|
||||
if(competition_id === 1)
|
||||
{
|
||||
// GID_RUNAREA_C1
|
||||
@ -53,7 +53,7 @@ export async function OCMArea(competition_id: number)
|
||||
// GID_PATH_NGR_MARUNOUCHI
|
||||
pathVal = 49;
|
||||
}
|
||||
// 6th - C1
|
||||
// 6th - C1 Inbound
|
||||
else if(competition_id === 5)
|
||||
{
|
||||
// GID_RUNAREA_C1
|
||||
@ -113,6 +113,150 @@ export async function OCMArea(competition_id: number)
|
||||
// GID_PATH_HKFOR
|
||||
pathVal = 62;
|
||||
}
|
||||
// 1st - C1 Outbound
|
||||
else if(competition_id === 10)
|
||||
{
|
||||
// GID_RUNAREA_C1
|
||||
areaVal = 0;
|
||||
|
||||
// GID_RAMP_C1_OUT_SHIBA
|
||||
rampVal = 3;
|
||||
|
||||
// GID_PATH_C1OUT_KANDABASHI03
|
||||
pathVal = 9;
|
||||
}
|
||||
// 2nd - Osaka
|
||||
else if(competition_id === 11)
|
||||
{
|
||||
// GID_RUNAREA_OSAKA
|
||||
areaVal = 9;
|
||||
|
||||
// GID_RAMP_OOSAKA_DOUTONBORI
|
||||
rampVal = 26;
|
||||
|
||||
// GID_PATH_OS_TONBORI03
|
||||
pathVal = 52;
|
||||
}
|
||||
// 3rd - Fukuoka
|
||||
else if(competition_id === 12)
|
||||
{
|
||||
// GID_RUNAREA_FUKUOKA
|
||||
areaVal = 11;
|
||||
|
||||
// GID_RAMP_FUKUOKA_EAST_NISHI
|
||||
rampVal = 31
|
||||
|
||||
// GID_PATH_FK_NISHIKOUEN;
|
||||
pathVal = 60;
|
||||
}
|
||||
// 4th - Nagoya
|
||||
else if(competition_id === 13)
|
||||
{
|
||||
// GID_RUNAREA_NAGOYA
|
||||
areaVal = 8;
|
||||
|
||||
// GID_RAMP_NAGOYA_MARUNOUCHI
|
||||
rampVal = 25;
|
||||
|
||||
// GID_PATH_NGR_MARUNOUCHI
|
||||
pathVal = 49;
|
||||
}
|
||||
// 5th - Yaesu
|
||||
else if(competition_id === 14)
|
||||
{
|
||||
// GID_RUNAREA_YAESU
|
||||
areaVal = 6;
|
||||
|
||||
// GID_RAMP_YAESU_SHIODOME
|
||||
rampVal = 18;
|
||||
|
||||
// GID_PATH_YSIN_SHIODOME01
|
||||
pathVal = 34;
|
||||
}
|
||||
// 9th - Hakone (Mt. Taikan)
|
||||
else if(competition_id === 15)
|
||||
{
|
||||
// GID_RUNAREA_TURNPIKE
|
||||
areaVal = 13;
|
||||
|
||||
// GID_RAMP_TURNPIKE_UP
|
||||
rampVal = 35;
|
||||
|
||||
// GID_PATH_TP_BOTTOM
|
||||
pathVal = 64;
|
||||
}
|
||||
//10th - Sub-center(Shibuya/Shinjuku)
|
||||
else if(competition_id === 16)
|
||||
{
|
||||
// GID_RUNAREA_SUBTOKYO_3_4
|
||||
areaVal = 2;
|
||||
|
||||
// GID_RAMP_SUBTOKYO_GAIEN
|
||||
rampVal = 7;
|
||||
|
||||
// GID_PATH_WTWEST_GAIEN
|
||||
pathVal = 17;
|
||||
}
|
||||
// 11th - Sub-center(Ikebukuro)
|
||||
else if(competition_id === 17)
|
||||
{
|
||||
// GID_RUNAREA_SUBTOKYO_5
|
||||
areaVal = 3;
|
||||
|
||||
// GID_RAMP_SUBTOKYO_DAIKANCHOU
|
||||
rampVal = 8;
|
||||
|
||||
// GID_PATH_WTUP_DAIKANCHOU
|
||||
pathVal = 18;
|
||||
}
|
||||
// 12th - Kobe
|
||||
else if(competition_id === 18)
|
||||
{
|
||||
// GID_RUNAREA_KOBE
|
||||
areaVal = 10;
|
||||
|
||||
// GID_RAMP_KOBE_NADAOOHASHI
|
||||
rampVal = 28;
|
||||
|
||||
// GID_PATH_KB_NADA
|
||||
pathVal = 55;
|
||||
}
|
||||
// 13th - New Belt Line
|
||||
else if(competition_id === 19)
|
||||
{
|
||||
// GID_RUNAREA_RING
|
||||
areaVal = 1;
|
||||
|
||||
// GID_RAMP_RING_LEFT_ARIAKE
|
||||
rampVal = 4;
|
||||
|
||||
// GID_PATH_N9IN_ARIAKE02
|
||||
pathVal = 11;
|
||||
}
|
||||
// 14th - Yokohama
|
||||
else if(competition_id === 20)
|
||||
{
|
||||
// GID_RUNAREA_YOKOHAMA
|
||||
areaVal = 7;
|
||||
|
||||
// GID_RAMP_MINATOMIRAI_OUT_SHINYAMASHITA
|
||||
rampVal = 23;
|
||||
|
||||
// GID_PATH_KGUP_SHINYAMASHITA03
|
||||
pathVal = 45;
|
||||
}
|
||||
// 15th - Hiroshima
|
||||
else if(competition_id === 21)
|
||||
{
|
||||
// GID_RUNAREA_HIROSHIMA
|
||||
areaVal = 18;
|
||||
|
||||
// GID_RAMP_HIROSHIMA_UJINA
|
||||
rampVal = 38;
|
||||
|
||||
// GID_PATH_HS_UJINA
|
||||
pathVal = 57;
|
||||
}
|
||||
|
||||
// Return the value to 'BASE_PATH/src/modules/ghost_ocm.ts'
|
||||
return {areaVal, rampVal, pathVal};
|
||||
|
Loading…
x
Reference in New Issue
Block a user