mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-20 16:22:56 +02:00
API: Return active SF levels in getOwnedSourceFiles and ResetInfo.ownedSF (#1761)
* DOCUMENTATION: Clarify getOwnedSourceFiles when player overrides active levels of SFs * Return Player.activeSourceFiles instead of Player.sourceFiles * Get rid of zeroes in the map
This commit is contained in:
@@ -88,7 +88,13 @@ export function NetscriptSingularity(): InternalAPI<ISingularity> {
|
||||
}
|
||||
return res;
|
||||
},
|
||||
getOwnedSourceFiles: () => () => [...Player.sourceFiles].map(([n, lvl]) => ({ n, lvl })),
|
||||
getOwnedSourceFiles: () => () => {
|
||||
return [...Player.activeSourceFiles]
|
||||
.filter(([__, activeLevel]) => {
|
||||
return activeLevel > 0;
|
||||
})
|
||||
.map(([n, lvl]) => ({ n, lvl }));
|
||||
},
|
||||
getAugmentationFactions: (ctx) => (_augName) => {
|
||||
helpers.checkSingularityAccess(ctx);
|
||||
const augName = getEnumHelper("AugmentationName").nsGetMember(ctx, _augName);
|
||||
|
||||
Reference in New Issue
Block a user