mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-18 20:25:45 +01:00
FORMULAS: Removing the possible exception when gymGains/universityGains is called (#898)
This commit is contained in:
parent
87e2f5c23b
commit
023f32bce3
@ -85,7 +85,7 @@ export function calculateFactionExp(person: IPerson, type: FactionWorkType): Wor
|
||||
export function calculateCost(classs: Class, location: Location): number {
|
||||
const serverMeta = serverMetadata.find((s) => s.specialName === location.name);
|
||||
const server = GetServer(serverMeta ? serverMeta.hostname : "");
|
||||
const discount = (server as Server).backdoorInstalled ? 0.9 : 1;
|
||||
const discount = (server as Server)?.backdoorInstalled ? 0.9 : 1;
|
||||
return classs.earnings.money * location.costMult * discount;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user