mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 09:33:49 +01:00
resolved merge issue
This commit is contained in:
parent
3255768259
commit
6dc7dc42c5
@ -22,6 +22,7 @@
|
||||
"@types/escodegen": "^0.0.7",
|
||||
"@types/numeral": "0.0.25",
|
||||
"@types/react": "^17.0.21",
|
||||
"@types/react-beautiful-dnd": "^13.1.2",
|
||||
"@types/react-dom": "^17.0.9",
|
||||
"@types/react-resizable": "^1.7.3",
|
||||
"acorn": "^8.4.1",
|
||||
@ -41,6 +42,7 @@
|
||||
"numeral": "2.0.6",
|
||||
"raw-loader": "^4.0.2",
|
||||
"react": "^17.0.2",
|
||||
"react-beautiful-dnd": "^13.1.0",
|
||||
"react-dom": "^17.0.2",
|
||||
"react-draggable": "^4.4.4",
|
||||
"react-resizable": "^3.0.4",
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -11,7 +11,7 @@ export function rm(
|
||||
server: BaseServer,
|
||||
args: (string | number | boolean)[],
|
||||
): void {
|
||||
if (args.length !== 1) {
|
||||
if (args.length < 1) {
|
||||
terminal.error("Incorrect number of arguments. Usage: rm [program/script]");
|
||||
return;
|
||||
}
|
||||
@ -25,6 +25,14 @@ export function rm(
|
||||
try {
|
||||
delTarget = terminal.getFilepath(args[0] + "");
|
||||
status = server.removeFile(delTarget);
|
||||
|
||||
// Check if we should remove it from both the text and script arrays
|
||||
if(args[1] === '-tas') {
|
||||
let fileIndex = server.scripts.findIndex(script => script.filename === (args[0] + ""));
|
||||
if(fileIndex !== -1) {
|
||||
server.scripts.splice(fileIndex, 1);
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
status = {
|
||||
res: false,
|
||||
|
@ -43,8 +43,10 @@ export function PromptManager(): React.ReactElement {
|
||||
{prompt != null && (
|
||||
<Modal open={true} onClose={close}>
|
||||
<Typography>{prompt.txt}</Typography>
|
||||
<Button onClick={yes}>Yes</Button>
|
||||
<Button onClick={no}>No</Button>
|
||||
<div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center', paddingTop: '10px' }}>
|
||||
<Button style={{ marginRight: 'auto' }} onClick={yes}>Yes</Button>
|
||||
<Button onClick={no}>No</Button>
|
||||
</div>
|
||||
</Modal>
|
||||
)}
|
||||
</>
|
||||
|
Loading…
Reference in New Issue
Block a user