mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-03 22:37:06 +02:00
Player is now a Person
Use correct class inheritance, use class as type and remove IPlayer
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { IPerson } from "src/PersonObjects/IPerson";
|
||||
import { Person } from "src/PersonObjects/Person";
|
||||
import { Player } from "../Player";
|
||||
|
||||
export interface WorkStats {
|
||||
@@ -68,7 +68,7 @@ export const scaleWorkStats = (w: WorkStats, n: number, scaleMoney = true): Work
|
||||
};
|
||||
};
|
||||
|
||||
export const applyWorkStats = (target: IPerson, workStats: WorkStats, cycles: number, source: string): WorkStats => {
|
||||
export const applyWorkStats = (target: Person, workStats: WorkStats, cycles: number, source: string): WorkStats => {
|
||||
const expStats = applyWorkStatsExp(target, workStats, cycles);
|
||||
const gains = {
|
||||
money: workStats.money * cycles,
|
||||
@@ -86,7 +86,7 @@ export const applyWorkStats = (target: IPerson, workStats: WorkStats, cycles: nu
|
||||
return gains;
|
||||
};
|
||||
|
||||
export const applyWorkStatsExp = (target: IPerson, workStats: WorkStats, cycles: number): WorkStats => {
|
||||
export const applyWorkStatsExp = (target: Person, workStats: WorkStats, cycles: number): WorkStats => {
|
||||
const gains = {
|
||||
money: 0,
|
||||
reputation: 0,
|
||||
|
||||
Reference in New Issue
Block a user