mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-30 03:23:48 +01:00
Merge branch 'dev' into autocomplete
This commit is contained in:
commit
745fb4fdf6
32
dist/vendor.bundle.js
vendored
32
dist/vendor.bundle.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -15,7 +15,7 @@ import { Skill } from "./Skill";
|
||||
import { City } from "./City";
|
||||
import { IAction } from "./IAction";
|
||||
import { IPlayer } from "../PersonObjects/IPlayer";
|
||||
import { IRouter } from "../ui/Router";
|
||||
import { IRouter, Page } from "../ui/Router";
|
||||
import { ConsoleHelpText } from "./data/Help";
|
||||
import { exceptionAlert } from "../utils/helpers/exceptionAlert";
|
||||
import { getRandomInt } from "../utils/helpers/getRandomInt";
|
||||
@ -26,7 +26,6 @@ import { addOffset } from "../utils/helpers/addOffset";
|
||||
import { Faction } from "../Faction/Faction";
|
||||
import { Factions, factionExists } from "../Faction/Factions";
|
||||
import { calculateHospitalizationCost } from "../Hospital/Hospital";
|
||||
import { redPillFlag } from "../RedPill";
|
||||
import { dialogBoxCreate } from "../ui/React/DialogBox";
|
||||
import { Settings } from "../Settings/Settings";
|
||||
import { Augmentations } from "../Augmentation/Augmentations";
|
||||
@ -184,6 +183,7 @@ export class Bladeburner implements IBladeburner {
|
||||
break;
|
||||
case ActionTypes["Diplomacy"]:
|
||||
case ActionTypes["Hyperbolic Regeneration Chamber"]:
|
||||
case ActionTypes["Incite Violence"]:
|
||||
this.actionTimeToComplete = 60;
|
||||
break;
|
||||
default:
|
||||
@ -339,6 +339,10 @@ export class Bladeburner implements IBladeburner {
|
||||
action.type = ActionTypes["Hyperbolic Regeneration Chamber"];
|
||||
action.name = "Hyperbolic Regeneration Chamber";
|
||||
break;
|
||||
case "stir trouble":
|
||||
action.type = ActionTypes["Incite Violence"];
|
||||
action.name = "Incite Violence";
|
||||
break;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
@ -1167,6 +1171,8 @@ export class Bladeburner implements IBladeburner {
|
||||
return GeneralActions["Diplomacy"];
|
||||
case ActionTypes["Hyperbolic Regeneration Chamber"]:
|
||||
return GeneralActions["Hyperbolic Regeneration Chamber"];
|
||||
case ActionTypes["Incite Violence"]:
|
||||
return GeneralActions["Incite Violence"];
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
@ -1493,6 +1499,23 @@ export class Bladeburner implements IBladeburner {
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ActionTypes["Incite Violence"]: {
|
||||
for (const contract of Object.keys(this.contracts)) {
|
||||
const growthF = Growths[contract];
|
||||
if (!growthF) throw new Error("trying to generate count for action that doesn't exist? " + contract);
|
||||
this.contracts[contract].count += (60 * 3 * growthF()) / BladeburnerConstants.ActionCountGrowthPeriod;
|
||||
}
|
||||
for (const operation of Object.keys(this.operations)) {
|
||||
const growthF = Growths[operation];
|
||||
if (!growthF) throw new Error("trying to generate count for action that doesn't exist? " + operation);
|
||||
this.operations[operation].count += (60 * 3 * growthF()) / BladeburnerConstants.ActionCountGrowthPeriod;
|
||||
}
|
||||
if (this.logging.general) {
|
||||
this.log(`Incited violence in the synthoid communities.`);
|
||||
}
|
||||
this.startAction(player, this.action);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
console.error(`Bladeburner.completeAction() called for invalid action: ${this.action.type}`);
|
||||
break;
|
||||
@ -1847,7 +1870,7 @@ export class Bladeburner implements IBladeburner {
|
||||
|
||||
process(router: IRouter, player: IPlayer): void {
|
||||
// Edge case condition...if Operation Daedalus is complete trigger the BitNode
|
||||
if (redPillFlag === false && this.blackops.hasOwnProperty("Operation Daedalus")) {
|
||||
if (router.page() !== Page.BitVerse && this.blackops.hasOwnProperty("Operation Daedalus")) {
|
||||
return router.toBitVerse(false, false);
|
||||
}
|
||||
|
||||
@ -1960,6 +1983,7 @@ export class Bladeburner implements IBladeburner {
|
||||
"Field Analysis",
|
||||
"Diplomacy",
|
||||
"Hyperbolic Regeneration Chamber",
|
||||
"Incite Violence",
|
||||
];
|
||||
if (gen.includes(res.type)) {
|
||||
res.type = "General";
|
||||
@ -2084,6 +2108,7 @@ export class Bladeburner implements IBladeburner {
|
||||
return this.getRecruitmentTime(player);
|
||||
case ActionTypes["Diplomacy"]:
|
||||
case ActionTypes["Hyperbolic Regeneration Chamber"]:
|
||||
case ActionTypes["Incite Violence"]:
|
||||
return 60;
|
||||
default:
|
||||
workerScript.log("bladeburner.getActionTime", errorLogText);
|
||||
@ -2121,6 +2146,7 @@ export class Bladeburner implements IBladeburner {
|
||||
case ActionTypes["FieldAnalysis"]:
|
||||
case ActionTypes["Diplomacy"]:
|
||||
case ActionTypes["Hyperbolic Regeneration Chamber"]:
|
||||
case ActionTypes["Incite Violence"]:
|
||||
return [1, 1];
|
||||
case ActionTypes["Recruitment"]: {
|
||||
const recChance = this.getRecruitmentSuccessChance(player);
|
||||
@ -2163,6 +2189,7 @@ export class Bladeburner implements IBladeburner {
|
||||
case ActionTypes["FieldAnalysis"]:
|
||||
case ActionTypes["Diplomacy"]:
|
||||
case ActionTypes["Hyperbolic Regeneration Chamber"]:
|
||||
case ActionTypes["Incite Violence"]:
|
||||
return Infinity;
|
||||
default:
|
||||
workerScript.log("bladeburner.getActionCountRemaining", errorLogText);
|
||||
|
@ -30,4 +30,8 @@ export const GeneralActions: IMap<Action> = {};
|
||||
GeneralActions[actionName] = new Action({
|
||||
name: actionName,
|
||||
});
|
||||
actionName = "Incite Violence";
|
||||
GeneralActions[actionName] = new Action({
|
||||
name: actionName,
|
||||
});
|
||||
})();
|
||||
|
@ -12,6 +12,7 @@ export const ActionTypes: {
|
||||
"Field Analysis": number;
|
||||
Diplomacy: number;
|
||||
"Hyperbolic Regeneration Chamber": number;
|
||||
"Incite Violence": number;
|
||||
} = {
|
||||
Idle: 1,
|
||||
Contract: 2,
|
||||
@ -24,4 +25,5 @@ export const ActionTypes: {
|
||||
"Field Analysis": 7,
|
||||
Diplomacy: 8,
|
||||
"Hyperbolic Regeneration Chamber": 9,
|
||||
"Incite Violence": 10,
|
||||
};
|
||||
|
@ -62,4 +62,7 @@ export const GeneralActions: {
|
||||
</>
|
||||
),
|
||||
},
|
||||
"Incite Violence": {
|
||||
desc: <>Purposefully stir trouble in the synthoid community in order to gain a political edge.</>,
|
||||
},
|
||||
};
|
||||
|
@ -37,6 +37,7 @@ export function GeneralActionElem(props: IProps): React.ReactElement {
|
||||
return 30;
|
||||
case "Diplomacy":
|
||||
case "Hyperbolic Regeneration Chamber":
|
||||
case "Incite Violence":
|
||||
return 60;
|
||||
case "Recruitment":
|
||||
return props.bladeburner.getRecruitmentTime(props.player);
|
||||
|
@ -8,6 +8,8 @@ function makeScriptBlob(code: string): Blob {
|
||||
return new Blob([code], { type: "text/javascript" });
|
||||
}
|
||||
|
||||
export function compile(script: Script, scripts: Script[]): void {}
|
||||
|
||||
// Begin executing a user JS script, and return a promise that resolves
|
||||
// or rejects when the script finishes.
|
||||
// - script is a script to execute (see Script.js). We depend only on .filename and .code.
|
||||
|
Loading…
Reference in New Issue
Block a user