Skip to content

Commit

Permalink
#none adding loss per hour to campaign summary
Browse files Browse the repository at this point in the history
  • Loading branch information
jgaribsin committed Mar 15, 2024
1 parent 3e38a73 commit f71e659
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/handlers/embed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,12 +251,16 @@ export function warStatusEmbeds() {

for (const campaign of campaigns) {
const {planetName, campaignType, planetData, planetEvent} = campaign;
const {lossPercPerHour} = planetData;
const title = `${planetName}: ${campaignType.toUpperCase()}`;

if (campaignType === 'Liberation') {
const {owner, liberation} = planetData;
const progressBar = drawLoadingBarPerc(liberation, 30);
status[owner as Faction].push({name: title, value: progressBar});
status[owner as Faction].push({
name: title,
value: `${progressBar} (-${lossPercPerHour}%/h)`,
});
} else if (campaignType === 'Defend') {
const {defence, race} = planetEvent as MergedPlanetEventData;
const progressBar = drawLoadingBarPerc(defence, 30);
Expand Down

0 comments on commit f71e659

Please sign in to comment.