mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 17:43:48 +01:00
fix #3395 donating to special factions possible via singularity
This commit is contained in:
parent
68ddf1d588
commit
89baba2e24
@ -49,6 +49,7 @@ import { FactionInfos } from "../Faction/FactionInfo";
|
|||||||
import { InternalAPI, NetscriptContext } from "src/Netscript/APIWrapper";
|
import { InternalAPI, NetscriptContext } from "src/Netscript/APIWrapper";
|
||||||
import { BlackOperationNames } from "../Bladeburner/data/BlackOperationNames";
|
import { BlackOperationNames } from "../Bladeburner/data/BlackOperationNames";
|
||||||
import { enterBitNode } from "../RedPill";
|
import { enterBitNode } from "../RedPill";
|
||||||
|
import { FactionNames } from "../Faction/data/FactionNames";
|
||||||
|
|
||||||
export function NetscriptSingularity(player: IPlayer, workerScript: WorkerScript): InternalAPI<ISingularity> {
|
export function NetscriptSingularity(player: IPlayer, workerScript: WorkerScript): InternalAPI<ISingularity> {
|
||||||
const getAugmentation = function (_ctx: NetscriptContext, name: string): Augmentation {
|
const getAugmentation = function (_ctx: NetscriptContext, name: string): Augmentation {
|
||||||
@ -1168,6 +1169,13 @@ export function NetscriptSingularity(player: IPlayer, workerScript: WorkerScript
|
|||||||
);
|
);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (faction.name === FactionNames.ChurchOfTheMachineGod || faction.name === FactionNames.Bladeburners) {
|
||||||
|
workerScript.log(
|
||||||
|
"donateToFaction",
|
||||||
|
() => `You can't donate to '${facName}' because they do not accept donations`,
|
||||||
|
);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (typeof amt !== "number" || amt <= 0 || isNaN(amt)) {
|
if (typeof amt !== "number" || amt <= 0 || isNaN(amt)) {
|
||||||
workerScript.log("donateToFaction", () => `Invalid donation amount: '${amt}'.`);
|
workerScript.log("donateToFaction", () => `Invalid donation amount: '${amt}'.`);
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user