mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-22 03:07:04 +02:00
feat: rename to blitzrinth
This commit is contained in:
1 parent
0fd17d9c96
commit
c2b936c925
213 files changed
+314
-307
No files matched your search
@@ -1,6 +1,6 @@
|
||||
import { clamp } from 'lodash';
|
||||
import { degToRad } from 'three/src/math/MathUtils';
|
||||
import { PitchLimits, YawLimits } from '../blitzkrieg/modelDefinitions';
|
||||
import { PitchLimits, YawLimits } from '../blitzrinth/modelDefinitions';
|
||||
import { normalizeAngleRad } from '../math/normalizeAngleRad';
|
||||
|
||||
export function applyPitchYawLimits(
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ShellDefinition } from '../blitzkrieg/tankDefinitions';
|
||||
import { ShellDefinition } from '../blitzrinth/tankDefinitions';
|
||||
|
||||
export function canRicochet(
|
||||
type: ShellDefinition['type'],
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ShellDefinition } from '../blitzkrieg/tankDefinitions';
|
||||
import { ShellDefinition } from '../blitzrinth/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 '../../blitzkrieg/readTexture';
|
||||
import { TextureMutation } from '../../blitzkrieg/readTexture/constants';
|
||||
import { readTexture } from '../../blitzrinth/readTexture';
|
||||
import { TextureMutation } from '../../blitzrinth/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 '../blitzkrieg/patientFetch';
|
||||
import { patientFetch } from '../blitzrinth/patientFetch';
|
||||
|
||||
type BlitzResponse<Data extends object> =
|
||||
| {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { RatingInfo } from '../../commands/ratingLeaderboard';
|
||||
import { Region } from '../../constants/regions';
|
||||
import { context } from '../blitzkrieg/context';
|
||||
import { patientFetch } from '../blitzkrieg/patientFetch';
|
||||
import { context } from '../blitzrinth/context';
|
||||
import { patientFetch } from '../blitzrinth/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 '../blitzkrieg/context';
|
||||
import { patientFetch } from '../blitzkrieg/patientFetch';
|
||||
import { context } from '../blitzrinth/context';
|
||||
import { patientFetch } from '../blitzrinth/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 '../blitzkrieg/patientFetch';
|
||||
import { withCORSProxy } from '../blitzkrieg/withCORSProxy';
|
||||
import { patientFetch } from '../blitzrinth/patientFetch';
|
||||
import { withCORSProxy } from '../blitzrinth/withCORSProxy';
|
||||
import regionToRegionSubdomain from './regionToRegionSubdomain';
|
||||
|
||||
export async function getRatingNeighbors(
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ShellDefinition } from '../blitzkrieg/tankDefinitions';
|
||||
import { ShellDefinition } from '../blitzrinth/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 '../blitzkrieg/tankDefinitions';
|
||||
import { tankDefinitions, tankNames } from '../blitzrinth/tankDefinitions';
|
||||
import { tankNamesTechTreeOnly } from '../discord/autocompleteTanks';
|
||||
import { translator } from '../localization/translator';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Region } from '../../constants/regions';
|
||||
import { context } from '../blitzkrieg/context';
|
||||
import { context } from '../blitzrinth/context';
|
||||
import regionToRegionSubdomain from './regionToRegionSubdomain';
|
||||
|
||||
type CurrentRatingPlayerSearch = Record<
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import isDev from './isDev';
|
||||
|
||||
export function asset(path: string) {
|
||||
return `https://raw.githubusercontent.com/tresabhi/blitzkrieg-assets/${isDev() ? 'dev' : 'main'}/${path}`;
|
||||
return `https://raw.githubusercontent.com/tresabhi/blitzrinth-assets/${isDev() ? 'dev' : 'main'}/${path}`;
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -12,7 +12,7 @@ export async function commitAssets(
|
||||
|
||||
await commitMultipleFiles(
|
||||
'tresabhi',
|
||||
'blitzkrieg-assets',
|
||||
'blitzrinth-assets',
|
||||
production ? 'main' : 'dev',
|
||||
`${message} - ${new Date().toDateString()}`,
|
||||
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.
+1
-1
@@ -16,7 +16,7 @@ export async function getArchivedLatestSeasonNumber() {
|
||||
if (ratingInfo.detail) {
|
||||
const regionsURL = (
|
||||
(await fetch(
|
||||
'https://api.github.com/repos/tresabhi/blitzkrieg-assets/git/trees/main',
|
||||
'https://api.github.com/repos/tresabhi/blitzrinth-assets/git/trees/main',
|
||||
).then((response) => response.json())) as GitHubTrees
|
||||
).tree.find(({ path }) => path === 'regions')!.url;
|
||||
const comURL = (
|
||||
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.
@@ -1,4 +1,10 @@
|
||||
const devHostStartNames = ['blitzkrieg-', 'localhost', 'betakrieg', 'devkrieg'];
|
||||
const devHostStartNames = [
|
||||
'blitzkrieg-',
|
||||
'localhost',
|
||||
'betakrieg',
|
||||
'devkrieg',
|
||||
'blitzrinth-',
|
||||
];
|
||||
|
||||
export default function isDev() {
|
||||
return (
|
||||
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 '../../blitzkrieg/getTankHistories';
|
||||
} from '../../blitzrinth/getTankHistories';
|
||||
import { emptyAllStats } from './constants';
|
||||
|
||||
const emptyTankHistoryNode: TankHistoryRaw = {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { AllStats } from '../blitz/getAccountInfo';
|
||||
import { context } from '../blitzkrieg/context';
|
||||
import { tankDefinitions } from '../blitzkrieg/tankDefinitions';
|
||||
import { context } from '../blitzrinth/context';
|
||||
import { tankDefinitions } from '../blitzrinth/tankDefinitions';
|
||||
|
||||
interface SpecialStats {
|
||||
winrate: number;
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
SlashCommandSubcommandBuilder,
|
||||
SlashCommandSubcommandGroupBuilder,
|
||||
} from 'discord.js';
|
||||
import { NATIONS } from '../blitzkrieg/tankDefinitions';
|
||||
import { NATIONS } from '../blitzrinth/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 '../blitzkrieg/tankDefinitions';
|
||||
import { tankNames } from '../blitzrinth/tankDefinitions';
|
||||
import {
|
||||
DISCORD_CHOICES_MAX_NAME_SIZE,
|
||||
OVERFLOW_SUFFIX,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ShardingManager } from 'discord.js';
|
||||
import { secrets } from '../blitzkrieg/secrets';
|
||||
import { secrets } from '../blitzrinth/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 '../blitzkrieg/jsxToPngThreaded';
|
||||
import jsxToPngThreaded from '../blitzrinth/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 '../blitzkrieg/getPeriodNow';
|
||||
import getPeriodStart from '../blitzkrieg/getPeriodStart';
|
||||
import getTimeDaysAgo from '../blitzkrieg/getTimeDaysAgo';
|
||||
import getPeriodNow from '../blitzrinth/getPeriodNow';
|
||||
import getPeriodStart from '../blitzrinth/getPeriodStart';
|
||||
import getTimeDaysAgo from '../blitzrinth/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 '../blitzkrieg/getPeriodNow';
|
||||
import getPeriodStart from '../blitzkrieg/getPeriodStart';
|
||||
import getTimeDaysAgo from '../blitzkrieg/getTimeDaysAgo';
|
||||
import getPeriodNow from '../blitzrinth/getPeriodNow';
|
||||
import getPeriodStart from '../blitzrinth/getPeriodStart';
|
||||
import getTimeDaysAgo from '../blitzrinth/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 '../../blitzkrieg/discordBlitzLink';
|
||||
import { getBlitzFromDiscord } from '../../blitzrinth/discordBlitzLink';
|
||||
import { translator } from '../../localization/translator';
|
||||
import { serverAndIdPattern } from './constants';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { GithubChangeBlob, createBlob } from '../blitzkrieg/createBlob';
|
||||
import { octokit } from '../blitzkrieg/octokit';
|
||||
import { GithubChangeBlob, createBlob } from '../blitzrinth/createBlob';
|
||||
import { octokit } from '../blitzrinth/octokit';
|
||||
|
||||
export class AssetCommit {
|
||||
constructor(
|
||||
@@ -11,7 +11,7 @@ export class AssetCommit {
|
||||
async add(path: string, content: string, encoding: 'utf-8' | 'base64') {
|
||||
console.log(`Blob: adding ${path}...`);
|
||||
|
||||
const blob = await createBlob('tresabhi', 'blitzkrieg-assets', {
|
||||
const blob = await createBlob('tresabhi', 'blitzrinth-assets', {
|
||||
content,
|
||||
encoding,
|
||||
path,
|
||||
@@ -26,14 +26,14 @@ export class AssetCommit {
|
||||
const latestCommitSha = (
|
||||
await octokit.git.getRef({
|
||||
owner: 'tresabhi',
|
||||
repo: 'blitzkrieg-assets',
|
||||
repo: 'blitzrinth-assets',
|
||||
ref: `heads/${this.production ? 'main' : 'dev'}`,
|
||||
})
|
||||
).data.object.sha;
|
||||
const treeSha = (
|
||||
await octokit.git.getCommit({
|
||||
owner: 'tresabhi',
|
||||
repo: 'blitzkrieg-assets',
|
||||
repo: 'blitzrinth-assets',
|
||||
commit_sha: latestCommitSha,
|
||||
})
|
||||
).data.tree.sha;
|
||||
@@ -41,20 +41,20 @@ export class AssetCommit {
|
||||
|
||||
const { data: treeData } = await octokit.git.createTree({
|
||||
owner: 'tresabhi',
|
||||
repo: 'blitzkrieg-assets',
|
||||
repo: 'blitzrinth-assets',
|
||||
base_tree: treeSha,
|
||||
tree: blobs,
|
||||
});
|
||||
const { data: newCommitData } = await octokit.git.createCommit({
|
||||
owner: 'tresabhi',
|
||||
repo: 'blitzkrieg-assets',
|
||||
repo: 'blitzrinth-assets',
|
||||
message: this.message,
|
||||
tree: treeData.sha,
|
||||
parents: [latestCommitSha],
|
||||
});
|
||||
await octokit.git.updateRef({
|
||||
owner: 'tresabhi',
|
||||
repo: 'blitzkrieg-assets',
|
||||
repo: 'blitzrinth-assets',
|
||||
ref: `heads/${this.production ? 'main' : 'dev'}`,
|
||||
sha: newCommitData.sha,
|
||||
});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { TreeType } from '../../components/Tanks';
|
||||
import { SupplementaryStats } from '../blitz/getAccountInfo';
|
||||
import { tankDefinitions } from '../blitzkrieg/tankDefinitions';
|
||||
import { tankDefinitions } from '../blitzrinth/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 '../blitzkrieg/tankDefinitions';
|
||||
import { tankDefinitions } from '../blitzrinth/tankDefinitions';
|
||||
|
||||
export async function getTierWeights(
|
||||
stats: Record<number, AllStats>,
|
||||
|
||||
@@ -3,7 +3,7 @@ import { IndividualTankStats } from '../../types/tanksStats';
|
||||
import { AllStats } from '../blitz/getAccountInfo';
|
||||
import { ReadStream, WriteStream } from './buffer';
|
||||
|
||||
export interface BlitzkriegTankStats extends AllStats {
|
||||
export interface BlitzrinthTankStats extends AllStats {
|
||||
id: number;
|
||||
battle_life_time: number;
|
||||
last_battle_time: number;
|
||||
@@ -123,7 +123,7 @@ export class RtscReadStream extends ReadStream {
|
||||
win_and_survived: this.uint32(),
|
||||
wins: this.uint32(),
|
||||
xp: this.uint32(),
|
||||
} satisfies BlitzkriegTankStats;
|
||||
} satisfies BlitzrinthTankStats;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loaded 100 of 213 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user