added logic to rewward and invite to infiltrators on infil completion

This commit is contained in:
phyzical
2022-03-23 23:23:01 +08:00
parent 0b171822df
commit 80edb744bf
5 changed files with 45 additions and 12 deletions
+6 -6
View File
@@ -56,7 +56,7 @@ function possibleJobs(player: IPlayer, sleeve: Sleeve): string[] {
function possibleFactions(player: IPlayer, sleeve: Sleeve): string[] {
// Array of all factions that other sleeves are working for
const forbiddenFactions = [FactionNames.Bladeburners as string];
const forbiddenFactions = [FactionNames.Bladeburners as string, FactionNames.Infiltrators as string];
if (player.gang) {
forbiddenFactions.push(player.gang.facName);
}
@@ -76,9 +76,9 @@ function possibleFactions(player: IPlayer, sleeve: Sleeve): string[] {
}
}
return factions.filter(faction => {
return factions.filter((faction) => {
const facInfo = Factions[faction].getInfo();
return facInfo.offerHackingWork || facInfo.offerFieldWork || facInfo.offerSecurityWork
return facInfo.offerHackingWork || facInfo.offerFieldWork || facInfo.offerSecurityWork;
});
}
@@ -279,7 +279,7 @@ export function TaskSelector(props: IProps): React.ReactElement {
return (
<>
<Select onChange={onS0Change} value={s0} sx={{ width: '100%' }}>
<Select onChange={onS0Change} value={s0} sx={{ width: "100%" }}>
{validActions.map((task) => (
<MenuItem key={task} value={task}>
{task}
@@ -288,7 +288,7 @@ export function TaskSelector(props: IProps): React.ReactElement {
</Select>
{!(details.first.length === 1 && details.first[0] === "------") && (
<>
<Select onChange={onS1Change} value={s1} sx={{ width: '100%' }}>
<Select onChange={onS1Change} value={s1} sx={{ width: "100%" }}>
{details.first.map((detail) => (
<MenuItem key={detail} value={detail}>
{detail}
@@ -299,7 +299,7 @@ export function TaskSelector(props: IProps): React.ReactElement {
)}
{!(details2.length === 1 && details2[0] === "------") && (
<>
<Select onChange={onS2Change} value={s2} sx={{ width: '100%' }}>
<Select onChange={onS2Change} value={s2} sx={{ width: "100%" }}>
{details2.map((detail) => (
<MenuItem key={detail} value={detail}>
{detail}