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.sort( (a: tID, b: tID) => {
|
||||
const aname = skillLabel(a);
|
||||
const bname = skillLabel(b);
|
||||
if ( aname < bname ) { return -1; }
|
||||
if ( aname > bname ) { return 1; }
|
||||
return 0;
|
||||
const alevel = Skills[a].interest * 1.1 + Skills[a].mastery;
|
||||
const blevel = Skills[b].interest * 1.1 + Skills[b].mastery;
|
||||
return blevel - alevel;
|
||||
});
|
||||
return availCache;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue