names and icons

This commit is contained in:
tresabhi committed 2026-06-02 19:48:28 -05:00
1 parent 18a6f30a4b
commit 595db8709b
13 files changed
+46 -77

No files matched your search

@@ -45,9 +45,9 @@
.align {
display: flex;
align-items: center;
gap: var(--space-2);
gap: var(--space-3);
svg {
img {
width: 1em;
height: 1em;
}
@@ -58,7 +58,7 @@ function Group({ group, characteristics }: GroupProps) {
strings.tanks.characteristics.titles as Record<string, string>
)[group.group]
}
{/*<GearIcon />*/}
<img src={`/media/groups/${group.group}.png`} />
</div>
</Heading>
</div>
@@ -96,7 +96,13 @@ function Item({ config, value }: ItemProps) {
return (
<span className={styles.item}>
<div className={styles.value}>
<Text lowContrast>{config.name}</Text>
<Text lowContrast>
{
(strings.tanks.characteristics.items as Record<string, string>)[
config.name
]
}
</Text>
<Text>{renderCharacteristic(value, config)}</Text>
</div>
@@ -345,17 +345,12 @@ export const characteristics = {
);
},
class({ tank }) {
return tank.tank!.tank_class;
},
camouflage({ attribute, characteristic, attributeSafe, state }) {
const tankClass = characteristic("class");
camouflage({ attribute, characteristic, attributeSafe, state, tank }) {
const base = attribute(
TankAttributeChange_AttributeName.ATTRIBUTE_NAME_CONCEALMENT_STILL,
);
const moving =
tankClass === TankClass.TANK_CLASS_LIGHT
tank.tank!.tank_class === TankClass.TANK_CLASS_LIGHT
? 0
: attribute(
TankAttributeChange_AttributeName.ATTRIBUTE_NAME_CONCEALMENT_MOVING,
@@ -388,54 +383,10 @@ export const characteristics = {
return -Infinity;
},
volume() {
return -Infinity;
},
nation({ tank }) {
return tank.tank!.nation;
},
name({ tank }) {
return tank.tank!.name!.value;
},
tier({ tank }) {
return tank.tank!.tier_catalog_id;
},
type({ tank }) {
return tank.tank!.tank_type;
},
id({ state }) {
return state.id.split(".").at(-1)!;
},
slug({ tank }) {
return tank.slug;
},
compensation({ tank }) {
return tank.compensation!.compensation?.currency_reward?.amount ?? null;
},
purchase_price() {
return -Infinity;
},
upgrade_price() {
return -Infinity;
},
research_level() {
return -Infinity;
},
crew_xp_multiplier() {
return -Infinity;
},
clipping_potential() {
return -Infinity;
},
@@ -452,7 +403,11 @@ export const characteristics = {
return -Infinity;
},
gun_yaw_range() {
azimuth_left() {
return -Infinity;
},
azimuth_right() {
return -Infinity;
},
@@ -464,7 +419,7 @@ export const characteristics = {
return -Infinity;
},
fire_health_burn() {
fire_rate() {
return -Infinity;
},
@@ -475,4 +430,8 @@ export const characteristics = {
width() {
return -Infinity;
},
penetration_loss() {
return -Infinity;
},
} satisfies Record<string, Characteristic>;
@@ -142,6 +142,7 @@ export const characteristicsOrder: CharacteristicsGroup[] = [
render: CharacteristicsGroupRender.Statistical,
order: [
{ name: "penetration", units: "mm" },
{ name: "penetration_loss" },
{ name: "shell_velocity", units: "m_s" },
{ name: "shell_range", units: "m" },
{ name: "shell_capacity" },
@@ -170,7 +171,8 @@ export const characteristicsOrder: CharacteristicsGroup[] = [
order: [
{ name: "gun_depression", decimals: 0, units: "deg" },
{ name: "gun_elevation", decimals: 0, units: "deg" },
{ name: "gun_yaw_range", decimals: 0, units: "deg" },
{ name: "azimuth_left", decimals: 0, units: "deg" },
{ name: "azimuth_right", decimals: 0, units: "deg" },
{ toy: "flexibility" },
],
@@ -186,9 +188,9 @@ export const characteristicsOrder: CharacteristicsGroup[] = [
{ name: "engine_power", units: "bhp" },
{ name: "brake_force", units: "N" },
{ name: "weight", decimals: 1, units: "t" },
{ name: "power_to_weight", decimals: 1, units: "bhp_t" },
{ name: "terrain_coefficient" },
{ name: "power_to_weight", decimals: 1, units: "bhp_t" },
{ name: "hull_traverse_speed", units: "deg_s" },
{ name: "turret_traverse_speed", units: "deg_s" },
@@ -208,7 +210,7 @@ export const characteristicsOrder: CharacteristicsGroup[] = [
order: [
{ name: "health", units: "hp" },
{ name: "fire_chance", units: "%" },
{ name: "fire_health_burn", units: "hp_s" },
{ name: "fire_rate", units: "hp_s" },
{ name: "ramming_resistance", units: "%" },
{ toy: "fire_health_burn" },
@@ -229,7 +231,6 @@ export const characteristicsOrder: CharacteristicsGroup[] = [
{ name: "width", units: "m" },
{ name: "height", units: "m" },
{ name: "length", units: "m" },
{ name: "volume", units: "m" },
],
},
];