mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-02 22:07:06 +02:00
commit1
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import { Programs } from "./Programs";
|
||||
import { Program } from "./Program";
|
||||
|
||||
import { IPlayer } from "../PersonObjects/IPlayer";
|
||||
import { Player } from "../Player";
|
||||
|
||||
//Returns the programs this player can create.
|
||||
export function getAvailableCreatePrograms(player: IPlayer): Program[] {
|
||||
export function getAvailableCreatePrograms(): Program[] {
|
||||
const programs: Program[] = [];
|
||||
for (const key of Object.keys(Programs)) {
|
||||
// Non-creatable program
|
||||
@@ -12,10 +12,10 @@ export function getAvailableCreatePrograms(player: IPlayer): Program[] {
|
||||
if (create == null) continue;
|
||||
|
||||
// Already has program
|
||||
if (player.hasProgram(Programs[key].name)) continue;
|
||||
if (Player.hasProgram(Programs[key].name)) continue;
|
||||
|
||||
// Does not meet requirements
|
||||
if (!create.req(player)) continue;
|
||||
if (!create.req()) continue;
|
||||
|
||||
programs.push(Programs[key]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user