Change base mult from 2 to 1 because it messes with a lot of items

This commit is contained in:
Platinum 2023-02-11 17:32:31 +11:00
parent 04f806e123
commit 1bb650af91
3 changed files with 7 additions and 6 deletions

View File

@ -1,6 +1,6 @@
{
"baselineBulletId": "59e6906286f7746c9f75e847",
"baselineBulletPrice": 2000,
"baselineBulletPrice": 3000,
"bulletDamageMultiplierRedutionFactor": 0.7,
"baselineArmourId": "5c0e655586f774045612eeb2",
"baselineArmourWeight": 10,

View File

@ -1,8 +1,7 @@
{
"startDelayInSeconds": 7,
"disableBsgBlacklist": true,
"canSellBlacklistedItemsOnFlea": true,
"blacklistedItemPriceMultiplier": 2,
"blacklistedItemPriceMultiplier": 1,
"blacklistedAmmoAdditionalPriceMultiplier": 1,
"blacklistedArmourAdditionalPriceMultiplier": 1,
"customItemConfigs": [

View File

@ -86,7 +86,7 @@ class TheBlacklistMod implements IPostDBLoadMod {
const itemProps = item._props;
if (!itemProps.CanSellOnRagfair) {
itemProps.CanSellOnRagfair = config.canSellBlacklistedItemsOnFlea;
itemProps.CanSellOnRagfair = config.disableBsgBlacklist;
prices[item._id] = this.getUpdatedPrice(item, prices);
@ -111,7 +111,7 @@ class TheBlacklistMod implements IPostDBLoadMod {
});
}
private getUpdatedPrice(item: ITemplateItem, prices: Record<string, number>) {
private getUpdatedPrice(item: ITemplateItem, prices: Record<string, number>): number | undefined {
// Note that this price can be affected by other mods like Lua's market updater.
const currentFleaPrice = prices[item._id];
let newPrice: number;
@ -122,7 +122,9 @@ class TheBlacklistMod implements IPostDBLoadMod {
newPrice = this.getUpdatedArmourPrice(item, prices);
}
return newPrice ? newPrice * config.blacklistedItemPriceMultiplier : currentFleaPrice;
// Avoids NaN. Also we shouldn't have any prices of 0.
const price = newPrice || currentFleaPrice;
return price && price * config.blacklistedItemPriceMultiplier;
}
private getUpdatedAmmoPrice(item: ITemplateItem) {