fix: core

This commit is contained in:
TrèsAbhi committed 2024-04-23 09:57:59 -05:00
1 parent 4013192faa
commit e53bdd8e19
205 files changed
+265 -265

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
import { clamp } from 'lodash';
import { degToRad } from 'three/src/math/MathUtils';
import { PitchLimits, YawLimits } from '../blitzrinth/modelDefinitions';
import { PitchLimits, YawLimits } from '../blitzkit/modelDefinitions';
import { normalizeAngleRad } from '../math/normalizeAngleRad';
export function applyPitchYawLimits(
+1 -1
View File
@@ -1,4 +1,4 @@
import { ShellDefinition } from '../blitzrinth/tankDefinitions';
import { ShellDefinition } from '../blitzkit/tankDefinitions';
export function canRicochet(
type: ShellDefinition['type'],
+1 -1
View File
@@ -1,4 +1,4 @@
import { ShellDefinition } from '../blitzrinth/tankDefinitions';
import { ShellDefinition } from '../blitzkit/tankDefinitions';
export function canSplash(type: ShellDefinition['type']): type is 'he' {
return type === 'he';
+2 -2
View File
@@ -2,8 +2,8 @@ import { Document, Material, Node, Scene } from '@gltf-transform/core';
import { times } from 'lodash';
import { dirname } from 'path';
import { Matrix4, Quaternion, Vector3, Vector4Tuple } from 'three';
import { readTexture } from '../../blitzrinth/readTexture';
import { TextureMutation } from '../../blitzrinth/readTexture/constants';
import { readTexture } from '../../blitzkit/readTexture';
import { TextureMutation } from '../../blitzkit/readTexture/constants';
import { Hierarchy, Sc2ReadStream, Textures } from '../../streams/sc2';
import { ScgReadStream } from '../../streams/scg';
import { VertexAttribute } from '../../streams/scpg';
+1 -1
View File
@@ -1,6 +1,6 @@
import { Region } from '../../constants/regions';
import { WARGAMING_APPLICATION_ID } from '../../constants/wargamingApplicationID';
import { patientFetch } from '../blitzrinth/patientFetch';
import { patientFetch } from '../blitzkit/patientFetch';
type BlitzResponse<Data extends object> =
| {
+2 -2
View File
@@ -1,7 +1,7 @@
import { RatingInfo } from '../../commands/ratingLeaderboard';
import { Region } from '../../constants/regions';
import { context } from '../blitzrinth/context';
import { patientFetch } from '../blitzrinth/patientFetch';
import { context } from '../blitzkit/context';
import { patientFetch } from '../blitzkit/patientFetch';
import regionToRegionSubdomain from './regionToRegionSubdomain';
const cache: Partial<Record<Region, RatingInfo>> = {};
+2 -2
View File
@@ -1,7 +1,7 @@
import { LeagueTop, RatingPlayer } from '../../commands/ratingLeaderboard';
import { Region } from '../../constants/regions';
import { context } from '../blitzrinth/context';
import { patientFetch } from '../blitzrinth/patientFetch';
import { context } from '../blitzkit/context';
import { patientFetch } from '../blitzkit/patientFetch';
import regionToRegionSubdomain from './regionToRegionSubdomain';
export async function getRatingLeague(
+2 -2
View File
@@ -1,7 +1,7 @@
import { RatingNeighbors } from '../../commands/ratingLeaderboard';
import { Region } from '../../constants/regions';
import { patientFetch } from '../blitzrinth/patientFetch';
import { withCORSProxy } from '../blitzrinth/withCORSProxy';
import { patientFetch } from '../blitzkit/patientFetch';
import { withCORSProxy } from '../blitzkit/withCORSProxy';
import regionToRegionSubdomain from './regionToRegionSubdomain';
export async function getRatingNeighbors(
+1 -1
View File
@@ -1,4 +1,4 @@
import { ShellDefinition } from '../blitzrinth/tankDefinitions';
import { ShellDefinition } from '../blitzkit/tankDefinitions';
export function isExplosive(
type: ShellDefinition['type'],
+1 -1
View File
@@ -2,7 +2,7 @@ import { Locale } from 'discord.js';
import { go } from 'fuzzysort';
import markdownEscape from 'markdown-escape';
import { UserError } from '../../hooks/userError';
import { tankDefinitions, tankNames } from '../blitzrinth/tankDefinitions';
import { tankDefinitions, tankNames } from '../blitzkit/tankDefinitions';
import { tankNamesTechTreeOnly } from '../discord/autocompleteTanks';
import { translator } from '../localization/translator';
+1 -1
View File
@@ -1,5 +1,5 @@
import { Region } from '../../constants/regions';
import { context } from '../blitzrinth/context';
import { context } from '../blitzkit/context';
import regionToRegionSubdomain from './regionToRegionSubdomain';
type CurrentRatingPlayerSearch = Record<
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -4,7 +4,7 @@ import { AllStats } from '../../blitz/getAccountInfo';
import getTankHistories, {
TankHistories,
TankHistoryRaw,
} from '../../blitzrinth/getTankHistories';
} from '../../blitzkit/getTankHistories';
import { emptyAllStats } from './constants';
const emptyTankHistoryNode: TankHistoryRaw = {
+2 -2
View File
@@ -1,6 +1,6 @@
import { AllStats } from '../blitz/getAccountInfo';
import { context } from '../blitzrinth/context';
import { tankDefinitions } from '../blitzrinth/tankDefinitions';
import { context } from '../blitzkit/context';
import { tankDefinitions } from '../blitzkit/tankDefinitions';
interface SpecialStats {
winrate: number;
+1 -1
View File
@@ -3,7 +3,7 @@ import {
SlashCommandSubcommandBuilder,
SlashCommandSubcommandGroupBuilder,
} from 'discord.js';
import { NATIONS } from '../blitzrinth/tankDefinitions';
import { NATIONS } from '../blitzkit/tankDefinitions';
import { addFilterOptions } from './addFilterOptions';
import { addPeriodSubCommands } from './addPeriodSubCommands';
+1 -1
View File
@@ -4,7 +4,7 @@ import {
CacheType,
} from 'discord.js';
import { go } from 'fuzzysort';
import { tankNames } from '../blitzrinth/tankDefinitions';
import { tankNames } from '../blitzkit/tankDefinitions';
import {
DISCORD_CHOICES_MAX_NAME_SIZE,
OVERFLOW_SUFFIX,
+1 -1
View File
@@ -1,5 +1,5 @@
import { ShardingManager } from 'discord.js';
import { secrets } from '../blitzrinth/secrets';
import { secrets } from '../blitzkit/secrets';
export const manager = new ShardingManager(`${__dirname}/bot.cjs`, {
token: secrets.DISCORD_TOKEN,
@@ -8,7 +8,7 @@ import {
MessageEditOptions,
} from 'discord.js';
import { InteractionReturnable } from '../../events/interactionCreate';
import jsxToPngThreaded from '../blitzrinth/jsxToPngThreaded';
import jsxToPngThreaded from '../blitzkit/jsxToPngThreaded';
export default async function normalizeInteractionReturnable(
returnable: InteractionReturnable,
+3 -3
View File
@@ -1,8 +1,8 @@
import { ButtonInteraction } from 'discord.js';
import { Region } from '../../constants/regions';
import getPeriodNow from '../blitzrinth/getPeriodNow';
import getPeriodStart from '../blitzrinth/getPeriodStart';
import getTimeDaysAgo from '../blitzrinth/getTimeDaysAgo';
import getPeriodNow from '../blitzkit/getPeriodNow';
import getPeriodStart from '../blitzkit/getPeriodStart';
import getTimeDaysAgo from '../blitzkit/getTimeDaysAgo';
import { PeriodType } from './addPeriodSubCommands';
import { getPeriodOptionName } from './getPeriodOptionName';
import { ResolvedPeriod } from './resolvePeriodFromCommand';
+3 -3
View File
@@ -1,8 +1,8 @@
import { CacheType, ChatInputCommandInteraction } from 'discord.js';
import { Region } from '../../constants/regions';
import getPeriodNow from '../blitzrinth/getPeriodNow';
import getPeriodStart from '../blitzrinth/getPeriodStart';
import getTimeDaysAgo from '../blitzrinth/getTimeDaysAgo';
import getPeriodNow from '../blitzkit/getPeriodNow';
import getPeriodStart from '../blitzkit/getPeriodStart';
import getTimeDaysAgo from '../blitzkit/getTimeDaysAgo';
import { translator } from '../localization/translator';
import { PeriodType } from './addPeriodSubCommands';
import { getPeriodOptionName } from './getPeriodOptionName';
@@ -3,7 +3,7 @@ import markdownEscape from 'markdown-escape';
import { Region } from '../../../constants/regions';
import { UserError } from '../../../hooks/userError';
import searchPlayersAcrossRegions from '../../blitz/searchPlayersAcrossRegions';
import { getBlitzFromDiscord } from '../../blitzrinth/discordBlitzLink';
import { getBlitzFromDiscord } from '../../blitzkit/discordBlitzLink';
import { translator } from '../../localization/translator';
import { serverAndIdPattern } from './constants';
+2 -2
View File
@@ -1,6 +1,6 @@
import { ASSETS_REPO } from '../../constants/assets';
import { GithubChangeBlob, createBlob } from '../blitzrinth/createBlob';
import { octokit } from '../blitzrinth/octokit';
import { GithubChangeBlob, createBlob } from '../blitzkit/createBlob';
import { octokit } from '../blitzkit/octokit';
export class AssetCommit {
constructor(
+1 -1
View File
@@ -1,6 +1,6 @@
import { TreeType } from '../../components/Tanks';
import { SupplementaryStats } from '../blitz/getAccountInfo';
import { tankDefinitions } from '../blitzrinth/tankDefinitions';
import { tankDefinitions } from '../blitzkit/tankDefinitions';
import { DiffedTankStats } from '../blitzstars/getStatsInPeriod';
import { tankAverages } from '../blitzstars/tankAverages';
import calculateWN8 from './calculateWN8';
+1 -1
View File
@@ -1,6 +1,6 @@
import { TierWeightsRecord } from '../../components/TierWeights';
import { AllStats } from '../blitz/getAccountInfo';
import { tankDefinitions } from '../blitzrinth/tankDefinitions';
import { tankDefinitions } from '../blitzkit/tankDefinitions';
export async function getTierWeights(
stats: Record<number, AllStats>,