mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 03:59:50 +02:00
Compare commits
2
Commits
0a7a220af3
...
d0834ed572
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d0834ed572 | ||
|
|
caf238dd32 |
No files matched your search
Vendored
+1
@@ -192,6 +192,7 @@
|
||||
"searchtanks",
|
||||
"SHAREDEXP",
|
||||
"SKLLD",
|
||||
"sluggify",
|
||||
"smoothstep",
|
||||
"Smri",
|
||||
"Specularity",
|
||||
|
||||
@@ -1,49 +1,50 @@
|
||||
export * from './assertSecret';
|
||||
export * from './asset';
|
||||
export * from './availableProvisions';
|
||||
export * from './averageDefinitions';
|
||||
export * from "./assertSecret";
|
||||
export * from "./asset";
|
||||
export * from "./availableProvisions";
|
||||
export * from "./averageDefinitions";
|
||||
// export * from './camouflageDefinitions';
|
||||
// export * from './checkConsumableProvisionInclusivity';
|
||||
export * from './coefficient';
|
||||
export * from './consumableDefinitions';
|
||||
export * from "./coefficient";
|
||||
export * from "./consumableDefinitions";
|
||||
// export * from './context';
|
||||
export * from './createDefaultSkills';
|
||||
export * from './degressiveStat';
|
||||
export * from './discoveredIdDefinitions';
|
||||
export * from './emblemURL';
|
||||
export * from './equipmentDefinitions';
|
||||
export * from './eventManager';
|
||||
export * from './gameDefinitions';
|
||||
export * from './getArchivedLatestSeasonNumber';
|
||||
export * from "./createDefaultSkills";
|
||||
export * from "./degressiveStat";
|
||||
export * from "./discoveredIdDefinitions";
|
||||
export * from "./emblemURL";
|
||||
export * from "./equipmentDefinitions";
|
||||
export * from "./eventManager";
|
||||
export * from "./gameDefinitions";
|
||||
export * from "./getArchivedLatestSeasonNumber";
|
||||
export * from "./sluggify";
|
||||
// export * from './getArchivedRatingInfo';
|
||||
export * from './getArchivedRatingLeaderboard';
|
||||
export * from "./getArchivedRatingLeaderboard";
|
||||
// export * from './getArchivedRatingMidnightLeaderboard';
|
||||
export * from './getTimeDaysAgo';
|
||||
export * from './isExplosive';
|
||||
export * from './mapDefinitions';
|
||||
export * from './modelDefinitions';
|
||||
export * from './normalizeBoundingBox';
|
||||
export * from "./getTimeDaysAgo";
|
||||
export * from "./isExplosive";
|
||||
export * from "./mapDefinitions";
|
||||
export * from "./modelDefinitions";
|
||||
export * from "./normalizeBoundingBox";
|
||||
// export * from './parseBkni';
|
||||
// export * from './patientFetch';
|
||||
export * from './patientFetchJSON';
|
||||
export * from './progressiveStat';
|
||||
export * from './provisionDefinitions';
|
||||
export * from './resolveDpm';
|
||||
export * from './resolvePenetrationCoefficient';
|
||||
export * from './reviews';
|
||||
export * from './skillDefinitions';
|
||||
export * from './sum';
|
||||
export * from './tankDefinitions';
|
||||
export * from './tankIcon';
|
||||
export * from './tankNames';
|
||||
export * from './unionBoundingBox';
|
||||
export * from './uniqueGuns';
|
||||
export * from './unwrapBlitzkitResponse';
|
||||
export * from './votes';
|
||||
export * from "./patientFetchJSON";
|
||||
export * from "./progressiveStat";
|
||||
export * from "./provisionDefinitions";
|
||||
export * from "./resolveDpm";
|
||||
export * from "./resolvePenetrationCoefficient";
|
||||
export * from "./reviews";
|
||||
export * from "./skillDefinitions";
|
||||
export * from "./sum";
|
||||
export * from "./tankDefinitions";
|
||||
export * from "./tankIcon";
|
||||
export * from "./tankNames";
|
||||
export * from "./unionBoundingBox";
|
||||
export * from "./uniqueGuns";
|
||||
export * from "./unwrapBlitzkitResponse";
|
||||
export * from "./votes";
|
||||
// export * from './withCORSProxy';
|
||||
export * from './createDefaultProvisions';
|
||||
export * from './gallery';
|
||||
export * from './metaSortTank';
|
||||
export * from './popularTanks';
|
||||
export * from './romanize';
|
||||
export * from './youtubers';
|
||||
export * from "./createDefaultProvisions";
|
||||
export * from "./gallery";
|
||||
export * from "./metaSortTank";
|
||||
export * from "./popularTanks";
|
||||
export * from "./romanize";
|
||||
export * from "./youtubers";
|
||||
@@ -8,12 +8,12 @@ export function resolvePenetrationCoefficient(
|
||||
) {
|
||||
const calibrated = calibratedShells
|
||||
? type === ShellType.SHELL_TYPE_AP
|
||||
? 1.08
|
||||
? 1.06
|
||||
: type === ShellType.SHELL_TYPE_APCR
|
||||
? 1.05
|
||||
? 1.06
|
||||
: type === ShellType.SHELL_TYPE_HEAT
|
||||
? 1.13
|
||||
: 1.08
|
||||
? 1.07
|
||||
: 1.07
|
||||
: 1;
|
||||
const equalizer = (equalize ? equalizerObj?.penetration : undefined) ?? 1;
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import { slugify } from "transliteration";
|
||||
|
||||
const nonAlphanumericRegex = /[^a-z0-9]/g;
|
||||
const multipleDashesRegex = /--+/g;
|
||||
const trailingDashRegex = /-$/g;
|
||||
const leadingDashRegex = /^-/g;
|
||||
|
||||
export function sluggify(value: string) {
|
||||
let slug = slugify(value);
|
||||
slug = slug.replaceAll(nonAlphanumericRegex, "-");
|
||||
slug = slug.replaceAll(multipleDashesRegex, "-");
|
||||
slug = slug.replaceAll(trailingDashRegex, "");
|
||||
slug = slug.replaceAll(leadingDashRegex, "");
|
||||
|
||||
return slug;
|
||||
}
|
||||
@@ -22,6 +22,7 @@ import {
|
||||
ResearchCost,
|
||||
ShellType,
|
||||
SkillDefinitions,
|
||||
sluggify,
|
||||
TankClass,
|
||||
TankDefinitions,
|
||||
TankPrice,
|
||||
@@ -36,7 +37,6 @@ import locales from "@blitzkit/i18n/locales.json";
|
||||
import { readFile } from "fs/promises";
|
||||
import { parse as parsePath } from "path";
|
||||
import type { Vector3Tuple } from "three";
|
||||
import { slugify } from "transliteration";
|
||||
import { parse as parseYaml } from "yaml";
|
||||
import { AssetUploader } from "../core/github/assetUploader";
|
||||
import { vfs } from "./constants";
|
||||
@@ -765,7 +765,7 @@ export async function definitions() {
|
||||
getString(tank.userString)
|
||||
).locales.en;
|
||||
|
||||
let slug = slugify(name);
|
||||
let slug = sluggify(name);
|
||||
|
||||
idToNation[tankId] = nation;
|
||||
|
||||
|
||||
+1
-1
@@ -129,7 +129,7 @@ export function PrimaryArmorSceneComponent({
|
||||
: undefined) ?? 1;
|
||||
|
||||
material.uniforms.thickness.value =
|
||||
thickness * (hasEnhancedArmor ? 1.03 : 1) * equalizer;
|
||||
thickness * (hasEnhancedArmor ? 1.04 : 1) * equalizer;
|
||||
|
||||
if (!noInvalidate) invalidate();
|
||||
}
|
||||
|
||||
+1
-1
@@ -65,7 +65,7 @@ export function SpacedArmorSubExternal({
|
||||
: undefined) ?? 1;
|
||||
|
||||
material.uniforms.thickness.value =
|
||||
thickness * (hasEnhancedArmor ? 1.03 : 1) * equalizer;
|
||||
thickness * (hasEnhancedArmor ? 1.04 : 1) * equalizer;
|
||||
}
|
||||
function handleAntagonistEquipmentChange() {
|
||||
const equipment = Duel.state.antagonist.equipmentMatrix;
|
||||
|
||||
+1
-1
@@ -75,7 +75,7 @@ export function SpacedArmorSubSpaced({
|
||||
: undefined) ?? 1;
|
||||
|
||||
material.uniforms.thickness.value =
|
||||
thickness * (hasEnhancedArmor ? 1.03 : 1) * equalizer;
|
||||
thickness * (hasEnhancedArmor ? 1.04 : 1) * equalizer;
|
||||
}
|
||||
function handleAntagonistEquipmentChange() {
|
||||
const equipment = Duel.state.antagonist.equipmentMatrix;
|
||||
|
||||
+1
-1
@@ -129,7 +129,7 @@ export function SpacedArmorSceneComponent({
|
||||
antagonistEqualizer,
|
||||
);
|
||||
const thicknessCoefficient =
|
||||
(hasEnhancedArmor ? 1.03 : 1) * protagonistEqualizer.armor;
|
||||
(hasEnhancedArmor ? 1.04 : 1) * protagonistEqualizer.armor;
|
||||
const filteredIntersections = intersections.filter(
|
||||
(intersection) =>
|
||||
"type" in intersection.object.userData &&
|
||||
|
||||
@@ -78,7 +78,7 @@ export function StaticArmorSceneComponent({
|
||||
const tank = Duel.use((state) => state.protagonist.tank);
|
||||
const equalize = Duel.use((state) => state.equalize);
|
||||
const equalizer = (equalize ? tank.equalizer : undefined) ?? defaultEqualizer;
|
||||
const thicknessCoefficient = (hasEnhancedArmor ? 1.03 : 1) * equalizer.armor;
|
||||
const thicknessCoefficient = (hasEnhancedArmor ? 1.04 : 1) * equalizer.armor;
|
||||
const thickness = thicknessRaw * thicknessCoefficient;
|
||||
const x = thickness / thicknessRange.value;
|
||||
const xClamped = clamp(x, 0, 1);
|
||||
|
||||
@@ -43,7 +43,7 @@ export function ConsumablesManager({
|
||||
cooldown={
|
||||
timers
|
||||
? consumable.cooldown *
|
||||
(hasConsumableDeliverySystem ? 0.88 : 1) *
|
||||
(hasConsumableDeliverySystem ? 1 - 0.17 : 1) *
|
||||
(1 - cooldownBooster! * 0.1)
|
||||
: undefined
|
||||
}
|
||||
|
||||
@@ -193,7 +193,7 @@ export function tankCharacteristics(
|
||||
coefficient(
|
||||
[hasSandbagArmor, 0.03],
|
||||
[hasEnhancedSandbagArmor, 0.06],
|
||||
[hasImprovedAssembly, 0.04],
|
||||
[hasImprovedAssembly, 0.05],
|
||||
) * equalizer.health;
|
||||
const shellVelocityCoefficient = coefficient(
|
||||
[hasSupercharger, 0.35],
|
||||
@@ -201,40 +201,34 @@ export function tankCharacteristics(
|
||||
);
|
||||
const aimTimeCoefficient =
|
||||
coefficient(
|
||||
[hasEnhancedGunLayingDrive, -0.15],
|
||||
[hasEnhancedGunLayingDrive, -0.12],
|
||||
[hasReticleCalibration, -0.3],
|
||||
) * coefficient([true, degressiveStat(gunnerMastery)]);
|
||||
const dispersionStillCoefficient =
|
||||
coefficient([hasRefinedGun, -0.15], [hasReticleCalibration, -0.3]) *
|
||||
coefficient([hasRefinedGun, -0.11], [hasReticleCalibration, -0.3]) *
|
||||
coefficient([true, degressiveStat(gunnerMastery)]);
|
||||
const dispersionDamagedCoefficient = coefficient([
|
||||
hasVerticalStabilizer,
|
||||
-0.12,
|
||||
-0.17,
|
||||
]);
|
||||
const dispersionHullTraverseCoefficient = coefficient(
|
||||
[hasVerticalStabilizer, -0.12],
|
||||
[hasVerticalStabilizer, -0.17],
|
||||
[true, -crewSkills.smooth_turn / 100],
|
||||
);
|
||||
const dispersionAfterShotCoefficient = coefficient(
|
||||
[hasVerticalStabilizer, -0.12],
|
||||
[hasVerticalStabilizer, -0.17],
|
||||
[true, -crewSkills.soft_recoil / 100],
|
||||
);
|
||||
const dispersionMovingCoefficient = coefficient(
|
||||
[hasVerticalStabilizer, -0.12],
|
||||
[hasVerticalStabilizer, -0.17],
|
||||
[true, -crewSkills.smooth_driving / 100],
|
||||
);
|
||||
const dispersionTurretTraverseCoefficient = coefficient(
|
||||
[hasVerticalStabilizer, -0.12],
|
||||
[hasVerticalStabilizer, -0.17],
|
||||
[true, -crewSkills.smooth_turret * (2 / 100)],
|
||||
);
|
||||
const enginePowerCoefficient = coefficient(
|
||||
[
|
||||
hasEngineAccelerator,
|
||||
tank.class === TankClass.TANK_CLASS_HEAVY ||
|
||||
tank.class === TankClass.TANK_CLASS_TANK_DESTROYER
|
||||
? 0.05
|
||||
: 0.04,
|
||||
],
|
||||
[hasEngineAccelerator, 0.06],
|
||||
[hasReducedEnginePowerBoost, 0.1],
|
||||
[hasEnginePowerBoost, 0.2],
|
||||
[hasImprovedEnginePowerBoost, 0.35],
|
||||
@@ -248,7 +242,7 @@ export function tankCharacteristics(
|
||||
coefficient([true, progressiveStat(gunnerMastery)]);
|
||||
const hullTraverseCoefficient =
|
||||
coefficient(
|
||||
[hasImprovedControl, 0.11],
|
||||
[hasImprovedControl, 0.12],
|
||||
[hasImprovedEnginePowerBoost, 0.01],
|
||||
[true, crewSkills.virtuoso / 100],
|
||||
) * coefficient([true, progressiveStat(driverMastery)]);
|
||||
@@ -305,8 +299,8 @@ export function tankCharacteristics(
|
||||
: tank.class === TankClass.TANK_CLASS_MEDIUM
|
||||
? 0.04
|
||||
: tank.class === TankClass.TANK_CLASS_LIGHT
|
||||
? 0.07
|
||||
: 0.1,
|
||||
? 0.06
|
||||
: 0.07,
|
||||
],
|
||||
);
|
||||
const camouflageCoefficientStill = sum(
|
||||
|
||||
Reference in new issue
Block a user