Replaced various magic strings with enum values
Added `itemHelper.getItemFromPool()`
This commit is contained in:
parent
836910c1d5
commit
8c05345b85
@ -23,6 +23,7 @@ import { BonusType } from "@spt/models/enums/BonusType";
|
|||||||
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
||||||
import { SkillTypes } from "@spt/models/enums/SkillTypes";
|
import { SkillTypes } from "@spt/models/enums/SkillTypes";
|
||||||
import { Traders } from "@spt/models/enums/Traders";
|
import { Traders } from "@spt/models/enums/Traders";
|
||||||
|
import { Weapons12Gauge, Weapons20Gauge } from "@spt/models/enums/WeaponTypes";
|
||||||
import { IBotConfig } from "@spt/models/spt/config/IBotConfig";
|
import { IBotConfig } from "@spt/models/spt/config/IBotConfig";
|
||||||
import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig";
|
import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig";
|
||||||
import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig";
|
import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig";
|
||||||
@ -551,10 +552,7 @@ export class GameController
|
|||||||
{
|
{
|
||||||
const itemDb = this.databaseService.getItems();
|
const itemDb = this.databaseService.getItems();
|
||||||
|
|
||||||
// Saiga 12ga
|
const shotguns = [Weapons12Gauge.SAIGA_12GA, Weapons20Gauge.TOZ_106, Weapons12Gauge.M870];
|
||||||
// Toz 106
|
|
||||||
// Remington 870
|
|
||||||
const shotguns = ["576165642459773c7a400233", "5a38e6bac4a2826c6e06d79b", "5a7828548dc32e5a9c28b516"];
|
|
||||||
for (const shotgunId of shotguns)
|
for (const shotgunId of shotguns)
|
||||||
{
|
{
|
||||||
if (itemDb[shotgunId]._props.ShotgunDispersion)
|
if (itemDb[shotgunId]._props.ShotgunDispersion)
|
||||||
|
@ -15,6 +15,7 @@ import { Item } from "@spt/models/eft/common/tables/IItem";
|
|||||||
import { IRegisterPlayerRequestData } from "@spt/models/eft/inRaid/IRegisterPlayerRequestData";
|
import { IRegisterPlayerRequestData } from "@spt/models/eft/inRaid/IRegisterPlayerRequestData";
|
||||||
import { ISaveProgressRequestData } from "@spt/models/eft/inRaid/ISaveProgressRequestData";
|
import { ISaveProgressRequestData } from "@spt/models/eft/inRaid/ISaveProgressRequestData";
|
||||||
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
||||||
|
import { ItemTpl } from "@spt/models/enums/ItemTpl";
|
||||||
import { MessageType } from "@spt/models/enums/MessageType";
|
import { MessageType } from "@spt/models/enums/MessageType";
|
||||||
import { PlayerRaidEndState } from "@spt/models/enums/PlayerRaidEndState";
|
import { PlayerRaidEndState } from "@spt/models/enums/PlayerRaidEndState";
|
||||||
import { QuestStatus } from "@spt/models/enums/QuestStatus";
|
import { QuestStatus } from "@spt/models/enums/QuestStatus";
|
||||||
@ -227,23 +228,24 @@ export class InraidController
|
|||||||
// Not dead
|
// Not dead
|
||||||
|
|
||||||
// Check for cultist amulets in special slot (only slot it can fit)
|
// Check for cultist amulets in special slot (only slot it can fit)
|
||||||
const amuletOnPlayer = serverPmcProfile.Inventory.items
|
const sacredAmulet = this.itemHelper.getItemFromPool(
|
||||||
.filter((item) => item.slotId?.startsWith("SpecialSlot"))
|
serverPmcProfile.Inventory.items,
|
||||||
.find((item) => item._tpl === "64d0b40fbe2eed70e254e2d4");
|
ItemTpl.SACRED_AMULET,
|
||||||
if (amuletOnPlayer)
|
"SpecialSlot");
|
||||||
|
if (sacredAmulet)
|
||||||
{
|
{
|
||||||
// No charges left, delete it
|
// No charges left, delete it
|
||||||
if (amuletOnPlayer.upd.CultistAmulet.NumberOfUsages <= 0)
|
if (sacredAmulet.upd.CultistAmulet.NumberOfUsages <= 0)
|
||||||
{
|
{
|
||||||
serverPmcProfile.Inventory.items.splice(
|
serverPmcProfile.Inventory.items.splice(
|
||||||
serverPmcProfile.Inventory.items.indexOf(amuletOnPlayer),
|
serverPmcProfile.Inventory.items.indexOf(sacredAmulet),
|
||||||
1,
|
1,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else if (amuletOnPlayer.upd.CultistAmulet.NumberOfUsages > 0)
|
else if (sacredAmulet.upd.CultistAmulet.NumberOfUsages > 0)
|
||||||
{
|
{
|
||||||
// Charges left, reduce by 1
|
// Charges left, reduce by 1
|
||||||
amuletOnPlayer.upd.CultistAmulet.NumberOfUsages--;
|
sacredAmulet.upd.CultistAmulet.NumberOfUsages--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@ import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRo
|
|||||||
import { Insurance } from "@spt/models/eft/profile/ISptProfile";
|
import { Insurance } from "@spt/models/eft/profile/ISptProfile";
|
||||||
import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData";
|
import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData";
|
||||||
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
||||||
|
import { Money } from "@spt/models/enums/Money";
|
||||||
import { SkillTypes } from "@spt/models/enums/SkillTypes";
|
import { SkillTypes } from "@spt/models/enums/SkillTypes";
|
||||||
import { IInsuranceConfig } from "@spt/models/spt/config/IInsuranceConfig";
|
import { IInsuranceConfig } from "@spt/models/spt/config/IInsuranceConfig";
|
||||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||||
@ -35,7 +36,6 @@ import { TimeUtil } from "@spt/utils/TimeUtil";
|
|||||||
export class InsuranceController
|
export class InsuranceController
|
||||||
{
|
{
|
||||||
protected insuranceConfig: IInsuranceConfig;
|
protected insuranceConfig: IInsuranceConfig;
|
||||||
protected roubleTpl = "5449016a4bdc2d6f028b456f";
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@inject("PrimaryLogger") protected logger: ILogger,
|
@inject("PrimaryLogger") protected logger: ILogger,
|
||||||
@ -518,7 +518,7 @@ export class InsuranceController
|
|||||||
// Get a dictionary of item tpls + their rouble price
|
// Get a dictionary of item tpls + their rouble price
|
||||||
for (const attachment of attachments)
|
for (const attachment of attachments)
|
||||||
{
|
{
|
||||||
const price = this.ragfairPriceService.getDynamicItemPrice(attachment._tpl, this.roubleTpl);
|
const price = this.ragfairPriceService.getDynamicItemPrice(attachment._tpl, Money.ROUBLES);
|
||||||
if (price)
|
if (price)
|
||||||
{
|
{
|
||||||
result[attachment._id] = Math.round(price);
|
result[attachment._id] = Math.round(price);
|
||||||
@ -680,7 +680,7 @@ export class InsuranceController
|
|||||||
for (const key of body.items)
|
for (const key of body.items)
|
||||||
{
|
{
|
||||||
itemsToPay.push({
|
itemsToPay.push({
|
||||||
id: this.roubleTpl, // TODO: update to handle different currencies
|
id: Money.ROUBLES, // TODO: update to handle different currencies
|
||||||
count: this.insuranceService.getRoublePriceToInsureItemWithTrader(
|
count: this.insuranceService.getRoublePriceToInsureItemWithTrader(
|
||||||
pmcData, inventoryItemsHash[key],
|
pmcData, inventoryItemsHash[key],
|
||||||
body.tid),
|
body.tid),
|
||||||
|
@ -20,6 +20,7 @@ import { ISearchFriendRequestData } from "@spt/models/eft/profile/ISearchFriendR
|
|||||||
import { ISearchFriendResponse } from "@spt/models/eft/profile/ISearchFriendResponse";
|
import { ISearchFriendResponse } from "@spt/models/eft/profile/ISearchFriendResponse";
|
||||||
import { ISptProfile, Inraid, Vitality } from "@spt/models/eft/profile/ISptProfile";
|
import { ISptProfile, Inraid, Vitality } from "@spt/models/eft/profile/ISptProfile";
|
||||||
import { IValidateNicknameRequestData } from "@spt/models/eft/profile/IValidateNicknameRequestData";
|
import { IValidateNicknameRequestData } from "@spt/models/eft/profile/IValidateNicknameRequestData";
|
||||||
|
import { ItemTpl } from "@spt/models/enums/ItemTpl";
|
||||||
import { MessageType } from "@spt/models/enums/MessageType";
|
import { MessageType } from "@spt/models/enums/MessageType";
|
||||||
import { QuestStatus } from "@spt/models/enums/QuestStatus";
|
import { QuestStatus } from "@spt/models/enums/QuestStatus";
|
||||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||||
@ -37,8 +38,6 @@ import { TimeUtil } from "@spt/utils/TimeUtil";
|
|||||||
@injectable()
|
@injectable()
|
||||||
export class ProfileController
|
export class ProfileController
|
||||||
{
|
{
|
||||||
protected defaultInventoryTpl = "55d7217a4bdc2d86028b456d";
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@inject("PrimaryLogger") protected logger: ILogger,
|
@inject("PrimaryLogger") protected logger: ILogger,
|
||||||
@inject("HashUtil") protected hashUtil: HashUtil,
|
@inject("HashUtil") protected hashUtil: HashUtil,
|
||||||
@ -462,7 +461,7 @@ export class ProfileController
|
|||||||
skills: playerPmc.Skills,
|
skills: playerPmc.Skills,
|
||||||
equipment: {
|
equipment: {
|
||||||
// Default inventory tpl
|
// Default inventory tpl
|
||||||
Id: playerPmc.Inventory.items.find((item) => item._tpl === this.defaultInventoryTpl)._id,
|
Id: playerPmc.Inventory.items.find((item) => item._tpl === ItemTpl.DEFAULT_INVENTORY)._id,
|
||||||
Items: playerPmc.Inventory.items,
|
Items: playerPmc.Inventory.items,
|
||||||
},
|
},
|
||||||
achievements: playerPmc.Achievements,
|
achievements: playerPmc.Achievements,
|
||||||
|
@ -20,6 +20,7 @@ import { BackendErrorCodes } from "@spt/models/enums/BackendErrorCodes";
|
|||||||
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
||||||
import { MemberCategory } from "@spt/models/enums/MemberCategory";
|
import { MemberCategory } from "@spt/models/enums/MemberCategory";
|
||||||
import { MessageType } from "@spt/models/enums/MessageType";
|
import { MessageType } from "@spt/models/enums/MessageType";
|
||||||
|
import { Money } from "@spt/models/enums/Money";
|
||||||
import { Traders } from "@spt/models/enums/Traders";
|
import { Traders } from "@spt/models/enums/Traders";
|
||||||
import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig";
|
import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig";
|
||||||
import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig";
|
import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig";
|
||||||
@ -39,8 +40,6 @@ import { TimeUtil } from "@spt/utils/TimeUtil";
|
|||||||
@injectable()
|
@injectable()
|
||||||
export class TradeController
|
export class TradeController
|
||||||
{
|
{
|
||||||
protected roubleTpl = "5449016a4bdc2d6f028b456f";
|
|
||||||
|
|
||||||
protected ragfairConfig: IRagfairConfig;
|
protected ragfairConfig: IRagfairConfig;
|
||||||
protected traderConfig: ITraderConfig;
|
protected traderConfig: ITraderConfig;
|
||||||
|
|
||||||
@ -276,7 +275,7 @@ export class TradeController
|
|||||||
// Create single currency item with all currency on it
|
// Create single currency item with all currency on it
|
||||||
const rootCurrencyReward = {
|
const rootCurrencyReward = {
|
||||||
_id: this.hashUtil.generate(),
|
_id: this.hashUtil.generate(),
|
||||||
_tpl: this.roubleTpl,
|
_tpl: Money.ROUBLES,
|
||||||
upd: { StackObjectsCount: roublesToSend },
|
upd: { StackObjectsCount: roublesToSend },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@ import { Appearance, Health, IBotType, Inventory } from "@spt/models/eft/common/
|
|||||||
import { Item, Upd } from "@spt/models/eft/common/tables/IItem";
|
import { Item, Upd } 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 { ItemTpl } from "@spt/models/enums/ItemTpl";
|
||||||
import { MemberCategory } from "@spt/models/enums/MemberCategory";
|
import { MemberCategory } from "@spt/models/enums/MemberCategory";
|
||||||
import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails";
|
import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails";
|
||||||
import { IBotConfig } from "@spt/models/spt/config/IBotConfig";
|
import { IBotConfig } from "@spt/models/spt/config/IBotConfig";
|
||||||
@ -530,13 +531,12 @@ export class BotGenerator
|
|||||||
*/
|
*/
|
||||||
protected generateInventoryId(profile: IBotBase): void
|
protected generateInventoryId(profile: IBotBase): void
|
||||||
{
|
{
|
||||||
const rootInventoryItemTpl = "55d7217a4bdc2d86028b456d";
|
|
||||||
const newInventoryItemId = this.hashUtil.generate();
|
const newInventoryItemId = this.hashUtil.generate();
|
||||||
|
|
||||||
for (const item of profile.Inventory.items)
|
for (const item of profile.Inventory.items)
|
||||||
{
|
{
|
||||||
// Root item found, update its _id value to newly generated id
|
// Root item found, update its _id value to newly generated id
|
||||||
if (item._tpl === rootInventoryItemTpl)
|
if (item._tpl === ItemTpl.DEFAULT_INVENTORY)
|
||||||
{
|
{
|
||||||
item._id = newInventoryItemId;
|
item._id = newInventoryItemId;
|
||||||
|
|
||||||
|
@ -11,6 +11,7 @@ import { Chances, Generation, IBotType, Inventory, Mods } from "@spt/models/eft/
|
|||||||
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
|
||||||
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
||||||
import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots";
|
import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots";
|
||||||
|
import { ItemTpl } from "@spt/models/enums/ItemTpl";
|
||||||
import {
|
import {
|
||||||
EquipmentFilterDetails,
|
EquipmentFilterDetails,
|
||||||
EquipmentFilters,
|
EquipmentFilters,
|
||||||
@ -101,27 +102,18 @@ export class BotInventoryGenerator
|
|||||||
protected generateInventoryBase(): PmcInventory
|
protected generateInventoryBase(): PmcInventory
|
||||||
{
|
{
|
||||||
const equipmentId = this.hashUtil.generate();
|
const equipmentId = this.hashUtil.generate();
|
||||||
const equipmentTpl = "55d7217a4bdc2d86028b456d";
|
|
||||||
|
|
||||||
const stashId = this.hashUtil.generate();
|
const stashId = this.hashUtil.generate();
|
||||||
const stashTpl = "566abbc34bdc2d92178b4576";
|
|
||||||
|
|
||||||
const questRaidItemsId = this.hashUtil.generate();
|
const questRaidItemsId = this.hashUtil.generate();
|
||||||
const questRaidItemsTpl = "5963866286f7747bf429b572";
|
|
||||||
|
|
||||||
const questStashItemsId = this.hashUtil.generate();
|
const questStashItemsId = this.hashUtil.generate();
|
||||||
const questStashItemsTpl = "5963866b86f7747bfa1c4462";
|
|
||||||
|
|
||||||
const sortingTableId = this.hashUtil.generate();
|
const sortingTableId = this.hashUtil.generate();
|
||||||
const sortingTableTpl = "602543c13fee350cd564d032";
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
items: [
|
items: [
|
||||||
{ _id: equipmentId, _tpl: equipmentTpl },
|
{ _id: equipmentId, _tpl: ItemTpl.DEFAULT_INVENTORY },
|
||||||
{ _id: stashId, _tpl: stashTpl },
|
{ _id: stashId, _tpl: ItemTpl.STASH },
|
||||||
{ _id: questRaidItemsId, _tpl: questRaidItemsTpl },
|
{ _id: questRaidItemsId, _tpl: ItemTpl.STASH_QUEST_RAID_ITEMS },
|
||||||
{ _id: questStashItemsId, _tpl: questStashItemsTpl },
|
{ _id: questStashItemsId, _tpl: ItemTpl.STASH_QUEST_ITEMS },
|
||||||
{ _id: sortingTableId, _tpl: sortingTableTpl },
|
{ _id: sortingTableId, _tpl: ItemTpl.SORTING_TABLE },
|
||||||
],
|
],
|
||||||
equipment: equipmentId,
|
equipment: equipmentId,
|
||||||
stash: stashId,
|
stash: stashId,
|
||||||
|
@ -3,6 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper";
|
|||||||
import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper";
|
import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper";
|
||||||
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
|
||||||
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
||||||
|
import { Money } from "@spt/models/enums/Money";
|
||||||
import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig";
|
import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig";
|
||||||
import { ConfigServer } from "@spt/servers/ConfigServer";
|
import { ConfigServer } from "@spt/servers/ConfigServer";
|
||||||
import { DatabaseService } from "@spt/services/DatabaseService";
|
import { DatabaseService } from "@spt/services/DatabaseService";
|
||||||
@ -22,8 +23,6 @@ export class PMCLootGenerator
|
|||||||
protected backpackLootPool: Record<string, number> = {};
|
protected backpackLootPool: Record<string, number> = {};
|
||||||
protected pmcConfig: IPmcConfig;
|
protected pmcConfig: IPmcConfig;
|
||||||
|
|
||||||
protected roubleTpl = "5449016a4bdc2d6f028b456f";
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@inject("ItemHelper") protected itemHelper: ItemHelper,
|
@inject("ItemHelper") protected itemHelper: ItemHelper,
|
||||||
@inject("DatabaseService") protected databaseService: DatabaseService,
|
@inject("DatabaseService") protected databaseService: DatabaseService,
|
||||||
@ -78,7 +77,7 @@ export class PMCLootGenerator
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Set price of item as its weight
|
// Set price of item as its weight
|
||||||
const price = this.ragfairPriceService.getDynamicItemPrice(itemToAdd._id, this.roubleTpl);
|
const price = this.ragfairPriceService.getDynamicItemPrice(itemToAdd._id, Money.ROUBLES);
|
||||||
this.pocketLootPool[itemToAdd._id] = price;
|
this.pocketLootPool[itemToAdd._id] = price;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -137,7 +136,7 @@ export class PMCLootGenerator
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Set price of item as its weight
|
// Set price of item as its weight
|
||||||
const price = this.ragfairPriceService.getDynamicItemPrice(itemToAdd._id, this.roubleTpl);
|
const price = this.ragfairPriceService.getDynamicItemPrice(itemToAdd._id, Money.ROUBLES);
|
||||||
this.vestLootPool[itemToAdd._id] = price;
|
this.vestLootPool[itemToAdd._id] = price;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -206,7 +205,7 @@ export class PMCLootGenerator
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Set price of item as its weight
|
// Set price of item as its weight
|
||||||
const price = this.ragfairPriceService.getDynamicItemPrice(itemToAdd._id, this.roubleTpl);
|
const price = this.ragfairPriceService.getDynamicItemPrice(itemToAdd._id, Money.ROUBLES);
|
||||||
this.backpackLootPool[itemToAdd._id] = price;
|
this.backpackLootPool[itemToAdd._id] = price;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -281,10 +281,10 @@ export class ScavCaseRewardGenerator
|
|||||||
{
|
{
|
||||||
const money: ITemplateItem[] = [];
|
const money: ITemplateItem[] = [];
|
||||||
const items = this.databaseService.getItems();
|
const items = this.databaseService.getItems();
|
||||||
money.push(items["5449016a4bdc2d6f028b456f"]); // rub
|
money.push(items[Money.ROUBLES]);
|
||||||
money.push(items["569668774bdc2da2298b4568"]); // euro
|
money.push(items[Money.EUROS]);
|
||||||
money.push(items["5696686a4bdc2da3298b456a"]); // dollar
|
money.push(items[Money.DOLLARS]);
|
||||||
money.push(items["5d235b4d86f7742e017bc88a"]); // GP
|
money.push(items[Money.GP]);
|
||||||
|
|
||||||
return this.randomUtil.getArrayValue(money);
|
return this.randomUtil.getArrayValue(money);
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@ import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
|
|||||||
import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest";
|
import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest";
|
||||||
import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile";
|
import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile";
|
||||||
import { BaseClasses } from "@spt/models/enums/BaseClasses";
|
import { BaseClasses } from "@spt/models/enums/BaseClasses";
|
||||||
|
import { ItemTpl } from "@spt/models/enums/ItemTpl";
|
||||||
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 { ItemFilterService } from "@spt/services/ItemFilterService";
|
import { ItemFilterService } from "@spt/services/ItemFilterService";
|
||||||
@ -32,9 +33,9 @@ export class GiveSptCommand implements ISptCommand
|
|||||||
private static acceptableConfidence = 0.9;
|
private static acceptableConfidence = 0.9;
|
||||||
// exception for flares
|
// exception for flares
|
||||||
private static excludedPresetItems = new Set<string>([
|
private static excludedPresetItems = new Set<string>([
|
||||||
"62178c4d4ecf221597654e3d",
|
ItemTpl.RSP30_SIGNAL_CARTRIDGE_RED,
|
||||||
"6217726288ed9f0845317459",
|
ItemTpl.RSP30_SIGNAL_CARTRIDGE_GREEN,
|
||||||
"624c0b3340357b5f566e8766",
|
ItemTpl.RSP30_SIGNAL_CARTRIDGE_YELLOW,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
protected savedCommand: Map<string, SavedCommand> = new Map<string, SavedCommand>();
|
protected savedCommand: Map<string, SavedCommand> = new Map<string, SavedCommand>();
|
||||||
|
@ -6,6 +6,7 @@ import { PresetHelper } from "@spt/helpers/PresetHelper";
|
|||||||
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
||||||
import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest";
|
import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest";
|
||||||
import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile";
|
import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile";
|
||||||
|
import { Money } from "@spt/models/enums/Money";
|
||||||
import { SkillTypes } from "@spt/models/enums/SkillTypes";
|
import { SkillTypes } from "@spt/models/enums/SkillTypes";
|
||||||
import { IProfileChangeEvent, ProfileChangeEventType } from "@spt/models/spt/dialog/ISendMessageDetails";
|
import { IProfileChangeEvent, ProfileChangeEventType } from "@spt/models/spt/dialog/ISendMessageDetails";
|
||||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||||
@ -125,7 +126,7 @@ export class ProfileSptCommand implements ISptCommand
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
_id: this.hashUtil.generate(),
|
_id: this.hashUtil.generate(),
|
||||||
_tpl: "5449016a4bdc2d6f028b456f",
|
_tpl: Money.ROUBLES,
|
||||||
upd: { StackObjectsCount: 1 },
|
upd: { StackObjectsCount: 1 },
|
||||||
parentId: this.hashUtil.generate(),
|
parentId: this.hashUtil.generate(),
|
||||||
slotId: "main",
|
slotId: "main",
|
||||||
|
@ -5,6 +5,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper";
|
|||||||
import { PresetHelper } from "@spt/helpers/PresetHelper";
|
import { PresetHelper } from "@spt/helpers/PresetHelper";
|
||||||
import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest";
|
import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest";
|
||||||
import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile";
|
import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile";
|
||||||
|
import { Money } from "@spt/models/enums/Money";
|
||||||
import { IProfileChangeEvent, ProfileChangeEventType } from "@spt/models/spt/dialog/ISendMessageDetails";
|
import { IProfileChangeEvent, ProfileChangeEventType } from "@spt/models/spt/dialog/ISendMessageDetails";
|
||||||
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";
|
||||||
@ -99,7 +100,7 @@ export class TraderSptCommand implements ISptCommand
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
_id: this.hashUtil.generate(),
|
_id: this.hashUtil.generate(),
|
||||||
_tpl: "5449016a4bdc2d6f028b456f",
|
_tpl: Money.ROUBLES,
|
||||||
upd: { StackObjectsCount: 1 },
|
upd: { StackObjectsCount: 1 },
|
||||||
parentId: this.hashUtil.generate(),
|
parentId: this.hashUtil.generate(),
|
||||||
slotId: "main",
|
slotId: "main",
|
||||||
|
@ -15,6 +15,7 @@ import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRo
|
|||||||
import { BonusType } from "@spt/models/enums/BonusType";
|
import { BonusType } from "@spt/models/enums/BonusType";
|
||||||
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
||||||
import { HideoutAreas } from "@spt/models/enums/HideoutAreas";
|
import { HideoutAreas } from "@spt/models/enums/HideoutAreas";
|
||||||
|
import { ItemTpl } from "@spt/models/enums/ItemTpl";
|
||||||
import { SkillTypes } from "@spt/models/enums/SkillTypes";
|
import { SkillTypes } from "@spt/models/enums/SkillTypes";
|
||||||
import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig";
|
import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig";
|
||||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||||
@ -34,8 +35,6 @@ export class HideoutHelper
|
|||||||
public static bitcoinFarm = "5d5c205bd582a50d042a3c0e";
|
public static bitcoinFarm = "5d5c205bd582a50d042a3c0e";
|
||||||
public static bitcoinProductionId = "5d5c205bd582a50d042a3c0e";
|
public static bitcoinProductionId = "5d5c205bd582a50d042a3c0e";
|
||||||
public static waterCollector = "5d5589c1f934db045e6c5492";
|
public static waterCollector = "5d5589c1f934db045e6c5492";
|
||||||
public static bitcoinTpl = "59faff1d86f7746c51718c9c";
|
|
||||||
public static expeditionaryFuelTank = "5d1b371186f774253763a656";
|
|
||||||
public static maxSkillPoint = 5000;
|
public static maxSkillPoint = 5000;
|
||||||
|
|
||||||
protected hideoutConfig: IHideoutConfig;
|
protected hideoutConfig: IHideoutConfig;
|
||||||
@ -982,7 +981,7 @@ export class HideoutHelper
|
|||||||
{
|
{
|
||||||
btcProd.Products.push({
|
btcProd.Products.push({
|
||||||
_id: this.hashUtil.generate(),
|
_id: this.hashUtil.generate(),
|
||||||
_tpl: HideoutHelper.bitcoinTpl,
|
_tpl: ItemTpl.BITCOIN,
|
||||||
upd: { StackObjectsCount: 1 },
|
upd: { StackObjectsCount: 1 },
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -1154,7 +1153,7 @@ export class HideoutHelper
|
|||||||
itemsToAdd.push([
|
itemsToAdd.push([
|
||||||
{
|
{
|
||||||
_id: this.hashUtil.generate(),
|
_id: this.hashUtil.generate(),
|
||||||
_tpl: HideoutHelper.bitcoinTpl,
|
_tpl: ItemTpl.BITCOIN,
|
||||||
upd: { StackObjectsCount: 1 },
|
upd: { StackObjectsCount: 1 },
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
@ -71,6 +71,24 @@ export class ItemHelper
|
|||||||
return filteredPool.some((poolItem) => poolItem._tpl === item);
|
return filteredPool.some((poolItem) => poolItem._tpl === item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the desired item from provided pool
|
||||||
|
* @param itemPool Item collection to search
|
||||||
|
* @param item Item to look for
|
||||||
|
* @param slotId OPTIONAL - slotid of desired item
|
||||||
|
* @returns Item or undefined
|
||||||
|
*/
|
||||||
|
public getItemFromPool(itemPool: Item[], item: ItemTpl, slotId?: string): Item | undefined
|
||||||
|
{
|
||||||
|
// Filter the pool by slotId if provided
|
||||||
|
const filteredPool = (slotId)
|
||||||
|
? itemPool.filter((item) => item.slotId?.startsWith(slotId))
|
||||||
|
: itemPool;
|
||||||
|
|
||||||
|
// Check if any item in the filtered pool matches the provided item
|
||||||
|
return filteredPool.find((poolItem) => poolItem._tpl === item);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method will compare two items (with all its children) and see if the are equivalent.
|
* This method will compare two items (with all its children) and see if the are equivalent.
|
||||||
* This method will NOT compare IDs on the items
|
* This method will NOT compare IDs on the items
|
||||||
|
@ -44,14 +44,16 @@ export class RagfairHelper
|
|||||||
{
|
{
|
||||||
switch (currency)
|
switch (currency)
|
||||||
{
|
{
|
||||||
case "569668774bdc2da2298b4568":
|
case Money.EUROS:
|
||||||
return "EUR";
|
return "EUR";
|
||||||
|
|
||||||
case "5696686a4bdc2da3298b456a":
|
case Money.DOLLARS:
|
||||||
return "USD";
|
return "USD";
|
||||||
|
|
||||||
case "5449016a4bdc2d6f028b456f":
|
case Money.ROUBLES:
|
||||||
return "RUB";
|
return "RUB";
|
||||||
|
case Money.GP:
|
||||||
|
return "GP";
|
||||||
default:
|
default:
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
@ -2,4 +2,37 @@ export enum ItemTpl
|
|||||||
{
|
{
|
||||||
MARK_OF_UNHEARD = "65ddcc9cfa85b9f17d0dfb07",
|
MARK_OF_UNHEARD = "65ddcc9cfa85b9f17d0dfb07",
|
||||||
SACRED_AMULET = "64d0b40fbe2eed70e254e2d4",
|
SACRED_AMULET = "64d0b40fbe2eed70e254e2d4",
|
||||||
|
DEFAULT_INVENTORY = "55d7217a4bdc2d86028b456d",
|
||||||
|
SURV12_KIT = "5d02797c86f774203f38e30a",
|
||||||
|
RSP30_SIGNAL_CARTRIDGE_RED = "62178c4d4ecf221597654e3d",
|
||||||
|
RSP30_SIGNAL_CARTRIDGE_GREEN = "6217726288ed9f0845317459",
|
||||||
|
RSP30_SIGNAL_CARTRIDGE_YELLOW = "624c0b3340357b5f566e8766",
|
||||||
|
BITCOIN = "59faff1d86f7746c51718c9c",
|
||||||
|
EXPEDITIONARY_FUEL_TANK = "5d1b371186f774253763a656",
|
||||||
|
FAKE_WHITE_BEARD = "5c1a1e3f2e221602b66cc4c2",
|
||||||
|
PUMPKIN_WITH_SWEETS = "634959225289190e5e773b3b",
|
||||||
|
CHRISTMAS_TREE_ORNAMENT_RED = "5df8a6a186f77412640e2e80",
|
||||||
|
CHRISTMAS_TREE_ORNAMENT_VIOLET = "5df8a77486f77412672a1e3f",
|
||||||
|
CHRISTMAS_TREE_ORNAMENT_SILVER = "5df8a72c86f77412640e2e83",
|
||||||
|
DED_MOROZ_HAT = "5a43943586f77416ad2f06e2",
|
||||||
|
SANTA_HAT = "5a43957686f7742a2c2f11b0",
|
||||||
|
SANTAS_BAG = "61b9e1aaef9a1b5d6a79899a",
|
||||||
|
STASH = "566abbc34bdc2d92178b4576",
|
||||||
|
STASH_QUEST_RAID_ITEMS = "5963866286f7747bf429b572",
|
||||||
|
STASH_QUEST_ITEMS = "5963866b86f7747bfa1c4462",
|
||||||
|
SORTING_TABLE = "602543c13fee350cd564d032",
|
||||||
|
SPOOKY_SKULL_MASK = "635267ab3c89e2112001f826",
|
||||||
|
FACELESS_MASK = "6176a48d732a664031271438",
|
||||||
|
JASON_MASK = "5bd071d786f7747e707b93a3",
|
||||||
|
MISHA_MAYOROV_MASK = "5bd0716d86f774171822ef4b",
|
||||||
|
SLENDER_MASK = "5bd06f5d86f77427101ad47c",
|
||||||
|
GHOUL_MASK = "6176a40f0b8c0312ac75a3d3",
|
||||||
|
HOCKEY_CAPTAIN_MASK = "62a5c2c98ec41a51b34739c0",
|
||||||
|
HOCKEY_BRAWLER_MASK = "62a5c333ec21e50cad3b5dc6",
|
||||||
|
HOCKEY_QUIET_MASK = "62a5c41e8ec41a51b34739c3",
|
||||||
|
JACK_LANTERN_PUMPKIN_HELMET = "59ef13ca86f77445fd0e2483",
|
||||||
|
WEAPON_STAND_STASH_1 = "6401c7b213d9b818bf0e7dd7",
|
||||||
|
WEAPON_STAND_STASH_2 = "64381b582bb1c5dedd0fc925",
|
||||||
|
WEAPON_STAND_STASH_3 = "64381b6e44b37a080d0245b9",
|
||||||
|
NCSTAR_MPR45_BACKUP_MOUNT = "5649a2464bdc2d91118b45a8",
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@ import { Item } from "@spt/models/eft/common/tables/IItem";
|
|||||||
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
|
||||||
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 { ItemTpl } from "@spt/models/enums/ItemTpl";
|
||||||
import { IBotConfig } from "@spt/models/spt/config/IBotConfig";
|
import { IBotConfig } from "@spt/models/spt/config/IBotConfig";
|
||||||
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";
|
||||||
@ -85,13 +86,13 @@ export class BotWeaponModLimitService
|
|||||||
): boolean
|
): boolean
|
||||||
{
|
{
|
||||||
// If mod or mods parent is the NcSTAR MPR45 Backup mount, allow it as it looks cool
|
// If mod or mods parent is the NcSTAR MPR45 Backup mount, allow it as it looks cool
|
||||||
const ncSTARTpl = "5649a2464bdc2d91118b45a8";
|
if (modsParent._id === ItemTpl.NCSTAR_MPR45_BACKUP_MOUNT
|
||||||
if (modsParent._id === ncSTARTpl || modTemplate._id === ncSTARTpl)
|
|| modTemplate._id === ItemTpl.NCSTAR_MPR45_BACKUP_MOUNT)
|
||||||
{
|
{
|
||||||
// If weapon already has a longer ranged scope on it, allow ncstar to be spawned
|
// If weapon already has a longer ranged scope on it, allow ncstar to be spawned
|
||||||
if (
|
if (
|
||||||
weapon.some((x) =>
|
weapon.some((item) =>
|
||||||
this.itemHelper.isOfBaseclasses(x._tpl, [
|
this.itemHelper.isOfBaseclasses(item._tpl, [
|
||||||
BaseClasses.ASSAULT_SCOPE,
|
BaseClasses.ASSAULT_SCOPE,
|
||||||
BaseClasses.OPTIC_SCOPE,
|
BaseClasses.OPTIC_SCOPE,
|
||||||
BaseClasses.SPECIAL_SCOPE,
|
BaseClasses.SPECIAL_SCOPE,
|
||||||
|
@ -1059,7 +1059,7 @@ export class FenceService
|
|||||||
assorts.barter_scheme[presetWithChildrenClone[0]._id] = [
|
assorts.barter_scheme[presetWithChildrenClone[0]._id] = [
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
_tpl: "5449016a4bdc2d6f028b456f",
|
_tpl: Money.ROUBLES,
|
||||||
count: Math.round(itemPrice),
|
count: Math.round(itemPrice),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@ -1124,7 +1124,7 @@ export class FenceService
|
|||||||
assorts.barter_scheme[presetWithChildrenClone[0]._id] = [
|
assorts.barter_scheme[presetWithChildrenClone[0]._id] = [
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
_tpl: "5449016a4bdc2d6f028b456f",
|
_tpl: Money.ROUBLES,
|
||||||
count: Math.round(itemPrice),
|
count: Math.round(itemPrice),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -15,6 +15,7 @@ import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTr
|
|||||||
import { BaseClasses } from "@spt/models/enums/BaseClasses";
|
import { BaseClasses } from "@spt/models/enums/BaseClasses";
|
||||||
import { BonusType } from "@spt/models/enums/BonusType";
|
import { BonusType } from "@spt/models/enums/BonusType";
|
||||||
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
||||||
|
import { Money } from "@spt/models/enums/Money";
|
||||||
import { SkillTypes } from "@spt/models/enums/SkillTypes";
|
import { SkillTypes } from "@spt/models/enums/SkillTypes";
|
||||||
import { BonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig";
|
import { BonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig";
|
||||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||||
@ -132,7 +133,7 @@ export class RepairService
|
|||||||
const options: IProcessBuyTradeRequestData = {
|
const options: IProcessBuyTradeRequestData = {
|
||||||
scheme_items: [
|
scheme_items: [
|
||||||
{
|
{
|
||||||
id: "5449016a4bdc2d6f028b456f", // Rouble tpl
|
id: Money.ROUBLES,
|
||||||
count: Math.round(repairCost),
|
count: Math.round(repairCost),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -6,6 +6,7 @@ import { ILocation } from "@spt/models/eft/common/ILocation";
|
|||||||
import { BossLocationSpawn } from "@spt/models/eft/common/ILocationBase";
|
import { BossLocationSpawn } from "@spt/models/eft/common/ILocationBase";
|
||||||
import { Inventory } from "@spt/models/eft/common/tables/IBotType";
|
import { Inventory } from "@spt/models/eft/common/tables/IBotType";
|
||||||
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
||||||
|
import { ItemTpl } from "@spt/models/enums/ItemTpl";
|
||||||
import { Season } from "@spt/models/enums/Season";
|
import { Season } from "@spt/models/enums/Season";
|
||||||
import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType";
|
import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType";
|
||||||
import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig";
|
import { IHttpConfig } from "@spt/models/spt/config/IHttpConfig";
|
||||||
@ -55,30 +56,30 @@ export class SeasonalEventService
|
|||||||
protected get christmasEventItems(): string[]
|
protected get christmasEventItems(): string[]
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
"5c1a1e3f2e221602b66cc4c2", // White beard
|
ItemTpl.FAKE_WHITE_BEARD,
|
||||||
"5df8a6a186f77412640e2e80", // Red bauble
|
ItemTpl.CHRISTMAS_TREE_ORNAMENT_RED,
|
||||||
"5df8a77486f77412672a1e3f", // Violet bauble
|
ItemTpl.CHRISTMAS_TREE_ORNAMENT_VIOLET,
|
||||||
"5df8a72c86f77412640e2e83", // Silver bauble
|
ItemTpl.CHRISTMAS_TREE_ORNAMENT_SILVER,
|
||||||
"5a43943586f77416ad2f06e2", // Ded moroz hat
|
ItemTpl.DED_MOROZ_HAT,
|
||||||
"5a43957686f7742a2c2f11b0", // Santa hat
|
ItemTpl.SANTA_HAT,
|
||||||
"61b9e1aaef9a1b5d6a79899a", // Santas's bag
|
ItemTpl.SANTAS_BAG,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
protected get halloweenEventItems(): string[]
|
protected get halloweenEventItems(): string[]
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
"635267ab3c89e2112001f826", // Halloween skull mask
|
ItemTpl.SPOOKY_SKULL_MASK,
|
||||||
"634959225289190e5e773b3b", // Pumpkin loot box
|
ItemTpl.PUMPKIN_WITH_SWEETS,
|
||||||
"59ef13ca86f77445fd0e2483", // Jack'o'lantern helmet
|
ItemTpl.JACK_LANTERN_PUMPKIN_HELMET,
|
||||||
"6176a48d732a664031271438", // Faceless mask
|
ItemTpl.FACELESS_MASK,
|
||||||
"5bd071d786f7747e707b93a3", // Jason mask
|
ItemTpl.JASON_MASK,
|
||||||
"5bd0716d86f774171822ef4b", // Misha Mayorov mask
|
ItemTpl.MISHA_MAYOROV_MASK,
|
||||||
"5bd06f5d86f77427101ad47c", // Slender mask
|
ItemTpl.SLENDER_MASK,
|
||||||
"6176a40f0b8c0312ac75a3d3", // Ghoul mask
|
ItemTpl.GHOUL_MASK,
|
||||||
"62a5c2c98ec41a51b34739c0", // Hockey player mask "Captain"
|
ItemTpl.HOCKEY_CAPTAIN_MASK,
|
||||||
"62a5c333ec21e50cad3b5dc6", // Hockey player mask "Brawler"
|
ItemTpl.HOCKEY_BRAWLER_MASK,
|
||||||
"62a5c41e8ec41a51b34739c3", // Hockey player mask "Quiet"
|
ItemTpl.HOCKEY_QUIET_MASK,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -546,7 +547,7 @@ export class SeasonalEventService
|
|||||||
|
|
||||||
protected addPumpkinsToScavBackpacks(): void
|
protected addPumpkinsToScavBackpacks(): void
|
||||||
{
|
{
|
||||||
this.databaseService.getBots().types.assault.inventory.items.Backpack["634959225289190e5e773b3b"] = 400;
|
this.databaseService.getBots().types.assault.inventory.items.Backpack[ItemTpl.PUMPKIN_WITH_SWEETS] = 400;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2,6 +2,7 @@ import { inject, injectable } from "tsyringe";
|
|||||||
import { ItemHelper } from "@spt/helpers/ItemHelper";
|
import { ItemHelper } from "@spt/helpers/ItemHelper";
|
||||||
import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem";
|
||||||
import { BaseClasses } from "@spt/models/enums/BaseClasses";
|
import { BaseClasses } from "@spt/models/enums/BaseClasses";
|
||||||
|
import { ItemTpl } from "@spt/models/enums/ItemTpl";
|
||||||
import {
|
import {
|
||||||
CreateItemResult,
|
CreateItemResult,
|
||||||
LocaleDetails,
|
LocaleDetails,
|
||||||
@ -223,7 +224,7 @@ export class CustomItemService
|
|||||||
protected addToWeaponShelf(newItemId: string): void
|
protected addToWeaponShelf(newItemId: string): void
|
||||||
{
|
{
|
||||||
// Ids for wall stashes in db
|
// Ids for wall stashes in db
|
||||||
const wallStashIds = ["6401c7b213d9b818bf0e7dd7", "64381b582bb1c5dedd0fc925", "64381b6e44b37a080d0245b9"];
|
const wallStashIds = [ItemTpl.WEAPON_STAND_STASH_1, ItemTpl.WEAPON_STAND_STASH_2, ItemTpl.WEAPON_STAND_STASH_3];
|
||||||
for (const wallId of wallStashIds)
|
for (const wallId of wallStashIds)
|
||||||
{
|
{
|
||||||
const wall = this.itemHelper.getItem(wallId);
|
const wall = this.itemHelper.getItem(wallId);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user