more fixes

This commit is contained in:
Olivier Gagnon 2021-11-26 18:54:06 -05:00
parent f17870926b
commit b941753e1b
3 changed files with 8 additions and 8 deletions

@ -349,13 +349,13 @@ export const FactionInfos: IMap<FactionInfo> = {
{" ; d' o `b ; "}<br /> {" ; d' o `b ; "}<br />
{" / d; `b| "}<br /> {" / d; `b| "}<br />
{" /, $; @ `: "}<br /> {" /, $; @ `: "}<br />
{" /' $$ ; "}<br /> {" /' $/ ; "}<br />
{" .' $$b o | "}<br /> {" .' $/b o | "}<br />
{" .' d$$$; : "}<br /> {" .' d$/$; : "}<br />
{" / .d$$$$; , ; "}<br /> {" / .d/$/$; , ; "}<br />
{" d .dNITESEC $ | "}<br /> {" d .dNITESEC $ | "}<br />
{" :bp.__.gNITESEC$$ :$ ; "}<br /> {" :bp.__.gNITESEC/$ :$ ; "}<br />
{" NITESECNITESECNIT $$b : "}<br /></>, {" NITESECNITESECNIT /$b : "}<br /></>,
[], [],
true, true,
true, true,

@ -47,7 +47,7 @@ export function purchaseHacknet(player: IPlayer): number {
throw new Error(`Calculated cost of purchasing HacknetServer is NaN`); throw new Error(`Calculated cost of purchasing HacknetServer is NaN`);
} }
if (!player.canAfford(cost)) { if (!player.canAfford(cost) || numOwned >= HacknetServerConstants.MaxServers) {
return -1; return -1;
} }
player.loseMoney(cost, "hacknet_expenses"); player.loseMoney(cost, "hacknet_expenses");

@ -5,7 +5,7 @@ export const recentScripts: RecentScript[] = [];
export function AddRecentScript(workerScript: WorkerScript): void { export function AddRecentScript(workerScript: WorkerScript): void {
if (recentScripts.find((r) => r.pid === workerScript.pid)) return; if (recentScripts.find((r) => r.pid === workerScript.pid)) return;
recentScripts.push({ recentScripts.unshift({
filename: workerScript.name, filename: workerScript.name,
args: workerScript.args, args: workerScript.args,
pid: workerScript.pid, pid: workerScript.pid,