mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-02 03:48:14 +03:00
Merge branch 'develop' into zkldi/issue-45
This commit is contained in:
Vendored
+1
-1
@@ -1,7 +1,7 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||
patreon: zkldi
|
||||
patreon: # zkldi
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: zkldi
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
<!-- This file is not automatically generated. We write this by hand. -->
|
||||
<!-- You must update it by hand too! -->
|
||||
|
||||
# Syntax
|
||||
|
||||
| Type | Description |
|
||||
| :----: | :---------------------------------------------------------------: |
|
||||
| BUG | This was a bug fix. |
|
||||
| ENH | This was an enhancement, An improvement to an existing behaviour. |
|
||||
| FEAT | A new feature. |
|
||||
| REWORK | An existing feature was reworked/changed. |
|
||||
|
||||
# Changelog
|
||||
|
||||
## 2.1.0 (Ongoing Development)
|
||||
|
||||
- [FEAT] Added Jubeat Support. (#169)
|
||||
- [FEAT] Added Pop'n Music Support. (#69)
|
||||
- [FEAT] Added WACCA Support. (#598)
|
||||
- [FEAT] Added support for Skye's pop'n hook. (#563)
|
||||
|
||||
*****
|
||||
|
||||
- [REWORK] KtRating is no longer the default rating algorithm for IIDX. It has been removed, and the new default is ktLampRating. (#597)
|
||||
|
||||
*****
|
||||
|
||||
- [ENH] Added a CHANGELOG.md file. (#627)
|
||||
- [ENH] BATCH-MANUAL now supports the `percent` field for jubeat only. (#620)
|
||||
- [ENH] Add support for jubility. (#163)
|
||||
- [ENH] Move BPI related data (Kaiden Average and BPI) to IIDX charts, instead of being in a separate collection. This lets us display more stats on the UI. (#599)
|
||||
- [ENH] Add game specific indexes. (#606)
|
||||
- [ENH] Ratings are nullable now (#611)
|
||||
- [ENH] Pre-HV Leggendaria songIDs are now properly resolved. (#487)
|
||||
|
||||
*****
|
||||
|
||||
- [BUG] UpdateClass now records the class as being recently achieved (i.e. display Chuuden -> Kaiden on the UI) (#589)
|
||||
- [BUG] CHUNITHM's rating calculator no longer over-rewards SS rank scores. (#615)
|
||||
- [BUG] Folder timelines now pull the oldest score for a given chart, rather than the newest. (#610)
|
||||
- [BUG] Fixed bug where good plays on 3y3s long would get dropped due to a misunderstanding of a field. (#602)
|
||||
Vendored
+9
-7
@@ -63,13 +63,7 @@ const staticIndexes: Partial<Record<Databases, Index[]>> = {
|
||||
index({ title: "text", searchTerms: "text" }),
|
||||
],
|
||||
"kai-auth-tokens": [index({ userID: 1, service: 1 }, UNIQUE)],
|
||||
"charts-iidx": [
|
||||
index(
|
||||
{ "data.arcChartID": 1 },
|
||||
{ unique: true, partialFilterExpression: { "data.arcChartID": { $type: "string" } } }
|
||||
),
|
||||
index({ "data.hashSHA256": 1 }),
|
||||
],
|
||||
|
||||
"bms-course-lookup": [index({ md5sums: 1 }, UNIQUE)],
|
||||
"api-tokens": [index({ token: 1 }, UNIQUE), index({ userID: 1 })],
|
||||
tables: [index({ tableID: 1, game: 1, playtype: 1 }, UNIQUE)],
|
||||
@@ -84,6 +78,14 @@ const staticIndexes: Partial<Record<Databases, Index[]>> = {
|
||||
counters: [index({ counterName: 1 }, UNIQUE)],
|
||||
"class-achievements": [index({ game: 1, playtype: 1, timeAchieved: 1 })],
|
||||
"api-clients": [index({ clientID: 1 }, UNIQUE)],
|
||||
"charts-iidx": [
|
||||
index(
|
||||
{ "data.arcChartID": 1 },
|
||||
{ unique: true, partialFilterExpression: { "data.arcChartID": { $type: "string" } } }
|
||||
),
|
||||
index({ "data.hashSHA256": 1 }),
|
||||
index({ "data.inGameID": 1, playtype: 1, difficulty: 1 }),
|
||||
],
|
||||
"charts-bms": [index({ "data.hashMD5": 1 }, UNIQUE), index({ "data.hashSHA256": 1 }, UNIQUE)],
|
||||
"charts-popn": [index({ "data.hashSHA256": 1 }, UNIQUE)],
|
||||
"charts-sdvx": [index({ "data.inGameID": 1, difficulty: 1 }, UNIQUE)],
|
||||
|
||||
@@ -69,6 +69,7 @@ const SUPPORTED_BMS_CLIENTS = [
|
||||
"LR2oraja 0.8.2",
|
||||
"LR2oraja 0.8.1",
|
||||
"LR2oraja 0.8.0",
|
||||
"LR2oraja(rekidai.info) 0.8.4",
|
||||
"LR2oraja(rekidai.info) 0.8.3",
|
||||
"LR2oraja(rekidai.info) 0.8.2",
|
||||
"LR2oraja(rekidai.info) 0.8.1",
|
||||
|
||||
@@ -91,7 +91,7 @@ function ConvertRandom(
|
||||
random: LR2HookScore["playerData"]["random"]
|
||||
): ScoreDocument<"bms:7K">["scoreMeta"]["random"] {
|
||||
switch (random) {
|
||||
case "NONRAN":
|
||||
case "NORAN":
|
||||
return "NONRAN";
|
||||
case "MIRROR":
|
||||
return "MIRROR";
|
||||
|
||||
@@ -5,7 +5,7 @@ import p, { PrudenceSchema } from "prudence";
|
||||
import ScoreImportFatalError from "lib/score-import/framework/score-importing/score-import-error";
|
||||
import { FormatPrError } from "utils/prudence";
|
||||
|
||||
const SUPPORTED_RANDOMS = ["NONRAN", "MIRROR", "RAN", "S-RAN"];
|
||||
const SUPPORTED_RANDOMS = ["NORAN", "MIRROR", "RAN", "S-RAN"];
|
||||
|
||||
const PR_LR2Hook: PrudenceSchema = {
|
||||
md5: "string",
|
||||
|
||||
@@ -5,7 +5,7 @@ export interface LR2HookScore {
|
||||
playerData: {
|
||||
autoScr: 0;
|
||||
gameMode: unknown;
|
||||
random: "NONRAN" | "MIRROR" | "RAN" | "S-RAN";
|
||||
random: "NORAN" | "MIRROR" | "RAN" | "S-RAN";
|
||||
gauge: "GROOVE" | "HAZARD" | "HARD" | "EASY" | "P-ATTACK" | "G-ATTACK";
|
||||
};
|
||||
scoreData: {
|
||||
|
||||
@@ -64,8 +64,12 @@ t.test("#UpdateScore", (t) => {
|
||||
scoreData: { score: 1020 },
|
||||
} as any);
|
||||
|
||||
delete score._id;
|
||||
|
||||
const newScoreID = CreateScoreID(score.userID, score, score.chartID);
|
||||
|
||||
rootLogger.crit(newScoreID);
|
||||
|
||||
await db.imports.insert(mockImportDocument);
|
||||
await db.sessions.insert(mockSessionDocument);
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import { KtLogger, rootLogger } from "lib/logger/logger";
|
||||
import { CreateCalculatedData } from "lib/score-import/framework/calculated-data/calculated-data";
|
||||
import { UpdateChartRanking } from "lib/score-import/framework/pb/create-pb-doc";
|
||||
import { CreateScoreID } from "lib/score-import/framework/score-importing/score-id";
|
||||
import { id } from "monk";
|
||||
import { ScoreDocument } from "tachi-common";
|
||||
import { UpdateAllPBs } from "utils/calculations/recalc-scores";
|
||||
import { FormatUserDoc, GetUserWithID } from "utils/user";
|
||||
@@ -67,6 +68,8 @@ export default async function UpdateScore(oldScore: ScoreDocument, newScore: Sco
|
||||
);
|
||||
|
||||
try {
|
||||
// Having _id defined will cause this to throw, causing it to not apply
|
||||
// the update.
|
||||
if (newScore._id) {
|
||||
logger.warn(
|
||||
`Passed a score with _id to UpdateScore. This property should not be set. Deleting this property and continuing anyway.`
|
||||
|
||||
Reference in New Issue
Block a user