mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-10 01:33:54 +01:00
Merge pull request #3723 from borisflagell/FIX#3132
UI: Fixes #3132 several Sleeve can no longer works concurrently in the same company
This commit is contained in:
commit
8f7bbaf62c
@ -44,7 +44,7 @@ interface ITaskDetails {
|
||||
|
||||
function possibleJobs(player: IPlayer, sleeve: Sleeve): string[] {
|
||||
// Array of all companies that other sleeves are working at
|
||||
const forbiddenCompanies = [];
|
||||
const forbiddenCompanies: string[] = [];
|
||||
for (const otherSleeve of player.sleeves) {
|
||||
if (sleeve === otherSleeve) {
|
||||
continue;
|
||||
@ -54,13 +54,8 @@ function possibleJobs(player: IPlayer, sleeve: Sleeve): string[] {
|
||||
}
|
||||
}
|
||||
const allJobs: string[] = Object.keys(player.jobs);
|
||||
for (let i = 0; i < allJobs.length; ++i) {
|
||||
if (!forbiddenCompanies.includes(allJobs[i])) {
|
||||
allJobs[i];
|
||||
}
|
||||
}
|
||||
|
||||
return allJobs;
|
||||
return allJobs.filter((company) => !forbiddenCompanies.includes(company));
|
||||
}
|
||||
|
||||
function possibleFactions(player: IPlayer, sleeve: Sleeve): string[] {
|
||||
|
Loading…
Reference in New Issue
Block a user