build and release

This commit is contained in:
zkldi
2021-05-27 13:21:19 +01:00
parent e63fcd24e6
commit e7ecafa604
4 changed files with 137 additions and 611 deletions
+25 -37
View File
@@ -1,42 +1,30 @@
import { Game, integer, Playtypes } from "./types";
export declare type ClassData = Record<string, ClassInfo>;
import { IDStrings, integer } from "./types";
export interface ClassInfo {
display: string;
mouseover: string;
index: integer;
}
declare type GameClasses = {
[G in Game]: {
[P in Playtypes[G]]: Record<string, ClassData>;
};
export declare const IIDXDans: ClassInfo[];
export declare const GitadoraColours: ClassInfo[];
export declare const BMSGenocideDans: ClassInfo[];
export declare const BMSStSlDans: ClassInfo[];
export declare const SDVXDans: ClassInfo[];
export interface GameClassSets {
"iidx:SP": "dan";
"iidx:DP": "dan";
"popn:9B": never;
"sdvx:Single": "dan" | "badge";
"usc:Single": never;
"ddr:SP": "dan";
"ddr:DP": "dan";
"maimai:Single": never;
"jubeat:Single": "colour";
"museca:Single": never;
"bms:7K": "genocideDan" | "stslDan";
"bms:14K": "genocideDan";
"chunithm:Single": never;
"gitadora:Gita": "colour";
"gitadora:Dora": "colour";
}
export declare type GameClasses<I extends IDStrings> = {
[K in GameClassSets[I]]: integer;
};
export declare const gameClassValues: GameClasses;
export declare const defaultGameClasses: {
iidx: {
SP: string;
DP: string;
};
ddr: {
SP: string;
DP: string;
};
gitadora: {
Gita: string;
Dora: string;
};
popn: {};
sdvx: {
Single: string;
};
museca: {};
jubeat: {
Single: string;
};
bms: {
"7K": string;
};
chunithm: {};
maimai: {};
usc: {};
};
export {};
+109 -572
View File
@@ -2,576 +2,113 @@
// Classes refer to things like dans.
// Not the JS construct.
Object.defineProperty(exports, "__esModule", { value: true });
exports.defaultGameClasses = exports.gameClassValues = void 0;
const __internalIIDXDans = {
kaiden: {
display: "皆伝",
mouseover: "Kaiden",
index: 18,
},
chuuden: {
display: "中伝",
mouseover: "Chuuden",
index: 17,
},
10: {
display: "十段",
mouseover: "10th Dan",
index: 16,
},
9: {
display: "九段",
mouseover: "9th Dan",
index: 15,
},
8: {
display: "八段",
mouseover: "8th Dan",
index: 14,
},
7: {
display: "七段",
mouseover: "7th Dan",
index: 13,
},
6: {
display: "六段",
mouseover: "6th Dan",
index: 12,
},
5: {
display: "五段",
mouseover: "5th Dan",
index: 11,
},
4: {
display: "四段",
mouseover: "4th Dan",
index: 10,
},
3: {
display: "三段",
mouseover: "3rd Dan",
index: 9,
},
2: {
display: "二段",
mouseover: "2nd Dan",
index: 8,
},
1: {
display: "初段",
mouseover: "1st Dan",
index: 7,
},
"1kyu": {
display: "一級",
mouseover: "1st Kyu",
index: 6,
},
"2kyu": {
display: "二級",
mouseover: "2nd Kyu",
index: 5,
},
"3kyu": {
display: "三級",
mouseover: "3rd Kyu",
index: 4,
},
"4kyu": {
display: "四級",
mouseover: "4th Kyu",
index: 3,
},
"5kyu": {
display: "五級",
mouseover: "5th Kyu",
index: 2,
},
"6kyu": {
display: "六級",
mouseover: "6th Kyu",
index: 1,
},
"7kyu": {
display: "七級",
mouseover: "7th Kyu",
index: 0,
},
};
const __internalSDVXDans = {
inf: {
display: "LV.∞",
mouseover: "Inf. Dan",
index: 12,
},
11: {
display: "LV.11",
mouseover: "11th Dan",
index: 11,
},
10: {
display: "LV.10",
mouseover: "10th Dan",
index: 10,
},
9: {
display: "LV.09",
mouseover: "9th Dan",
index: 9,
},
8: {
display: "LV.08",
mouseover: "8th Dan",
index: 8,
},
7: {
display: "LV.07",
mouseover: "7th Dan",
index: 7,
},
6: {
display: "LV.06",
mouseover: "6th Dan",
index: 6,
},
5: {
display: "LV.05",
mouseover: "5th Dan",
index: 5,
},
4: {
display: "LV.04",
mouseover: "4th Dan",
index: 4,
},
3: {
display: "LV.03",
mouseover: "3rd Dan",
index: 3,
},
2: {
display: "LV.02",
mouseover: "2nd Dan",
index: 2,
},
1: {
display: "LV.01",
mouseover: "1st Dan",
index: 1,
},
};
// unimplemented
const __internalDDRDans = {};
const __internalGitadoraColours = {
rainbow: {
display: "虹",
mouseover: "Rainbow",
index: 16,
},
gold: {
display: "金",
mouseover: "Gold",
index: 15,
},
silver: {
display: "銀",
mouseover: "Silver",
index: 14,
},
bronze: {
display: "銅",
mouseover: "Bronze",
index: 13,
},
redgradient: {
display: "赤グラ",
mouseover: "Red Gradient",
index: 12,
},
red: {
display: "赤",
mouseover: "Red",
index: 11,
},
purplegradient: {
display: "紫グラ",
mouseover: "Purple Gradient",
index: 10,
},
purple: {
display: "紫",
mouseover: "Purple",
index: 9,
},
bluegradient: {
display: "青グラ",
mouseover: "Blue Gradient",
index: 8,
},
blue: {
display: "青",
mouseover: "Blue",
index: 7,
},
greengradient: {
display: "緑グラ",
mouseover: "Green Gradient",
index: 6,
},
green: {
display: "緑",
mouseover: "Green",
index: 5,
},
yellowgradient: {
display: "黄グラ",
mouseover: "Yellow Gradient",
index: 4,
},
yellow: {
display: "黄",
mouseover: "Yellow",
index: 3,
},
orangegradient: {
display: "橙グラ",
mouseover: "Orange Gradient",
index: 2,
},
orange: {
display: "橙",
mouseover: "Orange",
index: 1,
},
white: {
display: "白",
mouseover: "White",
index: 0,
},
};
const __internalGenocideDans = {
overjoy: {
display: "(^^)",
mouseover: "Overjoy",
index: 22,
},
kaiden: {
display: "★★",
mouseover: "Insane Kaiden",
index: 21,
},
10: {
display: "★10",
mouseover: "Insane 10th Dan",
index: 20,
},
9: {
display: "★9",
mouseover: "Insane 9th Dan",
index: 19,
},
8: {
display: "★8",
mouseover: "Insane 8th Dan",
index: 18,
},
7: {
display: "★7",
mouseover: "Insane 7th Dan",
index: 17,
},
6: {
display: "★6",
mouseover: "Insane 6th Dan",
index: 16,
},
5: {
display: "★5",
mouseover: "Insane 5th Dan",
index: 15,
},
4: {
display: "★4",
mouseover: "Insane 4th Dan",
index: 14,
},
3: {
display: "★3",
mouseover: "Insane 3rd Dan",
index: 13,
},
2: {
display: "★2",
mouseover: "Insane 2nd Dan",
index: 12,
},
1: {
display: "★1",
mouseover: "Insane 1st Dan",
index: 11,
},
normal10: {
display: "☆10",
mouseover: "Normal 10th Dan",
index: 10,
},
normal9: {
display: "☆9",
mouseover: "Normal 9th Dan",
index: 9,
},
normal8: {
display: "☆8",
mouseover: "Normal 8th Dan",
index: 8,
},
normal7: {
display: "☆7",
mouseover: "Normal 7th Dan",
index: 7,
},
normal6: {
display: "☆6",
mouseover: "Normal 6th Dan",
index: 6,
},
normal5: {
display: "☆5",
mouseover: "Normal 5th Dan",
index: 5,
},
normal4: {
display: "☆4",
mouseover: "Normal 4th Dan",
index: 4,
},
normal3: {
display: "☆3",
mouseover: "Normal 3rd Dan",
index: 3,
},
normal2: {
display: "☆2",
mouseover: "Normal 2nd Dan",
index: 2,
},
normal1: {
display: "☆1",
mouseover: "Normal 1st Dan",
index: 1,
},
};
const __internalStellaDans = {
st11: {
display: "st11",
mouseover: "Stella Skill Simulator st11",
index: 24,
},
st10: {
display: "st10",
mouseover: "Stella Skill Simulator st10",
index: 23,
},
st9: {
display: "st9",
mouseover: "Stella Skill Simulator st9",
index: 22,
},
st8: {
display: "st8",
mouseover: "Stella Skill Simulator st8",
index: 21,
},
st7: {
display: "st7",
mouseover: "Stella Skill Simulator st7",
index: 20,
},
st6: {
display: "st6",
mouseover: "Stella Skill Simulator st6",
index: 19,
},
st5: {
display: "st5",
mouseover: "Stella Skill Simulator st5",
index: 18,
},
st4: {
display: "st4",
mouseover: "Stella Skill Simulator st4",
index: 17,
},
st3: {
display: "st3",
mouseover: "Stella Skill Simulator st3",
index: 16,
},
st2: {
display: "st2",
mouseover: "Stella Skill Simulator st2",
index: 15,
},
st1: {
display: "st1",
mouseover: "Stella Skill Simulator st1",
index: 14,
},
st0: {
display: "st0",
mouseover: "Stella Skill Simulator st0",
index: 13,
},
sl12: {
display: "sl12",
mouseover: "Satellite Skill Simulator sl12",
index: 12,
},
sl11: {
display: "sl11",
mouseover: "Satellite Skill Simulator sl11",
index: 11,
},
sl10: {
display: "sl10",
mouseover: "Satellite Skill Simulator sl10",
index: 10,
},
sl9: {
display: "sl9",
mouseover: "Satellite Skill Simulator sl9",
index: 9,
},
sl8: {
display: "sl8",
mouseover: "Satellite Skill Simulator sl8",
index: 8,
},
sl7: {
display: "sl7",
mouseover: "Satellite Skill Simulator sl7",
index: 7,
},
sl6: {
display: "sl6",
mouseover: "Satellite Skill Simulator sl6",
index: 6,
},
sl5: {
display: "sl5",
mouseover: "Satellite Skill Simulator sl5",
index: 5,
},
sl4: {
display: "sl4",
mouseover: "Satellite Skill Simulator sl4",
index: 4,
},
sl3: {
display: "sl3",
mouseover: "Satellite Skill Simulator sl3",
index: 3,
},
sl2: {
display: "sl2",
mouseover: "Satellite Skill Simulator sl2",
index: 2,
},
sl1: {
display: "sl1",
mouseover: "Satellite Skill Simulator sl1",
index: 1,
},
sl0: {
display: "sl0",
mouseover: "Satellite Skill Simulator sl0",
index: 0,
},
};
exports.gameClassValues = {
iidx: {
SP: {
dan: __internalIIDXDans,
},
DP: {
dan: __internalIIDXDans,
},
},
ddr: {
SP: {
dan: __internalDDRDans,
},
DP: {
dan: __internalDDRDans,
},
},
sdvx: {
Single: {
dan: __internalSDVXDans,
},
},
popn: {
"9B": {},
},
museca: {
Single: {},
},
jubeat: {
Single: {},
},
bms: {
"7K": {
genocideDan: __internalGenocideDans,
stDan: __internalStellaDans,
},
"14K": {},
},
chunithm: {
Single: {},
},
gitadora: {
Gita: {
skillColour: __internalGitadoraColours,
},
Dora: {
skillColour: __internalGitadoraColours,
},
},
maimai: {
Single: {},
},
usc: {
Single: {},
},
};
exports.defaultGameClasses = {
iidx: {
SP: "dan",
DP: "dan",
},
ddr: {
SP: "dan",
DP: "dan",
},
gitadora: {
Gita: "skillColour",
Dora: "skillColour",
},
popn: {},
sdvx: {
Single: "dan",
},
museca: {},
jubeat: {
Single: "jubilityColour",
},
bms: {
"7K": "genocideDan",
},
chunithm: {},
maimai: {},
usc: {},
};
exports.SDVXDans = exports.BMSStSlDans = exports.BMSGenocideDans = exports.GitadoraColours = exports.IIDXDans = void 0;
function c(d, m) {
return { display: d, mouseover: m };
}
exports.IIDXDans = [
c("七級", "7th Kyu"),
c("六級", "6th Kyu"),
c("五級", "5th Kyu"),
c("四級", "4th Kyu"),
c("三級", "3rd Kyu"),
c("二級", "2nd Kyu"),
c("一級", "1st Kyu"),
c("初段", "1st Dan"),
c("二段", "2nd Dan"),
c("三段", "3rd Dan"),
c("四段", "4th Dan"),
c("五段", "5th Dan"),
c("六段", "6th Dan"),
c("七段", "7th Dan"),
c("八段", "8th Dan"),
c("九段", "9th Dan"),
c("十段", "10th Dan"),
c("中伝", "Chuuden"),
c("皆伝", "Kaiden"),
];
exports.GitadoraColours = [
c("白", "White"),
c("橙", "Orange"),
c("橙グラ", "Orange Gradient"),
c("黄", "Yellow"),
c("黄グラ", "Yellow Gradient"),
c("緑", "Green"),
c("緑グラ", "Green Gradient"),
c("青", "Blue"),
c("青グラ", "Blue Gradient"),
c("紫", "Purple"),
c("紫グラ", "Purple Gradient"),
c("赤", "Red"),
c("赤グラ", "Red Gradient"),
c("銅", "Bronze"),
c("銀", "Silver"),
c("金", "Gold"),
c("虹", "Rainbow"),
];
exports.BMSGenocideDans = [
c("☆1", "Normal 1st Dan"),
c("☆2", "Normal 2nd Dan"),
c("☆3", "Normal 3rd Dan"),
c("☆4", "Normal 4th Dan"),
c("☆5", "Normal 5th Dan"),
c("☆6", "Normal 6th Dan"),
c("☆7", "Normal 7th Dan"),
c("☆8", "Normal 8th Dan"),
c("☆9", "Normal 9th Dan"),
c("☆10", "Normal 10th Dan"),
c("★1", "Insane 1st Dan"),
c("★2", "Insane 2nd Dan"),
c("★3", "Insane 3rd Dan"),
c("★4", "Insane 4th Dan"),
c("★5", "Insane 5th Dan"),
c("★6", "Insane 6th Dan"),
c("★7", "Insane 7th Dan"),
c("★8", "Insane 8th Dan"),
c("★9", "Insane 9th Dan"),
c("★10", "Insane 10th Dan"),
c("★★", "Insane Kaiden"),
c("(^^)", "Overjoy"),
];
exports.BMSStSlDans = [
c("sl0", "Satellite 0"),
c("sl1", "Satellite 1"),
c("sl2", "Satellite 2"),
c("sl3", "Satellite 3"),
c("sl4", "Satellite 4"),
c("sl5", "Satellite 5"),
c("sl6", "Satellite 6"),
c("sl7", "Satellite 7"),
c("sl8", "Satellite 8"),
c("sl9", "Satellite 9"),
c("sl10", "Satellite 10"),
c("sl11", "Satellite 11"),
c("sl12", "Satellite 12"),
c("st0", "Stella 0"),
c("st1", "Stella 1"),
c("st2", "Stella 2"),
c("st3", "Stella 3"),
c("st4", "Stella 4"),
c("st5", "Stella 5"),
c("st6", "Stella 6"),
c("st7", "Stella 7"),
c("st8", "Stella 8"),
c("st9", "Stella 9"),
c("st10", "Stella 10"),
c("st11", "Stella 11"),
];
exports.SDVXDans = [
c("LV.01", "1st Dan"),
c("LV.02", "2nd Dan"),
c("LV.03", "3rd Dan"),
c("LV.04", "4th Dan"),
c("LV.05", "5th Dan"),
c("LV.06", "6th Dan"),
c("LV.07", "7th Dan"),
c("LV.08", "8th Dan"),
c("LV.09", "9th Dan"),
c("LV.10", "10th Dan"),
c("LV.11", "11th Dan"),
c("LV.INF", "Inf. Dan"),
];
//# sourceMappingURL=game-classes.js.map
File diff suppressed because one or more lines are too long
+2 -1
View File
@@ -1,5 +1,6 @@
import { IObjectID } from "monk";
import { FilterQuery } from "mongodb";
import { GameClasses } from "./game-classes";
export interface CounterDocument {
counterName: string;
value: integer;
@@ -561,7 +562,7 @@ export interface UserGameStats<I extends IDStrings = IDStrings> extends MongoDBD
rating: number;
lampRating: number;
customRatings: Partial<Record<GameSpecificCalcLookup[I], number>>;
classes: Record<string, string>;
classes: GameClasses<I>;
}
/**
* PrivateUserDocument is the document indicating that we've returned everything about the user