See description

Reverted ToastVariant back to an enum internally. Still exposed to player as just possible strings.
Changed all 1-line documentation comments to actually be 1-line. Moved some because they were not providing documentation for the thing they were trying to.
This commit is contained in:
Snarling
2022-10-04 06:40:10 -04:00
parent 50f14b4f58
commit aa80cf6451
109 changed files with 400 additions and 1096 deletions
+4 -12
View File
@@ -86,9 +86,7 @@ export class Server extends BaseServer {
this.numOpenPortsRequired = params.numOpenPortsRequired != null ? params.numOpenPortsRequired : 5;
}
/**
* Ensures that the server's difficulty (server security) doesn't get too high
*/
/** Ensures that the server's difficulty (server security) doesn't get too high */
capDifficulty(): void {
if (this.hackDifficulty < this.minDifficulty) {
this.hackDifficulty = this.minDifficulty;
@@ -134,25 +132,19 @@ export class Server extends BaseServer {
this.moneyMax *= n;
}
/**
* Strengthens a server's security level (difficulty) by the specified amount
*/
/** Strengthens a server's security level (difficulty) by the specified amount */
fortify(amt: number): void {
this.hackDifficulty += amt;
this.capDifficulty();
}
/**
* Lowers the server's security level (difficulty) by the specified amount)
*/
/** Lowers the server's security level (difficulty) by the specified amount) */
weaken(amt: number): void {
this.hackDifficulty -= amt * BitNodeMultipliers.ServerWeakenRate;
this.capDifficulty();
}
/**
* Serialize the current object to a JSON save state
*/
/** Serialize the current object to a JSON save state */
toJSON(): IReviverValue {
return Generic_toJSON("Server", this);
}