diff --git a/markdown/bitburner.gang.getequipmentcost.md b/markdown/bitburner.gang.getequipmentcost.md index f1573f511..434f63de3 100644 --- a/markdown/bitburner.gang.getequipmentcost.md +++ b/markdown/bitburner.gang.getequipmentcost.md @@ -30,3 +30,5 @@ RAM cost: 2 GB Get the amount of money it takes to purchase a piece of Equipment or an Augmentation. If an invalid Equipment/Augmentation is specified, this function will return Infinity. +This function already takes equipmentCostMult from [GangGenInfo](./bitburner.ganggeninfo.md) into account. + diff --git a/markdown/bitburner.ganggeninfo.equipmentcostmult.md b/markdown/bitburner.ganggeninfo.equipmentcostmult.md new file mode 100644 index 000000000..26a34046a --- /dev/null +++ b/markdown/bitburner.ganggeninfo.equipmentcostmult.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [GangGenInfo](./bitburner.ganggeninfo.md) > [equipmentCostMult](./bitburner.ganggeninfo.equipmentcostmult.md) + +## GangGenInfo.equipmentCostMult property + +Gang gives a discount on all equipment. This multiplier is applied to the equipment cost. + +**Signature:** + +```typescript +equipmentCostMult: number; +``` diff --git a/markdown/bitburner.ganggeninfo.md b/markdown/bitburner.ganggeninfo.md index ba7e4828d..7a2e8876f 100644 --- a/markdown/bitburner.ganggeninfo.md +++ b/markdown/bitburner.ganggeninfo.md @@ -16,6 +16,7 @@ interface GangGenInfo | Property | Modifiers | Type | Description | | --- | --- | --- | --- | +| [equipmentCostMult](./bitburner.ganggeninfo.equipmentcostmult.md) | | number | Gang gives a discount on all equipment. This multiplier is applied to the equipment cost. | | [faction](./bitburner.ganggeninfo.faction.md) | | string | Name of faction that the gang belongs to ("Slum Snakes", etc.) | | [isHacking](./bitburner.ganggeninfo.ishacking.md) | | boolean | Indicating whether or not it's a hacking gang | | [moneyGainRate](./bitburner.ganggeninfo.moneygainrate.md) | | number | Money earned per game cycle | diff --git a/src/Documentation/pages.ts b/src/Documentation/pages.ts index 985d24842..106f38b96 100644 --- a/src/Documentation/pages.ts +++ b/src/Documentation/pages.ts @@ -519,6 +519,7 @@ import nsDoc_bitburner_gangformulas_moneygain_md from "../../markdown/bitburner. import nsDoc_bitburner_gangformulas_respectgain_md from "../../markdown/bitburner.gangformulas.respectgain.md?raw"; import nsDoc_bitburner_gangformulas_wantedlevelgain_md from "../../markdown/bitburner.gangformulas.wantedlevelgain.md?raw"; import nsDoc_bitburner_gangformulas_wantedpenalty_md from "../../markdown/bitburner.gangformulas.wantedpenalty.md?raw"; +import nsDoc_bitburner_ganggeninfo_equipmentcostmult_md from "../../markdown/bitburner.ganggeninfo.equipmentcostmult.md?raw"; import nsDoc_bitburner_ganggeninfo_faction_md from "../../markdown/bitburner.ganggeninfo.faction.md?raw"; import nsDoc_bitburner_ganggeninfo_ishacking_md from "../../markdown/bitburner.ganggeninfo.ishacking.md?raw"; import nsDoc_bitburner_ganggeninfo_md from "../../markdown/bitburner.ganggeninfo.md?raw"; @@ -2021,6 +2022,7 @@ AllPages["nsDoc/bitburner.gangformulas.moneygain.md"] = nsDoc_bitburner_gangform AllPages["nsDoc/bitburner.gangformulas.respectgain.md"] = nsDoc_bitburner_gangformulas_respectgain_md; AllPages["nsDoc/bitburner.gangformulas.wantedlevelgain.md"] = nsDoc_bitburner_gangformulas_wantedlevelgain_md; AllPages["nsDoc/bitburner.gangformulas.wantedpenalty.md"] = nsDoc_bitburner_gangformulas_wantedpenalty_md; +AllPages["nsDoc/bitburner.ganggeninfo.equipmentcostmult.md"] = nsDoc_bitburner_ganggeninfo_equipmentcostmult_md; AllPages["nsDoc/bitburner.ganggeninfo.faction.md"] = nsDoc_bitburner_ganggeninfo_faction_md; AllPages["nsDoc/bitburner.ganggeninfo.ishacking.md"] = nsDoc_bitburner_ganggeninfo_ishacking_md; AllPages["nsDoc/bitburner.ganggeninfo.md"] = nsDoc_bitburner_ganggeninfo_md; diff --git a/src/Gang/ui/EquipmentsSubpage.tsx b/src/Gang/ui/EquipmentsSubpage.tsx index 5b37b3d8e..a11d354cd 100644 --- a/src/Gang/ui/EquipmentsSubpage.tsx +++ b/src/Gang/ui/EquipmentsSubpage.tsx @@ -231,7 +231,7 @@ export function EquipmentsSubpage(): React.ReactElement { } > - Discount: -{formatPercent(1 - 1 / gang.getDiscount())} + Discount: {formatPercent(1 - 1 / gang.getDiscount())} { wantedLevel: gang.wanted, wantedLevelGainRate: gang.wantedGainRate, wantedPenalty: gang.getWantedPenalty(), + equipmentCostMult: 1 / gang.getDiscount(), }; }, getOtherGangInformation: (ctx) => () => { diff --git a/src/ScriptEditor/NetscriptDefinitions.d.ts b/src/ScriptEditor/NetscriptDefinitions.d.ts index fc1ab58fd..0eba5a2af 100644 --- a/src/ScriptEditor/NetscriptDefinitions.d.ts +++ b/src/ScriptEditor/NetscriptDefinitions.d.ts @@ -866,6 +866,8 @@ interface GangGenInfo { territoryWarfareEngaged: boolean; /** Number indicating the current wanted penalty */ wantedPenalty: number; + /** Gang gives a discount on all equipment. This multiplier is applied to the equipment cost. */ + equipmentCostMult: number; } /** @public */ @@ -4329,6 +4331,8 @@ export interface Gang { * Get the amount of money it takes to purchase a piece of Equipment or an Augmentation. * If an invalid Equipment/Augmentation is specified, this function will return Infinity. * + * This function already takes equipmentCostMult from {@link GangGenInfo | GangGenInfo} into account. + * * @param equipName - Name of equipment. * @returns Cost to purchase the specified Equipment/Augmentation (number). Infinity for invalid arguments */