track repair time

This commit is contained in:
tresabhi committed 2026-12-04 00:13:54 -06:00
1 parent ad017152c7
commit 54771738c0
6 files changed
+43 -1

No files matched your search

@@ -6,6 +6,7 @@ import {
} from "@blitzkit/core";
import { ShellType, TankClass, type GunDefinition } from "@blitzkit/protos";
import type { Vector2Tuple } from "three";
import { api } from "../api/dynamic";
import { shellSlot } from "../tankopedia/augments";
import { hullTraverseSpeed } from "../tankopedia/hullTraverseSpeed";
import { rawTerrainCoefficient } from "../tankopedia/rawTerrainCoefficient";
@@ -51,6 +52,8 @@ function intraClipOf(gun: GunDefinition) {
*/
const PEEKABOO_MIN_CYCLE = 10;
const skills = await api.skills();
// characteristics prefixed with an underscore are compute time only; they are never rendered
export const characteristics = {
gun_type: {
@@ -1266,6 +1269,18 @@ export const characteristics = {
},
},
track_repair_time: {
type: CharacteristicType.Number,
compute({ track, environment }) {
const skill =
1 +
(environment.skills.repair ?? 0) *
skills.constants.repair.values.repairSpeedFactorPerLevel;
return track.repair_time / skill;
},
},
// fire_rate: unavailable,
// ramming_resistance: unavailable,
@@ -654,6 +654,12 @@ export const characteristicsGroups: CharacteristicsGroup[] = [
units: "percentage",
},
{ name: "crew_count" },
{
name: "track_repair_time",
ranking: CharacteristicRanking.LowerIsBetter,
decimals: 1,
units: "s",
},
// { name: "fire_rate", units: "hp_s" },
// { name: "ramming_resistance", units: "percentage" },