From 73a1dd95117bfab04555b4f536e83fbd6da85284 Mon Sep 17 00:00:00 2001 From: Dev Date: Fri, 12 Apr 2024 23:05:27 +0100 Subject: [PATCH] Split out static/dynamic magazine fill options in config set static mag fill to 0% --- project/assets/configs/location.json | 1 + project/src/generators/LocationGenerator.ts | 2 +- project/src/models/eft/common/tables/IQuest.ts | 1 + project/src/models/spt/config/ILocationConfig.ts | 4 +++- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/project/assets/configs/location.json b/project/assets/configs/location.json index 9308a5c8..e518d8c7 100644 --- a/project/assets/configs/location.json +++ b/project/assets/configs/location.json @@ -1146,6 +1146,7 @@ "minFillStaticMagazinePercent": 50, "allowDuplicateItemsInStaticContainers": true, "magazineLootHasAmmoChancePercent": 50, + "staticMagazineLootHasAmmoChancePercent": 0, "looseLootBlacklist": {}, "scavRaidTimeSettings": { "settings": { diff --git a/project/src/generators/LocationGenerator.ts b/project/src/generators/LocationGenerator.ts index cf523064..b185c74b 100644 --- a/project/src/generators/LocationGenerator.ts +++ b/project/src/generators/LocationGenerator.ts @@ -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( diff --git a/project/src/models/eft/common/tables/IQuest.ts b/project/src/models/eft/common/tables/IQuest.ts index 65fabb1b..f544cb9f 100644 --- a/project/src/models/eft/common/tables/IQuest.ts +++ b/project/src/models/eft/common/tables/IQuest.ts @@ -169,6 +169,7 @@ export interface IQuestReward target?: string; items?: Item[]; loyaltyLevel?: number; + /** Hideout area id */ traderId?: string; unknown?: boolean; findInRaid?: boolean; diff --git a/project/src/models/spt/config/ILocationConfig.ts b/project/src/models/spt/config/ILocationConfig.ts index fee9de50..e282ba0f 100644 --- a/project/src/models/spt/config/ILocationConfig.ts +++ b/project/src/models/spt/config/ILocationConfig.ts @@ -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; /** Key: map, value: settings to control how long scav raids are*/