mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-09 17:23:53 +01:00
MISC: Gang Expenses category in MoneySource (#1043)
This commit is contained in:
parent
51ac4d009c
commit
cb7c75a3ce
@ -311,7 +311,7 @@ export class GangMember {
|
|||||||
if (this.augmentations.includes(upg.name) || this.upgrades.includes(upg.name)) return false;
|
if (this.augmentations.includes(upg.name) || this.upgrades.includes(upg.name)) return false;
|
||||||
|
|
||||||
if (Player.money < Player.gang.getUpgradeCost(upg)) 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") {
|
if (upg.type === "g") {
|
||||||
this.augmentations.push(upg.name);
|
this.augmentations.push(upg.name);
|
||||||
} else {
|
} else {
|
||||||
|
1
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
1
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
@ -89,6 +89,7 @@ interface MoneySource {
|
|||||||
corporation: number;
|
corporation: number;
|
||||||
crime: number;
|
crime: number;
|
||||||
gang: number;
|
gang: number;
|
||||||
|
gang_expenses: number;
|
||||||
hacking: number;
|
hacking: number;
|
||||||
hacknet: number;
|
hacknet: number;
|
||||||
hacknet_expenses: number;
|
hacknet_expenses: number;
|
||||||
|
@ -151,6 +151,9 @@ function MoneyModal({ open, onClose }: IMoneyModalProps): React.ReactElement {
|
|||||||
if (src.gang) {
|
if (src.gang) {
|
||||||
parts.push([`Gang:`, <Money key="gang" money={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) {
|
if (src.hacking) {
|
||||||
parts.push([`Hacking:`, <Money key="hacking" money={src.hacking} />]);
|
parts.push([`Hacking:`, <Money key="hacking" money={src.hacking} />]);
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,7 @@ export class MoneySourceTracker {
|
|||||||
corporation = 0;
|
corporation = 0;
|
||||||
crime = 0;
|
crime = 0;
|
||||||
gang = 0;
|
gang = 0;
|
||||||
|
gang_expenses = 0;
|
||||||
hacking = 0;
|
hacking = 0;
|
||||||
hacknet = 0;
|
hacknet = 0;
|
||||||
hacknet_expenses = 0;
|
hacknet_expenses = 0;
|
||||||
|
@ -1698,6 +1698,7 @@ exports[`Check Save File Continuity PlayerSave continuity 1`] = `
|
|||||||
"corporation": 0,
|
"corporation": 0,
|
||||||
"crime": 0,
|
"crime": 0,
|
||||||
"gang": 0,
|
"gang": 0,
|
||||||
|
"gang_expenses": 0,
|
||||||
"hacking": 0,
|
"hacking": 0,
|
||||||
"hacknet": 0,
|
"hacknet": 0,
|
||||||
"hacknet_expenses": 0,
|
"hacknet_expenses": 0,
|
||||||
@ -1722,6 +1723,7 @@ exports[`Check Save File Continuity PlayerSave continuity 1`] = `
|
|||||||
"corporation": 0,
|
"corporation": 0,
|
||||||
"crime": 0,
|
"crime": 0,
|
||||||
"gang": 0,
|
"gang": 0,
|
||||||
|
"gang_expenses": 0,
|
||||||
"hacking": 0,
|
"hacking": 0,
|
||||||
"hacknet": 0,
|
"hacknet": 0,
|
||||||
"hacknet_expenses": 0,
|
"hacknet_expenses": 0,
|
||||||
|
Loading…
Reference in New Issue
Block a user