Merge branch 'dev' into add-ns-getRecentScripts
20
dist/engine.bundle.js
vendored
BIN
dist/images/297df8c0e47764ea113951318b2acf55.png
vendored
Normal file
After Width: | Height: | Size: 118 KiB |
BIN
dist/images/447bc31e61f55e7eff875be3e9a81f1a.png
vendored
Normal file
After Width: | Height: | Size: 120 KiB |
BIN
dist/images/4e0e750f2f09de58219773edd46cbbf5.png
vendored
Normal file
After Width: | Height: | Size: 118 KiB |
BIN
dist/images/5aa87b7de67a77c914088783b055e1cf.png
vendored
Normal file
After Width: | Height: | Size: 119 KiB |
BIN
dist/images/66f4b86d86164fc117bd6d648e4eaa6f.png
vendored
Normal file
After Width: | Height: | Size: 116 KiB |
BIN
dist/images/6caf35202b10b52e1fc2743f674c33e8.png
vendored
Normal file
After Width: | Height: | Size: 111 KiB |
BIN
dist/images/83b2443ab7e7d346766c8f6bc5afc7a7.png
vendored
Normal file
After Width: | Height: | Size: 112 KiB |
BIN
dist/images/85a7b2896acb62be76f3ea7100fe9012.png
vendored
Normal file
After Width: | Height: | Size: 121 KiB |
BIN
dist/images/9f96a5084f4e5f1a6c0041b41b34d62d.png
vendored
Normal file
After Width: | Height: | Size: 118 KiB |
BIN
dist/images/a1110d6c8d16a14c4570411750248399.png
vendored
Normal file
After Width: | Height: | Size: 120 KiB |
BIN
dist/images/c7164b072d62c91c27c6d607b5207e7b.png
vendored
Normal file
After Width: | Height: | Size: 121 KiB |
BIN
dist/images/cb88977ea837bccb9cceb727adc78302.png
vendored
Normal file
After Width: | Height: | Size: 118 KiB |
BIN
dist/images/e66b0c327f97d08e4253f52234d659eb.png
vendored
Normal file
After Width: | Height: | Size: 120 KiB |
BIN
dist/images/e97de4daa946331c7e99dee9c05d629c.png
vendored
Normal file
After Width: | Height: | Size: 117 KiB |
4
dist/main.bundle.js
vendored
2
dist/main.bundle.js.map
vendored
36
dist/vendor.bundle.js
vendored
2
dist/vendor.bundle.js.map
vendored
BIN
favicon.ico
Normal file
After Width: | Height: | Size: 15 KiB |
1
package-lock.json
generated
@ -5,7 +5,6 @@
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "bitburner",
|
||||
"version": "1.3.0",
|
||||
"hasInstallScript": true,
|
||||
"license": "SEE LICENSE IN license.txt",
|
||||
|
25
package.sh
@ -3,10 +3,27 @@
|
||||
# Clear out any files remaining from old builds
|
||||
rm -rf .package
|
||||
|
||||
mkdir -p .package/dist/
|
||||
mkdir -p .package/dist/src/ThirdParty || true
|
||||
mkdir -p .package/src/ThirdParty || true
|
||||
mkdir -p .package/node_modules || true
|
||||
|
||||
cp index.html .package
|
||||
cp -r electron/* .package
|
||||
cp -r dist .package
|
||||
cp index.html .package/index.html
|
||||
cp -r dist/ext .package/dist
|
||||
cp -r dist/icons .package/dist
|
||||
cp -r dist/images .package/dist
|
||||
|
||||
# The css files
|
||||
cp dist/vendor.css .package/dist
|
||||
cp main.css .package/main.css
|
||||
|
||||
# The js files.
|
||||
cp dist/vendor.bundle.js .package/dist/vendor.bundle.js
|
||||
cp main.bundle.js .package/main.bundle.js
|
||||
|
||||
# Source maps
|
||||
cp dist/vendor.bundle.js.map .package/dist/vendor.bundle.js.map
|
||||
cp main.bundle.js.map .package/main.bundle.js.map
|
||||
|
||||
# Install electron sub-dependencies
|
||||
cd electron
|
||||
@ -15,4 +32,4 @@ cd ..
|
||||
|
||||
BUILD_PLATFORM="${1:-"all"}"
|
||||
# And finally build the app.
|
||||
npm run electron:packager-$BUILD_PLATFORM
|
||||
npm run electron:packager-$BUILD_PLATFORM
|
@ -44,7 +44,7 @@ export function findCrime(roughName: string): Crime | null {
|
||||
return Crimes.DealDrugs;
|
||||
} else if (roughName.includes("bond") && roughName.includes("forge")) {
|
||||
return Crimes.BondForgery;
|
||||
} else if (roughName.includes("traffick") && roughName.includes("arms")) {
|
||||
} else if ((roughName.includes("traffic") || roughName.includes("illegal")) && roughName.includes("arms")) {
|
||||
return Crimes.TraffickArms;
|
||||
} else if (roughName.includes("homicide")) {
|
||||
return Crimes.Homicide;
|
||||
@ -52,7 +52,7 @@ export function findCrime(roughName: string): Crime | null {
|
||||
return Crimes.GrandTheftAuto;
|
||||
} else if (roughName.includes("kidnap")) {
|
||||
return Crimes.Kidnap;
|
||||
} else if (roughName.includes("assassinate") || roughName.includes("assassination")) {
|
||||
} else if (roughName.includes("assassin")) {
|
||||
return Crimes.Assassination;
|
||||
} else if (roughName.includes("heist")) {
|
||||
return Crimes.Heist;
|
||||
|
@ -28,7 +28,7 @@ export function NetscriptStanek(player: IPlayer, workerScript: WorkerScript, hel
|
||||
height: function (): number {
|
||||
return staneksGift.height();
|
||||
},
|
||||
charge: function (arootX: any, arootY: any): Promise<void> {
|
||||
charge: function (arootX: unknown, arootY: unknown): Promise<void> {
|
||||
const rootX = helper.number("stanek.charge", "rootX", arootX);
|
||||
const rootY = helper.number("stanek.charge", "rootY", arootY);
|
||||
|
||||
@ -63,7 +63,7 @@ export function NetscriptStanek(player: IPlayer, workerScript: WorkerScript, hel
|
||||
workerScript.log("stanek.clear", () => `Cleared Stanek's Gift.`);
|
||||
staneksGift.clear();
|
||||
},
|
||||
canPlace: function (arootX: any, arootY: any, arotation: any, afragmentId: any): boolean {
|
||||
canPlace: function (arootX: unknown, arootY: unknown, arotation: unknown, afragmentId: unknown): boolean {
|
||||
const rootX = helper.number("stanek.canPlace", "rootX", arootX);
|
||||
const rootY = helper.number("stanek.canPlace", "rootY", arootY);
|
||||
const rotation = helper.number("stanek.canPlace", "rotation", arotation);
|
||||
@ -75,7 +75,7 @@ export function NetscriptStanek(player: IPlayer, workerScript: WorkerScript, hel
|
||||
const can = staneksGift.canPlace(rootX, rootY, rotation, fragment);
|
||||
return can;
|
||||
},
|
||||
place: function (arootX: any, arootY: any, arotation: any, afragmentId: any): boolean {
|
||||
place: function (arootX: unknown, arootY: unknown, arotation: unknown, afragmentId: unknown): boolean {
|
||||
const rootX = helper.number("stanek.place", "rootX", arootX);
|
||||
const rootY = helper.number("stanek.place", "rootY", arootY);
|
||||
const rotation = helper.number("stanek.place", "rotation", arotation);
|
||||
@ -86,7 +86,7 @@ export function NetscriptStanek(player: IPlayer, workerScript: WorkerScript, hel
|
||||
if (!fragment) throw helper.makeRuntimeErrorMsg("stanek.place", `Invalid fragment id: ${fragmentId}`);
|
||||
return staneksGift.place(rootX, rootY, rotation, fragment);
|
||||
},
|
||||
get: function (arootX: any, arootY: any): IActiveFragment | undefined {
|
||||
get: function (arootX: unknown, arootY: unknown): IActiveFragment | undefined {
|
||||
const rootX = helper.number("stanek.get", "rootX", arootX);
|
||||
const rootY = helper.number("stanek.get", "rootY", arootY);
|
||||
helper.updateDynamicRam("get", getRamCost(player, "stanek", "get"));
|
||||
@ -95,7 +95,7 @@ export function NetscriptStanek(player: IPlayer, workerScript: WorkerScript, hel
|
||||
if (fragment !== undefined) return fragment.copy();
|
||||
return undefined;
|
||||
},
|
||||
remove: function (arootX: any, arootY: any): boolean {
|
||||
remove: function (arootX: unknown, arootY: unknown): boolean {
|
||||
const rootX = helper.number("stanek.remove", "rootX", arootX);
|
||||
const rootY = helper.number("stanek.remove", "rootY", arootY);
|
||||
helper.updateDynamicRam("remove", getRamCost(player, "stanek", "remove"));
|
||||
|
80
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
@ -201,65 +201,65 @@ export interface CrimeStats {
|
||||
* @public
|
||||
*/
|
||||
export interface AugmentationStats {
|
||||
/** Multipler to hacking skill */
|
||||
/** Multiplier to hacking skill */
|
||||
hacking_mult?: number;
|
||||
/** Multipler to strength skill */
|
||||
/** Multiplier to strength skill */
|
||||
strength_mult?: number;
|
||||
/** Multipler to defense skill */
|
||||
/** Multiplier to defense skill */
|
||||
defense_mult?: number;
|
||||
/** Multipler to dexterity skill */
|
||||
/** Multiplier to dexterity skill */
|
||||
dexterity_mult?: number;
|
||||
/** Multipler to agility skill */
|
||||
/** Multiplier to agility skill */
|
||||
agility_mult?: number;
|
||||
/** Multipler to charisma skill */
|
||||
/** Multiplier to charisma skill */
|
||||
charisma_mult?: number;
|
||||
/** Multipler to hacking experience gain rate */
|
||||
/** Multiplier to hacking experience gain rate */
|
||||
hacking_exp_mult?: number;
|
||||
/** Multipler to strength experience gain rate */
|
||||
/** Multiplier to strength experience gain rate */
|
||||
strength_exp_mult?: number;
|
||||
/** Multipler to defense experience gain rate */
|
||||
/** Multiplier to defense experience gain rate */
|
||||
defense_exp_mult?: number;
|
||||
/** Multipler to dexterity experience gain rate */
|
||||
/** Multiplier to dexterity experience gain rate */
|
||||
dexterity_exp_mult?: number;
|
||||
/** Multipler to agility experience gain rate */
|
||||
/** Multiplier to agility experience gain rate */
|
||||
agility_exp_mult?: number;
|
||||
/** Multipler to charisma experience gain rate */
|
||||
/** Multiplier to charisma experience gain rate */
|
||||
charisma_exp_mult?: number;
|
||||
/** Multipler to chance of successfully performing a hack */
|
||||
/** Multiplier to chance of successfully performing a hack */
|
||||
hacking_chance_mult?: number;
|
||||
/** Multipler to hacking speed */
|
||||
/** Multiplier to hacking speed */
|
||||
hacking_speed_mult?: number;
|
||||
/** Multipler to amount of money the player gains from hacking */
|
||||
/** Multiplier to amount of money the player gains from hacking */
|
||||
hacking_money_mult?: number;
|
||||
/** Multipler to amount of money injected into servers using grow */
|
||||
/** Multiplier to amount of money injected into servers using grow */
|
||||
hacking_grow_mult?: number;
|
||||
/** Multipler to amount of reputation gained when working */
|
||||
/** Multiplier to amount of reputation gained when working */
|
||||
company_rep_mult?: number;
|
||||
/** Multipler to amount of reputation gained when working */
|
||||
/** Multiplier to amount of reputation gained when working */
|
||||
faction_rep_mult?: number;
|
||||
/** Multipler to amount of money gained from crimes */
|
||||
/** Multiplier to amount of money gained from crimes */
|
||||
crime_money_mult?: number;
|
||||
/** Multipler to crime success rate */
|
||||
/** Multiplier to crime success rate */
|
||||
crime_success_mult?: number;
|
||||
/** Multipler to amount of money gained from working */
|
||||
/** Multiplier to amount of money gained from working */
|
||||
work_money_mult?: number;
|
||||
/** Multipler to amount of money produced by Hacknet Nodes */
|
||||
/** Multiplier to amount of money produced by Hacknet Nodes */
|
||||
hacknet_node_money_mult?: number;
|
||||
/** Multipler to cost of purchasing a Hacknet Node */
|
||||
/** Multiplier to cost of purchasing a Hacknet Node */
|
||||
hacknet_node_purchase_cost_mult?: number;
|
||||
/** Multipler to cost of ram for a Hacknet Node */
|
||||
/** Multiplier to cost of ram for a Hacknet Node */
|
||||
hacknet_node_ram_cost_mult?: number;
|
||||
/** Multipler to cost of core for a Hacknet Node */
|
||||
/** Multiplier to cost of core for a Hacknet Node */
|
||||
hacknet_node_core_cost_mult?: number;
|
||||
/** Multipler to cost of leveling up a Hacknet Node */
|
||||
/** Multiplier to cost of leveling up a Hacknet Node */
|
||||
hacknet_node_level_cost_mult?: number;
|
||||
/** Multipler to Bladeburner max stamina */
|
||||
/** Multiplier to Bladeburner max stamina */
|
||||
bladeburner_max_stamina_mult?: number;
|
||||
/** Multipler to Bladeburner stamina gain rate */
|
||||
/** Multiplier to Bladeburner stamina gain rate */
|
||||
bladeburner_stamina_gain_mult?: number;
|
||||
/** Multipler to effectiveness in Bladeburner Field Analysis */
|
||||
/** Multiplier to effectiveness in Bladeburner Field Analysis */
|
||||
bladeburner_analysis_mult?: number;
|
||||
/** Multipler to success chance in Bladeburner contracts/operations */
|
||||
/** Multiplier to success chance in Bladeburner contracts/operations */
|
||||
bladeburner_success_chance_mult?: number;
|
||||
}
|
||||
|
||||
@ -478,7 +478,7 @@ export interface Server {
|
||||
/** IP Address. Must be unique */
|
||||
ip: string;
|
||||
|
||||
/** Flag indicating whether player is curently connected to this server */
|
||||
/** Flag indicating whether player is currently connected to this server */
|
||||
isConnectedTo: boolean;
|
||||
|
||||
/** RAM (GB) available on this server */
|
||||
@ -621,7 +621,7 @@ export interface BitNodeMultipliers {
|
||||
ScriptHackMoneyGain: number;
|
||||
/** Influences the growth percentage per cycle against a server. */
|
||||
ServerGrowthRate: number;
|
||||
/** Influences the maxmimum money that a server can grow to. */
|
||||
/** Influences the maximum money that a server can grow to. */
|
||||
ServerMaxMoney: number;
|
||||
/** Influences the initial money that a server starts with. */
|
||||
ServerStartingMoney: number;
|
||||
@ -681,7 +681,7 @@ export interface PlayerSkills {
|
||||
dexterity: number;
|
||||
/** Agility level */
|
||||
agility: number;
|
||||
/** Chraisma level */
|
||||
/** Charisma level */
|
||||
charisma: number;
|
||||
/** Intelligence level */
|
||||
intelligence: number;
|
||||
@ -881,7 +881,7 @@ export interface GangTaskStats {
|
||||
baseMoney: number;
|
||||
/** Hacking skill impact on task scaling */
|
||||
hackWeight: number;
|
||||
/** Stength skill impact on task scaling */
|
||||
/** Strength skill impact on task scaling */
|
||||
strWeight: number;
|
||||
/** Defense skill impact on task scaling */
|
||||
defWeight: number;
|
||||
@ -1616,7 +1616,7 @@ export interface Singularity {
|
||||
*
|
||||
*
|
||||
* Returns a boolean indicating whether or not the player is currently performing an
|
||||
* ‘action’. These actions include working for a company/faction, studying at a univeristy,
|
||||
* ‘action’. These actions include working for a company/faction, studying at a university,
|
||||
* working out at a gym, creating a program, committing a crime, or carrying out a Hacking Mission.
|
||||
*
|
||||
* @returns True if the player is currently performing an ‘action’, false otherwise.
|
||||
@ -2606,7 +2606,7 @@ export interface Hacknet {
|
||||
getHashUpgradeLevel(upgName: string): number;
|
||||
|
||||
/**
|
||||
* Get the multipler to study.
|
||||
* Get the multiplier to study.
|
||||
* @remarks
|
||||
* RAM cost: 0 GB
|
||||
*
|
||||
@ -2617,7 +2617,7 @@ export interface Hacknet {
|
||||
getStudyMult(): number;
|
||||
|
||||
/**
|
||||
* Get the multipler to training.
|
||||
* Get the multiplier to training.
|
||||
* @remarks
|
||||
* RAM cost: 0 GB
|
||||
*
|
||||
@ -3111,7 +3111,7 @@ export interface Bladeburner {
|
||||
*/
|
||||
export interface CodingContract {
|
||||
/**
|
||||
* Attemps a coding contract.
|
||||
* Attempts a coding contract.
|
||||
* @remarks
|
||||
* RAM cost: 10 GB
|
||||
*
|
||||
@ -5453,7 +5453,7 @@ export interface NS extends Singularity {
|
||||
* @remarks
|
||||
* RAM cost: 0.3 GB
|
||||
*
|
||||
* Running with no args returns curent script.
|
||||
* Running with no args returns current script.
|
||||
* If you use a PID as the first parameter, the hostname and args parameters are unnecessary.
|
||||
*
|
||||
* @param filename - Optional. Filename or PID of the script.
|
||||
@ -6736,7 +6736,7 @@ interface EmployeeJobs {
|
||||
interface Division {
|
||||
/** Name of the division */
|
||||
name: string;
|
||||
/** Type of division, like Aggriculture */
|
||||
/** Type of division, like Agriculture */
|
||||
type: string;
|
||||
/** Awareness of the division */
|
||||
awareness: number;
|
||||
|
@ -314,7 +314,9 @@ export class Terminal implements ITerminal {
|
||||
this.print("Organization name: " + (!isHacknet ? org : "player"));
|
||||
const hasAdminRights = (!isHacknet && currServ.hasAdminRights) || isHacknet;
|
||||
this.print("Root Access: " + (hasAdminRights ? "YES" : "NO"));
|
||||
this.print("Can run scripts on this host: " + (hasAdminRights ? "YES" : "NO"));
|
||||
const canRunScripts = hasAdminRights && currServ.maxRam > 0;
|
||||
this.print("Can run scripts on this host: " + (canRunScripts ? "YES" : "NO"));
|
||||
this.print("RAM: " + numeralWrapper.formatRAM(currServ.maxRam));
|
||||
if (currServ instanceof Server) {
|
||||
this.print("Backdoor: " + (currServ.backdoorInstalled ? "YES" : "NO"));
|
||||
const hackingSkill = currServ.requiredHackingSkill;
|
||||
|
@ -63,8 +63,7 @@ module.exports = (env, argv) => {
|
||||
new HtmlWebpackPlugin({
|
||||
title: "Bitburner",
|
||||
template: "src/index.html",
|
||||
filename: "../index.html",
|
||||
favicon: "assets/favicon.ico",
|
||||
favicon: "favicon.ico",
|
||||
googleAnalytics: {
|
||||
trackingId: "UA-100157497-1",
|
||||
},
|
||||
@ -137,7 +136,7 @@ module.exports = (env, argv) => {
|
||||
// },
|
||||
entry: entry,
|
||||
output: {
|
||||
path: path.resolve(__dirname, outputDirectory),
|
||||
path: path.resolve(__dirname, "./"),
|
||||
filename: "[name].bundle.js",
|
||||
},
|
||||
module: {
|
||||
@ -159,10 +158,10 @@ module.exports = (env, argv) => {
|
||||
},
|
||||
{
|
||||
test: /\.(png|jpe?g|gif|jp2|webp)$/,
|
||||
loader: 'file-loader',
|
||||
loader: "file-loader",
|
||||
options: {
|
||||
name: '[contenthash].[ext]',
|
||||
outputPath: 'images',
|
||||
name: "[contenthash].[ext]",
|
||||
outputPath: "dist/images",
|
||||
},
|
||||
},
|
||||
],
|
||||
@ -185,7 +184,7 @@ module.exports = (env, argv) => {
|
||||
cacheGroups: {
|
||||
vendor: {
|
||||
test: /[\\/]node_modules[\\/]/,
|
||||
name: `vendor`,
|
||||
name: `${outputDirectory}/vendor`,
|
||||
chunks: "all",
|
||||
},
|
||||
},
|
||||
|