1
0
mirror of synced 2025-02-23 13:39:03 +01:00

fix when checking scratch car

This commit is contained in:
Shiroi Kitsu 2023-04-05 11:22:52 +07:00
parent 9c6822b923
commit f18761ab42
2 changed files with 4 additions and 4 deletions

View File

@ -9,6 +9,7 @@ import * as wm from "../wmmt/wm.proto";
// Import Util
import * as common from "./util/common";
import * as carFunctions from "./cars/functions";
import * as terminal from "./terminal/check_car";
export default class CarModule extends Module {
@ -152,6 +153,9 @@ export default class CarModule extends Module {
}
});
// Check if created car is from terminal scratch car
await terminal.checkScratchCar(body.userId, body.car.visualModel!)
// Get the user's current car order
let carOrder = createCar.user.carOrder;
await carFunctions.carOrder(carOrder, car, createCar.user.id);

View File

@ -10,7 +10,6 @@ import * as wmproto from "../../wmmt/wm.proto";
// Import Util
import * as common from "../util/common";
import * as car_tune from "./car_tune";
import * as terminal from "../terminal/check_car";
// Get Car Data
@ -310,9 +309,6 @@ export async function createCar(body: wm.protobuf.CreateCarRequest)
{
// Car is fully tuned
tune = 2;
// Check if created car is from terminal scratch car
await terminal.checkScratchCar(body.userId, body.car.visualModel!)
}
// User item not used, but car has 600 HP by default
else if (body.car && body.car.tunePower == 10 && body.car.tuneHandling == 10)