mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-27 03:25:44 +02:00
Connect to owned servers from anywhere (#159)
* purchasedByPlayer allows connect-from-anywhere as if the server was backdoored. * Also added optional backdoorInstalled variable to type for BaseServer. This has no runtime effect, but it allows accessing that variable without TS needing us to verify whether it's instanceof Server first.
This commit is contained in:
@@ -93,6 +93,9 @@ export abstract class BaseServer {
|
||||
// Flag indicating whether this is a purchased server
|
||||
purchasedByPlayer = false;
|
||||
|
||||
// Variables that exist only on some types of servers can just be optional.
|
||||
backdoorInstalled?: boolean;
|
||||
|
||||
constructor(params: IConstructorParams = { hostname: "", ip: createRandomIp() }) {
|
||||
this.ip = params.ip ? params.ip : createRandomIp();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user