Split out static/dynamic magazine fill options in config

set static mag fill to 0%
This commit is contained in:
Dev 2024-04-12 23:05:27 +01:00
parent a33325cbf5
commit 73a1dd9511
4 changed files with 6 additions and 2 deletions

View File

@ -1146,6 +1146,7 @@
"minFillStaticMagazinePercent": 50,
"allowDuplicateItemsInStaticContainers": true,
"magazineLootHasAmmoChancePercent": 50,
"staticMagazineLootHasAmmoChancePercent": 0,
"looseLootBlacklist": {},
"scavRaidTimeSettings": {
"settings": {

View File

@ -871,7 +871,7 @@ export class LocationGenerator
// Create array with just magazine
const magazineItem: Item[] = [{ _id: this.objectId.generate(), _tpl: chosenTpl }];
if (this.randomUtil.getChance100(this.locationConfig.magazineLootHasAmmoChancePercent))
if (this.randomUtil.getChance100(this.locationConfig.staticMagazineLootHasAmmoChancePercent))
{
// Add randomised amount of cartridges
this.itemHelper.fillMagazineWithRandomCartridge(

View File

@ -169,6 +169,7 @@ export interface IQuestReward
target?: string;
items?: Item[];
loyaltyLevel?: number;
/** Hideout area id */
traderId?: string;
unknown?: boolean;
findInRaid?: boolean;

View File

@ -36,8 +36,10 @@ export interface ILocationConfig extends IBaseConfig
/** How full must a random static magazine be %*/
minFillStaticMagazinePercent: number;
allowDuplicateItemsInStaticContainers: boolean;
/** Chance loose/static magazines have ammo in them */
/** Chance loose magazines have ammo in them TODO - rename to dynamicMagazineLootHasAmmoChancePercent */
magazineLootHasAmmoChancePercent: number;
/** Chance static magazines have ammo in them */
staticMagazineLootHasAmmoChancePercent: number;
/** Key: map, value: loose loot ids to ignore */
looseLootBlacklist: Record<string, string[]>;
/** Key: map, value: settings to control how long scav raids are*/