shells in more rows

This commit is contained in:
tresabhi committed 2026-12-03 22:00:01 -06:00
1 parent b04946ed96
commit 38f751a8b0
3 files changed
+7 -3

No files matched your search

@@ -213,7 +213,6 @@ function Group({ group, characteristics }: GroupProps) {
if (items.length === 0) return null; if (items.length === 0) return null;
const isShellGroup = group.name === "shell";
const title = ( const title = (
strings.tanks.characteristics.titles as Record<string, string> strings.tanks.characteristics.titles as Record<string, string>
)[group.name]; )[group.name];
@@ -222,12 +221,12 @@ function Group({ group, characteristics }: GroupProps) {
<Table.Body> <Table.Body>
<Table.Row> <Table.Row>
<Table.GroupTitle <Table.GroupTitle
colSpan={isShellGroup ? undefined : characteristics.length + 1} colSpan={group.shells ? undefined : characteristics.length + 1}
> >
{title} {title}
</Table.GroupTitle> </Table.GroupTitle>
{isShellGroup && {group.shells &&
members.map((member, index) => ( members.map((member, index) => (
<Table.GroupCell key={member.key} className={styles["shell-cell"]}> <Table.GroupCell key={member.key} className={styles["shell-cell"]}>
<ShellSwitcher member={member} index={index} /> <ShellSwitcher member={member} index={index} />
@@ -334,6 +334,7 @@ export const characteristicsGroups: CharacteristicsGroup[] = [
{ {
name: "gun", name: "gun",
shells: true,
// render: CharacteristicsGroupRender.Statistical, // render: CharacteristicsGroupRender.Statistical,
order: [ order: [
{ {
@@ -394,6 +395,7 @@ export const characteristicsGroups: CharacteristicsGroup[] = [
{ {
name: "clip", name: "clip",
shells: true,
// render: CharacteristicsGroupRender.Statistical, // render: CharacteristicsGroupRender.Statistical,
order: [ order: [
{ name: "clipping_potential", localize: true, units: "hp" }, { name: "clipping_potential", localize: true, units: "hp" },
@@ -420,6 +422,7 @@ export const characteristicsGroups: CharacteristicsGroup[] = [
{ {
name: "shell", name: "shell",
shells: true,
// render: CharacteristicsGroupRender.Statistical, // render: CharacteristicsGroupRender.Statistical,
order: [ order: [
{ name: "penetration", units: "mm" }, { name: "penetration", units: "mm" },
@@ -130,5 +130,7 @@ export type CharacteristicsGroup = {
name: string; name: string;
// Groups that only some tanks have are no use as a sort key // Groups that only some tanks have are no use as a sort key
sortable?: boolean; sortable?: boolean;
// Shows each tank's shell switcher in the group's title row
shells?: boolean;
order: (CharacteristicRenderConfig | LabelRenderConfig | ToyRenderConfig)[]; order: (CharacteristicRenderConfig | LabelRenderConfig | ToyRenderConfig)[];
}; };