Added ragfair.dynamic.barter.makeSingleStackOnly config option, default to true

This commit is contained in:
Dev 2024-10-22 20:51:22 +01:00
parent 9f6ec573d6
commit 1aac4a0635
3 changed files with 6 additions and 0 deletions

View File

@ -39,6 +39,7 @@
"itemCountMax": 3,
"priceRangeVariancePercent": 15,
"minRoubleCostToBecomeBarter": 20000,
"makeSingleStackOnly": true,
"itemTypeBlacklist": [
"55802f4a4bdc2ddb688b4569",
"55802f3e4bdc2de7118b4584",

View File

@ -505,6 +505,9 @@ export class RagfairOfferGenerator {
// Apply randomised properties
this.randomiseOfferItemUpdProperties(randomUserId, itemWithChildren, itemDetails[1]);
barterScheme = this.createBarterBarterScheme(itemWithChildren, this.ragfairConfig.dynamic.barter);
if (this.ragfairConfig.dynamic.barter.makeSingleStackOnly) {
itemWithChildren[0].upd.StackObjectsCount = 1;
}
} else {
// Apply randomised properties
this.randomiseOfferItemUpdProperties(randomUserId, itemWithChildren, itemDetails[1]);

View File

@ -97,6 +97,8 @@ export interface IBarterDetails {
priceRangeVariancePercent: number;
/** Min rouble price for an offer to be considered for turning into a barter */
minRoubleCostToBecomeBarter: number;
/** Should barter offers only single stack */
makeSingleStackOnly: boolean;
/** Item Tpls to never be turned into a barter */
itemTypeBlacklist: string[];
}