mirror of
https://github.com/thepeacockproject/Peacock
synced 2025-02-23 03:35:25 +01:00
unlockorderComparer
-> unlockOrderComparer
This commit is contained in:
parent
46c0537256
commit
79a32df1dd
components
@ -20,7 +20,7 @@ import { Response, Router } from "express"
|
||||
import {
|
||||
gameDifficulty,
|
||||
PEACOCKVERSTRING,
|
||||
unlockorderComparer,
|
||||
unlockOrderComparer,
|
||||
uuidRegex,
|
||||
} from "./utils"
|
||||
import { contractSessions, getSession } from "./eventHandler"
|
||||
@ -651,7 +651,7 @@ menuDataRouter.get(
|
||||
.filter((unlockable) =>
|
||||
pickupsInScene.includes(unlockable.Properties.RepositoryId),
|
||||
)
|
||||
.sort(unlockorderComparer),
|
||||
.sort(unlockOrderComparer),
|
||||
UserCentric: generateUserCentric(
|
||||
contractData,
|
||||
req.jwt.unique_name,
|
||||
@ -731,7 +731,7 @@ menuDataRouter.get(
|
||||
unlockable.Properties.RepositoryId!,
|
||||
),
|
||||
)
|
||||
.sort(unlockorderComparer),
|
||||
.sort(unlockOrderComparer),
|
||||
UserCentric: generateUserCentric(
|
||||
contractData,
|
||||
req.jwt.unique_name,
|
||||
|
@ -32,7 +32,7 @@ import {
|
||||
} from "../contracts/dataGen"
|
||||
import { getConfig } from "../configSwizzleManager"
|
||||
import { getUserData, writeUserData } from "../databaseHandler"
|
||||
import { nilUuid, unlockorderComparer } from "../utils"
|
||||
import { nilUuid, unlockOrderComparer } from "../utils"
|
||||
|
||||
import type { Response } from "express"
|
||||
import { createInventory } from "../inventory"
|
||||
@ -314,7 +314,7 @@ export async function planningView(
|
||||
unlockable.Properties.Difficulty ===
|
||||
contractData.Metadata.Difficulty,
|
||||
)
|
||||
.sort(unlockorderComparer),
|
||||
.sort(unlockOrderComparer),
|
||||
Location: sublocation,
|
||||
LoadoutData:
|
||||
contractData.Metadata.Type === "sniper"
|
||||
|
@ -286,7 +286,7 @@ export function handleAxiosError(error: AxiosError): void {
|
||||
}
|
||||
}
|
||||
|
||||
export function unlockorderComparer(a: Unlockable, b: Unlockable): number {
|
||||
export function unlockOrderComparer(a: Unlockable, b: Unlockable): number {
|
||||
return (
|
||||
(a?.Properties?.UnlockOrder ?? Number.POSITIVE_INFINITY) -
|
||||
(b?.Properties?.UnlockOrder ?? Number.POSITIVE_INFINITY) || 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user