Merge branch 'dev' of github.com:danielyxie/bitburner into dev

This commit is contained in:
Olivier Gagnon
2022-03-17 14:00:27 -04:00
10 changed files with 23 additions and 26 deletions

View File

@@ -108,6 +108,7 @@ export const RamCosts: IMap<any> = {
hackAnalyzeSecurity: RamCostConstants.ScriptHackAnalyzeRamCost,
hackAnalyzeChance: RamCostConstants.ScriptHackAnalyzeRamCost,
sleep: 0,
asleep: 0,
share: 2.4,
getSharePower: 0.2,
grow: RamCostConstants.ScriptGrowRamCost,

View File

@@ -102,7 +102,7 @@ export class WorkerScript {
scriptRef: RunningScript;
/**
* IP Address on which this script is running
* hostname on which this script is running
*/
hostname: string;

View File

@@ -363,11 +363,11 @@ export class PlayerObject implements IPlayer {
this.companyName = ""; // Name of Company. Must match a key value in Companies ma;
// Servers
this.currentServer = ""; //IP address of Server currently being accessed through termina;
this.purchasedServers = []; //IP Addresses of purchased server;
this.currentServer = ""; //hostname of Server currently being accessed through termina;
this.purchasedServers = []; //hostnames of purchased server;
// Hacknet Nodes/Servers
this.hacknetNodes = []; // Note= For Hacknet Servers, this array holds the IP addresses of the server;
this.hacknetNodes = []; // Note= For Hacknet Servers, this array holds the hostnames of the server;
this.hashManager = new HashManager();
//Factions
@@ -483,11 +483,11 @@ export class PlayerObject implements IPlayer {
// Let's get a hash of some semi-random stuff so we have something unique.
this.identifier = cyrb53(
"I-" +
new Date().getTime() +
navigator.userAgent +
window.innerWidth +
window.innerHeight +
getRandomInt(100, 999),
new Date().getTime() +
navigator.userAgent +
window.innerWidth +
window.innerHeight +
getRandomInt(100, 999),
);
this.init = generalMethods.init;

View File

@@ -2785,7 +2785,7 @@ export interface Bladeburner {
*
* Note that this is meant to be used for Contracts and Operations.
* This function will return Infinity for actions such as Training and Field Analysis.
* This function will return 1 for BlackOps not yet completed regardless of wether
* This function will return 1 for BlackOps not yet completed regardless of whether
* the player has the required rank to attempt the mission or not.
*
* @param type - Type of action.
@@ -2825,7 +2825,7 @@ export interface Bladeburner {
getActionCurrentLevel(type: string, name: string): number;
/**
* Get wether an action is set to autolevel.
* Get whether an action is set to autolevel.
* @remarks
* RAM cost: 4 GB
*

View File

@@ -76,7 +76,7 @@ export class BaseServer {
// Script files on this Server
scripts: Script[] = [];
// Contains the IP Addresses of all servers that are immediately
// Contains the hostnames of all servers that are immediately
// reachable from this one
serversOnNetwork: string[] = [];

View File

@@ -190,7 +190,7 @@ export const HelpTexts: IMap<string[]> = {
connect: [
"Usage: connect [hostname]",
" ",
"Connect to a remote server. The hostname or IP address of the remote server must be given as the argument ",
"Connect to a remote server. The hostname of the remote server must be given as the argument ",
"to this command. Note that only servers that are immediately adjacent to the current server in the network can be connected to. To ",
"see which servers can be connected to, use the 'scan' command.",
" ",

View File

@@ -167,7 +167,7 @@ export function ls(
function postSegments(segments: string[], style?: any, linked?: boolean): void {
const maxLength = Math.max(...segments.map((s) => s.length)) + 1;
const filesPerRow = Math.floor(80 / maxLength);
const filesPerRow = Math.ceil(80 / maxLength);
for (let i = 0; i < segments.length; i++) {
let row = "";
for (let col = 0; col < filesPerRow; col++) {

View File

@@ -56,7 +56,7 @@ export function ServerAccordions(props: IProps): React.ReactElement {
for (const ws of props.workerScripts.values()) {
const server = GetServer(ws.hostname);
if (server == null) {
console.warn(`WorkerScript has invalid IP address: ${ws.hostname}`);
console.warn(`WorkerScript has invalid hostname: ${ws.hostname}`);
continue;
}