INNER CODE UNIT · TypeScript
crew
Thorium-Sim/thorium · server/classes/generic/index.ts:258
const crew = App.crew.filter(c => c.simulatorId === this.simulatorId);
//
// Gather Information
//
// Get the damage team positions
const damageTeamCrew = crew
.map(c => c.position)
.filter(c => damagePositions.indexOf(c) > -1)
.filter((c, i, a) => a.indexOf(c) === i);
const damageTeamCrewCount = crew
.filter(c => damagePositions.indexOf(c.position) > -1)
.reduce((prev, next) => {
prev[next.position] = prev[next.position] ? prev[next.position] + 1 : 1;
return prev;
}, {});
const securityTeamCrew = crew