mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 12:09:51 +02:00
fix: core
This commit is contained in:
1 parent
4013192faa
commit
e53bdd8e19
205 files changed
+265
-265
No files matched your search
@@ -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,4 +1,4 @@
|
||||
import { ShellDefinition } from '../blitzrinth/tankDefinitions';
|
||||
import { ShellDefinition } from '../blitzkit/tankDefinitions';
|
||||
|
||||
export function canRicochet(
|
||||
type: ShellDefinition['type'],
|
||||
|
||||
@@ -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,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,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> =
|
||||
| {
|
||||
|
||||
@@ -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>> = {};
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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,4 +1,4 @@
|
||||
import { ShellDefinition } from '../blitzrinth/tankDefinitions';
|
||||
import { ShellDefinition } from '../blitzkit/tankDefinitions';
|
||||
|
||||
export function isExplosive(
|
||||
type: ShellDefinition['type'],
|
||||
|
||||
@@ -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,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.
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 = {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -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,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,
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -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,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,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>,
|
||||
|
||||
Reference in new issue
Block a user