Added getMoneyTpls()
This commit is contained in:
parent
7497f0d40f
commit
bda69a5563
@ -15,7 +15,6 @@ import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "@
|
|||||||
import { Item } from "@spt/models/eft/common/tables/IItem";
|
import { Item } from "@spt/models/eft/common/tables/IItem";
|
||||||
import { BaseClasses } from "@spt/models/enums/BaseClasses";
|
import { BaseClasses } from "@spt/models/enums/BaseClasses";
|
||||||
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
||||||
import { Money } from "@spt/models/enums/Money";
|
|
||||||
import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig";
|
import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig";
|
||||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "@spt/servers/ConfigServer";
|
import { ConfigServer } from "@spt/servers/ConfigServer";
|
||||||
@ -424,9 +423,9 @@ export class LocationLootGenerator
|
|||||||
.map((x) => x.itemTpl);
|
.map((x) => x.itemTpl);
|
||||||
|
|
||||||
// Draw random loot
|
// Draw random loot
|
||||||
// Money spawn more than once in container
|
// Allow money to spawn more than once in container
|
||||||
let failedToFitCount = 0;
|
let failedToFitCount = 0;
|
||||||
const locklist = [Money.ROUBLES, Money.DOLLARS, Money.EUROS, Money.GP];
|
const locklist = this.itemHelper.getMoneyTpls();
|
||||||
|
|
||||||
// Choose items to add to container, factor in weighting + lock money down
|
// Choose items to add to container, factor in weighting + lock money down
|
||||||
// Filter out items picked that're already in the above `tplsForced` array
|
// Filter out items picked that're already in the above `tplsForced` array
|
||||||
|
@ -8,6 +8,7 @@ import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
|
|||||||
import { BaseClasses } from "@spt/models/enums/BaseClasses";
|
import { BaseClasses } from "@spt/models/enums/BaseClasses";
|
||||||
import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots";
|
import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots";
|
||||||
import { ItemTpl } from "@spt/models/enums/ItemTpl";
|
import { ItemTpl } from "@spt/models/enums/ItemTpl";
|
||||||
|
import { Money } from "@spt/models/enums/Money";
|
||||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||||
import { DatabaseService } from "@spt/services/DatabaseService";
|
import { DatabaseService } from "@spt/services/DatabaseService";
|
||||||
import { ItemBaseClassService } from "@spt/services/ItemBaseClassService";
|
import { ItemBaseClassService } from "@spt/services/ItemBaseClassService";
|
||||||
@ -1916,6 +1917,11 @@ export class ItemHelper
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public getMoneyTpls(): string[]
|
||||||
|
{
|
||||||
|
return Object.values(Money);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||||
|
Loading…
Reference in New Issue
Block a user