Skip to content

Commit

Permalink
Merge seasonal power data into season data
Browse files Browse the repository at this point in the history
  • Loading branch information
gomander committed Oct 6, 2023
1 parent 5429c2d commit b4e999c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 250 deletions.
238 changes: 0 additions & 238 deletions client/src/data/power-levels.ts

This file was deleted.

16 changes: 8 additions & 8 deletions client/src/data/seasons.ts
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
interface AnnualRelease {
title: string
year: number
value: number
subdivisions: number
}

const annualReleases = new Map<number, AnnualRelease>([
[1, {
title: 'Destiny 2',
year: 1,
value: 1,
subdivisions: 3
}],
[2, {
title: 'Forsaken',
year: 2,
value: 2,
subdivisions: 4
}],
[3, {
title: 'Shadowkeep',
year: 3,
value: 3,
subdivisions: 4
}],
[4, {
title: 'Beyond Light',
year: 4,
value: 4,
subdivisions: 4
}],
[5, {
title: 'Witch Queen',
year: 5,
value: 5,
subdivisions: 4
}],
[6, {
title: 'Lightfall',
year: 6,
value: 6,
subdivisions: 4
}],
[7, {
title: 'The Final Shape',
year: 7,
value: 7,
subdivisions: 3
}]
])
Expand Down
16 changes: 12 additions & 4 deletions client/src/pages/HistoricalPowerPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</template>

<script setup lang="ts">
import levels from 'src/data/power-levels'
import seasons from 'src/data/seasons'
const columns = [
{
Expand Down Expand Up @@ -60,7 +60,15 @@ const columns = [
}
]
const rows = structuredClone(levels)
rows.reverse()
const rows = Array.from(seasons).filter(
season => typeof season[0] === 'number'
).map(season => season[1]).map(season => ({
year: `${season.year?.title} - ${season.year?.value}`,
name: season.title,
season: season.value,
base: season.power?.base,
soft: season.power?.soft,
powerful: season.power?.powerful,
pinnacle: season.power?.hard
})).reverse()
</script>

0 comments on commit b4e999c

Please sign in to comment.