mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-11 10:13:52 +01:00
UI: Fixes #3132 several Sleeve can no longer works concurrently in the same company
fixes #3132 fixes #3394 Fixed the faulty possibleJob() logic in Sleeve/UI/TaskSelector
This commit is contained in:
parent
27bf6cba39
commit
08d8f405c0
@ -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