feat: skills are ordered by interest level, then by mastery level
This commit is contained in:
parent
d4e9d1449a
commit
d493cf0f78
|
@ -18,11 +18,9 @@ export function available(): tID[] {
|
||||||
availCache.push(id);
|
availCache.push(id);
|
||||||
}
|
}
|
||||||
availCache.sort( (a: tID, b: tID) => {
|
availCache.sort( (a: tID, b: tID) => {
|
||||||
const aname = skillLabel(a);
|
const alevel = Skills[a].interest * 1.1 + Skills[a].mastery;
|
||||||
const bname = skillLabel(b);
|
const blevel = Skills[b].interest * 1.1 + Skills[b].mastery;
|
||||||
if ( aname < bname ) { return -1; }
|
return blevel - alevel;
|
||||||
if ( aname > bname ) { return 1; }
|
|
||||||
return 0;
|
|
||||||
});
|
});
|
||||||
return availCache;
|
return availCache;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue