MISC: Gang Expenses category in MoneySource (#1043)

This commit is contained in:
deansvendsen 2024-01-24 10:18:56 +11:00 committed by GitHub
parent 51ac4d009c
commit cb7c75a3ce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 8 additions and 1 deletions

@ -311,7 +311,7 @@ export class GangMember {
if (this.augmentations.includes(upg.name) || this.upgrades.includes(upg.name)) return false;
if (Player.money < Player.gang.getUpgradeCost(upg)) return false;
Player.loseMoney(Player.gang.getUpgradeCost(upg), "gang");
Player.loseMoney(Player.gang.getUpgradeCost(upg), "gang_expenses");
if (upg.type === "g") {
this.augmentations.push(upg.name);
} else {

@ -89,6 +89,7 @@ interface MoneySource {
corporation: number;
crime: number;
gang: number;
gang_expenses: number;
hacking: number;
hacknet: number;
hacknet_expenses: number;

@ -151,6 +151,9 @@ function MoneyModal({ open, onClose }: IMoneyModalProps): React.ReactElement {
if (src.gang) {
parts.push([`Gang:`, <Money key="gang" money={src.gang} />]);
}
if (src.gang_expenses) {
parts.push([`Gang Expenses:`, <Money key="gang-expenses" money={src.gang_expenses} />]);
}
if (src.hacking) {
parts.push([`Hacking:`, <Money key="hacking" money={src.hacking} />]);
}

@ -12,6 +12,7 @@ export class MoneySourceTracker {
corporation = 0;
crime = 0;
gang = 0;
gang_expenses = 0;
hacking = 0;
hacknet = 0;
hacknet_expenses = 0;

@ -1698,6 +1698,7 @@ exports[`Check Save File Continuity PlayerSave continuity 1`] = `
"corporation": 0,
"crime": 0,
"gang": 0,
"gang_expenses": 0,
"hacking": 0,
"hacknet": 0,
"hacknet_expenses": 0,
@ -1722,6 +1723,7 @@ exports[`Check Save File Continuity PlayerSave continuity 1`] = `
"corporation": 0,
"crime": 0,
"gang": 0,
"gang_expenses": 0,
"hacking": 0,
"hacknet": 0,
"hacknet_expenses": 0,