mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-22 23:53:48 +01:00
HacknetServer Grow/Weaken error messages
It may be intentional to use hack for all 3 (ie, assume the player makes the connection that can't hack, also means can't grow or weaken), in which case, disregard. On the other hand, it could've easily been a copy/paste artifact, and this would be more explicitly clear, so thought it was worth bringing up.
This commit is contained in:
parent
07fe3c1906
commit
4ffe5508dc
@ -143,7 +143,7 @@ export class Terminal implements ITerminal {
|
|||||||
startGrow(player: IPlayer): void {
|
startGrow(player: IPlayer): void {
|
||||||
const server = player.getCurrentServer();
|
const server = player.getCurrentServer();
|
||||||
if (server instanceof HacknetServer) {
|
if (server instanceof HacknetServer) {
|
||||||
this.error("Cannot hack this kind of server");
|
this.error("Cannot grow this kind of server");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!(server instanceof Server)) throw new Error("server should be normal server");
|
if (!(server instanceof Server)) throw new Error("server should be normal server");
|
||||||
@ -152,7 +152,7 @@ export class Terminal implements ITerminal {
|
|||||||
startWeaken(player: IPlayer): void {
|
startWeaken(player: IPlayer): void {
|
||||||
const server = player.getCurrentServer();
|
const server = player.getCurrentServer();
|
||||||
if (server instanceof HacknetServer) {
|
if (server instanceof HacknetServer) {
|
||||||
this.error("Cannot hack this kind of server");
|
this.error("Cannot weaken this kind of server");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!(server instanceof Server)) throw new Error("server should be normal server");
|
if (!(server instanceof Server)) throw new Error("server should be normal server");
|
||||||
@ -241,7 +241,7 @@ export class Terminal implements ITerminal {
|
|||||||
if (cancelled) return;
|
if (cancelled) return;
|
||||||
|
|
||||||
if (server instanceof HacknetServer) {
|
if (server instanceof HacknetServer) {
|
||||||
this.error("Cannot hack this kind of server");
|
this.error("Cannot grow this kind of server");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!(server instanceof Server)) throw new Error("server should be normal server");
|
if (!(server instanceof Server)) throw new Error("server should be normal server");
|
||||||
@ -268,7 +268,7 @@ export class Terminal implements ITerminal {
|
|||||||
if (cancelled) return;
|
if (cancelled) return;
|
||||||
|
|
||||||
if (server instanceof HacknetServer) {
|
if (server instanceof HacknetServer) {
|
||||||
this.error("Cannot hack this kind of server");
|
this.error("Cannot weaken this kind of server");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!(server instanceof Server)) throw new Error("server should be normal server");
|
if (!(server instanceof Server)) throw new Error("server should be normal server");
|
||||||
|
Loading…
Reference in New Issue
Block a user