Implemented getExplicitRewardStackSize()
for getExplicitRewards()
This commit is contained in:
parent
94e990cedb
commit
a5679140aa
@ -32,6 +32,9 @@
|
|||||||
"5e2aedd986f7746d404f3aa4"
|
"5e2aedd986f7746d404f3aa4"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"directRewardStackSize": {
|
||||||
|
"exampleTpl": {"min": 1000, "max": 50000}
|
||||||
|
},
|
||||||
"rewardItemBlacklist": [],
|
"rewardItemBlacklist": [],
|
||||||
"additionalRewardItemPool": [],
|
"additionalRewardItemPool": [],
|
||||||
"currencyRewards": {
|
"currencyRewards": {
|
||||||
|
@ -22,6 +22,7 @@ export interface ICultistCircleSettings {
|
|||||||
rewardPriceMultiplerMinMax: MinMax;
|
rewardPriceMultiplerMinMax: MinMax;
|
||||||
/** Specific reward pool when player sacrificed one specific item */
|
/** Specific reward pool when player sacrificed one specific item */
|
||||||
directRewards: Record<string, string[]>;
|
directRewards: Record<string, string[]>;
|
||||||
|
directRewardStackSize: Record<string, MinMax>;
|
||||||
/** Item tpls to exclude from the reward pool */
|
/** Item tpls to exclude from the reward pool */
|
||||||
rewardItemBlacklist: string[];
|
rewardItemBlacklist: string[];
|
||||||
/** Item tpls to include in the reward pool */
|
/** Item tpls to include in the reward pool */
|
||||||
|
@ -295,7 +295,7 @@ export class CircleOfCultistService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Some items can have variable stack size, e.g. ammo
|
// 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
|
// Not a weapon/armor, standard single item
|
||||||
const rewardItem: Item = {
|
const rewardItem: Item = {
|
||||||
@ -315,6 +315,15 @@ export class CircleOfCultistService {
|
|||||||
return rewards;
|
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
|
* Get the size of a reward items stack
|
||||||
* 1 for everything except ammo, ammo can be between min stack and max stack
|
* 1 for everything except ammo, ammo can be between min stack and max stack
|
||||||
|
Loading…
x
Reference in New Issue
Block a user