Show error when missing caliber data in drawAmmoTpl()
This commit is contained in:
parent
45c6d4dfe7
commit
628d817348
@ -1105,7 +1105,13 @@ export class ItemHelper
|
||||
protected drawAmmoTpl(caliber: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>): string
|
||||
{
|
||||
const ammoArray = new ProbabilityObjectArray<string>(this.mathUtil, this.jsonUtil);
|
||||
for (const icd of staticAmmoDist[caliber])
|
||||
const ammos = staticAmmoDist[caliber];
|
||||
if (!ammos)
|
||||
{
|
||||
this.logger.error(`missing caliber data for: ${caliber}`);
|
||||
}
|
||||
|
||||
for (const icd of ammos)
|
||||
{
|
||||
ammoArray.push(new ProbabilityObject(icd.tpl, icd.relativeProbability));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user