mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-04 06:37:49 +02:00
MISC: Apply SF override to charisma calculations (#2642)
This commit is contained in:
@@ -602,6 +602,10 @@ export function canAccessCotMG(this: PlayerObject): boolean {
|
||||
return canAccessBitNodeFeature(13);
|
||||
}
|
||||
|
||||
/**
|
||||
* To ensure the "SF override" option work properly, this function should only be used in special cases. In most cases,
|
||||
* activeSourceFileLvl should be used instead.
|
||||
*/
|
||||
export function sourceFileLvl(this: PlayerObject, n: number): number {
|
||||
return this.sourceFiles.get(n) ?? 0;
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ export function getFactionFieldWorkRepGain(p: IPerson, favor: number): number {
|
||||
}
|
||||
|
||||
function getDarknetCharismaBonus(p: IPerson, scalar: number = 1): number {
|
||||
if (Player.sourceFileLvl(15) >= 3) {
|
||||
if (Player.activeSourceFileLvl(15) >= 3) {
|
||||
return p.skills.charisma * scalar;
|
||||
}
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user