mirror of
https://github.com/sp-tarkov/server.git
synced 2025-02-12 15:50:42 -05:00
Added system to allow overriding flea prices via config
This commit is contained in:
parent
3662767972
commit
c40a4aa7cb
@ -336,7 +336,13 @@
|
|||||||
"handbookPriceOverMultiplier": 11,
|
"handbookPriceOverMultiplier": 11,
|
||||||
"newPriceHandbookMultiplier": 11
|
"newPriceHandbookMultiplier": 11
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"itemPriceOverrideRouble":{
|
||||||
|
"66bc98a01a47be227a5e956e": 500000,
|
||||||
|
"63a8970d7108f713591149f5": 50000,
|
||||||
|
"63a898a328e385334e0640a5": 100000,
|
||||||
|
"63a897c6b1ff6e29734fcc95": 200000
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"tieredFlea": {
|
"tieredFlea": {
|
||||||
"enabled": false,
|
"enabled": false,
|
||||||
|
@ -80,6 +80,8 @@ export interface IDynamic {
|
|||||||
blacklist: IRagfairBlacklist;
|
blacklist: IRagfairBlacklist;
|
||||||
/** Dict of price limits keyed by item type */
|
/** Dict of price limits keyed by item type */
|
||||||
unreasonableModPrices: Record<string, IUnreasonableModPrices>;
|
unreasonableModPrices: Record<string, IUnreasonableModPrices>;
|
||||||
|
/** Custom rouble prices for items to override values from prices.json */
|
||||||
|
itemPriceOverrideRouble: Record<string, number>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IPriceRanges {
|
export interface IPriceRanges {
|
||||||
|
@ -118,14 +118,8 @@ export class PostDbLoadService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.addMissingTraderBuyRestrictionMaxValue();
|
this.addMissingTraderBuyRestrictionMaxValue();
|
||||||
}
|
|
||||||
|
|
||||||
protected addMissingTraderBuyRestrictionMaxValue(): void {
|
this.applyFleaPriceOverrides();
|
||||||
this.databaseService.getGlobals().config.TradingSettings.BuyRestrictionMaxBonus.unheard_edition = {
|
|
||||||
multiplier:
|
|
||||||
this.databaseService.getGlobals().config.TradingSettings.BuyRestrictionMaxBonus.edge_of_darkness
|
|
||||||
.multiplier,
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected adjustMinReserveRaiderSpawnChance(): void {
|
protected adjustMinReserveRaiderSpawnChance(): void {
|
||||||
@ -510,4 +504,19 @@ export class PostDbLoadService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected addMissingTraderBuyRestrictionMaxValue(): void {
|
||||||
|
this.databaseService.getGlobals().config.TradingSettings.BuyRestrictionMaxBonus.unheard_edition = {
|
||||||
|
multiplier:
|
||||||
|
this.databaseService.getGlobals().config.TradingSettings.BuyRestrictionMaxBonus.edge_of_darkness
|
||||||
|
.multiplier,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
protected applyFleaPriceOverrides() {
|
||||||
|
const fleaPrices = this.databaseService.getPrices();
|
||||||
|
for (const [key, value] of Object.entries(this.ragfairConfig.dynamic.itemPriceOverrideRouble)) {
|
||||||
|
fleaPrices[key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user