MISC: Apply SF override to charisma calculations (#2642)

This commit is contained in:
catloversg
2026-04-10 07:25:51 +07:00
committed by GitHub
parent d6299becd6
commit d25b1676ab
4 changed files with 7 additions and 3 deletions
@@ -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;
}
+1 -1
View File
@@ -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;