Always Display all Ethics + Text Formatting for the table

This commit is contained in:
Neshura 2023-08-16 01:02:36 +02:00
parent e8b7e395e2
commit 39f813bec3
Signed by: Neshura
GPG key ID: B6983AAA6B9A7A6C

View file

@ -64,6 +64,21 @@
pageData.ethicsData = new Map();
pageData.gestaltCount = { total: 0, machines: 0 };
chellarisData.ethics.forEach((ethic, id) => {
const newEthicsData: {
machine: boolean;
displayName: string;
regular: number;
fanatic: number;
} = {
machine: ethic.machine,
displayName: ethic.displayName,
regular: 0,
fanatic: 0
};
pageData.ethicsData.set(id, newEthicsData);
})
tmpGameData.empires.forEach((empire, index) => {
if (selectedGameGroups.includes(empire.group)) {
groupEmpires.set(index, empire);
@ -187,7 +202,7 @@
{#each pageData.ethicsData as ethicData}
{#if !ethicData[1].machine}
<tr>
<td>{ethicData[1].displayName}</td>
<td class="table-label">{ethicData[1].displayName}</td>
<td>{ethicData[1].regular}</td>
<td>{ethicData[1].fanatic}</td>
</tr>
@ -207,7 +222,7 @@
{#each pageData.ethicsData as ethicData}
{#if ethicData[1].machine}
<tr>
<td>{ethicData[1].displayName}</td>
<td class="table-label">{ethicData[1].displayName}</td>
<td>{ethicData[1].regular}</td>
</tr>
{/if}
@ -238,6 +253,11 @@
td {
padding: 0.3rem 0.5rem;
border: 1px solid var(--color-text);
text-align: center;
}
.table-label {
text-align: right;
}
h4 {