mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-25 18:50:56 +02:00
NETSCRIPT: Add the 'cat' method to 'ns.singularity' (#1999)
This commit is contained in:
@@ -52,6 +52,7 @@ import { calculateEffectiveRequiredReputation } from "../Company/utils";
|
||||
import { calculateFavorAfterResetting } from "../Faction/formulas/favor";
|
||||
import { validBitNodes } from "../BitNode/BitNodeUtils";
|
||||
import { exceptionAlert } from "../utils/helpers/exceptionAlert";
|
||||
import { cat } from "../Terminal/commands/cat";
|
||||
|
||||
export function NetscriptSingularity(): InternalAPI<ISingularity> {
|
||||
const runAfterReset = function (cbScript: ScriptFilePath) {
|
||||
@@ -467,6 +468,12 @@ export function NetscriptSingularity(): InternalAPI<ISingularity> {
|
||||
helpers.checkSingularityAccess(ctx);
|
||||
return Player.getCurrentServer().hostname;
|
||||
},
|
||||
cat: (ctx) => (_filename) => {
|
||||
helpers.checkSingularityAccess(ctx);
|
||||
const filename = helpers.string(ctx, "filename", _filename);
|
||||
const server = Player.getCurrentServer();
|
||||
cat([filename], server);
|
||||
},
|
||||
connect: (ctx) => (_hostname) => {
|
||||
helpers.checkSingularityAccess(ctx);
|
||||
const hostname = helpers.string(ctx, "hostname", _hostname);
|
||||
|
||||
Reference in New Issue
Block a user