diff --git a/project/assets/configs/hideout.json b/project/assets/configs/hideout.json index 2a63dd8f..500ab337 100644 --- a/project/assets/configs/hideout.json +++ b/project/assets/configs/hideout.json @@ -32,6 +32,9 @@ "5e2aedd986f7746d404f3aa4" ] }, + "directRewardStackSize": { + "exampleTpl": {"min": 1000, "max": 50000} + }, "rewardItemBlacklist": [], "additionalRewardItemPool": [], "currencyRewards": { diff --git a/project/src/models/spt/config/IHideoutConfig.ts b/project/src/models/spt/config/IHideoutConfig.ts index 2ca05bc2..61dc853a 100644 --- a/project/src/models/spt/config/IHideoutConfig.ts +++ b/project/src/models/spt/config/IHideoutConfig.ts @@ -22,6 +22,7 @@ export interface ICultistCircleSettings { rewardPriceMultiplerMinMax: MinMax; /** Specific reward pool when player sacrificed one specific item */ directRewards: Record; + directRewardStackSize: Record; /** Item tpls to exclude from the reward pool */ rewardItemBlacklist: string[]; /** Item tpls to include in the reward pool */ diff --git a/project/src/services/CircleOfCultistService.ts b/project/src/services/CircleOfCultistService.ts index 232901b0..768aac89 100644 --- a/project/src/services/CircleOfCultistService.ts +++ b/project/src/services/CircleOfCultistService.ts @@ -295,7 +295,7 @@ export class CircleOfCultistService { } // Some items can have variable stack size, e.g. ammo - const stackSize = this.getRewardStackSize(rewardTpl, 20000); + const stackSize = this.getExplicitRewardStackSize(rewardTpl); // Not a weapon/armor, standard single item const rewardItem: Item = { @@ -315,6 +315,15 @@ export class CircleOfCultistService { return rewards; } + protected getExplicitRewardStackSize(rewardTpl: string) { + const settings = this.hideoutConfig.cultistCircle.directRewardStackSize[rewardTpl]; + if (!settings) { + return 1; + } + + return this.randomUtil.getInt(settings.min, settings.max); + } + /** * Get the size of a reward items stack * 1 for everything except ammo, ammo can be between min stack and max stack