Minor code cleanup
This commit is contained in:
@@ -32,10 +32,10 @@ const metricPriority = (m: NumberMetric) => {
|
||||
};
|
||||
|
||||
export class LevelCalculator {
|
||||
Standards: Standards;
|
||||
standards: Standards;
|
||||
|
||||
public constructor(standards: Standards) {
|
||||
this.Standards = standards;
|
||||
this.standards = standards;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------------------------------
|
||||
@@ -97,7 +97,7 @@ export class LevelCalculator {
|
||||
(Object.values(Attribute) as Attribute[]).forEach((attribute) => {
|
||||
const attrActivityPerformances = activityPerformances.filter(
|
||||
(p) =>
|
||||
this.Standards.byActivity(p.activity).getMetadata()
|
||||
this.standards.byActivity(p.activity).getMetadata()
|
||||
.attribute === attribute,
|
||||
);
|
||||
attrLevels[attribute] = this.calculateAttributeLevel(
|
||||
@@ -119,7 +119,7 @@ export class LevelCalculator {
|
||||
if (
|
||||
activityPerformances.some(
|
||||
(p) =>
|
||||
this.Standards.byActivity(p.activity).getMetadata()
|
||||
this.standards.byActivity(p.activity).getMetadata()
|
||||
.attribute !== attribute,
|
||||
)
|
||||
) {
|
||||
@@ -127,7 +127,7 @@ export class LevelCalculator {
|
||||
}
|
||||
|
||||
// must perform all of an attributes activities
|
||||
for (const activity of this.Standards.getAttributeActivities(
|
||||
for (const activity of this.standards.getAttributeActivities(
|
||||
attribute,
|
||||
)) {
|
||||
const filteredActivites = activityPerformances.map(
|
||||
@@ -142,7 +142,7 @@ export class LevelCalculator {
|
||||
}
|
||||
|
||||
const activityLevels = activityPerformances.map((p) => {
|
||||
const interpolatedStandard = this.Standards
|
||||
const interpolatedStandard = this.standards
|
||||
.byActivity(p.activity)
|
||||
.byMetrics(player.metrics)
|
||||
.getOneInterpolated();
|
||||
|
||||
Reference in New Issue
Block a user