Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bite 5 #6

Merged
merged 26 commits into from
Aug 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
755c853
Add full/singles data files for red note
noahm May 1, 2022
f6b35ea
Add separate data for swiss/elim/finals
noahm May 2, 2022
79e429f
Set singles swiss as default
noahm May 2, 2022
6826b89
Theme it up for red note
noahm May 2, 2022
76a3494
Fix chart count for swiss rounds
noahm May 6, 2022
1b4d42e
Initial commit for BITE5 modifications - Updated logo and copy on pag…
May 19, 2022
7d476aa
Sett up default schema for default weight distribution
May 19, 2022
9abd17b
Added all song data and filters for BITE5 tournament. Removed Red No…
May 19, 2022
b0068cb
Updated CSS: Limit 5 cards per row and fixed width
May 19, 2022
beca1de
Fixed type declaration for weights in songs.schema
May 19, 2022
7f3dd21
Updated tool tip, darker background and larger song name text
May 23, 2022
dff6275
Potential qualifers songlist
May 23, 2022
e5ec8e5
Removed DLC defaults
May 23, 2022
1b1eddb
Sort eligible charts by difficulty level
May 23, 2022
302eafd
Updated flags in song JSON
May 25, 2022
ab5cae4
Turn counter test
May 26, 2022
9033565
June 3 Update
Jun 4, 2022
3ecf1a6
June 3 Update Jacket Images
Jun 4, 2022
073c26b
Resolve conflicts from PR
Jul 28, 2022
1b45815
Merge order songs
Jul 30, 2022
6930fdc
Removed extra songs from merge
Jul 30, 2022
8398e15
Updated levels and added new songs to match tournament
Jul 30, 2022
8081d2f
Updated defaut and added wild 22-24 best of 3
Jul 30, 2022
df88507
Resolve merge conflicts from main to bite-5
Aug 2, 2022
f9c16a0
Removed test stying and updated meta data
Aug 2, 2022
ab72601
Updated sorting method by level + alphabetical order on eligible charts
Aug 3, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions songs.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@
},
"lvlMax": {
"type": "integer"
},
"useWeights": {
"type": "boolean"
},
"weights": {
"type": "array"
}
}
},
Expand All @@ -56,15 +62,20 @@
"difficulties",
"lowerLvlBound",
"upperLvlBound",
"flags"
"flags",
"useWeights",
"weights"
],
"additionalProperties": false,
"properties": {
"style": { "type": "string" },
"difficulties": { "$ref": "#/$defs/uniqueStringArr" },
"flags": { "$ref": "#/$defs/uniqueStringArr" },
"lowerLvlBound": { "type": "integer" },
"upperLvlBound": { "type": "integer" }
"upperLvlBound": { "type": "integer" },
"chartCount": { "type": "integer" },
"useWeights": { "type": "boolean" },
"weights": { "type": "array", "items": { "type": "number" } }
}
},
"i18n": {
Expand Down
2 changes: 1 addition & 1 deletion src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { ThemeSyncWidget } from "./theme-toggle";
export function App() {
return (
<ConfigStateManager>
<DrawStateManager defaultDataSet="a20plus">
<DrawStateManager defaultDataSet="1-wild-19-21">
<ThemeSyncWidget />
<UpdateManager />
<Header />
Expand Down
15 changes: 13 additions & 2 deletions src/apply-default-config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,26 @@ export function ApplyDefaultConfig({ defaults }: Props) {
}

update((config) => {
const { lowerLvlBound, upperLvlBound, flags, difficulties, style } =
defaults;
const {
lowerLvlBound,
upperLvlBound,
flags,
difficulties,
style,
chartCount,
useWeights,
weights,
} = defaults;
return {
...config,
chartCount: chartCount || config.chartCount,
lowerBound: lowerLvlBound,
upperBound: upperLvlBound,
flags: new Set(flags),
difficulties: new Set(difficulties),
style,
useWeights,
weights
};
});
}, [defaults, update]);
Expand Down
Binary file added src/assets/bite5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/jackets/DarkFenix.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/jackets/JustDoIt.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/jackets/LiberarVida.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/jackets/MetaDreadnaught.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/jackets/WeGotTheMoves.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/rednote.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/config-state.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class ConfigStateManager extends Component<Props, ConfigState> {
lowerBound: 0,
useWeights: false,
orderByAction: true,
weights: [],
weights: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 0],
forceDistribution: true,
style: "",
difficulties: new Set(),
Expand Down
1 change: 1 addition & 0 deletions src/drawing-list.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
padding: 10px;
overflow: hidden;
flex-wrap: wrap;
justify-content: center;
}

.sectionLabel {
Expand Down
12 changes: 5 additions & 7 deletions src/drawing-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { ConfigStateContext } from "./config-state";
import { EligibleChartsList } from "./eligible-charts-list";
import { Callout, NonIdealState } from "@blueprintjs/core";
import { IconNames } from "@blueprintjs/icons";
import logo from "./assets/ddr-tools-256.png";
import logo from "./assets/bite5.png";

const renderDrawing = (drawing: Drawing) => (
<DrawnSet key={drawing.id} drawing={drawing} />
Expand All @@ -27,13 +27,11 @@ export function DrawingList() {
return (
<div className={styles.empty}>
<NonIdealState
icon={<img src={logo} height={128} />}
title="DDR Tools"
description="Click 'Draw' above to draw some songs at random. Chose from other games in the top left menu."
icon={<img src={logo} height={256} />}
title="The Beast in the East 5 SMX Card Draw"
action={
<Callout intent="primary" icon={IconNames.WRENCH}>
DDR Card Draw now has a new name and and URL. Look for more new
features coming soon!
<Callout intent="danger" icon={IconNames.ArrowTopLeft}>
Choose a tournament round, then click 'Draw'
</Callout>
}
/>
Expand Down
1 change: 1 addition & 0 deletions src/drawn-set.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
padding: 10px;
overflow: hidden;
flex-wrap: wrap;
justify-content: center;
}
1 change: 1 addition & 0 deletions src/drawn-set.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { memo, useContext, useState } from "react";
import { SongCard } from "./song-card";
import { ProgressBar } from "@blueprintjs/core";
import styles from "./drawn-set.css";
import {
Drawing,
Expand Down
7 changes: 7 additions & 0 deletions src/eligible-charts-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@ export function EligibleChartsList() {
let charts = Array.from(eligibleCharts(configState, gameData.songs));
const songs = new Set<string>();
const cards = charts
.sort((a, b) => {
if (a.level === b.level){
return a.name < b.name ? -1 : 1
} else {
return a.level < b.level ? -1 : 1
}
})
.map((chart, index) => {
songs.add(songKeyFromChart(chart));
if (isDisplayFiltered && chart.flags.every((f) => f !== currentTab)) {
Expand Down
2 changes: 1 addition & 1 deletion src/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export function Header() {
<Button icon={IconNames.MENU} />
</Popover2>
<Navbar.Divider />
<Tooltip2 content="Change Song Data" placement="bottom">
<Tooltip2 content="Change Difficulty Range" placement="bottom">
<VersionSelect />
</Tooltip2>
</Navbar.Group>
Expand Down
2 changes: 0 additions & 2 deletions src/hooks/useDataSets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ export const available = process.env.DATA_FILES as unknown as Array<{
display: string;
}>;

available.sort((a, b) => (a.display < b.display ? -1 : 1));

export function useDataSets() {
const { dataSetName, loadGameData } = useContext(DrawStateContext);
const current = available.find((s) => s.name === dataSetName) || available[0];
Expand Down
8 changes: 4 additions & 4 deletions src/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
<head>
<meta charset="UTF-8" />
<meta property="og:site_name" content="DDR.tools" />
<meta property="og:title" content="DDR Tools - card draw and more!" />
<meta property="og:title" content="The Beast in the East 5 SMX Card Draw" />
<meta
property="og:description"
content="Tools for music game tournaments and training"
content="Custom card draw for The Beast in the East 5 StepManiaX Tournament"
/>
<meta property="og:image" content="/ddr-tools-128.png" />
<meta name="theme-color" content="#28b6ea" />
<title>DDR Tools - card draw and more!</title>
<meta name="theme-color" content="#d12f25" />
<title>The Beast in the East 5 SMX Card Draw</title>
</head>
<body></body>
</html>
5 changes: 5 additions & 0 deletions src/models/SongData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ export interface GameData {
*/
flags: string[];
lvlMax: number;
useWeights?: boolean;
weights?: unknown[];
};
/**
* Defines the default configuration for this game
Expand All @@ -53,6 +55,9 @@ export interface GameData {
flags: UniqueStringArr;
lowerLvlBound: number;
upperLvlBound: number;
chartCount?: number;
useWeights: boolean;
weights: number[];
};
/**
* Set of localized values for display of any styles, difficulties, or flags
Expand Down
11 changes: 6 additions & 5 deletions src/song-card/song-card.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
@import url("https://fonts.googleapis.com/css?family=Russo+One");

.chart {
display: flex !important;
flex: 1 0 0;
display: flex;
flex: 0 0 19%;
text-align: center;
border: 2px solid black;
border-radius: 5px;
Expand Down Expand Up @@ -42,7 +42,7 @@
}

.name {
font-size: 120%;
font-size: 140%;
}
.nameTranslation {
font-size: 75%;
Expand Down Expand Up @@ -72,12 +72,13 @@
}

.vetoed {
opacity: 0.8;
/* opacity: 0.8;
transform: scale(0.9);
transform-origin: center;
filter: grayscale(75%);
border-color: red;
box-shadow: 0px 0px 5px red;
box-shadow: 0px 0px 5px red; */
display: none;
}

.protected {
Expand Down
4 changes: 3 additions & 1 deletion src/song-card/song-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ interface Props {
replacedBy?: Player;
replacedWith?: DrawnChart;
iconCallbacks?: IconCallbacks;
turnOrder?:number;
}

export function SongCard(props: Props) {
Expand All @@ -39,6 +40,7 @@ export function SongCard(props: Props) {
replacedBy,
replacedWith,
iconCallbacks,
turnOrder,
} = props;

const [showingIconMenu, setShowIconMenu] = useState(false);
Expand Down Expand Up @@ -72,7 +74,7 @@ export function SongCard(props: Props) {
let jacketBg = {};
if (jacket) {
jacketBg = {
backgroundImage: `linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), url("jackets/${jacket}")`,
backgroundImage: `linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url("jackets/${jacket}")`,
};
}

Expand Down
13 changes: 8 additions & 5 deletions src/songs/smx.json → src/songs/1-wild-19-21.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,17 @@
},
"defaults": {
"style": "solo",
"difficulties": ["wild", "hard"],
"difficulties": ["wild"],
"flags": [],
"lowerLvlBound": 18,
"upperLvlBound": 22
"lowerLvlBound": 19,
"upperLvlBound": 21,
"chartCount": 7,
"useWeights": true,
"weights": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 2]
},
"i18n": {
"en": {
"name": "StepManiaX",
"name": "Wild Mode | 19 - 21",
"solo": "Solo",
"basic": "Basic",
"easy": "Easy",
Expand Down Expand Up @@ -13305,4 +13308,4 @@
]
}
]
}
}
Loading