mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-23 17:53:00 +02:00
create program and grafting done
This commit is contained in:
@@ -7,6 +7,7 @@ import { getGraftingAvailableAugs, calculateGraftingTimeWithBonus } from "../Per
|
||||
import { IPlayer } from "../PersonObjects/IPlayer";
|
||||
import { Grafting as IGrafting } from "../ScriptEditor/NetscriptDefinitions";
|
||||
import { Router } from "../ui/GameRoot";
|
||||
import { GraftingWork } from "../Work/GraftingWork";
|
||||
|
||||
export function NetscriptGrafting(player: IPlayer): InternalAPI<IGrafting> {
|
||||
const checkGraftingAPIAccess = (ctx: NetscriptContext): void => {
|
||||
@@ -79,8 +80,13 @@ export function NetscriptGrafting(player: IPlayer): InternalAPI<IGrafting> {
|
||||
return false;
|
||||
}
|
||||
|
||||
player.loseMoney(craftableAug.cost, "augmentations");
|
||||
player.startGraftAugmentationWork(augName, craftableAug.time);
|
||||
player.startNEWWork(
|
||||
new GraftingWork({
|
||||
singularity: true,
|
||||
augmentation: augName,
|
||||
player: player,
|
||||
}),
|
||||
);
|
||||
|
||||
if (focus) {
|
||||
player.startFocusing();
|
||||
|
||||
Reference in New Issue
Block a user