Files
SPT-Server-Build/Libraries/SPTarkov.Server.Core/Models/Spt/Templates/Templates.cs
T
Jesse 54f0d0779c Convert TemplateItem to MongoId (#436)
* Convert TemplateItem to MongoId

* Push new extensions

* Handle null mongoid's being passed to regex

* Handle null strings, fixes item events

* Updated loot generation to work with new property `composedKey`

Fixed typo in `SlotId`

* Fix missing method after merge

* Remove duplicately named MongoIDExtensions?

* Fixed location loot generation to handle impending loot json changes

* Updated location JSONs with new properties (excluding lighthouse loose loot)

* Fixed build issue with ItemTplGenerator

* use correct handing for new mongo ids

* Added helper method to improve readability

---------

Co-authored-by: Chomp <dev@dev.sp-tarkov.com>
2025-07-02 10:14:04 +01:00

73 lines
2.3 KiB
C#

using System.Text.Json.Serialization;
using SPTarkov.Server.Core.Models.Common;
using SPTarkov.Server.Core.Models.Eft.Common.Tables;
using SPTarkov.Server.Core.Models.Eft.Profile;
namespace SPTarkov.Server.Core.Models.Spt.Templates;
public record Templates
{
[JsonExtensionData]
public Dictionary<string, object>? ExtensionData { get; set; }
[JsonPropertyName("character")]
public List<string>? Character { get; set; }
[JsonPropertyName("customisationStorage")]
public List<CustomisationStorage>? CustomisationStorage { get; set; }
[JsonPropertyName("items")]
public Dictionary<MongoId, TemplateItem>? Items { get; set; }
[JsonPropertyName("prestige")]
public Prestige? Prestige { get; set; }
[JsonPropertyName("quests")]
public Dictionary<string, Quest>? Quests { get; set; }
[JsonPropertyName("repeatableQuests")]
public RepeatableQuestDatabase? RepeatableQuests { get; set; }
[JsonPropertyName("handbook")]
public HandbookBase? Handbook { get; set; }
[JsonPropertyName("customization")]
public Dictionary<string, CustomizationItem>? Customization { get; set; }
/// <summary>
/// The profile templates listed in the launcher on profile creation, split by account type (e.g. Standard) then side (e.g. bear/usec)
/// </summary>
[JsonPropertyName("profiles")]
public Dictionary<string, ProfileSides>? Profiles { get; set; }
/// <summary>
/// Flea prices of items - gathered from online flea market dump
/// </summary>
[JsonPropertyName("prices")]
public Dictionary<string, double>? Prices { get; set; }
/// <summary>
/// Default equipment loadouts that show on main inventory screen
/// </summary>
[JsonPropertyName("defaultEquipmentPresets")]
public List<DefaultEquipmentPreset>? DefaultEquipmentPresets { get; set; }
/// <summary>
/// Achievements
/// </summary>
[JsonPropertyName("achievements")]
public List<Achievement>? Achievements { get; set; }
/// <summary>
/// Achievements
/// </summary>
[JsonPropertyName("customAchievements")]
public List<Achievement>? CustomAchievements { get; set; }
/// <summary>
/// Location services data
/// </summary>
[JsonPropertyName("locationServices")]
public LocationServices? LocationServices { get; set; }
}