mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-26 03:59:53 +01:00
feat: split tutorial bots
This commit is contained in:
1 parent
a362301515
commit
417858f21a
6 files changed
+16
-5
No files matched your search
@@ -45,6 +45,7 @@ type ShellDefinitionsList = Record<
|
|||||||
damage: { armor: number; devices: number };
|
damage: { armor: number; devices: number };
|
||||||
normalizationAngle: number;
|
normalizationAngle: number;
|
||||||
ricochetAngle: number;
|
ricochetAngle: number;
|
||||||
|
explosionRadius?: number;
|
||||||
}
|
}
|
||||||
> & {
|
> & {
|
||||||
icons: Record<string, string>;
|
icons: Record<string, string>;
|
||||||
@@ -285,6 +286,8 @@ export async function buildDefinitions() {
|
|||||||
);
|
);
|
||||||
|
|
||||||
for (const tankKey in tankList.root) {
|
for (const tankKey in tankList.root) {
|
||||||
|
if (tankKey.includes('tutorial_bot')) return;
|
||||||
|
|
||||||
const tank = tankList.root[tankKey];
|
const tank = tankList.root[tankKey];
|
||||||
const tankPrice: TankDefinitionPrice =
|
const tankPrice: TankDefinitionPrice =
|
||||||
typeof tank.price === 'number'
|
typeof tank.price === 'number'
|
||||||
@@ -567,6 +570,7 @@ export async function buildDefinitions() {
|
|||||||
normalization: shell.normalizationAngle,
|
normalization: shell.normalizationAngle,
|
||||||
ricochet: shell.ricochetAngle,
|
ricochet: shell.ricochetAngle,
|
||||||
type: blitzShellKindToBLitzkrieg[shell.kind],
|
type: blitzShellKindToBLitzkrieg[shell.kind],
|
||||||
|
explosionRadius: shell.explosionRadius,
|
||||||
icon: shell.icon,
|
icon: shell.icon,
|
||||||
penetration:
|
penetration:
|
||||||
penetrationRaw[0] === penetrationRaw[1]
|
penetrationRaw[0] === penetrationRaw[1]
|
||||||
|
|||||||
@@ -28,6 +28,8 @@ export async function buildTankArmors() {
|
|||||||
|
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
Object.entries(tanks.root).map(async ([tankKey, tank]) => {
|
Object.entries(tanks.root).map(async ([tankKey, tank]) => {
|
||||||
|
if (tankKey.includes('tutorial_bot')) return;
|
||||||
|
|
||||||
const id = toUniqueId(nation, tank.id);
|
const id = toUniqueId(nation, tank.id);
|
||||||
|
|
||||||
console.log(`Building armor ${id} @ ${nation}/${tankKey}`);
|
console.log(`Building armor ${id} @ ${nation}/${tankKey}`);
|
||||||
|
|||||||
@@ -32,11 +32,13 @@ export async function buildTankIcons() {
|
|||||||
);
|
);
|
||||||
|
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
Object.entries(tanks.root).map(async ([tankIndex, tank]) => {
|
Object.entries(tanks.root).map(async ([tankKey, tank]) => {
|
||||||
|
if (tankKey.includes('tutorial_bot')) return;
|
||||||
|
|
||||||
const nationVehicleId = tank.id;
|
const nationVehicleId = tank.id;
|
||||||
const id = (nationVehicleId << 8) + (NATION_IDS[nation] << 4) + 1;
|
const id = (nationVehicleId << 8) + (NATION_IDS[nation] << 4) + 1;
|
||||||
const parameters = await readYAMLDVPL<TankParameters>(
|
const parameters = await readYAMLDVPL<TankParameters>(
|
||||||
`${DATA}/${POI.tankParameters}/${nation}/${tankIndex}.yaml.dvpl`,
|
`${DATA}/${POI.tankParameters}/${nation}/${tankKey}.yaml.dvpl`,
|
||||||
);
|
);
|
||||||
const small = `${DATA}/${parameters.resourcesPath.smallIconPath
|
const small = `${DATA}/${parameters.resourcesPath.smallIconPath
|
||||||
.replace(/~res:\//, '')
|
.replace(/~res:\//, '')
|
||||||
|
|||||||
@@ -43,6 +43,8 @@ export async function buildTankModels() {
|
|||||||
|
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
Object.entries(tanks.root).map(async ([tankKey, tank]) => {
|
Object.entries(tanks.root).map(async ([tankKey, tank]) => {
|
||||||
|
if (tankKey.includes('tutorial_bot')) return;
|
||||||
|
|
||||||
const id = toUniqueId(nation, tank.id);
|
const id = toUniqueId(nation, tank.id);
|
||||||
|
|
||||||
console.log(`Building model ${id} @ ${nation}/${tankKey}`);
|
console.log(`Building model ${id} @ ${nation}/${tankKey}`);
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ void main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (canSplash) {
|
if (canSplash) {
|
||||||
float reducedFinalThickness = finalThickness * (5.0 / 11.0);
|
float reducedFinalThickness = finalThickness * (1.0 / 10.0);
|
||||||
float splashDelta = reducedFinalThickness - piercedPenetration;
|
float splashDelta = reducedFinalThickness - piercedPenetration;
|
||||||
|
|
||||||
if (splashDelta > randomRadius) {
|
if (splashDelta > randomRadius) {
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ interface GunDefinitionAutoReloader {
|
|||||||
interClip: number;
|
interClip: number;
|
||||||
count: number;
|
count: number;
|
||||||
}
|
}
|
||||||
export interface ShellDefinition {
|
export type ShellDefinition = {
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
speed: number;
|
speed: number;
|
||||||
@@ -70,7 +70,8 @@ export interface ShellDefinition {
|
|||||||
type: ShellType;
|
type: ShellType;
|
||||||
normalization?: number;
|
normalization?: number;
|
||||||
ricochet?: number;
|
ricochet?: number;
|
||||||
}
|
explosionRadius?: number;
|
||||||
|
};
|
||||||
|
|
||||||
export const tankDefinitions = fetch(asset('definitions/tanks.json'), {
|
export const tankDefinitions = fetch(asset('definitions/tanks.json'), {
|
||||||
cache: 'no-cache',
|
cache: 'no-cache',
|
||||||
|
|||||||
Reference in new issue
Block a user