mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-03-21 18:04:39 -05:00
Refactor away in-game-lists barrel file Closes #2322
This commit is contained in:
parent
cb8669acc3
commit
e9676ada18
|
|
@ -1,6 +1,6 @@
|
|||
import clsx from "clsx";
|
||||
import * as React from "react";
|
||||
import { abilities } from "~/modules/in-game-lists";
|
||||
import { abilities } from "~/modules/in-game-lists/abilities";
|
||||
import type { BuildAbilitiesTupleWithUnknown } from "~/modules/in-game-lists/types";
|
||||
import invariant from "~/utils/invariant";
|
||||
import { abilityImageUrl } from "~/utils/urls";
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import { useIsMounted } from "~/hooks/useIsMounted";
|
|||
import type {
|
||||
Ability as AbilityType,
|
||||
ModeShort,
|
||||
} from "~/modules/in-game-lists";
|
||||
} from "~/modules/in-game-lists/types";
|
||||
import type { BuildAbilitiesTuple } from "~/modules/in-game-lists/types";
|
||||
import { altWeaponIdToId } from "~/modules/in-game-lists/weapon-ids";
|
||||
import { databaseTimestampToDate } from "~/utils/dates";
|
||||
|
|
|
|||
|
|
@ -6,16 +6,18 @@ import { useTranslation } from "react-i18next";
|
|||
import type { GearType } from "~/db/tables";
|
||||
import type { SerializedMapPoolEvent } from "~/features/calendar/routes/map-pool-events";
|
||||
import { useAllEventsWithMapPools } from "~/hooks/swr";
|
||||
import type { MainWeaponId } from "~/modules/in-game-lists";
|
||||
import {
|
||||
clothesGearIds,
|
||||
headGearIds,
|
||||
mainWeaponIds,
|
||||
shoesGearIds,
|
||||
} from "~/modules/in-game-lists/gear-ids";
|
||||
import type { MainWeaponId } from "~/modules/in-game-lists/types";
|
||||
import { weaponAltNames } from "~/modules/in-game-lists/weapon-alt-names";
|
||||
import {
|
||||
mainWeaponIds,
|
||||
subWeaponIds,
|
||||
weaponCategories,
|
||||
} from "~/modules/in-game-lists";
|
||||
import { weaponAltNames } from "~/modules/in-game-lists/weapon-alt-names";
|
||||
} from "~/modules/in-game-lists/weapon-ids";
|
||||
import {
|
||||
nonBombSubWeaponIds,
|
||||
nonDamagingSpecialWeaponIds,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import clsx from "clsx";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import type { TierName } from "~/features/mmr/mmr-constants";
|
||||
import type { MainWeaponId, StageId } from "~/modules/in-game-lists";
|
||||
import type { MainWeaponId, StageId } from "~/modules/in-game-lists/types";
|
||||
import type { ModeShortWithSpecial } from "~/modules/in-game-lists/types";
|
||||
import {
|
||||
TIER_PLUS_URL,
|
||||
|
|
|
|||
|
|
@ -7,12 +7,9 @@ import type { Tables } from "~/db/tables";
|
|||
import type { SerializedMapPoolEvent } from "~/features/calendar/routes/map-pool-events";
|
||||
import { MapPool } from "~/features/map-list-generator/core/map-pool";
|
||||
import { BANNED_MAPS } from "~/features/sendouq-settings/banned-maps";
|
||||
import {
|
||||
type ModeShort,
|
||||
type StageId,
|
||||
modesShort,
|
||||
} from "~/modules/in-game-lists";
|
||||
import { stageIds } from "~/modules/in-game-lists";
|
||||
import { modesShort } from "~/modules/in-game-lists/modes";
|
||||
import { stageIds } from "~/modules/in-game-lists/stage-ids";
|
||||
import type { ModeShort, StageId } from "~/modules/in-game-lists/types";
|
||||
import { split, startsWith } from "~/utils/strings";
|
||||
import { assertType } from "~/utils/types";
|
||||
import { modeImageUrl, stageImageUrl } from "~/utils/urls";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type { BuildAbilitiesTupleWithUnknown } from "./modules/in-game-lists";
|
||||
import type { BuildAbilitiesTupleWithUnknown } from "./modules/in-game-lists/types";
|
||||
|
||||
export const TWEET_LENGTH_MAX_LENGTH = 280;
|
||||
export const DISCORD_MESSAGE_MAX_LENGTH = 2000;
|
||||
|
|
|
|||
|
|
@ -50,21 +50,21 @@ import {
|
|||
secondsToHoursMinutesSecondString,
|
||||
youtubeIdToYoutubeUrl,
|
||||
} from "~/features/vods/vods-utils";
|
||||
import { abilities } from "~/modules/in-game-lists/abilities";
|
||||
import {
|
||||
clothesGearIds,
|
||||
headGearIds,
|
||||
shoesGearIds,
|
||||
} from "~/modules/in-game-lists/gear-ids";
|
||||
import { modesShort } from "~/modules/in-game-lists/modes";
|
||||
import { rankedModesShort } from "~/modules/in-game-lists/modes";
|
||||
import { stageIds } from "~/modules/in-game-lists/stage-ids";
|
||||
import type {
|
||||
AbilityType,
|
||||
MainWeaponId,
|
||||
StageId,
|
||||
} from "~/modules/in-game-lists";
|
||||
import {
|
||||
abilities,
|
||||
clothesGearIds,
|
||||
headGearIds,
|
||||
mainWeaponIds,
|
||||
modesShort,
|
||||
shoesGearIds,
|
||||
stageIds,
|
||||
} from "~/modules/in-game-lists";
|
||||
import { rankedModesShort } from "~/modules/in-game-lists/modes";
|
||||
} from "~/modules/in-game-lists/types";
|
||||
import { mainWeaponIds } from "~/modules/in-game-lists/weapon-ids";
|
||||
import type { TournamentMapListMap } from "~/modules/tournament-map-list-generator";
|
||||
import { SENDOUQ_DEFAULT_MAPS } from "~/modules/tournament-map-list-generator/constants";
|
||||
import { nullFilledArray } from "~/utils/arrays";
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ import type {
|
|||
MainWeaponId,
|
||||
ModeShort,
|
||||
StageId,
|
||||
} from "~/modules/in-game-lists";
|
||||
} from "~/modules/in-game-lists/types";
|
||||
import type { JSONColumnTypeNullable } from "~/utils/kysely.server";
|
||||
|
||||
type Generated<T> = T extends ColumnType<infer S, infer I, infer U>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type { MainWeaponId } from "~/modules/in-game-lists";
|
||||
import type { MainWeaponId } from "~/modules/in-game-lists/types";
|
||||
import type { DamageType } from "./analyzer-types";
|
||||
|
||||
export const MAX_LDE_INTENSITY = 21;
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
import { useSearchParams } from "@remix-run/react";
|
||||
import {
|
||||
type Ability,
|
||||
type AbilityWithUnknown,
|
||||
type BuildAbilitiesTupleWithUnknown,
|
||||
type MainWeaponId,
|
||||
abilities,
|
||||
isAbility,
|
||||
} from "~/modules/in-game-lists";
|
||||
import { abilities } from "~/modules/in-game-lists/abilities";
|
||||
import type {
|
||||
Ability,
|
||||
AbilityWithUnknown,
|
||||
BuildAbilitiesTupleWithUnknown,
|
||||
MainWeaponId,
|
||||
} from "~/modules/in-game-lists/types";
|
||||
import { isAbility } from "~/modules/in-game-lists/utils";
|
||||
import invariant from "~/utils/invariant";
|
||||
import { MAX_LDE_INTENSITY } from "./analyzer-constants";
|
||||
import type { SpecialEffectType } from "./analyzer-types";
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import type {
|
|||
MainWeaponId,
|
||||
SpecialWeaponId,
|
||||
SubWeaponId,
|
||||
} from "~/modules/in-game-lists";
|
||||
} from "~/modules/in-game-lists/types";
|
||||
import type { AbilityWithUnknown } from "~/modules/in-game-lists/types";
|
||||
import type { DAMAGE_TYPE } from "./analyzer-constants";
|
||||
import type { SPECIAL_EFFECTS } from "./core/specialEffects";
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import * as React from "react";
|
|||
import { useTranslation } from "react-i18next";
|
||||
import { Ability } from "~/components/Ability";
|
||||
import { MAX_AP } from "~/constants";
|
||||
import type { MainWeaponId } from "~/modules/in-game-lists";
|
||||
import type { MainWeaponId } from "~/modules/in-game-lists/types";
|
||||
import { SendouButton } from "../../../components/elements/Button";
|
||||
import { SendouPopover } from "../../../components/elements/Popover";
|
||||
import type { FullInkTankOption } from "../analyzer-types";
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { describe, expect, test } from "vitest";
|
|||
import type {
|
||||
AbilityWithUnknown,
|
||||
BuildAbilitiesTupleWithUnknown,
|
||||
} from "~/modules/in-game-lists";
|
||||
} from "~/modules/in-game-lists/types";
|
||||
import { getAbilityChunksMapAsArray } from "./abilityChunksCalc";
|
||||
|
||||
// Utility function that performs an order-agnostic check to see
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import {
|
||||
type AbilityWithUnknown,
|
||||
type BuildAbilitiesTupleWithUnknown,
|
||||
abilities,
|
||||
} from "~/modules/in-game-lists";
|
||||
import { abilities } from "~/modules/in-game-lists/abilities";
|
||||
import type {
|
||||
AbilityWithUnknown,
|
||||
BuildAbilitiesTupleWithUnknown,
|
||||
} from "~/modules/in-game-lists/types";
|
||||
import type { AbilityChunks } from "../analyzer-types";
|
||||
|
||||
// Reference for Ability Chunks numbers: https://splatoonwiki.org/wiki/Ability_chunk#Splatoon_3
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import { describe, expect, test } from "vitest";
|
||||
import { type MainWeaponId, mainWeaponIds } from "~/modules/in-game-lists";
|
||||
import type { MainWeaponId } from "~/modules/in-game-lists/types";
|
||||
import { mainWeaponIds } from "~/modules/in-game-lists/weapon-ids";
|
||||
import { damageTypeToWeaponType } from "../analyzer-constants";
|
||||
import { buildStats } from "./stats";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,27 +1,27 @@
|
|||
import { nanoid } from "nanoid";
|
||||
import * as R from "remeda";
|
||||
import type {
|
||||
Ability,
|
||||
MainWeaponId,
|
||||
SubWeaponId,
|
||||
} from "~/modules/in-game-lists/types";
|
||||
import {
|
||||
ANGLE_SHOOTER_ID,
|
||||
AUTO_BOMB_ID,
|
||||
type Ability,
|
||||
BURST_BOMB_ID,
|
||||
CRAB_TANK_ID,
|
||||
CURLING_BOMB_ID,
|
||||
FIZZY_BOMB_ID,
|
||||
type MainWeaponId,
|
||||
INK_MINE_ID,
|
||||
POINT_SENSOR_ID,
|
||||
SPLASH_WALL_ID,
|
||||
SPLAT_BOMB_ID,
|
||||
SPRINKLER_ID,
|
||||
SUCTION_BOMB_ID,
|
||||
type SubWeaponId,
|
||||
TORPEDO_ID,
|
||||
ZIPCASTER_ID,
|
||||
subWeaponIds,
|
||||
} from "~/modules/in-game-lists";
|
||||
import {
|
||||
ANGLE_SHOOTER_ID,
|
||||
INK_MINE_ID,
|
||||
POINT_SENSOR_ID,
|
||||
} from "~/modules/in-game-lists";
|
||||
} from "~/modules/in-game-lists/weapon-ids";
|
||||
import invariant from "~/utils/invariant";
|
||||
import { cutToNDecimalPlaces, roundToNDecimalPlaces } from "~/utils/number";
|
||||
import { assertUnreachable } from "~/utils/types";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { EMPTY_BUILD } from "~/constants";
|
||||
import { abilities } from "~/modules/in-game-lists/abilities";
|
||||
import type {
|
||||
Ability,
|
||||
AbilityType,
|
||||
|
|
@ -7,16 +8,15 @@ import type {
|
|||
MainWeaponId,
|
||||
SpecialWeaponId,
|
||||
SubWeaponId,
|
||||
} from "~/modules/in-game-lists";
|
||||
} from "~/modules/in-game-lists/types";
|
||||
import {
|
||||
abilities,
|
||||
mainWeaponIds,
|
||||
nonBombSubWeaponIds,
|
||||
nonDamagingSpecialWeaponIds,
|
||||
specialWeaponIds,
|
||||
subWeaponIds,
|
||||
weaponCategories,
|
||||
} from "~/modules/in-game-lists";
|
||||
} from "~/modules/in-game-lists/weapon-ids";
|
||||
import invariant from "~/utils/invariant";
|
||||
import type { Unpacked } from "~/utils/types";
|
||||
import { UNKNOWN_SHORT } from "../analyzer-constants";
|
||||
|
|
|
|||
|
|
@ -16,22 +16,24 @@ import { BeakerIcon } from "~/components/icons/Beaker";
|
|||
import { MAX_AP } from "~/constants";
|
||||
import { useUser } from "~/features/auth/core/user";
|
||||
import { useIsMounted } from "~/hooks/useIsMounted";
|
||||
import type { Ability as AbilityType } from "~/modules/in-game-lists";
|
||||
import { abilitiesShort } from "~/modules/in-game-lists/abilities";
|
||||
import type { Ability as AbilityType } from "~/modules/in-game-lists/types";
|
||||
import type {
|
||||
BuildAbilitiesTupleWithUnknown,
|
||||
MainWeaponId,
|
||||
SubWeaponId,
|
||||
} from "~/modules/in-game-lists/types";
|
||||
import { isAbility } from "~/modules/in-game-lists/utils";
|
||||
import {
|
||||
ANGLE_SHOOTER_ID,
|
||||
BIG_BUBBLER_ID,
|
||||
type BuildAbilitiesTupleWithUnknown,
|
||||
INK_MINE_ID,
|
||||
INK_STORM_ID,
|
||||
KILLER_WAIL_ID,
|
||||
type MainWeaponId,
|
||||
POINT_SENSOR_ID,
|
||||
type SubWeaponId,
|
||||
TORPEDO_ID,
|
||||
TOXIC_MIST_ID,
|
||||
abilitiesShort,
|
||||
isAbility,
|
||||
} from "~/modules/in-game-lists";
|
||||
} from "~/modules/in-game-lists/weapon-ids";
|
||||
import { atOrError, nullFilledArray } from "~/utils/arrays";
|
||||
import { damageTypeTranslationString } from "~/utils/i18next";
|
||||
import invariant from "~/utils/invariant";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import { MAX_AP } from "~/constants";
|
||||
import { type Ability, abilities } from "~/modules/in-game-lists";
|
||||
import { abilities } from "~/modules/in-game-lists/abilities";
|
||||
import type { Ability } from "~/modules/in-game-lists/types";
|
||||
import invariant from "~/utils/invariant";
|
||||
import { roundToNDecimalPlaces } from "~/utils/number";
|
||||
import { isStackableAbility } from "../build-analyzer/core/utils";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { sql } from "~/db/sql";
|
||||
import type { Ability, MainWeaponId } from "~/modules/in-game-lists";
|
||||
import type { Ability, MainWeaponId } from "~/modules/in-game-lists/types";
|
||||
|
||||
// TODO: could consider removing private builds from this
|
||||
const stm = sql.prepare(/* sql */ `
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { sql } from "~/db/sql";
|
||||
import type { Ability, MainWeaponId } from "~/modules/in-game-lists";
|
||||
import type { Ability, MainWeaponId } from "~/modules/in-game-lists/types";
|
||||
|
||||
// TODO: could consider removing private builds from this
|
||||
const query = (includeWeaponId: boolean) => /* sql */ `
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@ import type { Transaction } from "kysely";
|
|||
import { jsonArrayFrom } from "kysely/helpers/sqlite";
|
||||
import { db } from "~/db/sql";
|
||||
import type { BuildWeapon, DB, Tables, TablesInsertable } from "~/db/tables";
|
||||
import {
|
||||
type BuildAbilitiesTuple,
|
||||
type ModeShort,
|
||||
modesShort,
|
||||
} from "~/modules/in-game-lists";
|
||||
import { modesShort } from "~/modules/in-game-lists/modes";
|
||||
import type {
|
||||
BuildAbilitiesTuple,
|
||||
ModeShort,
|
||||
} from "~/modules/in-game-lists/types";
|
||||
import invariant from "~/utils/invariant";
|
||||
|
||||
export async function allByUserId({
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type { Ability, ModeShort } from "~/modules/in-game-lists";
|
||||
import type { Ability, ModeShort } from "~/modules/in-game-lists/types";
|
||||
|
||||
type WithId<T> = T & { id: string };
|
||||
|
||||
|
|
|
|||
|
|
@ -5,12 +5,10 @@ import { ModeImage } from "~/components/Image";
|
|||
import { CrossIcon } from "~/components/icons/Cross";
|
||||
import { PATCHES } from "~/constants";
|
||||
import { possibleApValues } from "~/features/build-analyzer";
|
||||
import type { ModeShort } from "~/modules/in-game-lists";
|
||||
import {
|
||||
type Ability as AbilityType,
|
||||
abilities,
|
||||
modesShort,
|
||||
} from "~/modules/in-game-lists";
|
||||
import { abilities } from "~/modules/in-game-lists/abilities";
|
||||
import { modesShort } from "~/modules/in-game-lists/modes";
|
||||
import type { ModeShort } from "~/modules/in-game-lists/types";
|
||||
import type { Ability as AbilityType } from "~/modules/in-game-lists/types";
|
||||
import { dateToYYYYMMDD } from "~/utils/dates";
|
||||
import type {
|
||||
AbilityBuildFilter,
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import {
|
||||
type Ability,
|
||||
type BuildAbilitiesTuple,
|
||||
abilities,
|
||||
} from "~/modules/in-game-lists";
|
||||
import { abilities } from "~/modules/in-game-lists/abilities";
|
||||
import { mainOnlyAbilitiesShort } from "~/modules/in-game-lists/abilities";
|
||||
import type {
|
||||
Ability,
|
||||
BuildAbilitiesTuple,
|
||||
} from "~/modules/in-game-lists/types";
|
||||
|
||||
const abilityToIndex = abilities.reduce(
|
||||
(acc, ability, index) => {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { BUILDS_PAGE_MAX_BUILDS } from "~/constants";
|
||||
import type { MainWeaponId } from "~/modules/in-game-lists";
|
||||
import type { MainWeaponId } from "~/modules/in-game-lists/types";
|
||||
import { cache, syncCached } from "~/utils/cache.server";
|
||||
import { buildsByWeaponId } from "../queries/buildsBy.server";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
import type { Tables } from "~/db/tables";
|
||||
import { buildToAbilityPoints } from "~/features/build-analyzer";
|
||||
import type { BuildAbilitiesTuple, ModeShort } from "~/modules/in-game-lists";
|
||||
import type {
|
||||
BuildAbilitiesTuple,
|
||||
ModeShort,
|
||||
} from "~/modules/in-game-lists/types";
|
||||
import { databaseTimestampToDate } from "~/utils/dates";
|
||||
import { assertUnreachable } from "~/utils/types";
|
||||
import type { BuildFiltersFromSearchParams } from "../builds-schemas.server";
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import type {
|
|||
Ability,
|
||||
BuildAbilitiesTuple,
|
||||
ModeShort,
|
||||
} from "~/modules/in-game-lists";
|
||||
} from "~/modules/in-game-lists/types";
|
||||
import { dateToDatabaseTimestamp } from "~/utils/dates";
|
||||
import { filterBuilds } from "./filter.server";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import type { LoaderFunctionArgs } from "@remix-run/node";
|
||||
import { BUILDS_PAGE_BATCH_SIZE, BUILDS_PAGE_MAX_BUILDS } from "~/constants";
|
||||
import { i18next } from "~/modules/i18n/i18next.server";
|
||||
import { weaponIdIsNotAlt } from "~/modules/in-game-lists";
|
||||
import { weaponIdIsNotAlt } from "~/modules/in-game-lists/weapon-ids";
|
||||
import { weaponNameSlugToId } from "~/utils/unslugify.server";
|
||||
import { mySlugify } from "~/utils/urls";
|
||||
import { FILTER_SEARCH_PARAM_KEY } from "../builds-constants";
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
import { sql } from "~/db/sql";
|
||||
import type { Tables, UserWithPlusTier } from "~/db/tables";
|
||||
import { type ModeShort, weaponIdToAltId } from "~/modules/in-game-lists";
|
||||
import type { ModeShort } from "~/modules/in-game-lists/types";
|
||||
import type {
|
||||
BuildAbilitiesTuple,
|
||||
MainWeaponId,
|
||||
} from "~/modules/in-game-lists/types";
|
||||
import { weaponIdToAltId } from "~/modules/in-game-lists/weapon-ids";
|
||||
import invariant from "~/utils/invariant";
|
||||
import { sortAbilities } from "../core/ability-sorting.server";
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,11 @@ import { Link } from "@remix-run/react";
|
|||
import { useTranslation } from "react-i18next";
|
||||
import { Image } from "~/components/Image";
|
||||
import { Main } from "~/components/Main";
|
||||
import type { MainWeaponId } from "~/modules/in-game-lists";
|
||||
import { weaponCategories, weaponIdIsNotAlt } from "~/modules/in-game-lists";
|
||||
import type { MainWeaponId } from "~/modules/in-game-lists/types";
|
||||
import {
|
||||
weaponCategories,
|
||||
weaponIdIsNotAlt,
|
||||
} from "~/modules/in-game-lists/weapon-ids";
|
||||
import type { SendouRouteHandle } from "~/utils/remix.server";
|
||||
import {
|
||||
BUILDS_PAGE,
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ import type { CalendarEventTag, Tables } from "~/db/tables";
|
|||
import { MapPool } from "~/features/map-list-generator/core/map-pool";
|
||||
import * as Progression from "~/features/tournament-bracket/core/Progression";
|
||||
import { useIsMounted } from "~/hooks/useIsMounted";
|
||||
import type { RankedModeShort } from "~/modules/in-game-lists";
|
||||
import type { RankedModeShort } from "~/modules/in-game-lists/types";
|
||||
import { isDefined } from "~/utils/arrays";
|
||||
import {
|
||||
databaseTimestampToDate,
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ import { USER_LEADERBOARD_MIN_ENTRIES_FOR_LEVIATHAN } from "~/features/mmr/mmr-c
|
|||
import { spToOrdinal } from "~/features/mmr/mmr-utils";
|
||||
import { freshUserSkills, userSkills } from "~/features/mmr/tiered.server";
|
||||
import * as UserRepository from "~/features/user-page/UserRepository.server";
|
||||
import type { MainWeaponId } from "~/modules/in-game-lists";
|
||||
import { weaponCategories } from "~/modules/in-game-lists";
|
||||
import type { MainWeaponId } from "~/modules/in-game-lists/types";
|
||||
import { weaponCategories } from "~/modules/in-game-lists/weapon-ids";
|
||||
import { cache, ttl } from "~/utils/cache.server";
|
||||
import type { Unwrapped } from "~/utils/types";
|
||||
import { DEFAULT_LEADERBOARD_MAX_SIZE } from "../leaderboards-constants";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
import { mainWeaponIds, weaponCategories } from "~/modules/in-game-lists";
|
||||
import { rankedModesShort } from "~/modules/in-game-lists/modes";
|
||||
import {
|
||||
mainWeaponIds,
|
||||
weaponCategories,
|
||||
} from "~/modules/in-game-lists/weapon-ids";
|
||||
|
||||
export const MATCHES_COUNT_NEEDED_FOR_LEADERBOARD = 7;
|
||||
export const DEFAULT_LEADERBOARD_MAX_SIZE = 500;
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ import * as Seasons from "~/features/mmr/core/Seasons";
|
|||
import type {
|
||||
MainWeaponId,
|
||||
RankedModeShort,
|
||||
weaponCategories,
|
||||
} from "~/modules/in-game-lists";
|
||||
} from "~/modules/in-game-lists/types";
|
||||
import type { weaponCategories } from "~/modules/in-game-lists/weapon-ids";
|
||||
import { cache, ttl } from "~/utils/cache.server";
|
||||
import {
|
||||
cachedFullUserLeaderboard,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { sql } from "~/db/sql";
|
||||
import type { Tables } from "~/db/tables";
|
||||
import type { MainWeaponId } from "~/modules/in-game-lists";
|
||||
import type { MainWeaponId } from "~/modules/in-game-lists/types";
|
||||
import { DEFAULT_LEADERBOARD_MAX_SIZE } from "../leaderboards-constants";
|
||||
|
||||
const getStm = (where = "") =>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { sql } from "~/db/sql";
|
||||
import type { Tables } from "~/db/tables";
|
||||
import * as Seasons from "~/features/mmr/core/Seasons";
|
||||
import type { MainWeaponId } from "~/modules/in-game-lists";
|
||||
import type { MainWeaponId } from "~/modules/in-game-lists/types";
|
||||
import { dateToDatabaseTimestamp } from "~/utils/dates";
|
||||
import { MATCHES_COUNT_NEEDED_FOR_LEADERBOARD } from "../leaderboards-constants";
|
||||
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ import { Main } from "~/components/Main";
|
|||
import * as Seasons from "~/features/mmr/core/Seasons";
|
||||
import { ordinalToSp } from "~/features/mmr/mmr-utils";
|
||||
import type { SkillTierInterval } from "~/features/mmr/tiered.server";
|
||||
import { weaponCategories } from "~/modules/in-game-lists";
|
||||
import { rankedModesShort } from "~/modules/in-game-lists/modes";
|
||||
import { weaponCategories } from "~/modules/in-game-lists/weapon-ids";
|
||||
import { metaTags } from "~/utils/remix";
|
||||
import type { SendouRouteHandle } from "~/utils/remix.server";
|
||||
import {
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import type { Tables } from "~/db/tables";
|
|||
import type { TierName } from "~/features/mmr/mmr-constants";
|
||||
import { TIERS } from "~/features/mmr/mmr-constants";
|
||||
import { languagesUnified } from "~/modules/i18n/config";
|
||||
import type { MainWeaponId } from "~/modules/in-game-lists";
|
||||
import type { MainWeaponId } from "~/modules/in-game-lists/types";
|
||||
import { LFG } from "../lfg-constants";
|
||||
import type { LFGFilter } from "../lfg-types";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { compareTwoTiers } from "~/features/mmr/mmr-utils";
|
||||
import type { MainWeaponId } from "~/modules/in-game-lists";
|
||||
import type { MainWeaponId } from "~/modules/in-game-lists/types";
|
||||
import {
|
||||
altWeaponIdToId,
|
||||
mainWeaponIds,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { type LFGType, LFG_TYPES } from "~/db/tables";
|
||||
import { languagesUnified } from "~/modules/i18n/config";
|
||||
import type { MainWeaponId } from "~/modules/in-game-lists";
|
||||
import type { MainWeaponId } from "~/modules/in-game-lists/types";
|
||||
import { assertUnreachable } from "~/utils/types";
|
||||
import { TIERS, type TierName } from "../mmr/mmr-constants";
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import type {
|
|||
ModeShort,
|
||||
ModeWithStage,
|
||||
StageId,
|
||||
} from "~/modules/in-game-lists";
|
||||
} from "~/modules/in-game-lists/types";
|
||||
import invariant from "~/utils/invariant";
|
||||
import type { MapPool } from "../map-pool";
|
||||
import type { MapPoolObject } from "../map-pool-serializer/types";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import * as R from "remeda";
|
||||
import type { ModeShort } from "../../../../modules/in-game-lists";
|
||||
import type { ModeShort } from "../../../../modules/in-game-lists/types";
|
||||
|
||||
export function modesOrder(
|
||||
type: "EQUAL" | "SZ_EVERY_OTHER",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import type { Tables } from "~/db/tables";
|
||||
import type { ModeShort } from "../../../../modules/in-game-lists";
|
||||
import type { ModeShort } from "../../../../modules/in-game-lists/types";
|
||||
import type { MapPool } from "../map-pool";
|
||||
import type { MapPoolObject } from "../map-pool-serializer/types";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
import invariant from "~/utils/invariant";
|
||||
import {
|
||||
type StageId,
|
||||
modesShort,
|
||||
stageIds,
|
||||
} from "../../../../modules/in-game-lists";
|
||||
import { modesShort } from "../../../../modules/in-game-lists/modes";
|
||||
import { stageIds } from "../../../../modules/in-game-lists/stage-ids";
|
||||
import type { StageId } from "../../../../modules/in-game-lists/types";
|
||||
import type { MapPoolObject, ReadonlyMapPoolObject } from "./types";
|
||||
|
||||
export function mapPoolToSerializedString(
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
import type { ModeShort, StageId } from "../../../../modules/in-game-lists";
|
||||
import type {
|
||||
ModeShort,
|
||||
StageId,
|
||||
} from "../../../../modules/in-game-lists/types";
|
||||
|
||||
export type MapPoolObject = Record<ModeShort, StageId[]>;
|
||||
export type ReadonlyMapPoolObject = Readonly<
|
||||
|
|
|
|||
|
|
@ -1,9 +1,6 @@
|
|||
import type { Tables } from "~/db/tables";
|
||||
import {
|
||||
type ModeShort,
|
||||
type StageId,
|
||||
stageIds,
|
||||
} from "~/modules/in-game-lists";
|
||||
import { stageIds } from "~/modules/in-game-lists/stage-ids";
|
||||
import type { ModeShort, StageId } from "~/modules/in-game-lists/types";
|
||||
import { mapPoolListToMapPoolObject } from "./map-list-generator/utils";
|
||||
import {
|
||||
mapPoolToSerializedString,
|
||||
|
|
|
|||
|
|
@ -11,7 +11,8 @@ import { MapPoolSelector, MapPoolStages } from "~/components/MapPoolSelector";
|
|||
import { SendouSwitch } from "~/components/elements/Switch";
|
||||
import { EditIcon } from "~/components/icons/Edit";
|
||||
import type { Tables } from "~/db/tables";
|
||||
import { type ModeWithStage, stageIds } from "~/modules/in-game-lists";
|
||||
import { stageIds } from "~/modules/in-game-lists/stage-ids";
|
||||
import type { ModeWithStage } from "~/modules/in-game-lists/types";
|
||||
import invariant from "~/utils/invariant";
|
||||
import { metaTags } from "~/utils/remix";
|
||||
import type { SendouRouteHandle } from "~/utils/remix.server";
|
||||
|
|
|
|||
|
|
@ -20,14 +20,14 @@ import { useTranslation } from "react-i18next";
|
|||
import * as R from "remeda";
|
||||
import { usePlannerBg } from "~/hooks/usePlannerBg";
|
||||
import type { LanguageCode } from "~/modules/i18n/config";
|
||||
import type { ModeShort, StageId } from "~/modules/in-game-lists";
|
||||
import { modesShort } from "~/modules/in-game-lists/modes";
|
||||
import { stageIds } from "~/modules/in-game-lists/stage-ids";
|
||||
import type { ModeShort, StageId } from "~/modules/in-game-lists/types";
|
||||
import {
|
||||
specialWeaponIds,
|
||||
stageIds,
|
||||
subWeaponIds,
|
||||
weaponCategories,
|
||||
} from "~/modules/in-game-lists";
|
||||
import { modesShort } from "~/modules/in-game-lists/modes";
|
||||
} from "~/modules/in-game-lists/weapon-ids";
|
||||
import {
|
||||
mainWeaponImageUrl,
|
||||
modeImageUrl,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { type MainWeaponId, mainWeaponIds } from "~/modules/in-game-lists";
|
||||
import type { MainWeaponId } from "~/modules/in-game-lists/types";
|
||||
import { mainWeaponIds } from "~/modules/in-game-lists/weapon-ids";
|
||||
import invariant from "~/utils/invariant";
|
||||
import type { AnyWeapon, DamageType } from "../build-analyzer";
|
||||
import type { CombineWith } from "./calculator-types";
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import {
|
|||
possibleApValues,
|
||||
validatedAnyWeaponFromSearchParams,
|
||||
} from "~/features/build-analyzer";
|
||||
import { exampleMainWeaponIdWithSpecialWeaponId } from "~/modules/in-game-lists";
|
||||
import { exampleMainWeaponIdWithSpecialWeaponId } from "~/modules/in-game-lists/weapon-ids";
|
||||
import { assertType } from "~/utils/types";
|
||||
import type { AnyWeapon } from "../build-analyzer/analyzer-types";
|
||||
import {
|
||||
|
|
|
|||
|
|
@ -5,16 +5,16 @@ import type {
|
|||
AnalyzedBuild,
|
||||
DamageType,
|
||||
} from "~/features/build-analyzer";
|
||||
import {
|
||||
exampleMainWeaponIdWithSpecialWeaponId,
|
||||
mainWeaponIds,
|
||||
specialWeaponIds,
|
||||
} from "~/modules/in-game-lists";
|
||||
import type {
|
||||
MainWeaponId,
|
||||
SpecialWeaponId,
|
||||
SubWeaponId,
|
||||
} from "~/modules/in-game-lists";
|
||||
} from "~/modules/in-game-lists/types";
|
||||
import {
|
||||
exampleMainWeaponIdWithSpecialWeaponId,
|
||||
mainWeaponIds,
|
||||
specialWeaponIds,
|
||||
} from "~/modules/in-game-lists/weapon-ids";
|
||||
import { calculateDamage } from "./objectDamage";
|
||||
|
||||
function calculate({
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import type {
|
|||
MainWeaponId,
|
||||
SpecialWeaponId,
|
||||
SubWeaponId,
|
||||
} from "~/modules/in-game-lists";
|
||||
} from "~/modules/in-game-lists/types";
|
||||
import { altWeaponIdToId } from "~/modules/in-game-lists/weapon-ids";
|
||||
import invariant from "~/utils/invariant";
|
||||
import { roundToNDecimalPlaces } from "~/utils/number";
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import {
|
|||
BIG_BUBBLER_ID,
|
||||
CRAB_TANK_ID,
|
||||
SPLASH_WALL_ID,
|
||||
} from "~/modules/in-game-lists";
|
||||
} from "~/modules/in-game-lists/weapon-ids";
|
||||
import invariant from "~/utils/invariant";
|
||||
import type { HitPoints } from "../calculator-types";
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ import {
|
|||
SQUID_BEAKON_ID,
|
||||
TORPEDO_ID,
|
||||
WAVE_BREAKER_ID,
|
||||
} from "~/modules/in-game-lists";
|
||||
} from "~/modules/in-game-lists/weapon-ids";
|
||||
import {
|
||||
SUPER_CHUMP_ID,
|
||||
TRIPLE_SPLASHDOWN_ID,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { describe, expect, test } from "vitest";
|
||||
import type { UserMapModePreferences } from "~/db/tables";
|
||||
import type { StageId } from "~/modules/in-game-lists";
|
||||
import { rankedModesShort } from "~/modules/in-game-lists/modes";
|
||||
import type { StageId } from "~/modules/in-game-lists/types";
|
||||
import { SENDOUQ_DEFAULT_MAPS } from "~/modules/tournament-map-list-generator/constants";
|
||||
import * as Test from "~/utils/Test";
|
||||
import { nullFilledArray } from "~/utils/arrays";
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ import { BANNED_MAPS } from "~/features/sendouq-settings/banned-maps";
|
|||
import { addSkillsToGroups } from "~/features/sendouq/core/groups.server";
|
||||
import { SENDOUQ_BEST_OF } from "~/features/sendouq/q-constants";
|
||||
import type { LookingGroupWithInviteCode } from "~/features/sendouq/q-types";
|
||||
import type { ModeShort, StageId } from "~/modules/in-game-lists";
|
||||
import { modesShort } from "~/modules/in-game-lists";
|
||||
import { modesShort } from "~/modules/in-game-lists/modes";
|
||||
import type { ModeShort, StageId } from "~/modules/in-game-lists/types";
|
||||
import {
|
||||
type TournamentMapListMap,
|
||||
createTournamentMapList,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { describe, expect, test } from "vitest";
|
||||
import type { MainWeaponId } from "~/modules/in-game-lists";
|
||||
import type { MainWeaponId } from "~/modules/in-game-lists/types";
|
||||
import { mergeReportedWeapons } from "./reported-weapons.server";
|
||||
|
||||
describe("mergeReportedWeapons()", () => {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import type { GroupForMatch } from "~/features/sendouq-match/QMatchRepository.server";
|
||||
import type { MainWeaponId } from "~/modules/in-game-lists";
|
||||
import type { MainWeaponId } from "~/modules/in-game-lists/types";
|
||||
import type { MatchById } from "../queries/findMatchById.server";
|
||||
import type { reportedWeaponsByMatchId } from "../queries/reportedWeaponsByMatchId.server";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { sql } from "~/db/sql";
|
||||
import type { MainWeaponId } from "~/modules/in-game-lists";
|
||||
import type { MainWeaponId } from "~/modules/in-game-lists/types";
|
||||
|
||||
const insertStm = sql.prepare(/* sql */ `
|
||||
insert into "ReportedWeapon"
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ import { useRecentlyReportedWeapons } from "~/features/sendouq/q-hooks";
|
|||
import { resolveRoomPass } from "~/features/tournament-bracket/tournament-bracket-utils";
|
||||
import { useIsMounted } from "~/hooks/useIsMounted";
|
||||
import { useWindowSize } from "~/hooks/useWindowSize";
|
||||
import type { MainWeaponId } from "~/modules/in-game-lists";
|
||||
import type { MainWeaponId } from "~/modules/in-game-lists/types";
|
||||
import { SPLATTERCOLOR_SCREEN_ID } from "~/modules/in-game-lists/weapon-ids";
|
||||
import { useHasRole } from "~/modules/permissions/hooks";
|
||||
import { joinListToNaturalString } from "~/utils/arrays";
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { db } from "~/db/sql";
|
||||
import type { QWeaponPool, Tables, UserMapModePreferences } from "~/db/tables";
|
||||
import { modesShort } from "~/modules/in-game-lists";
|
||||
import { modesShort } from "~/modules/in-game-lists/modes";
|
||||
import { COMMON_USER_FIELDS } from "~/utils/kysely.server";
|
||||
|
||||
export async function settingsByUserId(userId: number) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import type { ModeShort, StageId } from "~/modules/in-game-lists";
|
||||
import { stagesObj as s } from "~/modules/in-game-lists/stage-ids";
|
||||
import type { ModeShort, StageId } from "~/modules/in-game-lists/types";
|
||||
|
||||
export const BANNED_MAPS: Record<ModeShort, StageId[]> = {
|
||||
TW: [],
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import { useTranslation } from "react-i18next";
|
|||
import { Divider } from "~/components/Divider";
|
||||
import { ModeImage } from "~/components/Image";
|
||||
import { CheckmarkIcon } from "~/components/icons/Checkmark";
|
||||
import type { ModeShort, StageId } from "~/modules/in-game-lists";
|
||||
import { stageIds } from "~/modules/in-game-lists";
|
||||
import { stageIds } from "~/modules/in-game-lists/stage-ids";
|
||||
import type { ModeShort, StageId } from "~/modules/in-game-lists/types";
|
||||
import { nullFilledArray } from "~/utils/arrays";
|
||||
import { stageImageUrl } from "~/utils/urls";
|
||||
import { BANNED_MAPS } from "../banned-maps";
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { z } from "zod";
|
||||
import { languagesUnified } from "~/modules/i18n/config";
|
||||
import { modesShort } from "~/modules/in-game-lists";
|
||||
import { modesShort } from "~/modules/in-game-lists/modes";
|
||||
import {
|
||||
_action,
|
||||
checkboxValueToBoolean,
|
||||
|
|
|
|||
|
|
@ -28,8 +28,8 @@ import {
|
|||
} from "~/features/chat/chat-utils";
|
||||
import { useIsMounted } from "~/hooks/useIsMounted";
|
||||
import { languagesUnified } from "~/modules/i18n/config";
|
||||
import type { MainWeaponId, ModeShort } from "~/modules/in-game-lists";
|
||||
import { modesShort } from "~/modules/in-game-lists/modes";
|
||||
import type { MainWeaponId, ModeShort } from "~/modules/in-game-lists/types";
|
||||
import { metaTags } from "~/utils/remix";
|
||||
import type { SendouRouteHandle } from "~/utils/remix.server";
|
||||
import { assertUnreachable } from "~/utils/types";
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ import { MATCHES_COUNT_NEEDED_FOR_LEADERBOARD } from "~/features/leaderboards/le
|
|||
import { ordinalToRoundedSp } from "~/features/mmr/mmr-utils";
|
||||
import type { TieredSkill } from "~/features/mmr/tiered.server";
|
||||
import { languagesUnified } from "~/modules/i18n/config";
|
||||
import type { ModeShort } from "~/modules/in-game-lists";
|
||||
import type { ModeShort } from "~/modules/in-game-lists/types";
|
||||
import { SPLATTERCOLOR_SCREEN_ID } from "~/modules/in-game-lists/weapon-ids";
|
||||
import { databaseTimestampToDate } from "~/utils/dates";
|
||||
import { inGameNameWithoutDiscriminator } from "~/utils/strings";
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import type {
|
|||
TieredSkill,
|
||||
} from "~/features/mmr/tiered.server";
|
||||
import { mapModePreferencesToModeList } from "~/features/sendouq-match/core/match.server";
|
||||
import { modesShort } from "~/modules/in-game-lists";
|
||||
import { modesShort } from "~/modules/in-game-lists/modes";
|
||||
import { databaseTimestampToDate } from "~/utils/dates";
|
||||
import invariant from "~/utils/invariant";
|
||||
import { FULL_GROUP_SIZE } from "../q-constants";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import * as React from "react";
|
||||
import type { MainWeaponId } from "~/modules/in-game-lists";
|
||||
import type { MainWeaponId } from "~/modules/in-game-lists/types";
|
||||
|
||||
const LOCAL_STORAGE_KEY = "sq__reported-weapons";
|
||||
const MAX_REPORTED_WEAPONS = 6;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import type { ParsedMemento, QWeaponPool, Tables } from "~/db/tables";
|
||||
import type { ModeShort } from "~/modules/in-game-lists";
|
||||
import type { ModeShort } from "~/modules/in-game-lists/types";
|
||||
import type { TieredSkill } from "../mmr/tiered.server";
|
||||
import type { GroupForMatch } from "../sendouq-match/QMatchRepository.server";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import type { Tables } from "~/db/tables";
|
||||
import { stageIds } from "~/modules/in-game-lists";
|
||||
import { rankedModesShort } from "~/modules/in-game-lists/modes";
|
||||
import { stageIds } from "~/modules/in-game-lists/stage-ids";
|
||||
import { databaseTimestampToDate } from "~/utils/dates";
|
||||
import {
|
||||
SENDOUQ_LOOKING_PAGE,
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { sql } from "~/db/sql";
|
|||
import type { ParsedMemento, Tables } from "~/db/tables";
|
||||
import * as Seasons from "~/features/mmr/core/Seasons";
|
||||
import { MATCHES_PER_SEASONS_PAGE } from "~/features/user-page/user-page-constants";
|
||||
import type { MainWeaponId } from "~/modules/in-game-lists";
|
||||
import type { MainWeaponId } from "~/modules/in-game-lists/types";
|
||||
import { dateToDatabaseTimestamp } from "~/utils/dates";
|
||||
import { parseDBArray, parseDBJsonArray } from "~/utils/sql";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { sql } from "~/db/sql";
|
||||
import * as Seasons from "~/features/mmr/core/Seasons";
|
||||
import type { MainWeaponId } from "~/modules/in-game-lists";
|
||||
import type { MainWeaponId } from "~/modules/in-game-lists/types";
|
||||
import { dateToDatabaseTimestamp } from "~/utils/dates";
|
||||
|
||||
const stm = sql.prepare(/* sql */ `
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { sql } from "~/db/sql";
|
||||
import type { Tables } from "~/db/tables";
|
||||
import type { ModeShort, StageId } from "~/modules/in-game-lists";
|
||||
import type { ModeShort, StageId } from "~/modules/in-game-lists/types";
|
||||
|
||||
const stm = sql.prepare(/* sql */ `
|
||||
select
|
||||
|
|
|
|||
|
|
@ -1,6 +1,10 @@
|
|||
import { sql } from "~/db/sql";
|
||||
import * as Seasons from "~/features/mmr/core/Seasons";
|
||||
import type { MainWeaponId, ModeShort, StageId } from "~/modules/in-game-lists";
|
||||
import type {
|
||||
MainWeaponId,
|
||||
ModeShort,
|
||||
StageId,
|
||||
} from "~/modules/in-game-lists/types";
|
||||
import { dateToDatabaseTimestamp } from "~/utils/dates";
|
||||
import { assertUnreachable } from "~/utils/types";
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import type { UserMapModePreferences } from "~/db/tables";
|
|||
import type { matchSchema } from "~/features/sendouq-match/q-match-schemas";
|
||||
import { action as rawMatchAction } from "~/features/sendouq-match/routes/q.match.$id";
|
||||
import { BANNED_MAPS } from "~/features/sendouq-settings/banned-maps";
|
||||
import { stageIds } from "~/modules/in-game-lists";
|
||||
import { stageIds } from "~/modules/in-game-lists/stage-ids";
|
||||
import {
|
||||
dbInsertUsers,
|
||||
dbReset,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import type { LoaderFunctionArgs } from "@remix-run/node";
|
||||
import type { RankedModeShort } from "~/modules/in-game-lists";
|
||||
import { rankedModesShort } from "~/modules/in-game-lists/modes";
|
||||
import type { RankedModeShort } from "~/modules/in-game-lists/types";
|
||||
import { findPlacementsOfMonth } from "../queries/findPlacements.server";
|
||||
import { monthYears } from "../queries/monthYears";
|
||||
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import { nanoid } from "nanoid";
|
|||
import { useTranslation } from "react-i18next";
|
||||
import { Main } from "~/components/Main";
|
||||
import type { Tables } from "~/db/tables";
|
||||
import type { RankedModeShort } from "~/modules/in-game-lists";
|
||||
import { rankedModesShort } from "~/modules/in-game-lists/modes";
|
||||
import type { RankedModeShort } from "~/modules/in-game-lists/types";
|
||||
import invariant from "~/utils/invariant";
|
||||
import { metaTags } from "~/utils/remix";
|
||||
import type { SendouRouteHandle } from "~/utils/remix.server";
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ import {
|
|||
} from "~/features/tournament/routes/to.$id";
|
||||
import { TOURNAMENT } from "~/features/tournament/tournament-constants";
|
||||
import type { TournamentManagerDataSet } from "~/modules/brackets-manager/types";
|
||||
import type { ModeShort, StageId } from "~/modules/in-game-lists";
|
||||
import type { ModeShort, StageId } from "~/modules/in-game-lists/types";
|
||||
import { nullFilledArray } from "~/utils/arrays";
|
||||
import { databaseTimestampToDate } from "~/utils/dates";
|
||||
import invariant from "~/utils/invariant";
|
||||
|
|
|
|||
|
|
@ -10,11 +10,8 @@ import { CrossIcon } from "~/components/icons/Cross";
|
|||
import type { TournamentRoundMaps } from "~/db/tables";
|
||||
import { useUser } from "~/features/auth/core/user";
|
||||
import { useTournament } from "~/features/tournament/routes/to.$id";
|
||||
import {
|
||||
type ModeShort,
|
||||
type StageId,
|
||||
modesShort,
|
||||
} from "~/modules/in-game-lists";
|
||||
import { modesShort } from "~/modules/in-game-lists/modes";
|
||||
import type { ModeShort, StageId } from "~/modules/in-game-lists/types";
|
||||
import invariant from "~/utils/invariant";
|
||||
import { stageImageUrl } from "~/utils/urls";
|
||||
import * as PickBan from "../core/PickBan";
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import { useTournament } from "~/features/tournament/routes/to.$id";
|
|||
import { resolveLeagueRoundStartDate } from "~/features/tournament/tournament-utils";
|
||||
import { useIsMounted } from "~/hooks/useIsMounted";
|
||||
import { useSearchParamState } from "~/hooks/useSearchParamState";
|
||||
import type { StageId } from "~/modules/in-game-lists";
|
||||
import type { StageId } from "~/modules/in-game-lists/types";
|
||||
import { SPLATTERCOLOR_SCREEN_ID } from "~/modules/in-game-lists/weapon-ids";
|
||||
import type { TournamentMapListMap } from "~/modules/tournament-map-list-generator";
|
||||
import { nullFilledArray } from "~/utils/arrays";
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import type {
|
|||
ModeShort,
|
||||
ModeWithStage,
|
||||
StageId,
|
||||
} from "~/modules/in-game-lists";
|
||||
} from "~/modules/in-game-lists/types";
|
||||
import type { TournamentMapListMap } from "~/modules/tournament-map-list-generator";
|
||||
import invariant from "~/utils/invariant";
|
||||
import { logger } from "~/utils/logger";
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ import {
|
|||
} from "~/features/tournament/tournament-utils";
|
||||
import type { TournamentManagerDataSet } from "~/modules/brackets-manager/types";
|
||||
import type { Match, Stage } from "~/modules/brackets-model";
|
||||
import type { ModeShort } from "~/modules/in-game-lists";
|
||||
import type { ModeShort } from "~/modules/in-game-lists/types";
|
||||
import { isAdmin } from "~/modules/permissions/utils";
|
||||
import {
|
||||
databaseTimestampNow,
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { MapPool } from "~/features/map-list-generator/core/map-pool";
|
|||
import type * as PickBan from "~/features/tournament-bracket/core/PickBan";
|
||||
import { mapPickingStyleToModes } from "~/features/tournament/tournament-utils";
|
||||
import type { Round } from "~/modules/brackets-model";
|
||||
import type { ModeShort, StageId } from "~/modules/in-game-lists";
|
||||
import type { ModeShort, StageId } from "~/modules/in-game-lists/types";
|
||||
import type { TournamentMapListMap } from "~/modules/tournament-map-list-generator";
|
||||
import {
|
||||
type TournamentMaplistSource,
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
import * as R from "remeda";
|
||||
import type { Tables, TournamentRoundMaps } from "~/db/tables";
|
||||
import type { Round } from "~/modules/brackets-model";
|
||||
import type { ModeShort, StageId } from "~/modules/in-game-lists";
|
||||
import type { ModeShort, StageId } from "~/modules/in-game-lists/types";
|
||||
import { SENDOUQ_DEFAULT_MAPS } from "~/modules/tournament-map-list-generator/constants";
|
||||
import { logger } from "~/utils/logger";
|
||||
import { assertUnreachable } from "~/utils/types";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { sql } from "~/db/sql";
|
||||
import type { ModeShort, StageId } from "~/modules/in-game-lists";
|
||||
import type { ModeShort, StageId } from "~/modules/in-game-lists/types";
|
||||
import invariant from "~/utils/invariant";
|
||||
import { parseDBArray, parseDBJsonArray } from "~/utils/sql";
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import type { TFunction } from "i18next";
|
|||
import * as R from "remeda";
|
||||
import type { Tables, TournamentRoundMaps } from "~/db/tables";
|
||||
import type { TournamentManagerDataSet } from "~/modules/brackets-manager/types";
|
||||
import type { ModeShort, StageId } from "~/modules/in-game-lists";
|
||||
import type { ModeShort, StageId } from "~/modules/in-game-lists/types";
|
||||
import type { TournamentMaplistSource } from "~/modules/tournament-map-list-generator";
|
||||
import {
|
||||
seededRandom,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { sql } from "~/db/sql";
|
||||
import type { Tables, UserWithPlusTier } from "~/db/tables";
|
||||
import type { MainWeaponId } from "~/modules/in-game-lists";
|
||||
import type { MainWeaponId } from "~/modules/in-game-lists/types";
|
||||
|
||||
const stm = sql.prepare(/* sql */ `
|
||||
select
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import { RequiredHiddenInput } from "~/components/RequiredHiddenInput";
|
|||
import { SubmitButton } from "~/components/SubmitButton";
|
||||
import { TrashIcon } from "~/components/icons/Trash";
|
||||
import { useUser } from "~/features/auth/core/user";
|
||||
import type { MainWeaponId } from "~/modules/in-game-lists";
|
||||
import type { MainWeaponId } from "~/modules/in-game-lists/types";
|
||||
import type { SendouRouteHandle } from "~/utils/remix.server";
|
||||
import { TOURNAMENT_SUB } from "../tournament-subs-constants";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { z } from "zod";
|
||||
import { mainWeaponIds } from "~/modules/in-game-lists";
|
||||
import { mainWeaponIds } from "~/modules/in-game-lists/weapon-ids";
|
||||
import { id, processMany, removeDuplicates, safeJSONParse } from "~/utils/zod";
|
||||
import { TOURNAMENT_SUB } from "./tournament-subs-constants";
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import type {
|
|||
} from "~/db/tables";
|
||||
import * as Progression from "~/features/tournament-bracket/core/Progression";
|
||||
import { Status } from "~/modules/brackets-model";
|
||||
import { modesShort } from "~/modules/in-game-lists";
|
||||
import { modesShort } from "~/modules/in-game-lists/modes";
|
||||
import { nullFilledArray, nullifyingAvg } from "~/utils/arrays";
|
||||
import { databaseTimestampNow, dateToDatabaseTimestamp } from "~/utils/dates";
|
||||
import { COMMON_USER_FIELDS, userChatNameColor } from "~/utils/kysely.server";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import type { Tables } from "~/db/tables";
|
||||
import type { ModeShort, StageId } from "~/modules/in-game-lists";
|
||||
import type { ModeShort, StageId } from "~/modules/in-game-lists/types";
|
||||
import type { TournamentMaplistSource } from "~/modules/tournament-map-list-generator";
|
||||
import { sourceTypes } from "~/modules/tournament-map-list-generator";
|
||||
import invariant from "~/utils/invariant";
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import * as R from "remeda";
|
||||
import { sql } from "~/db/sql";
|
||||
import type { Tables } from "~/db/tables";
|
||||
import type { ModeShort, StageId } from "~/modules/in-game-lists";
|
||||
import type { ModeShort, StageId } from "~/modules/in-game-lists/types";
|
||||
import { parseDBArray } from "~/utils/sql";
|
||||
|
||||
const stm = sql.prepare(/* sql */ `
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import * as R from "remeda";
|
||||
import { INVITE_CODE_LENGTH } from "~/constants";
|
||||
import type { ModeShort, StageId } from "~/modules/in-game-lists";
|
||||
import { modesShort, rankedModesShort } from "~/modules/in-game-lists/modes";
|
||||
import type { ModeShort, StageId } from "~/modules/in-game-lists/types";
|
||||
import { weekNumberToDate } from "~/utils/dates";
|
||||
import { tournamentLogoUrl } from "~/utils/urls";
|
||||
import type { Tables, TournamentStageSettings } from "../../db/tables";
|
||||
|
|
|
|||
|
|
@ -9,9 +9,9 @@ import type { BuildWeaponWithTop500Info } from "~/features/builds/queries/builds
|
|||
import {
|
||||
clothesGearIds,
|
||||
headGearIds,
|
||||
modesShort,
|
||||
shoesGearIds,
|
||||
} from "~/modules/in-game-lists";
|
||||
} from "~/modules/in-game-lists/gear-ids";
|
||||
import { modesShort } from "~/modules/in-game-lists/modes";
|
||||
import type {
|
||||
BuildAbilitiesTuple,
|
||||
MainWeaponId,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { describe, expect, it } from "vitest";
|
||||
import type { MainWeaponId } from "~/modules/in-game-lists";
|
||||
import type { MainWeaponId } from "~/modules/in-game-lists/types";
|
||||
import { databaseTimestampNow } from "~/utils/dates";
|
||||
import { sortBuilds } from "./build-sorting.server";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import type { BuildSort } from "~/db/tables";
|
||||
import type * as BuildRepository from "~/features/builds/BuildRepository.server";
|
||||
import { type MainWeaponId, modesShort } from "~/modules/in-game-lists";
|
||||
import { modesShort } from "~/modules/in-game-lists/modes";
|
||||
import type { MainWeaponId } from "~/modules/in-game-lists/types";
|
||||
import { weaponIdToBucketId } from "~/modules/in-game-lists/weapon-ids";
|
||||
import { DEFAULT_BUILD_SORT } from "../user-page-constants";
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import type { LoaderFunctionArgs } from "@remix-run/node";
|
|||
import { z } from "zod";
|
||||
import { requireUserId } from "~/features/auth/core/user.server";
|
||||
import * as BuildRepository from "~/features/builds/BuildRepository.server";
|
||||
import type { Ability } from "~/modules/in-game-lists";
|
||||
import type { Ability } from "~/modules/in-game-lists/types";
|
||||
import { actualNumber, id } from "~/utils/zod";
|
||||
|
||||
const newBuildLoaderParamsSchema = z.object({
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { getUserId } from "~/features/auth/core/user.server";
|
|||
import * as BuildRepository from "~/features/builds/BuildRepository.server";
|
||||
import { sortAbilities } from "~/features/builds/core/ability-sorting.server";
|
||||
import * as UserRepository from "~/features/user-page/UserRepository.server";
|
||||
import type { MainWeaponId } from "~/modules/in-game-lists";
|
||||
import type { MainWeaponId } from "~/modules/in-game-lists/types";
|
||||
import type { SerializeFrom } from "~/utils/remix";
|
||||
import { notFoundIfFalsy, privatelyCachedJson } from "~/utils/remix.server";
|
||||
import { sortBuilds } from "../core/build-sorting.server";
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ import {
|
|||
validatedBuildFromSearchParams,
|
||||
validatedWeaponIdFromSearchParams,
|
||||
} from "~/features/build-analyzer";
|
||||
import { modesShort } from "~/modules/in-game-lists";
|
||||
import { modesShort } from "~/modules/in-game-lists/modes";
|
||||
import { rankedModesShort } from "~/modules/in-game-lists/modes";
|
||||
import type {
|
||||
BuildAbilitiesTupleWithUnknown,
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user