fix a few things

This commit is contained in:
Olivier Gagnon
2021-08-20 14:39:24 -04:00
parent 6e1100750e
commit dcddc0c2d5
10 changed files with 77 additions and 51 deletions
+1 -1
View File
@@ -93,7 +93,7 @@ export function ContractElem(props: IProps): React.ReactElement {
<pre style={{display: 'inline-block'}}>
<span dangerouslySetInnerHTML={{__html: props.action.desc}} />
<br /><br />
Estimated success chance: {formatNumber(estimatedSuccessChance*100, 1)}% {props.action.isStealth?stealthIcon:<></>}${props.action.isKill?killIcon:<></>}<br />
Estimated success chance: {formatNumber(estimatedSuccessChance*100, 1)}% {props.action.isStealth?stealthIcon:<></>}{props.action.isKill?killIcon:<></>}<br />
Time Required: {convertTimeMsToTimeElapsedString(actionTime*1000)}<br />
Contracts remaining: {Math.floor(props.action.count)}<br />
Successes: {props.action.successes}<br />
+5
View File
@@ -254,4 +254,9 @@ export const CONSTANTS: IMap<any> = {
* Fix weird scrolling in the new Bladeburner React console.
* nerf noodle bar
`,
// hotfix
// Remove dollar sign in blade contract UI element
// Can no longer create file that break the filesystem.
// Milestones now call the faction CyberSec instead of CSEC
}
+1 -1
View File
@@ -36,7 +36,7 @@ export const Milestones: Milestone[] = [
},
},
{
title: "Install all the Augmentations from CSEC",
title: "Install all the Augmentations from CyberSec",
fulfilled: (p: IPlayer): boolean => {
return allFactionAugs(p, Factions["CyberSec"]);
},
+2 -1
View File
@@ -172,6 +172,7 @@ import { isString } from "../utils/helpers/isString";
import { createElement } from "../utils/uiHelpers/createElement";
import { createPopup } from "../utils/uiHelpers/createPopup";
import { removeElementById } from "../utils/uiHelpers/removeElementById";
import { removeLeadingSlash } from "./Terminal/DirectoryHelpers";
const defaultInterpreter = new Interpreter('', () => undefined);
@@ -2149,7 +2150,7 @@ function NetscriptFunctions(workerScript) {
}
return port.write(data);
} else if (isString(port)) { // Write to script or text file
const fn = port;
const fn = removeLeadingSlash(port);
if (!isValidFilePath(fn)) {
throw makeRuntimeErrorMsg("write", `Invalid filepath: ${fn}`);
}