mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-07-16 08:27:05 -05:00
* Add DB tables
* Toggle TO Tools in new calendar event page
* TO tools page initial
* Add counter pick map pool UI
* Save tie breaker map pool
* Save team name
* Layout initial
* Load users own team
* Make team name input required
* Rename team
* Divide to sections
* Submit team map pool
* New style for counter pick map pool section expand
* Fix tiebreaker map pool not saved when new event made
* Split to many forms
* According for team name
* Small UI consistency tweaks
* Add explanation to tie breaker maps
* Remove redundant prop
* Fix new calendar event todos
* Use required hidden input component in new build page
* Fix to tools page showing even when toToolsEnabled = 0
* Delete team
* Map list generation tests initial
* Add tournament map list generation tests
* First version of map list generation
* Add seeded RNG
* Rearrange files
* Generation with strats initial
* Default map pool + allow one team not to have any maps
* Implement map generation via backtracking
* Make order of stages irrelevant
* Add one more TODO
* Seed
* Fixes
* Tournament map list generator initial
* More functional maplist
* Fix any
* Persist in search params initial
* Add date to calendar seed
* Revert "Persist in search params initial"
This reverts commit f01a9e6982.
* Allow admin to start tournament
* Rate maplist instead of optimal / suboptimal
* Add fallback if map list generation errors out
* Hide TO Tools if not admin
* Submit team roster and delete members
* Teams page
* Give roster s p a c e
* Clear user combobox on sent + layout tweaks
* Gracefully handle updating after tournament has started
* Add title
* Persist map list in search params
* Add i18n
75 lines
2.0 KiB
TypeScript
75 lines
2.0 KiB
TypeScript
import allTags from "~/routes/calendar/tags.json";
|
|
import type { CalendarEventTag } from "./db/types";
|
|
import type { BuildAbilitiesTupleWithUnknown } from "./modules/in-game-lists";
|
|
|
|
export const TWEET_LENGTH_MAX_LENGTH = 280;
|
|
export const DISCORD_MESSAGE_MAX_LENGTH = 2000;
|
|
|
|
export const USER = {
|
|
BIO_MAX_LENGTH: DISCORD_MESSAGE_MAX_LENGTH,
|
|
CUSTOM_URL_MAX_LENGTH: 32,
|
|
IN_GAME_NAME_TEXT_MAX_LENGTH: 20,
|
|
IN_GAME_NAME_DISCRIMINATOR_LENGTH: 4,
|
|
};
|
|
|
|
export const PlUS_SUGGESTION_FIRST_COMMENT_MAX_LENGTH = 500;
|
|
export const PlUS_SUGGESTION_COMMENT_MAX_LENGTH = TWEET_LENGTH_MAX_LENGTH;
|
|
|
|
export const CALENDAR_EVENT = {
|
|
NAME_MIN_LENGTH: 2,
|
|
NAME_MAX_LENGTH: 100,
|
|
DESCRIPTION_MAX_LENGTH: DISCORD_MESSAGE_MAX_LENGTH,
|
|
DISCORD_INVITE_CODE_MAX_LENGTH: 50,
|
|
BRACKET_URL_MAX_LENGTH: 200,
|
|
MAX_AMOUNT_OF_DATES: 5,
|
|
TAGS: Object.keys(allTags) as Array<CalendarEventTag>,
|
|
};
|
|
|
|
export const CALENDAR_EVENT_RESULT = {
|
|
MAX_PARTICIPANTS_COUNT: 1000,
|
|
MAX_PLAYERS_LENGTH: 8,
|
|
MAX_TEAM_NAME_LENGTH: 100,
|
|
MAX_TEAM_PLACEMENT: 256,
|
|
MAX_PLAYER_NAME_LENGTH: 100,
|
|
} as const;
|
|
|
|
export const TOURNAMENT = {
|
|
TEAM_NAME_MAX_LENGTH: 64,
|
|
COUNTERPICK_MAPS_PER_MODE: 2,
|
|
COUNTERPICK_MAX_STAGE_REPEAT: 2,
|
|
TEAM_MIN_MEMBERS_FOR_FULL: 4,
|
|
TEAM_MAX_MEMBERS: 6,
|
|
AVAILABLE_BEST_OF: [3, 5, 7] as const,
|
|
} as const;
|
|
|
|
export const BUILD = {
|
|
TITLE_MIN_LENGTH: 1,
|
|
TITLE_MAX_LENGTH: 100,
|
|
DESCRIPTION_MAX_LENGTH: TWEET_LENGTH_MAX_LENGTH,
|
|
MAX_WEAPONS_COUNT: 5,
|
|
MAX_COUNT: 250,
|
|
} as const;
|
|
|
|
export const MAPS = {
|
|
CODE_MIN_LENGTH: 2,
|
|
CODE_MAX_LENGTH: 32,
|
|
};
|
|
|
|
export const BUILDS_PAGE_BATCH_SIZE = 24;
|
|
export const BUILDS_PAGE_MAX_BUILDS = 240;
|
|
|
|
export const EMPTY_BUILD: BuildAbilitiesTupleWithUnknown = [
|
|
["UNKNOWN", "UNKNOWN", "UNKNOWN", "UNKNOWN"],
|
|
["UNKNOWN", "UNKNOWN", "UNKNOWN", "UNKNOWN"],
|
|
["UNKNOWN", "UNKNOWN", "UNKNOWN", "UNKNOWN"],
|
|
];
|
|
|
|
export const PLUS_TIERS = [1, 2, 3];
|
|
|
|
export const PLUS_UPVOTE = 1;
|
|
export const PLUS_DOWNVOTE = -1;
|
|
|
|
export const ADMIN_DISCORD_ID = "79237403620945920";
|
|
|
|
export const LOHI_TOKEN_HEADER_NAME = "Lohi-Token";
|