Skip to content

Commit d5715c6

Browse files
committed
refactor(data.ts): remove unused allDamageTypes method to clean up code and improve maintainability
style(data.ts): add noinspection comments to suppress warnings for unused local symbols
1 parent f76af3b commit d5715c6

1 file changed

Lines changed: 3 additions & 13 deletions

File tree

src/data.ts

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ export function parseDuration(duration: string | number): number {
185185
const minutes = 60;
186186
const hours = minutes * 60;
187187
const days = hours * 24;
188+
// noinspection PointlessArithmeticExpressionJS
188189
const units: [string, number][] = [
189190
["turns", 1 * turns],
190191
["turn", 1 * turns],
@@ -1467,19 +1468,6 @@ export class CddaData {
14671468
...this.#deconstructFromTerrainIndex.lookup(item_id).sort(byName),
14681469
];
14691470
}
1470-
1471-
allDamageTypes(
1472-
sort_key:
1473-
| "protection_info"
1474-
| "bionic_info"
1475-
| "pet_prot_info"
1476-
| "melee_combat_info"
1477-
| "ablative_info" = "protection_info",
1478-
) {
1479-
return this.byType("damage_info_order")
1480-
.sort((a, b) => (a[sort_key]?.order ?? -1) - (b[sort_key]?.order ?? -1))
1481-
.map((x) => this.byId("damage_type", x.id));
1482-
}
14831471
}
14841472

14851473
class ReverseIndex<T extends keyof SupportedTypesWithMapped> {
@@ -1489,7 +1477,9 @@ class ReverseIndex<T extends keyof SupportedTypesWithMapped> {
14891477
private fn: (x: SupportedTypesWithMapped[T]) => string[],
14901478
) {}
14911479

1480+
// noinspection JSUnusedLocalSymbols
14921481
#_index: Map<string, SupportedTypesWithMapped[T][]> | null = null;
1482+
// noinspection JSUnusedLocalSymbols
14931483
get #index() {
14941484
if (!this.#_index) {
14951485
this.#_index = new Map();

0 commit comments

Comments
 (0)