mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-05 21:38:06 +03:00
bpitarget support and leaderboard thingy links to leaderboards
This commit is contained in:
+1
-1
@@ -86,7 +86,7 @@
|
||||
"resolve": "1.12.0",
|
||||
"resolve-url-loader": "3.1.0",
|
||||
"socicon": "3.0.5",
|
||||
"tachi-common": "0.4.23"
|
||||
"tachi-common": "0.5.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/humanize-duration": "3.25.1",
|
||||
|
||||
Generated
+4
-4
@@ -88,7 +88,7 @@ specifiers:
|
||||
serve: 11.2.0
|
||||
socicon: 3.0.5
|
||||
style-loader: 1.0.0
|
||||
tachi-common: 0.4.23
|
||||
tachi-common: 0.5.5
|
||||
terser-webpack-plugin: 1.4.1
|
||||
ts-pnp: 1.1.4
|
||||
typescript: 4.3.5
|
||||
@@ -164,7 +164,7 @@ dependencies:
|
||||
resolve: 1.12.0
|
||||
resolve-url-loader: 3.1.0
|
||||
socicon: 3.0.5
|
||||
tachi-common: 0.4.23
|
||||
tachi-common: 0.5.5
|
||||
|
||||
devDependencies:
|
||||
'@types/humanize-duration': 3.25.1
|
||||
@@ -11491,8 +11491,8 @@ packages:
|
||||
strip-ansi: 6.0.0
|
||||
dev: true
|
||||
|
||||
/tachi-common/0.4.23:
|
||||
resolution: {integrity: sha512-MlE2wY9XfNTiZoKJ+7utDdO/ItV3eb8KLEkOPXZMn+sqQbrJd0WSIM1j9vecdYUWG02+3NJf6awmud0Q6upgPA==}
|
||||
/tachi-common/0.5.5:
|
||||
resolution: {integrity: sha512-LFKK+3xhlDQJ07yUij2/H+0cPiHXoXKdFQyR8X1ZNSjsluZoWncR9Rkqwhxlt/WeFBaGyLjkYkpdMkRYZMLVUg==}
|
||||
dependencies:
|
||||
monk: 7.3.4
|
||||
transitivePeerDependencies:
|
||||
|
||||
@@ -178,19 +178,38 @@ function PreferencesForm({ reqUser, game, playtype }: Props) {
|
||||
</Form.Text>
|
||||
</Form.Group>
|
||||
{game === "iidx" && (
|
||||
<Form.Group>
|
||||
<Form.Check
|
||||
type="checkbox"
|
||||
id="gameSpecific.display2DXTra"
|
||||
name="gameSpecific.display2DXTra"
|
||||
checked={formik.values.gameSpecific.display2DXTra}
|
||||
onChange={formik.handleChange}
|
||||
label="Display 2DX-tra Charts"
|
||||
/>
|
||||
<Form.Text className="text-muted">
|
||||
Display 2DX-tra charts on the song page.
|
||||
</Form.Text>
|
||||
</Form.Group>
|
||||
<>
|
||||
<Form.Group>
|
||||
<Form.Check
|
||||
type="checkbox"
|
||||
id="gameSpecific.display2DXTra"
|
||||
name="gameSpecific.display2DXTra"
|
||||
checked={formik.values.gameSpecific.display2DXTra}
|
||||
onChange={formik.handleChange}
|
||||
label="Display 2DX-tra Charts"
|
||||
/>
|
||||
<Form.Text className="text-muted">
|
||||
Display 2DX-tra charts on the song page.
|
||||
</Form.Text>
|
||||
</Form.Group>
|
||||
<Form.Group>
|
||||
<Form.Label>BPI Target</Form.Label>
|
||||
<Form.Control
|
||||
type="number"
|
||||
id="gameSpecific.bpiTarget"
|
||||
name="gameSpecific.bpiTarget"
|
||||
value={formik.values.gameSpecific.bpiTarget}
|
||||
min={0}
|
||||
max={100}
|
||||
step={10}
|
||||
onChange={formik.handleChange}
|
||||
/>
|
||||
<Form.Text className="text-muted">
|
||||
Set yourself a BPI target. {TachiConfig.name} will show how far away you
|
||||
are from it in the UI!
|
||||
</Form.Text>
|
||||
</Form.Group>
|
||||
</>
|
||||
)}
|
||||
<div className="row justify-content-center">
|
||||
<Button type="submit" variant="success">
|
||||
|
||||
@@ -81,6 +81,7 @@ export function GetGPTCoreHeaders<Dataset extends FolderDataset | PBDataset | Sc
|
||||
];
|
||||
case "iidx":
|
||||
case "bms":
|
||||
case "pms":
|
||||
return [
|
||||
ScoreHeader,
|
||||
[
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { useProfileRatingAlg } from "components/util/useScoreRatingAlg";
|
||||
import React from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
import { IDStrings, integer, UGSRatingsLookup } from "tachi-common";
|
||||
import { GamePT } from "types/react";
|
||||
import { UppercaseFirst } from "util/misc";
|
||||
@@ -35,7 +36,12 @@ export default function RankingData({
|
||||
<h4>Ranking{extendData.length ? ` (${UppercaseFirst(alg)})` : ""}</h4>
|
||||
</div>
|
||||
<div className="col-12">
|
||||
<strong className="display-4">#{rankingData[alg].ranking}</strong>
|
||||
<Link
|
||||
to={`/dashboard/games/${game}/${playtype}/leaderboards`}
|
||||
className="gentle-link"
|
||||
>
|
||||
<strong className="display-4">#{rankingData[alg].ranking}</strong>
|
||||
</Link>
|
||||
<span className="text-muted">/{rankingData[alg].outOf}</span>
|
||||
</div>
|
||||
{extendData}
|
||||
|
||||
@@ -3,6 +3,7 @@ import { Game } from "tachi-common";
|
||||
const scales: Record<Game, number> = {
|
||||
iidx: 2,
|
||||
bms: 2,
|
||||
pms: 2,
|
||||
chunithm: 5,
|
||||
ddr: 1,
|
||||
gitadora: 1,
|
||||
|
||||
@@ -16,6 +16,14 @@ const ScaleNameAchievedFns: ScaleAchievedFns = {
|
||||
"sgl-EC": k => k.scoreData.lampIndex >= IIDX_LAMPS.EASY_CLEAR,
|
||||
"sgl-HC": k => k.scoreData.lampIndex >= IIDX_LAMPS.HARD_CLEAR,
|
||||
},
|
||||
"pms:Controller": {
|
||||
"sgl-EC": k => k.scoreData.lampIndex >= IIDX_LAMPS.EASY_CLEAR,
|
||||
"sgl-HC": k => k.scoreData.lampIndex >= IIDX_LAMPS.HARD_CLEAR,
|
||||
},
|
||||
"pms:Keyboard": {
|
||||
"sgl-EC": k => k.scoreData.lampIndex >= IIDX_LAMPS.EASY_CLEAR,
|
||||
"sgl-HC": k => k.scoreData.lampIndex >= IIDX_LAMPS.HARD_CLEAR,
|
||||
},
|
||||
"chunithm:Single": {},
|
||||
"ddr:DP": {},
|
||||
"ddr:SP": {},
|
||||
|
||||
Reference in New Issue
Block a user