From b95ccad7c680817c2d80691994e8eac9d8fafb1a Mon Sep 17 00:00:00 2001 From: CWX Date: Mon, 6 Jan 2025 15:51:27 +0000 Subject: [PATCH] Fix Namespaces along with CJs PR, Added more types --- Core/Core.csproj | 1 - Core/Models/Config/HttpConfig.cs | 2 +- Core/Models/Eft/Common/Tables/BotBase.cs | 2 +- Core/Models/Eft/Common/Tables/BotCore.cs | 2 +- Core/Models/Eft/Common/Tables/BotType.cs | 2 +- Core/Models/Enums/ConfigTypes.cs | 2 +- Core/Models/Logging/LogBackgroundColor.cs | 2 +- Core/Models/Logging/LogTextColor.cs | 2 +- Core/Models/Spt/Bots/Bots.cs | 3 +- Core/Models/Spt/Callbacks/BotCallbacks.cs | 26 ++ Core/Models/Spt/Callbacks/BundleCallbacks.cs | 19 + .../Spt/Callbacks/CustomizationCallbacks.cs | 24 ++ Core/Models/Spt/Callbacks/DialogCallbacks.cs | 79 ++++ Core/Models/Spt/Callbacks/GameCallbacks.cs | 44 +++ .../Models/Spt/Callbacks/HandbookCallbacks.cs | 9 + Core/Models/Spt/Callbacks/HealthCallbacks.cs | 29 ++ Core/Models/Spt/Callbacks/HideoutCallbacks.cs | 6 + Core/Models/Spt/Callbacks/HttpCallbacks.cs | 6 + .../Spt/Callbacks/InsuranceCallbacks.cs | 6 + .../Spt/Callbacks/InventoryCallbacks.cs | 6 + .../Spt/Callbacks/ItemEventCallbacks.cs | 6 + .../Models/Spt/Callbacks/LauncherCallbacks.cs | 6 + .../Models/Spt/Callbacks/LocationCallbacks.cs | 6 + Core/Models/Spt/Callbacks/ModCallbacks.cs | 6 + Core/Models/Spt/Callbacks/NoteCallbacks.cs | 6 + .../Models/Spt/Callbacks/NotifierCallbacks.cs | 6 + .../Spt/Callbacks/PresetBuildCallbacks.cs | 6 + Core/Models/Spt/Callbacks/PresetCallbacks.cs | 6 + Core/Models/Spt/Callbacks/ProfileCallbacks.cs | 6 + Core/Models/Spt/Callbacks/QuestCallbacks.cs | 6 + Core/Models/Spt/Callbacks/RagfairCallbacks.cs | 6 + Core/Models/Spt/Callbacks/RepairCallbacks.cs | 6 + Core/Models/Spt/Callbacks/SaveCallbacks.cs | 6 + Core/Models/Spt/Callbacks/TradeCallbacks.cs | 6 + Core/Models/Spt/Callbacks/TraderCallbacks.cs | 6 + Core/Models/Spt/Callbacks/WeatherCallbacks.cs | 6 + Core/Models/Spt/Config/AirdropConfig.cs | 2 +- Core/Models/Spt/Config/BackupConfig.cs | 2 +- Core/Models/Spt/Config/BaseConfig.cs | 2 +- Core/Models/Spt/Config/BotConfig.cs | 2 +- Core/Models/Spt/Config/BotDurability.cs | 2 +- Core/Models/Spt/Config/CoreConfig.cs | 2 +- Core/Models/Spt/Config/GiftsConfig.cs | 2 +- Core/Models/Spt/Config/HealthConfig.cs | 6 +- Core/Models/Spt/Config/HideoutConfig.cs | 5 +- Core/Models/Spt/Config/HttpConfig.cs | 2 +- Core/Models/Spt/Config/InRaidConfig.cs | 87 ++++- Core/Models/Spt/Config/InsuranceConfig.cs | 56 ++- Core/Models/Spt/Config/InventoryConfig.cs | 69 +++- Core/Models/Spt/Config/ItemConfig.cs | 47 ++- Core/Models/Spt/Config/LocaleConfig.cs | 22 +- Core/Models/Spt/Config/LocationConfig.cs | 315 ++++++++++++++- Core/Models/Spt/Config/LootConfig.cs | 17 +- Core/Models/Spt/Config/LostOnDeathConfig.cs | 61 ++- Core/Models/Spt/Config/MatchConfig.cs | 8 +- Core/Models/Spt/Config/PlayerScavConfig.cs | 60 ++- Core/Models/Spt/Config/PmcChatResponse.cs | 33 +- Core/Models/Spt/Config/PmcConfig.cs | 157 +++++++- Core/Models/Spt/Config/QuestConfig.cs | 364 +++++++++++++++++- Core/Models/Spt/Config/RagfairConfig.cs | 364 +++++++++++++++++- Core/Models/Spt/Config/RepairConfig.cs | 108 +++++- Core/Models/Spt/Config/ScavCaseConfig.cs | 78 +++- Core/Models/Spt/Config/SeasonalEventConfig.cs | 101 ++++- Core/Models/Spt/Config/TraderConfig.cs | 170 +++++++- Core/Models/Spt/Config/WeatherConfig.cs | 104 ++++- Core/Models/Spt/Controllers/BotController.cs | 55 ++- Core/Models/Spt/Dialog/SendMessageDetails.cs | 5 +- .../Spt/Fence/CreateFenceAssortsResult.cs | 5 +- .../Spt/Fence/FenceAssortGenerationValues.cs | 2 +- Core/Models/Spt/Generators/BotGenerator.cs | 25 +- .../Spt/Generators/LocationGenerator.cs | 35 +- .../Models/Spt/Generators/PMCLootGenerator.cs | 24 +- .../Spt/Generators/RagfairAssortGenerator.cs | 18 +- .../Spt/Generators/RagfairOfferGenerator.cs | 26 +- Core/Models/Spt/Hideout/CircleCraftDetails.cs | 4 +- Core/Models/Spt/Hideout/Hideout.cs | 4 +- .../Hideout/ScavCaseRewardCountsAndPrice.cs | 2 +- .../Spt/Inventory/OwnerInventoryItems.cs | 2 +- Core/Models/Spt/Location/RaidChanges.cs | 2 +- Core/Models/Spt/Logging/ClientLogRequest.cs | 2 +- Core/Models/Spt/Logging/LogBackgroundColor.cs | 2 +- Core/Models/Spt/Logging/LogLevel.cs | 2 +- Core/Models/Spt/Logging/LogTextColor.cs | 2 +- Core/Models/Spt/Logging/SptLogger.cs | 23 +- Core/Models/Spt/Mod/ModLoader.cs | 25 +- Core/Models/Spt/Mod/NewItemDetails.cs | 128 +++--- Core/Models/Spt/Mod/PackageJsonData.cs | 80 ++-- .../Spt/Quests/GetRepeatableByIdResult.cs | 2 +- .../Models/Spt/Ragfair/RagfairServerPrices.cs | 2 +- Core/Models/Spt/Ragfair/TplWithFleaPrice.cs | 2 +- .../Spt/Repeatable/QuestRewardValues.cs | 2 +- Core/Models/Spt/Repeatable/QuestTypePool.cs | 2 +- Core/Models/Spt/Server/DatabaseTables.cs | 2 +- Core/Models/Spt/Server/LocaleBase.cs | 3 +- Core/Models/Spt/Server/Locations.cs | 2 +- Core/Models/Spt/Server/ServerBase.cs | 2 +- Core/Models/Spt/Server/SettingsBase.cs | 2 +- 97 files changed, 2815 insertions(+), 295 deletions(-) create mode 100644 Core/Models/Spt/Callbacks/BotCallbacks.cs create mode 100644 Core/Models/Spt/Callbacks/BundleCallbacks.cs create mode 100644 Core/Models/Spt/Callbacks/CustomizationCallbacks.cs create mode 100644 Core/Models/Spt/Callbacks/DialogCallbacks.cs create mode 100644 Core/Models/Spt/Callbacks/GameCallbacks.cs create mode 100644 Core/Models/Spt/Callbacks/HandbookCallbacks.cs create mode 100644 Core/Models/Spt/Callbacks/HealthCallbacks.cs create mode 100644 Core/Models/Spt/Callbacks/HideoutCallbacks.cs create mode 100644 Core/Models/Spt/Callbacks/HttpCallbacks.cs create mode 100644 Core/Models/Spt/Callbacks/InsuranceCallbacks.cs create mode 100644 Core/Models/Spt/Callbacks/InventoryCallbacks.cs create mode 100644 Core/Models/Spt/Callbacks/ItemEventCallbacks.cs create mode 100644 Core/Models/Spt/Callbacks/LauncherCallbacks.cs create mode 100644 Core/Models/Spt/Callbacks/LocationCallbacks.cs create mode 100644 Core/Models/Spt/Callbacks/ModCallbacks.cs create mode 100644 Core/Models/Spt/Callbacks/NoteCallbacks.cs create mode 100644 Core/Models/Spt/Callbacks/NotifierCallbacks.cs create mode 100644 Core/Models/Spt/Callbacks/PresetBuildCallbacks.cs create mode 100644 Core/Models/Spt/Callbacks/PresetCallbacks.cs create mode 100644 Core/Models/Spt/Callbacks/ProfileCallbacks.cs create mode 100644 Core/Models/Spt/Callbacks/QuestCallbacks.cs create mode 100644 Core/Models/Spt/Callbacks/RagfairCallbacks.cs create mode 100644 Core/Models/Spt/Callbacks/RepairCallbacks.cs create mode 100644 Core/Models/Spt/Callbacks/SaveCallbacks.cs create mode 100644 Core/Models/Spt/Callbacks/TradeCallbacks.cs create mode 100644 Core/Models/Spt/Callbacks/TraderCallbacks.cs create mode 100644 Core/Models/Spt/Callbacks/WeatherCallbacks.cs diff --git a/Core/Core.csproj b/Core/Core.csproj index c84e1b8b..aa09572c 100644 --- a/Core/Core.csproj +++ b/Core/Core.csproj @@ -5,7 +5,6 @@ enable enable Library - Types diff --git a/Core/Models/Config/HttpConfig.cs b/Core/Models/Config/HttpConfig.cs index 71a1c612..b661f3b1 100644 --- a/Core/Models/Config/HttpConfig.cs +++ b/Core/Models/Config/HttpConfig.cs @@ -1,4 +1,4 @@ -namespace Types.Models.Config; +namespace Core.Models.Config; public class HttpConfig { diff --git a/Core/Models/Eft/Common/Tables/BotBase.cs b/Core/Models/Eft/Common/Tables/BotBase.cs index a0b37417..df51dbf4 100644 --- a/Core/Models/Eft/Common/Tables/BotBase.cs +++ b/Core/Models/Eft/Common/Tables/BotBase.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace Types.Models.Eft.Common.Tables; +namespace Core.Models.Eft.Common.Tables; public class BotBase { diff --git a/Core/Models/Eft/Common/Tables/BotCore.cs b/Core/Models/Eft/Common/Tables/BotCore.cs index 5d6c8952..38732b91 100644 --- a/Core/Models/Eft/Common/Tables/BotCore.cs +++ b/Core/Models/Eft/Common/Tables/BotCore.cs @@ -1,4 +1,4 @@ -namespace Types.Models.Eft.Common.Tables; +namespace Core.Models.Eft.Common.Tables; public class BotCore { diff --git a/Core/Models/Eft/Common/Tables/BotType.cs b/Core/Models/Eft/Common/Tables/BotType.cs index baa8e24f..e9930fda 100644 --- a/Core/Models/Eft/Common/Tables/BotType.cs +++ b/Core/Models/Eft/Common/Tables/BotType.cs @@ -1,4 +1,4 @@ -namespace Types.Models.Eft.Common.Tables; +namespace Core.Models.Eft.Common.Tables; public class BotType { diff --git a/Core/Models/Enums/ConfigTypes.cs b/Core/Models/Enums/ConfigTypes.cs index 822e6f27..66cfac6a 100644 --- a/Core/Models/Enums/ConfigTypes.cs +++ b/Core/Models/Enums/ConfigTypes.cs @@ -1,4 +1,4 @@ -namespace Types.Models.Enums; +namespace Core.Models.Enums; public enum ConfigTypes { diff --git a/Core/Models/Logging/LogBackgroundColor.cs b/Core/Models/Logging/LogBackgroundColor.cs index 6ba9878d..08c5d2c8 100644 --- a/Core/Models/Logging/LogBackgroundColor.cs +++ b/Core/Models/Logging/LogBackgroundColor.cs @@ -1,4 +1,4 @@ -namespace Types.Models.Logging; +namespace Core.Models.Logging; public enum LogBackgroundColor { diff --git a/Core/Models/Logging/LogTextColor.cs b/Core/Models/Logging/LogTextColor.cs index 4188878d..c2a76282 100644 --- a/Core/Models/Logging/LogTextColor.cs +++ b/Core/Models/Logging/LogTextColor.cs @@ -1,4 +1,4 @@ -namespace Types.Models.Logging; +namespace Core.Models.Logging; public enum LogTextColor { diff --git a/Core/Models/Spt/Bots/Bots.cs b/Core/Models/Spt/Bots/Bots.cs index ae563b09..e951e0a3 100644 --- a/Core/Models/Spt/Bots/Bots.cs +++ b/Core/Models/Spt/Bots/Bots.cs @@ -1,6 +1,7 @@ using System.Text.Json.Serialization; +using Core.Models.Eft.Common.Tables; -namespace Types.Models.Spt.Bots; +namespace Core.Models.Spt.Bots; public class Bots { diff --git a/Core/Models/Spt/Callbacks/BotCallbacks.cs b/Core/Models/Spt/Callbacks/BotCallbacks.cs new file mode 100644 index 00000000..dda5ab92 --- /dev/null +++ b/Core/Models/Spt/Callbacks/BotCallbacks.cs @@ -0,0 +1,26 @@ +using Core.Models.Eft.Common.Tables; + +namespace Core.Models.Spt.Callbacks; + +public class BotCallbacks +{ + public string GetBotLimit(string url, EmptyRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public string GetBotDifficulty(string url, EmptyRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public GetBodyResponseData> GenerateBots(string url, GenerateBotsRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public string GetBotCap() + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/Core/Models/Spt/Callbacks/BundleCallbacks.cs b/Core/Models/Spt/Callbacks/BundleCallbacks.cs new file mode 100644 index 00000000..17b23487 --- /dev/null +++ b/Core/Models/Spt/Callbacks/BundleCallbacks.cs @@ -0,0 +1,19 @@ +namespace Core.Models.Spt.Callbacks; + +public class BundleCallbacks +{ + public object SendBundle(string sessionID, object req, object res, object body) + { + throw new NotImplementedException(); + } + + public string GetBundles(string url, object info, string sessionID) + { + throw new NotImplementedException(); + } + + public string GetBundle(string url, object info, string sessionID) + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/Core/Models/Spt/Callbacks/CustomizationCallbacks.cs b/Core/Models/Spt/Callbacks/CustomizationCallbacks.cs new file mode 100644 index 00000000..cb33b642 --- /dev/null +++ b/Core/Models/Spt/Callbacks/CustomizationCallbacks.cs @@ -0,0 +1,24 @@ +namespace Core.Models.Spt.Callbacks; + +public class CustomizationCallbacks +{ + public GetBodyResponseData GetSuits(string url, object info, string sessionID) + { + throw new NotImplementedException(); + } + + public GetBodyResponseData> GetTraderSuits(string url, object info, string sessionID) + { + throw new NotImplementedException(); + } + + public ItemEventRouterResponse WearClothing(PmcData pmcData, WearClothingRequestData body, string sessionID) + { + throw new NotImplementedException(); + } + + public ItemEventRouterResponse BuyClothing(PmcData pmcData, BuyClothingRequestData body, string sessionID) + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/Core/Models/Spt/Callbacks/DialogCallbacks.cs b/Core/Models/Spt/Callbacks/DialogCallbacks.cs new file mode 100644 index 00000000..1e2bd458 --- /dev/null +++ b/Core/Models/Spt/Callbacks/DialogCallbacks.cs @@ -0,0 +1,79 @@ +namespace Core.Models.Spt.Callbacks; + +public class DialogCallbacks +{ + public GetBodyResponseData GetFriendList(string url, EmptyRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public GetBodyResponseData> GetChatServerList(string url, GetChatServerListRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public GetBodyResponseData> GetMailDialogList(string url, GetMailDialogListRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public GetBodyResponseData GetMailDialogView(string url, GetMailDialogViewRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public GetBodyResponseData GetMailDialogInfo(string url, GetMailDialogInfoRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public GetBodyResponseData> RemoveDialog(string url, RemoveDialogRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public GetBodyResponseData> PinDialog(string url, PinDialogRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public GetBodyResponseData> UnpinDialog(string url, PinDialogRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public GetBodyResponseData> SetRead(string url, SetDialogReadRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public GetBodyResponseData GetAllAttachments(string url, EmptyRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public GetBodyResponseData> ListOutbox(string url, EmptyRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public GetBodyResponseData> ListInbox(string url, EmptyRequestData info, string sessionID) + { + + } + + public NullResponseData SendFriendRequest(string url, FriendRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public GetBodyResponseData SendMessage(string url, SendMessageRequest info, string sessionID) + { + throw new NotImplementedException(); + } + + public bool Update() + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/Core/Models/Spt/Callbacks/GameCallbacks.cs b/Core/Models/Spt/Callbacks/GameCallbacks.cs new file mode 100644 index 00000000..36754b2c --- /dev/null +++ b/Core/Models/Spt/Callbacks/GameCallbacks.cs @@ -0,0 +1,44 @@ +namespace Core.Models.Spt.Callbacks; + +public class GameCallbacks +{ + public NullResponseData VersionValidata(string url, VersionValidaterequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public GetBodyResponseData GameStart(string url, EmptyRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public GetBodyResponseData GameLogout(string url, EmptyRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public GetBodyResponseData GetGameConfig(string url, GameEmptyCrcRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public GetBodyResponseData GetServer(string url, EmptyRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public GetBodyResponseData ValidateGameVersion(string url, EmptyRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public GetBodyResponseData GameKeepalive(string url, EmptyRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public string GetVersion(string url, EmptyRequestData info, string sessionID) + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/Core/Models/Spt/Callbacks/HandbookCallbacks.cs b/Core/Models/Spt/Callbacks/HandbookCallbacks.cs new file mode 100644 index 00000000..f58bb0a9 --- /dev/null +++ b/Core/Models/Spt/Callbacks/HandbookCallbacks.cs @@ -0,0 +1,9 @@ +namespace Core.Models.Spt.Callbacks; + +public class HandbookCallbacks +{ + public void Load() + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/Core/Models/Spt/Callbacks/HealthCallbacks.cs b/Core/Models/Spt/Callbacks/HealthCallbacks.cs new file mode 100644 index 00000000..15ec2ded --- /dev/null +++ b/Core/Models/Spt/Callbacks/HealthCallbacks.cs @@ -0,0 +1,29 @@ +namespace Core.Models.Spt.Callbacks; + +public class HealthCallbacks +{ + public SptProfile OnLoad(string sessionID) + { + throw new NotImplementedException(); + } + + public object SyncHealth(string url, SyncHealthRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public object OffraidEat(PmcData pmcData, OffraidEatRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public object OffraidHeal(PmcData pmcData, OffraidHealRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public object HealthTreatment(PmcData pmcData, HealthTreatmentRequestData info, string sessionID) + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/Core/Models/Spt/Callbacks/HideoutCallbacks.cs b/Core/Models/Spt/Callbacks/HideoutCallbacks.cs new file mode 100644 index 00000000..cf3e75d5 --- /dev/null +++ b/Core/Models/Spt/Callbacks/HideoutCallbacks.cs @@ -0,0 +1,6 @@ +namespace Core.Models.Spt.Callbacks; + +public class HideoutCallbacks +{ + +} \ No newline at end of file diff --git a/Core/Models/Spt/Callbacks/HttpCallbacks.cs b/Core/Models/Spt/Callbacks/HttpCallbacks.cs new file mode 100644 index 00000000..970f4ec7 --- /dev/null +++ b/Core/Models/Spt/Callbacks/HttpCallbacks.cs @@ -0,0 +1,6 @@ +namespace Core.Models.Spt.Callbacks; + +public class HttpCallbacks +{ + +} \ No newline at end of file diff --git a/Core/Models/Spt/Callbacks/InsuranceCallbacks.cs b/Core/Models/Spt/Callbacks/InsuranceCallbacks.cs new file mode 100644 index 00000000..65a45288 --- /dev/null +++ b/Core/Models/Spt/Callbacks/InsuranceCallbacks.cs @@ -0,0 +1,6 @@ +namespace Core.Models.Spt.Callbacks; + +public class InsuranceCallbacks +{ + +} \ No newline at end of file diff --git a/Core/Models/Spt/Callbacks/InventoryCallbacks.cs b/Core/Models/Spt/Callbacks/InventoryCallbacks.cs new file mode 100644 index 00000000..31bbf43e --- /dev/null +++ b/Core/Models/Spt/Callbacks/InventoryCallbacks.cs @@ -0,0 +1,6 @@ +namespace Core.Models.Spt.Callbacks; + +public class InventoryCallbacks +{ + +} \ No newline at end of file diff --git a/Core/Models/Spt/Callbacks/ItemEventCallbacks.cs b/Core/Models/Spt/Callbacks/ItemEventCallbacks.cs new file mode 100644 index 00000000..9e5f2ade --- /dev/null +++ b/Core/Models/Spt/Callbacks/ItemEventCallbacks.cs @@ -0,0 +1,6 @@ +namespace Core.Models.Spt.Callbacks; + +public class ItemEventCallbacks +{ + +} \ No newline at end of file diff --git a/Core/Models/Spt/Callbacks/LauncherCallbacks.cs b/Core/Models/Spt/Callbacks/LauncherCallbacks.cs new file mode 100644 index 00000000..1bff8558 --- /dev/null +++ b/Core/Models/Spt/Callbacks/LauncherCallbacks.cs @@ -0,0 +1,6 @@ +namespace Core.Models.Spt.Callbacks; + +public class LauncherCallbacks +{ + +} \ No newline at end of file diff --git a/Core/Models/Spt/Callbacks/LocationCallbacks.cs b/Core/Models/Spt/Callbacks/LocationCallbacks.cs new file mode 100644 index 00000000..dd4322ae --- /dev/null +++ b/Core/Models/Spt/Callbacks/LocationCallbacks.cs @@ -0,0 +1,6 @@ +namespace Core.Models.Spt.Callbacks; + +public class LocationCallbacks +{ + +} \ No newline at end of file diff --git a/Core/Models/Spt/Callbacks/ModCallbacks.cs b/Core/Models/Spt/Callbacks/ModCallbacks.cs new file mode 100644 index 00000000..fe2cf935 --- /dev/null +++ b/Core/Models/Spt/Callbacks/ModCallbacks.cs @@ -0,0 +1,6 @@ +namespace Core.Models.Spt.Callbacks; + +public class ModCallbacks +{ + +} \ No newline at end of file diff --git a/Core/Models/Spt/Callbacks/NoteCallbacks.cs b/Core/Models/Spt/Callbacks/NoteCallbacks.cs new file mode 100644 index 00000000..1727e4eb --- /dev/null +++ b/Core/Models/Spt/Callbacks/NoteCallbacks.cs @@ -0,0 +1,6 @@ +namespace Core.Models.Spt.Callbacks; + +public class NoteCallbacks +{ + +} \ No newline at end of file diff --git a/Core/Models/Spt/Callbacks/NotifierCallbacks.cs b/Core/Models/Spt/Callbacks/NotifierCallbacks.cs new file mode 100644 index 00000000..1b7ca1e7 --- /dev/null +++ b/Core/Models/Spt/Callbacks/NotifierCallbacks.cs @@ -0,0 +1,6 @@ +namespace Core.Models.Spt.Callbacks; + +public class NotifierCallbacks +{ + +} \ No newline at end of file diff --git a/Core/Models/Spt/Callbacks/PresetBuildCallbacks.cs b/Core/Models/Spt/Callbacks/PresetBuildCallbacks.cs new file mode 100644 index 00000000..159679c1 --- /dev/null +++ b/Core/Models/Spt/Callbacks/PresetBuildCallbacks.cs @@ -0,0 +1,6 @@ +namespace Core.Models.Spt.Callbacks; + +public class PresetBuildCallbacks +{ + +} \ No newline at end of file diff --git a/Core/Models/Spt/Callbacks/PresetCallbacks.cs b/Core/Models/Spt/Callbacks/PresetCallbacks.cs new file mode 100644 index 00000000..2c211242 --- /dev/null +++ b/Core/Models/Spt/Callbacks/PresetCallbacks.cs @@ -0,0 +1,6 @@ +namespace Core.Models.Spt.Callbacks; + +public class PresetCallbacks +{ + +} \ No newline at end of file diff --git a/Core/Models/Spt/Callbacks/ProfileCallbacks.cs b/Core/Models/Spt/Callbacks/ProfileCallbacks.cs new file mode 100644 index 00000000..e6697cf9 --- /dev/null +++ b/Core/Models/Spt/Callbacks/ProfileCallbacks.cs @@ -0,0 +1,6 @@ +namespace Core.Models.Spt.Callbacks; + +public class ProfileCallbacks +{ + +} \ No newline at end of file diff --git a/Core/Models/Spt/Callbacks/QuestCallbacks.cs b/Core/Models/Spt/Callbacks/QuestCallbacks.cs new file mode 100644 index 00000000..5f15f1b9 --- /dev/null +++ b/Core/Models/Spt/Callbacks/QuestCallbacks.cs @@ -0,0 +1,6 @@ +namespace Core.Models.Spt.Callbacks; + +public class QuestCallbacks +{ + +} \ No newline at end of file diff --git a/Core/Models/Spt/Callbacks/RagfairCallbacks.cs b/Core/Models/Spt/Callbacks/RagfairCallbacks.cs new file mode 100644 index 00000000..4e66d22a --- /dev/null +++ b/Core/Models/Spt/Callbacks/RagfairCallbacks.cs @@ -0,0 +1,6 @@ +namespace Core.Models.Spt.Callbacks; + +public class RagfairCallbacks +{ + +} \ No newline at end of file diff --git a/Core/Models/Spt/Callbacks/RepairCallbacks.cs b/Core/Models/Spt/Callbacks/RepairCallbacks.cs new file mode 100644 index 00000000..fec72c83 --- /dev/null +++ b/Core/Models/Spt/Callbacks/RepairCallbacks.cs @@ -0,0 +1,6 @@ +namespace Core.Models.Spt.Callbacks; + +public class RepairCallbacks +{ + +} \ No newline at end of file diff --git a/Core/Models/Spt/Callbacks/SaveCallbacks.cs b/Core/Models/Spt/Callbacks/SaveCallbacks.cs new file mode 100644 index 00000000..4393c0ce --- /dev/null +++ b/Core/Models/Spt/Callbacks/SaveCallbacks.cs @@ -0,0 +1,6 @@ +namespace Core.Models.Spt.Callbacks; + +public class SaveCallbacks +{ + +} \ No newline at end of file diff --git a/Core/Models/Spt/Callbacks/TradeCallbacks.cs b/Core/Models/Spt/Callbacks/TradeCallbacks.cs new file mode 100644 index 00000000..e2b64f97 --- /dev/null +++ b/Core/Models/Spt/Callbacks/TradeCallbacks.cs @@ -0,0 +1,6 @@ +namespace Core.Models.Spt.Callbacks; + +public class TradeCallbacks +{ + +} \ No newline at end of file diff --git a/Core/Models/Spt/Callbacks/TraderCallbacks.cs b/Core/Models/Spt/Callbacks/TraderCallbacks.cs new file mode 100644 index 00000000..6ac98d74 --- /dev/null +++ b/Core/Models/Spt/Callbacks/TraderCallbacks.cs @@ -0,0 +1,6 @@ +namespace Core.Models.Spt.Callbacks; + +public class TraderCallbacks +{ + +} \ No newline at end of file diff --git a/Core/Models/Spt/Callbacks/WeatherCallbacks.cs b/Core/Models/Spt/Callbacks/WeatherCallbacks.cs new file mode 100644 index 00000000..fabf3385 --- /dev/null +++ b/Core/Models/Spt/Callbacks/WeatherCallbacks.cs @@ -0,0 +1,6 @@ +namespace Core.Models.Spt.Callbacks; + +public class WeatherCallbacks +{ + +} \ No newline at end of file diff --git a/Core/Models/Spt/Config/AirdropConfig.cs b/Core/Models/Spt/Config/AirdropConfig.cs index 36644ea1..f982c8de 100644 --- a/Core/Models/Spt/Config/AirdropConfig.cs +++ b/Core/Models/Spt/Config/AirdropConfig.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Text.Json.Serialization; -namespace Types.Models.Spt.Config; +namespace Core.Models.Spt.Config; public class AirdropConfig : BaseConfig { diff --git a/Core/Models/Spt/Config/BackupConfig.cs b/Core/Models/Spt/Config/BackupConfig.cs index 96568506..7bd6b324 100644 --- a/Core/Models/Spt/Config/BackupConfig.cs +++ b/Core/Models/Spt/Config/BackupConfig.cs @@ -1,4 +1,4 @@ -namespace Types.Models.Spt.Config; +namespace Core.Models.Spt.Config; using System.Text.Json.Serialization; diff --git a/Core/Models/Spt/Config/BaseConfig.cs b/Core/Models/Spt/Config/BaseConfig.cs index 82a345d8..b5138c9a 100644 --- a/Core/Models/Spt/Config/BaseConfig.cs +++ b/Core/Models/Spt/Config/BaseConfig.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace Types.Models.Spt.Config; +namespace Core.Models.Spt.Config; public class BaseConfig { diff --git a/Core/Models/Spt/Config/BotConfig.cs b/Core/Models/Spt/Config/BotConfig.cs index 704b3baf..932fafd7 100644 --- a/Core/Models/Spt/Config/BotConfig.cs +++ b/Core/Models/Spt/Config/BotConfig.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Text.Json.Serialization; -namespace Types.Models.Spt.Config; +namespace Core.Models.Spt.Config; public class BotConfig : BaseConfig { diff --git a/Core/Models/Spt/Config/BotDurability.cs b/Core/Models/Spt/Config/BotDurability.cs index 7e437154..f6c06dd8 100644 --- a/Core/Models/Spt/Config/BotDurability.cs +++ b/Core/Models/Spt/Config/BotDurability.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace Types.Models.Spt.Config; +namespace Core.Models.Spt.Config; public class BotDurability { diff --git a/Core/Models/Spt/Config/CoreConfig.cs b/Core/Models/Spt/Config/CoreConfig.cs index 1808a074..44b3531f 100644 --- a/Core/Models/Spt/Config/CoreConfig.cs +++ b/Core/Models/Spt/Config/CoreConfig.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace Types.Models.Spt.Config; +namespace Core.Models.Spt.Config; public class CoreConfig : BaseConfig { diff --git a/Core/Models/Spt/Config/GiftsConfig.cs b/Core/Models/Spt/Config/GiftsConfig.cs index 91b03a36..9c05afbd 100644 --- a/Core/Models/Spt/Config/GiftsConfig.cs +++ b/Core/Models/Spt/Config/GiftsConfig.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace Types.Models.Spt.Config; +namespace Core.Models.Spt.Config; public class Gift { diff --git a/Core/Models/Spt/Config/HealthConfig.cs b/Core/Models/Spt/Config/HealthConfig.cs index 42a3fbec..7088a1a3 100644 --- a/Core/Models/Spt/Config/HealthConfig.cs +++ b/Core/Models/Spt/Config/HealthConfig.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace Types.Models.Spt.Config; +namespace Core.Models.Spt.Config; public class HealthConfig : BaseConfig { @@ -11,7 +11,7 @@ public class HealthConfig : BaseConfig public HealthMultipliers HealthMultipliers { get; set; } [JsonPropertyName("save")] - public Save Save { get; set; } + public HealthSave Save { get; set; } } public class HealthMultipliers @@ -23,7 +23,7 @@ public class HealthMultipliers public double Blacked { get; set; } } -public class Save +public class HealthSave { [JsonPropertyName("health")] public bool Health { get; set; } diff --git a/Core/Models/Spt/Config/HideoutConfig.cs b/Core/Models/Spt/Config/HideoutConfig.cs index b7674535..b7479156 100644 --- a/Core/Models/Spt/Config/HideoutConfig.cs +++ b/Core/Models/Spt/Config/HideoutConfig.cs @@ -1,7 +1,6 @@ -using System.Collections.Generic; -using System.Text.Json.Serialization; +using System.Text.Json.Serialization; -namespace Types.Models.Spt.Config; +namespace Core.Models.Spt.Config; public class HideoutConfig : BaseConfig { diff --git a/Core/Models/Spt/Config/HttpConfig.cs b/Core/Models/Spt/Config/HttpConfig.cs index 04dda2ea..d465daa5 100644 --- a/Core/Models/Spt/Config/HttpConfig.cs +++ b/Core/Models/Spt/Config/HttpConfig.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace Types.Models.Spt.Config; +namespace Core.Models.Spt.Config; public class HttpConfig : BaseConfig { diff --git a/Core/Models/Spt/Config/InRaidConfig.cs b/Core/Models/Spt/Config/InRaidConfig.cs index 919dea0b..c46f8eb2 100644 --- a/Core/Models/Spt/Config/InRaidConfig.cs +++ b/Core/Models/Spt/Config/InRaidConfig.cs @@ -1,6 +1,87 @@ -namespace Types.Models.Spt.Config; +using System.Text.Json.Serialization; -public class InRaidConfig +namespace Core.Models.Spt.Config; + +public class InRaidConfig : BaseConfig { - + [JsonPropertyName("kind")] + public string Kind { get; set; } = "spt-inraid"; + + /** Overrides to apply to the pre-raid settings screen */ + [JsonPropertyName("raidMenuSettings")] + public RaidMenuSettings RaidMenuSettings { get; set; } + + /** What effects should be saved post-raid */ + [JsonPropertyName("save")] + public RaidSave Save { get; set; } + + /** Names of car extracts */ + [JsonPropertyName("carExtracts")] + public List CarExtracts { get; set; } + + /** Names of coop extracts */ + [JsonPropertyName("coopExtracts")] + public List CoopExtracts { get; set; } + + /** Fence rep gain from a single car extract */ + [JsonPropertyName("carExtractBaseStandingGain")] + public double CarExtractBaseStandingGain { get; set; } + + /** Fence rep gain from a single coop extract */ + [JsonPropertyName("coopExtractBaseStandingGain")] + public double CoopExtractBaseStandingGain { get; set; } + + /** Fence rep gain when successfully extracting as pscav */ + [JsonPropertyName("scavExtractStandingGain")] + public double ScavExtractStandingGain { get; set; } + + /** The likelihood of PMC eliminating a minimum of 2 scavs while you engage them as a pscav. */ + [JsonPropertyName("pmcKillProbabilityForScavGain")] + public double PmcKillProbabilityForScavGain { get; set; } + + /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ + [JsonPropertyName("keepFiRSecureContainerOnDeath")] + public bool KeepFiRSecureContainerOnDeath { get; set; } + + /** If enabled always keep found in raid status on items */ + [JsonPropertyName("alwaysKeepFoundInRaidonRaidEnd")] + public bool AlwaysKeepFoundInRaidOnRaidEnd { get; set; } + + /** Percentage chance a player scav hot is hostile to the player when scavving */ + [JsonPropertyName("playerScavHostileChancePercent")] + public double PlayerScavHostileChancePercent { get; set; } +} + +public class RaidMenuSettings +{ + [JsonPropertyName("aiAmount")] + public string AiAmount { get; set; } + + [JsonPropertyName("aiDifficulty")] + public string AiDifficulty { get; set; } + + [JsonPropertyName("bossEnabled")] + public bool BossEnabled { get; set; } + + [JsonPropertyName("scavWars")] + public bool ScavWars { get; set; } + + [JsonPropertyName("taggedAndCursed")] + public bool TaggedAndCursed { get; set; } + + [JsonPropertyName("enablePve")] + public bool EnablePve { get; set; } + + [JsonPropertyName("randomWeather")] + public bool RandomWeather { get; set; } + + [JsonPropertyName("randomTime")] + public bool RandomTime { get; set; } +} + +public class RaidSave +{ + /** Should loot gained from raid be saved */ + [JsonPropertyName("loot")] + public bool Loot { get; set; } } \ No newline at end of file diff --git a/Core/Models/Spt/Config/InsuranceConfig.cs b/Core/Models/Spt/Config/InsuranceConfig.cs index 2a557154..4a8fd62b 100644 --- a/Core/Models/Spt/Config/InsuranceConfig.cs +++ b/Core/Models/Spt/Config/InsuranceConfig.cs @@ -1,6 +1,56 @@ -namespace Types.Models.Spt.Config; +using System.Text.Json.Serialization; -public class InsuranceConfig +namespace Core.Models.Spt.Config; + +public class InsuranceConfig : BaseConfig { - + [JsonPropertyName("kind")] + public string Kind { get; set; } = "spt-insurance"; + + /// + /// Chance item is returned as insurance, keyed by trader id + /// + [JsonPropertyName("returnChancePercent")] + public Dictionary ReturnChancePercent { get; set; } + + /// + /// Item slots that should never be returned as insurance + /// + [JsonPropertyName("blacklistedEquipment")] + public List BlacklistedEquipment { get; set; } + + /// + /// Some slots should always be removed, e.g. 'cartridges' + /// + [JsonPropertyName("slotIdsToAlwaysRemove")] + public List SlotIdsToAlwaysRemove { get; set; } + + /// + /// Override to control how quickly insurance is processed/returned in seconds + /// + [JsonPropertyName("returnTimeOverrideSeconds")] + public double ReturnTimeOverrideSeconds { get; set; } + + /// + /// Override to control how long insurance returns stay in mail before expiring - in seconds + /// + [JsonPropertyName("storageTimeOverrideSeconds")] + public double StorageTimeOverrideSeconds { get; set; } + + /// + /// How often server should process insurance in seconds + /// + [JsonPropertyName("runIntervalSeconds")] + public double RunIntervalSeconds { get; set; } + + // Lowest rouble price for an attachment to be allowed to be taken + [JsonPropertyName("minAttachmentRoublePriceToBeTaken")] + public double MinAttachmentRoublePriceToBeTaken { get; set; } + + // Chance out of 100% no attachments from a parent are taken + [JsonPropertyName("chanceNoAttachmentsTakenPercent")] + public double ChanceNoAttachmentsTakenPercent { get; set; } + + [JsonPropertyName("simulateItemsBeingTaken")] + public bool SimulateItemsBeingTaken { get; set; } } \ No newline at end of file diff --git a/Core/Models/Spt/Config/InventoryConfig.cs b/Core/Models/Spt/Config/InventoryConfig.cs index 76f8424e..38f98e3e 100644 --- a/Core/Models/Spt/Config/InventoryConfig.cs +++ b/Core/Models/Spt/Config/InventoryConfig.cs @@ -1,6 +1,71 @@ -namespace Types.Models.Spt.Config; +using System.Text.Json.Serialization; -public class InventoryConfig +namespace Core.Models.Spt.Config; + +public class InventoryConfig : BaseConfig { + [JsonPropertyName("kind")] + public string Kind { get; set; } = "spt-inventory"; + /** Should new items purchased by flagged as found in raid */ + [JsonPropertyName("newItemsMarkedFound")] + public bool NewItemsMarkedFound { get; set; } + + [JsonPropertyName("randomLootContainers")] + public Dictionary RandomLootContainers { get; set; } + + [JsonPropertyName("sealedAirdropContainer")] + public SealedAirdropContainerSettings SealedAirdropContainer { get; set; } + + /** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */ + [JsonPropertyName("customMoneyTpls")] + public List CustomMoneyTpls { get; set; } + + /** Multipliers for skill gain when inside menus, NOT in-game */ + [JsonPropertyName("skillGainMultiplers")] + public Dictionary SkillGainMultipliers { get; set; } + + /** Container Tpls that should be deprioritised when choosing where to take money from for payments */ + [JsonPropertyName("deprioritisedMoneyContainers")] + public List DeprioritisedMoneyContainers { get; set; } +} + +public class RewardDetails +{ + [JsonPropertyName("rewardCount")] + public int RewardCount { get; set; } + + [JsonPropertyName("foundInRaid")] + public bool FoundInRaid { get; set; } + + [JsonPropertyName("rewardTplPool")] + public Dictionary? RewardTplPool { get; set; } + + [JsonPropertyName("rewardTypePool")] + public List? RewardTypePool { get; set; } +} + +public class SealedAirdropContainerSettings +{ + [JsonPropertyName("weaponRewardWeight")] + public Dictionary WeaponRewardWeight { get; set; } + + [JsonPropertyName("defaultPresetsOnly")] + public bool DefaultPresetsOnly { get; set; } + + /** Should contents be flagged as found in raid when opened */ + [JsonPropertyName("foundInRaid")] + public bool FoundInRaid { get; set; } + + [JsonPropertyName("weaponModRewardLimits")] + public Dictionary WeaponModRewardLimits { get; set; } + + [JsonPropertyName("rewardTypeLimits")] + public Dictionary RewardTypeLimits { get; set; } + + [JsonPropertyName("ammoBoxWhitelist")] + public List AmmoBoxWhitelist { get; set; } + + [JsonPropertyName("allowBossItems")] + public bool AllowBossItems { get; set; } } \ No newline at end of file diff --git a/Core/Models/Spt/Config/ItemConfig.cs b/Core/Models/Spt/Config/ItemConfig.cs index ef9080f0..f51537fe 100644 --- a/Core/Models/Spt/Config/ItemConfig.cs +++ b/Core/Models/Spt/Config/ItemConfig.cs @@ -1,6 +1,47 @@ -namespace Types.Models.Spt.Config; +using System.Text.Json.Serialization; -public class ItemConfig +namespace Core.Models.Spt.Config; + +public class ItemConfig : BaseConfig { - + [JsonPropertyName("kind")] + public string Kind { get; set; } = "spt-item"; + + /** Items that should be globally blacklisted */ + [JsonPropertyName("blacklist")] + public List Blacklist { get; set; } + + /** Items that should not be lootable from any location */ + [JsonPropertyName("lootableItemBlacklist")] + public List LootableItemBlacklist { get; set; } + + /** items that should not be given as rewards */ + [JsonPropertyName("rewardItemBlacklist")] + public List RewardItemBlacklist { get; set; } + + /** Item base types that should not be given as rewards */ + [JsonPropertyName("rewardItemTypeBlacklist")] + public List RewardItemTypeBlacklist { get; set; } + + /** Items that can only be found on bosses */ + [JsonPropertyName("bossItems")] + public List BossItems { get; set; } + + [JsonPropertyName("handbookPriceOverride")] + public Dictionary HandbookPriceOverride { get; set; } + + /** Presets to add to the globals.json `ItemPresets` dictionary on server start */ + [JsonPropertyName("customItemGlobalPresets")] + public List CustomItemGlobalPresets { get; set; } +} + +public class HandbookPriceOverride +{ + /** Price in roubles */ + [JsonPropertyName("price")] + public decimal Price { get; set; } + + /** NOT parentId from items.json, but handbook.json */ + [JsonPropertyName("parentId")] + public string ParentId { get; set; } } \ No newline at end of file diff --git a/Core/Models/Spt/Config/LocaleConfig.cs b/Core/Models/Spt/Config/LocaleConfig.cs index 1535c27d..9e6bc230 100644 --- a/Core/Models/Spt/Config/LocaleConfig.cs +++ b/Core/Models/Spt/Config/LocaleConfig.cs @@ -1,6 +1,24 @@ -namespace Types.Models.Spt.Config; +using System.Text.Json.Serialization; -public class LocaleConfig +namespace Core.Models.Spt.Config; + +public class LocaleConfig : BaseConfig { + [JsonPropertyName("kind")] + public string Kind { get; set; } = "spt-locale"; + /** e.g. ru/en/cn/fr etc, or 'system', will take computer locale setting */ + [JsonPropertyName("gameLocale")] + public string GameLocale { get; set; } + + /** e.g. ru/en/cn/fr etc, or 'system', will take computer locale setting */ + [JsonPropertyName("serverLocale")] + public string ServerLocale { get; set; } + + /** Languages server can be translated into */ + [JsonPropertyName("serverSupportedLocales")] + public List ServerSupportedLocales { get; set; } + + [JsonPropertyName("fallbacks")] + public Dictionary Fallbacks { get; set; } } \ No newline at end of file diff --git a/Core/Models/Spt/Config/LocationConfig.cs b/Core/Models/Spt/Config/LocationConfig.cs index f2c96fd0..7f20643a 100644 --- a/Core/Models/Spt/Config/LocationConfig.cs +++ b/Core/Models/Spt/Config/LocationConfig.cs @@ -1,6 +1,317 @@ -namespace Types.Models.Spt.Config; +using System.Text.Json.Serialization; -public class LocationConfig +namespace Core.Models.Spt.Config; + +public class LocationConfig : BaseConfig { + [JsonPropertyName("kind")] + public string Kind { get; set; } = "spt-location"; + + /// + /// Rogues are classified as bosses and spawn immediately, this can result in no scavs spawning, delay rogues spawning to allow scavs to spawn first + /// + [JsonPropertyName("rogueLighthouseSpawnTimeSettings")] + public RogueLighthouseSpawnTimeSettings RogueLighthouseSpawnTimeSettings { get; set; } + + /// + /// When a map has hit max alive bots, any wave that should spawn will be reduced to 1 bot in size and placed in a spawn queue, this splits waves into smaller sizes to reduce the impact of this behaviour + /// + [JsonPropertyName("splitWaveIntoSingleSpawnsSettings")] + public SplitWaveSettings SplitWaveIntoSingleSpawnsSettings { get; set; } + + [JsonPropertyName("looseLootMultiplier")] + public LootMultiplier LooseLootMultiplier { get; set; } + [JsonPropertyName("staticLootMultiplier")] + public LootMultiplier StaticLootMultiplier { get; set; } + + /// + /// Custom bot waves to add to a locations base json on game start if addCustomBotWavesToMaps is true + /// + [JsonPropertyName("customWaves")] + public CustomWaves CustomWaves { get; set; } + + /// + /// Open zones to add to map + /// + [JsonPropertyName("openZones")] + public Dictionary> OpenZones { get; set; } + + /// + /// Key = map id, value = item tpls that should only have one forced loot spawn position + /// + [JsonPropertyName("forcedLootSingleSpawnById")] + public Dictionary> ForcedLootSingleSpawnById { get; set; } + + /// + /// How many attempts should be taken to fit an item into a container before giving up + /// + [JsonPropertyName("fitLootIntoContainerAttempts")] + public int FitLootIntoContainerAttempts { get; set; } + + /// + /// Add all possible zones to each maps `OpenZones` property + /// + [JsonPropertyName("addOpenZonesToAllMaps")] + public bool AddOpenZonesToAllMaps { get; set; } + + /// + /// Allow addition of custom bot waves designed by SPT to be added to maps - defined in configs/location.json.customWaves + /// + [JsonPropertyName("addCustomBotWavesToMaps")] + public bool AddCustomBotWavesToMaps { get; set; } + + /// + /// Should the limits defined inside botTypeLimits to be applied to locations on game start + /// + [JsonPropertyName("enableBotTypeLimits")] + public bool EnableBotTypeLimits { get; set; } + + /// + /// Add limits to a locations base.MinMaxBots array if enableBotTypeLimits is true + /// + [JsonPropertyName("botTypeLimits")] + public Dictionary> BotTypeLimits { get; set; } + + /// + /// Container randomisation settings + /// + [JsonPropertyName("containerRandomisationSettings")] + public ContainerRandomisationSettings ContainerRandomisationSettings { get; set; } + + /// + /// How full must a random loose magazine be % + /// + [JsonPropertyName("minFillLooseMagazinePercent")] + public int MinFillLooseMagazinePercent { get; set; } + + /// + /// How full must a random static magazine be % + /// + [JsonPropertyName("minFillStaticMagazinePercent")] + public int MinFillStaticMagazinePercent { get; set; } + + [JsonPropertyName("allowDuplicateItemsInStaticContainers")] + public bool AllowDuplicateItemsInStaticContainers { get; set; } + + /// + /// Chance loose magazines have ammo in them TODO - rename to dynamicMagazineLootHasAmmoChancePercent + /// + [JsonPropertyName("magazineLootHasAmmoChancePercent")] + public int MagazineLootHasAmmoChancePercent { get; set; } + + /// + /// Chance static magazines have ammo in them + /// + [JsonPropertyName("staticMagazineLootHasAmmoChancePercent")] + public int StaticMagazineLootHasAmmoChancePercent { get; set; } + + /// + /// Key: map, value: loose loot ids to ignore + /// + [JsonPropertyName("looseLootBlacklist")] + public Dictionary> LooseLootBlacklist { get; set; } + + /// + /// Key: map, value: settings to control how long scav raids are + /// + [JsonPropertyName("scavRaidTimeSettings")] + public ScavRaidTimeSettings ScavRaidTimeSettings { get; set; } + + /// + /// Settings to adjust mods for lootable equipment in raid + /// + [JsonPropertyName("equipmentLootSettings")] + public EquipmentLootSettings EquipmentLootSettings { get; set; } + + /// + /// Min percentage to set raider spawns at, -1 makes no changes + /// + [JsonPropertyName("reserveRaiderSpawnChanceOverrides")] + public ReserveRaiderSpawnChanceOverrides ReserveRaiderSpawnChanceOverrides { get; set; } + + /// + /// Map ids players cannot visit + /// + [JsonPropertyName("nonMaps")] + public List NonMaps { get; set; } +} + +public class ReserveRaiderSpawnChanceOverrides +{ + [JsonPropertyName("nonTriggered")] + public int NonTriggered { get; set; } + + [JsonPropertyName("triggered")] + public int Triggered { get; set; } +} + +public class EquipmentLootSettings +{ + // Percentage chance item will be added to equipment + [JsonPropertyName("modSpawnChancePercent")] + public Dictionary ModSpawnChancePercent { get; set; } +} + +public class FixEmptyBotWavesSettings +{ + [JsonPropertyName("enabled")] + public bool Enabled { get; set; } + + [JsonPropertyName("ignoreMaps")] + public List IgnoreMaps { get; set; } +} + +public class RogueLighthouseSpawnTimeSettings +{ + [JsonPropertyName("enabled")] + public bool Enabled { get; set; } + + [JsonPropertyName("waitTimeSeconds")] + public int WaitTimeSeconds { get; set; } +} + +public class SplitWaveSettings +{ + [JsonPropertyName("enabled")] + public bool Enabled { get; set; } + + [JsonPropertyName("ignoreMaps")] + public List IgnoreMaps { get; set; } + + [JsonPropertyName("waveSizeThreshold")] + public int WaveSizeThreshold { get; set; } +} + +public class CustomWaves +{ + /** Bosses spawn on raid start */ + [JsonPropertyName("boss")] + public Dictionary> Boss { get; set; } + + [JsonPropertyName("normal")] + public Dictionary> Normal { get; set; } +} + +public class BotTypeLimit : MinMax +{ + [JsonPropertyName("type")] + public string Type { get; set; } +} + +/** Multiplier to apply to the loot count for a given map */ +public class LootMultiplier +{ + [JsonPropertyName("bigmap")] + public int BigMap { get; set; } + + [JsonPropertyName("develop")] + public int Develop { get; set; } + + [JsonPropertyName("factory4_day")] + public int Factory4Day { get; set; } + + [JsonPropertyName("factory4_night")] + public int Factory4Night { get; set; } + + [JsonPropertyName("interchange")] + public int Interchange { get; set; } + + [JsonPropertyName("laboratory")] + public int Laboratory { get; set; } + + [JsonPropertyName("rezervbase")] + public int RezervBase { get; set; } + + [JsonPropertyName("shoreline")] + public int Shoreline { get; set; } + + [JsonPropertyName("woods")] + public int Woods { get; set; } + + [JsonPropertyName("hideout")] + public int Hideout { get; set; } + + [JsonPropertyName("lighthouse")] + public int Lighthouse { get; set; } + + [JsonPropertyName("privatearea")] + public int PrivateArea { get; set; } + + [JsonPropertyName("suburbs")] + public int Suburbs { get; set; } + + [JsonPropertyName("tarkovstreets")] + public int TarkovStreets { get; set; } + + [JsonPropertyName("terminal")] + public int Terminal { get; set; } + + [JsonPropertyName("town")] + public int Town { get; set; } + + [JsonPropertyName("sandbox")] + public int Sandbox { get; set; } +} + +public class ContainerRandomisationSettings +{ + [JsonPropertyName("enabled")] + public bool Enabled { get; set; } + + /** What maps can use the container randomisation feature */ + [JsonPropertyName("maps")] + public Dictionary Maps { get; set; } + + /** Some container types don't work when randomised */ + [JsonPropertyName("containerTypesToNotRandomise")] + public List ContainerTypesToNotRandomise { get; set; } + + [JsonPropertyName("containerGroupMinSizeMultiplier")] + public double ContainerGroupMinSizeMultiplier { get; set; } + + [JsonPropertyName("containerGroupMaxSizeMultiplier")] + public double ContainerGroupMaxSizeMultiplier { get; set; } +} + +public class ScavRaidTimeSettings +{ + [JsonPropertyName("settings")] + public ScavRaidTimeConfigSettings Settings { get; set; } + + [JsonPropertyName("maps")] + public Dictionary Maps { get; set; } +} + +public class ScavRaidTimeConfigSettings +{ + [JsonPropertyName("trainArrivalDelayObservedSeconds")] + public int TrainArrivalDelayObservedSeconds { get; set; } +} + +public class ScavRaidTimeLocationSettings +{ + /** Should loot be reduced by same percent length of raid is reduced by */ + [JsonPropertyName("reduceLootByPercent")] + public bool ReduceLootByPercent { get; set; } + + /** Smallest % of container loot that should be spawned */ + [JsonPropertyName("minStaticLootPercent")] + public double MinStaticLootPercent { get; set; } + + /** Smallest % of loose loot that should be spawned */ + [JsonPropertyName("minDynamicLootPercent")] + public double MinDynamicLootPercent { get; set; } + + /** Chance raid time is reduced */ + [JsonPropertyName("reducedChancePercent")] + public double ReducedChancePercent { get; set; } + + /** How much should raid time be reduced - weighted */ + [JsonPropertyName("reductionPercentWeights")] + public Dictionary ReductionPercentWeights { get; set; } + + /** Should bot waves be removed / spawn times be adjusted */ + [JsonPropertyName("adjustWaves")] + public bool AdjustWaves { get; set; } } \ No newline at end of file diff --git a/Core/Models/Spt/Config/LootConfig.cs b/Core/Models/Spt/Config/LootConfig.cs index b2c5ec60..01aca581 100644 --- a/Core/Models/Spt/Config/LootConfig.cs +++ b/Core/Models/Spt/Config/LootConfig.cs @@ -1,6 +1,17 @@ -namespace Types.Models.Spt.Config; +using System.Text.Json.Serialization; -public class LootConfig +namespace Core.Models.Spt.Config; + +public class LootConfig : BaseConfig { - + [JsonPropertyName("kind")] + public string Kind { get; set; } = "spt-loot"; + + /** Spawn positions to add into a map, key=mapid */ + [JsonPropertyName("looseLoot")] + public Dictionary LooseLoot { get; set; } + + /** Loose loot probability adjustments to apply on game start */ + [JsonPropertyName("looseLootSpawnPointAdjustments")] + public Dictionary> LooseLootSpawnPointAdjustments { get; set; } } \ No newline at end of file diff --git a/Core/Models/Spt/Config/LostOnDeathConfig.cs b/Core/Models/Spt/Config/LostOnDeathConfig.cs index 1ed695ad..9803f6ef 100644 --- a/Core/Models/Spt/Config/LostOnDeathConfig.cs +++ b/Core/Models/Spt/Config/LostOnDeathConfig.cs @@ -1,6 +1,63 @@ -namespace Types.Models.Spt.Config; +using System.Text.Json.Serialization; -public class LostOnDeathConfig +namespace Core.Models.Spt.Config; + +public class LostOnDeathConfig : BaseConfig { + [JsonPropertyName("kind")] + public string Kind { get; set; } = "spt-lostondeath"; + /** What equipment in each slot should be lost on death */ + [JsonPropertyName("equipment")] + public LostEquipment Equipment { get; set; } + + /** Should special slot items be removed from quest inventory on death e.g. wifi camera/markers */ + [JsonPropertyName("specialSlotItems")] + public bool SpecialSlotItems { get; set; } + + /** Should quest items be removed from quest inventory on death */ + [JsonPropertyName("questItems")] + public bool QuestItems { get; set; } +} + +public class LostEquipment +{ + [JsonPropertyName("ArmBand")] + public bool ArmBand { get; set; } + + [JsonPropertyName("Headwear")] + public bool Headwear { get; set; } + + [JsonPropertyName("Earpiece")] + public bool Earpiece { get; set; } + + [JsonPropertyName("FaceCover")] + public bool FaceCover { get; set; } + + [JsonPropertyName("ArmorVest")] + public bool ArmorVest { get; set; } + + [JsonPropertyName("Eyewear")] + public bool Eyewear { get; set; } + + [JsonPropertyName("TacticalVest")] + public bool TacticalVest { get; set; } + + [JsonPropertyName("PocketItems")] + public bool PocketItems { get; set; } + + [JsonPropertyName("Backpack")] + public bool Backpack { get; set; } + + [JsonPropertyName("Holster")] + public bool Holster { get; set; } + + [JsonPropertyName("FirstPrimaryWeapon")] + public bool FirstPrimaryWeapon { get; set; } + + [JsonPropertyName("SecondPrimaryWeapon")] + public bool SecondPrimaryWeapon { get; set; } + + [JsonPropertyName("Scabbard")] + public bool Scabbard { get; set; } } \ No newline at end of file diff --git a/Core/Models/Spt/Config/MatchConfig.cs b/Core/Models/Spt/Config/MatchConfig.cs index f0cd1b63..2a3a86d0 100644 --- a/Core/Models/Spt/Config/MatchConfig.cs +++ b/Core/Models/Spt/Config/MatchConfig.cs @@ -1,6 +1,12 @@ -namespace Types.Models.Spt.Config; +using System.Text.Json.Serialization; + +namespace Core.Models.Spt.Config; public class MatchConfig { + [JsonPropertyName("kind")] + public string Kind { get; set; } = "spt-match"; + [JsonPropertyName("enabled")] + public bool Enabled { get; set; } } \ No newline at end of file diff --git a/Core/Models/Spt/Config/PlayerScavConfig.cs b/Core/Models/Spt/Config/PlayerScavConfig.cs index 79bbd9ac..e1c141d7 100644 --- a/Core/Models/Spt/Config/PlayerScavConfig.cs +++ b/Core/Models/Spt/Config/PlayerScavConfig.cs @@ -1,6 +1,60 @@ -namespace Types.Models.Spt.Config; +using System.Text.Json.Serialization; -public class PlayerScavConfig +namespace Core.Models.Spt.Config; + +public class PlayerScavConfig : BaseConfig { - + [JsonPropertyName("kind")] + public string Kind { get; set; } = "spt-playerscav"; + + [JsonPropertyName("karmaLevel")] + public Dictionary KarmaLevel { get; set; } +} + +public class KarmaLevel +{ + [JsonPropertyName("botTypeForLoot")] + public string BotTypeForLoot { get; set; } + + [JsonPropertyName("modifiers")] + public Modifiers Modifiers { get; set; } + + [JsonPropertyName("itemLimits")] + public ItemLimits ItemLimits { get; set; } + + [JsonPropertyName("equipmentBlacklist")] + public Dictionary EquipmentBlacklist { get; set; } + + [JsonPropertyName("lootItemsToAddChancePercent")] + public Dictionary LootItemsToAddChancePercent { get; set; } +} + +public class Modifiers +{ + [JsonPropertyName("equipment")] + public Dictionary Equipment { get; set; } + + [JsonPropertyName("mod")] + public Dictionary Mod { get; set; } +} + +public class ItemLimits +{ + [JsonPropertyName("healing")] + public GenerationData Healing { get; set; } + + [JsonPropertyName("drugs")] + public GenerationData Drugs { get; set; } + + [JsonPropertyName("stims")] + public GenerationData Stims { get; set; } + + [JsonPropertyName("looseLoot")] + public GenerationData LooseLoot { get; set; } + + [JsonPropertyName("magazines")] + public GenerationData Magazines { get; set; } + + [JsonPropertyName("grenades")] + public GenerationData Grenades { get; set; } } \ No newline at end of file diff --git a/Core/Models/Spt/Config/PmcChatResponse.cs b/Core/Models/Spt/Config/PmcChatResponse.cs index 072704ea..a10a32ca 100644 --- a/Core/Models/Spt/Config/PmcChatResponse.cs +++ b/Core/Models/Spt/Config/PmcChatResponse.cs @@ -1,6 +1,33 @@ -namespace Types.Models.Spt.Config; +using System.Text.Json.Serialization; -public class PmcChatResponse +namespace Core.Models.Spt.Config; + +public class PmcChatResponse : BaseConfig { - + [JsonPropertyName("kind")] + public string Kind { get; set; } = "spt-pmcchatresponse"; + + [JsonPropertyName("victim")] + public ResponseSettings Victim { get; set; } + + [JsonPropertyName("killer")] + public ResponseSettings Killer { get; set; } +} + +public class ResponseSettings +{ + [JsonPropertyName("responseChancePercent")] + public double ResponseChancePercent { get; set; } + + [JsonPropertyName("responseTypeWeights")] + public Dictionary ResponseTypeWeights { get; set; } + + [JsonPropertyName("stripCapitalisationChancePercent")] + public double StripCapitalisationChancePercent { get; set; } + + [JsonPropertyName("allCapsChancePercent")] + public double AllCapsChancePercent { get; set; } + + [JsonPropertyName("appendBroToMessageEndChancePercent")] + public double AppendBroToMessageEndChancePercent { get; set; } } \ No newline at end of file diff --git a/Core/Models/Spt/Config/PmcConfig.cs b/Core/Models/Spt/Config/PmcConfig.cs index 8033166e..75467735 100644 --- a/Core/Models/Spt/Config/PmcConfig.cs +++ b/Core/Models/Spt/Config/PmcConfig.cs @@ -1,6 +1,159 @@ -namespace Types.Models.Spt.Config; +using System.Text.Json.Serialization; -public class PmcConfig +namespace Core.Models.Spt.Config; + +public class PmcConfig : BaseConfig { + [JsonPropertyName("kind")] + public string Kind { get; set; } = "spt-pmc"; + /** What game version should the PMC have */ + [JsonPropertyName("gameVersionWeight")] + public Dictionary GameVersionWeight { get; set; } + + /** What account type should the PMC have */ + [JsonPropertyName("accountTypeWeight")] + public Dictionary AccountTypeWeight { get; set; } + + /** Global whitelist/blacklist of vest loot for PMCs */ + [JsonPropertyName("vestLoot")] + public SlotLootSettings VestLoot { get; set; } + + /** Global whitelist/blacklist of pocket loot for PMCs */ + [JsonPropertyName("pocketLoot")] + public SlotLootSettings PocketLoot { get; set; } + + /** Global whitelist/blacklist of backpack loot for PMCs */ + [JsonPropertyName("backpackLoot")] + public SlotLootSettings BackpackLoot { get; set; } + + [JsonPropertyName("globalLootBlacklist")] + public List GlobalLootBlacklist { get; set; } + + /** Use difficulty defined in config/bot.json/difficulty instead of chosen difficulty dropdown value */ + [JsonPropertyName("useDifficultyOverride")] + public bool UseDifficultyOverride { get; set; } + + /** Difficulty override e.g. "AsOnline/Hard" */ + [JsonPropertyName("difficulty")] + public string Difficulty { get; set; } + + /** Chance out of 100 to have a complete gun in backpack */ + [JsonPropertyName("looseWeaponInBackpackChancePercent")] + public double LooseWeaponInBackpackChancePercent { get; set; } + + /** Chance out of 100 to have an enhancement applied to PMC weapon */ + [JsonPropertyName("weaponHasEnhancementChancePercent")] + public double WeaponHasEnhancementChancePercent { get; set; } + + /** MinMax count of weapons to have in backpack */ + [JsonPropertyName("looseWeaponInBackpackLootMinMax")] + public MinMax LooseWeaponInBackpackLootMinMax { get; set; } + + /** Percentage chance PMC will be USEC */ + [JsonPropertyName("isUsec")] + public double IsUsec { get; set; } + + /** WildSpawnType enum value USEC PMCs use */ + [JsonPropertyName("usecType")] + public string UsecType { get; set; } + + /** WildSpawnType enum value BEAR PMCs use */ + [JsonPropertyName("bearType")] + public string BearType { get; set; } + + /** What 'brain' does a PMC use, keyed by map and side (USEC/BEAR) key: map location, value: type for usec/bear */ + [JsonPropertyName("pmcType")] + public Dictionary>> PmcType { get; set; } + + [JsonPropertyName("maxBackpackLootTotalRub")] + public List MaxBackpackLootTotalRub { get; set; } + + [JsonPropertyName("maxPocketLootTotalRub")] + public double MaxPocketLootTotalRub { get; set; } + + [JsonPropertyName("maxVestLootTotalRub")] + public double MaxVestLootTotalRub { get; set; } + + /** Percentage chance a bot from a wave is converted into a PMC, first key = map, second key = bot wildspawn type (assault/exusec), value: min+max chance to be converted */ + [JsonPropertyName("convertIntoPmcChance")] + public Dictionary> ConvertIntoPmcChance { get; set; } + + /** How many levels above player level can a PMC be */ + [JsonPropertyName("botRelativeLevelDeltaMax")] + public double BotRelativeLevelDeltaMax { get; set; } + + /** How many levels below player level can a PMC be */ + [JsonPropertyName("botRelativeLevelDeltaMin")] + public double BotRelativeLevelDeltaMin { get; set; } + + /** Force a number of healing items into PMCs secure container to ensure they can heal */ + [JsonPropertyName("forceHealingItemsIntoSecure")] + public bool ForceHealingItemsIntoSecure { get; set; } + + [JsonPropertyName("hostilitySettings")] + public Dictionary HostilitySettings { get; set; } + + [JsonPropertyName("allPMCsHavePlayerNameWithRandomPrefixChance")] + public double AllPMCsHavePlayerNameWithRandomPrefixChance { get; set; } + + [JsonPropertyName("locationSpecificPmcLevelOverride")] + public Dictionary LocationSpecificPmcLevelOverride { get; set; } + + /** Should secure container loot from usec.json/bear.json be added to pmc bots secure */ + [JsonPropertyName("addSecureContainerLootFromBotConfig")] + public bool AddSecureContainerLootFromBotConfig { get; set; } +} + +public class HostilitySettings +{ + /** Bot roles that are 100% an enemy */ + [JsonPropertyName("additionalEnemyTypes")] + public List? AdditionalEnemyTypes { get; set; } + + /** Objects that determine the % chance another bot type is an enemy */ + [JsonPropertyName("chancedEnemies")] + public List? ChancedEnemies { get; set; } + + [JsonPropertyName("bearEnemyChance")] + public double? BearEnemyChance { get; set; } + + [JsonPropertyName("usecEnemyChance")] + public double? UsecEnemyChance { get; set; } + + [JsonPropertyName("savageEnemyChance")] + public double? SavageEnemyChance { get; set; } + + /** Bot roles that are 100% a friendly */ + [JsonPropertyName("additionalFriendlyTypes")] + public List? AdditionalFriendlyTypes { get; set; } + + [JsonPropertyName("savagePlayerBehaviour")] + public string? SavagePlayerBehaviour { get; set; } +} + +public class PmcTypes +{ + [JsonPropertyName("usec")] + public string Usec { get; set; } + + [JsonPropertyName("bear")] + public string Bear { get; set; } +} + +public class SlotLootSettings +{ + /** Item Type whitelist */ + [JsonPropertyName("whitelist")] + public List Whitelist { get; set; } + + /** Item tpl blacklist */ + [JsonPropertyName("blacklist")] + public List Blacklist { get; set; } +} + +public class IMinMaxLootValue : MinMax +{ + [JsonPropertyName("value")] + public double Value { get; set; } } \ No newline at end of file diff --git a/Core/Models/Spt/Config/QuestConfig.cs b/Core/Models/Spt/Config/QuestConfig.cs index 9cde6954..8e81ec9f 100644 --- a/Core/Models/Spt/Config/QuestConfig.cs +++ b/Core/Models/Spt/Config/QuestConfig.cs @@ -1,6 +1,366 @@ -namespace Types.Models.Spt.Config; +using System.Text.Json.Serialization; -public class QuestConfig +namespace Core.Models.Spt.Config; + +public class QuestConfig : BaseConfig { + [JsonPropertyName("kind")] + public string Kind { get; set; } = "spt-quest"; + + // Hours to get/redeem items from quest mail keyed by profile type + [JsonPropertyName("mailRedeemTimeHours")] + public Dictionary MailRedeemTimeHours { get; set; } + + [JsonPropertyName("questTemplateIds")] + public PlayerTypeQuestIds QuestTemplateIds { get; set; } + + /** Show non-seasonal quests be shown to player */ + [JsonPropertyName("showNonSeasonalEventQuests")] + public bool ShowNonSeasonalEventQuests { get; set; } + + [JsonPropertyName("eventQuests")] + public Dictionary EventQuests { get; set; } + + [JsonPropertyName("repeatableQuests")] + public List RepeatableQuests { get; set; } + + [JsonPropertyName("locationIdMap")] + public Dictionary LocationIdMap { get; set; } + + [JsonPropertyName("bearOnlyQuests")] + public List BearOnlyQuests { get; set; } + + [JsonPropertyName("usecOnlyQuests")] + public List UsecOnlyQuests { get; set; } + + /** Quests that the keyed game version do not see/access */ + [JsonPropertyName("profileBlacklist")] + public Dictionary> ProfileBlacklist { get; set; } + + /** key=questid, gameversions that can see/access quest */ + [JsonPropertyName("profileWhitelist")] + public Dictionary> ProfileWhitelist { get; set; } +} + +public class PlayerTypeQuestIds +{ + [JsonPropertyName("pmc")] + public QuestTypeIds Pmc { get; set; } + + [JsonPropertyName("scav")] + public QuestTypeIds Scav { get; set; } +} + +public class QuestTypeIds +{ + [JsonPropertyName("Elimination")] + public string Elimination { get; set; } + + [JsonPropertyName("Completion")] + public string Completion { get; set; } + + [JsonPropertyName("Exploration")] + public string Exploration { get; set; } +} + +public class EventQuestData +{ + [JsonPropertyName("name")] + public string Name { get; set; } + + [JsonPropertyName("season")] + public SeasonalEventType Season { get; set; } + + [JsonPropertyName("startTimestamp")] + public long StartTimestamp { get; set; } + + [JsonPropertyName("endTimestamp")] + public long EndTimestamp { get; set; } + + [JsonPropertyName("yearly")] + public bool Yearly { get; set; } +} + +public class RepeatableQuestConfig +{ + [JsonPropertyName("id")] + public string Id { get; set; } + + [JsonPropertyName("name")] + public string Name { get; set; } + + [JsonPropertyName("side")] + public string Side { get; set; } + + [JsonPropertyName("types")] + public List Types { get; set; } + + [JsonPropertyName("resetTime")] + public long ResetTime { get; set; } + + [JsonPropertyName("numQuests")] + public int NumQuests { get; set; } + + [JsonPropertyName("minPlayerLevel")] + public int MinPlayerLevel { get; set; } + + [JsonPropertyName("rewardScaling")] + public RewardScaling RewardScaling { get; set; } + + [JsonPropertyName("locations")] + public Dictionary> Locations { get; set; } + + [JsonPropertyName("traderWhitelist")] + public List TraderWhitelist { get; set; } + + [JsonPropertyName("questConfig")] + public RepeatableQuestTypesConfig QuestConfig { get; set; } + + /** Item base types to block when generating rewards */ + [JsonPropertyName("rewardBaseTypeBlacklist")] + public List RewardBaseTypeBlacklist { get; set; } + + /** Item tplIds to ignore when generating rewards */ + [JsonPropertyName("rewardBlacklist")] + public List RewardBlacklist { get; set; } + + [JsonPropertyName("rewardAmmoStackMinSize")] + public int RewardAmmoStackMinSize { get; set; } + + [JsonPropertyName("freeChangesAvailable")] + public int FreeChangesAvailable { get; set; } + + [JsonPropertyName("freeChanges")] + public int FreeChanges { get; set; } + + [JsonPropertyName("keepDailyQuestTypeOnReplacement")] + public bool KeepDailyQuestTypeOnReplacement { get; set; } +} + +public class RewardScaling +{ + [JsonPropertyName("levels")] + public List Levels { get; set; } + [JsonPropertyName("experience")] + public List Experience { get; set; } + + [JsonPropertyName("roubles")] + public List Roubles { get; set; } + + [JsonPropertyName("gpCoins")] + public List GpCoins { get; set; } + + [JsonPropertyName("items")] + public List Items { get; set; } + + [JsonPropertyName("reputation")] + public List Reputation { get; set; } + + [JsonPropertyName("rewardSpread")] + public int RewardSpread { get; set; } + + [JsonPropertyName("skillRewardChance")] + public List SkillRewardChance { get; set; } + + [JsonPropertyName("skillPointReward")] + public List SkillPointReward { get; set; } +} + +public class TraderWhitelist +{ + [JsonPropertyName("traderId")] + public string TraderId { get; set; } + + [JsonPropertyName("questTypes")] + public List QuestTypes { get; set; } + + [JsonPropertyName("rewardBaseWhitelist")] + public List RewardBaseWhitelist { get; set; } + + [JsonPropertyName("rewardCanBeWeapon")] + public bool RewardCanBeWeapon { get; set; } + + [JsonPropertyName("weaponRewardChancePercent")] + public double WeaponRewardChancePercent { get; set; } +} + +public class RepeatableQuestTypesConfig +{ + [JsonPropertyName("Exploration")] + public Exploration Exploration { get; set; } + + [JsonPropertyName("Completion")] + public Completion Completion { get; set; } + + [JsonPropertyName("Pickup")] + public Pickup Pickup { get; set; } + + [JsonPropertyName("Elimination")] + public List Elimination { get; set; } +} + +public class Exploration : BaseQuestConfig +{ + [JsonPropertyName("maxExtracts")] + public int MaximumExtracts { get; set; } + + [JsonPropertyName("maxExtractsWithSpecificExit")] + public int MaximumExtractsWithSpecificExit { get; set; } + + [JsonPropertyName("specificExits")] + public SpecificExits SpecificExits { get; set; } +} + +public class SpecificExits +{ + [JsonPropertyName("probability")] + public int Probability { get; set; } + + [JsonPropertyName("passageRequirementWhitelist")] + public List PassageRequirementWhitelist { get; set; } +} + +public class Completion : BaseQuestConfig +{ + [JsonPropertyName("minRequestedAmount")] + public int MinimumRequestedAmount { get; set; } + + [JsonPropertyName("maxRequestedAmount")] + public int MaximumRequestedAmount { get; set; } + + [JsonPropertyName("uniqueItemCount")] + public int UniqueItemCount { get; set; } + + [JsonPropertyName("minRequestedBulletAmount")] + public int MinimumRequestedBulletAmount { get; set; } + + [JsonPropertyName("maxRequestedBulletAmount")] + public int MaximumRequestedBulletAmount { get; set; } + + [JsonPropertyName("useWhitelist")] + public bool UseWhitelist { get; set; } + + [JsonPropertyName("useBlacklist")] + public bool UseBlacklist { get; set; } +} + +public class Pickup : BaseQuestConfig +{ + [JsonPropertyName("ItemTypeToFetchWithMaxCount")] + public List ItemTypeToFetchWithMaxCount { get; set; } +} + +public class PickupTypeWithMaxCount +{ + [JsonPropertyName("itemType")] + public string ItemType { get; set; } + + [JsonPropertyName("maxPickupCount")] + public int MaximumPickupCount { get; set; } + + [JsonPropertyName("minPickupCount")] + public int MinimumPickupCount { get; set; } +} + +public class EliminationConfig : BaseQuestConfig +{ + [JsonPropertyName("levelRange")] + public MinMax LevelRange { get; set; } + + [JsonPropertyName("targets")] + public List Targets { get; set; } + + [JsonPropertyName("bodyPartProb")] + public double BodyPartProbability { get; set; } + + [JsonPropertyName("bodyParts")] + public List BodyParts { get; set; } + + [JsonPropertyName("specificLocationProb")] + public double SpecificLocationProbability { get; set; } + + [JsonPropertyName("distLocationBlacklist")] + public List DistLocationBlacklist { get; set; } + + [JsonPropertyName("distProb")] + public double DistanceProbability { get; set; } + + [JsonPropertyName("maxDist")] + public double MaxDistance { get; set; } + + [JsonPropertyName("minDist")] + public double MinDistance { get; set; } + + [JsonPropertyName("maxKills")] + public int MaxKills { get; set; } + + [JsonPropertyName("minKills")] + public int MinKills { get; set; } + + [JsonPropertyName("minBossKills")] + public int MinBossKills { get; set; } + + [JsonPropertyName("maxBossKills")] + public int MaxBossKills { get; set; } + + [JsonPropertyName("minPmcKills")] + public int MinPmcKills { get; set; } + + [JsonPropertyName("maxPmcKills")] + public int MaxPmcKills { get; set; } + + [JsonPropertyName("weaponCategoryRequirementProb")] + public double WeaponCategoryRequirementProbability { get; set; } + + [JsonPropertyName("weaponCategoryRequirements")] + public List WeaponCategoryRequirements { get; set; } + + [JsonPropertyName("weaponRequirementProb")] + public double WeaponRequirementProbability { get; set; } + + [JsonPropertyName("weaponRequirements")] + public List WeaponRequirements { get; set; } +} + +public class BaseQuestConfig +{ + [JsonPropertyName("possibleSkillRewards")] + public List PossibleSkillRewards { get; set; } +} + +public class Target : ProbabilityObject +{ + [JsonPropertyName("data")] + public BossInfo Data { get; set; } +} + +public class BossInfo +{ + [JsonPropertyName("isBoss")] + public bool IsBoss { get; set; } + + [JsonPropertyName("isPmc")] + public bool IsPmc { get; set; } +} + +public class BodyPart : ProbabilityObject { + [JsonPropertyName("data")] + public string[] Data { get; set; } +} + +public class WeaponRequirement : ProbabilityObject { + [JsonPropertyName("data")] + public string[] Data { get; set; } +} + +public class ProbabilityObject { + [JsonPropertyName("key")] + public string Key { get; set; } + + [JsonPropertyName("relativeProbability")] + public double RelativeProbability { get; set; } + + [JsonPropertyName("data")] + public object Data { get; set; } } \ No newline at end of file diff --git a/Core/Models/Spt/Config/RagfairConfig.cs b/Core/Models/Spt/Config/RagfairConfig.cs index a695c5bd..f2ad68ea 100644 --- a/Core/Models/Spt/Config/RagfairConfig.cs +++ b/Core/Models/Spt/Config/RagfairConfig.cs @@ -1,6 +1,364 @@ -namespace Types.Models.Spt.Config; +namespace Core.Models.Spt.Config; -public class RagfairConfig +using System.Text.Json.Serialization; + +public class RagfairConfig : BaseConfig { - + [JsonPropertyName("kind")] + public string Kind { get; set; } = "spt-ragfair"; + + /** How many seconds should pass before expired offers and processed + player offers checked if sold */ + [JsonPropertyName("runIntervalSeconds")] + public int RunIntervalSeconds { get; set; } + + /** Default values used to hydrate `runIntervalSeconds` with */ + [JsonPropertyName("runIntervalValues")] + public RunIntervalValues RunIntervalValues { get; set; } + + /** Player listing settings */ + [JsonPropertyName("sell")] + public Sell Sell { get; set; } + + /** Trader ids + should their assorts be listed on flea */ + [JsonPropertyName("traders")] + public Dictionary Traders { get; set; } + + [JsonPropertyName("dynamic")] + public Dynamic Dynamic { get; set; } + + [JsonPropertyName("tieredFlea")] + public TieredFlea TieredFlea { get; set; } +} + +public class Sell +{ + /** Should a fee be deducted from player when listing an item for sale */ + [JsonPropertyName("fees")] + public bool Fees { get; set; } + + /** Settings to control chances of offer being sold */ + [JsonPropertyName("chance")] + public Chance Chance { get; set; } + + /** Settings to control how long it takes for a player offer to sell */ + [JsonPropertyName("time")] + public MinMax Time { get; set; } + + /** Seconds from clicking remove to remove offer from market */ + [JsonPropertyName("expireSeconds")] + public int ExpireSeconds { get; set; } +} + +public class Chance +{ + /** Base chance percent to sell an item */ + [JsonPropertyName("base")] + public int Base { get; set; } + + /** Value to multiply the sell chance by */ + [JsonPropertyName("sellMultiplier")] + public int SellMultiplier { get; set; } + + /** Max possible sell chance % for a player listed offer */ + [JsonPropertyName("maxSellChancePercent")] + public int MaxSellChancePercent { get; set; } + + /** Min possible sell chance % for a player listed offer */ + [JsonPropertyName("minSellChancePercent")] + public int MinSellChancePercent { get; set; } +} + +public class Dynamic +{ + // Should a purchased dynamic offers items be flagged as found in raid + public bool PurchasesAreFoundInRaid { get; set; } + + /** Use the highest trader price for an offer if its greater than the price in templates/prices.json */ + public bool UseTraderPriceForOffersIfHigher { get; set; } + + /** Barter offer specific settings */ + public BarterDetails Barter { get; set; } + + public PackDetails Pack { get; set; } + + /** Dynamic offer price below handbook adjustment values */ + public OfferAdjustment OfferAdjustment { get; set; } + + /** How many offers should expire before an offer regeneration occurs */ + public int ExpiredOfferThreshold { get; set; } + + /** How many offers should be listed */ + public MinMax OfferItemCount { get; set; } + + /** How much should the price of an offer vary by (percent 0.8 = 80%, 1.2 = 120%) */ + public PriceRanges PriceRanges { get; set; } + + /** Should default presets to listed only or should non-standard presets found in globals.json be listed too */ + public bool ShowDefaultPresetsOnly { get; set; } + + /** Tpls that should not use the variable price system when their quality is < 100% (lower dura/uses = lower price) */ + public List IgnoreQualityPriceVarianceBlacklist { get; set; } + + public MinMax EndTimeSeconds { get; set; } + + /** Settings to control the durability range of item items listed on flea */ + public Condition Condition { get; set; } + + /** Size stackable items should be listed for in percent of max stack size */ + public MinMax StackablePercent { get; set; } + + /** Items that cannot be stacked can have multiples sold in one offer, what range of values can be listed */ + public MinMax NonStackableCount { get; set; } + + /** Range of rating offers for items being listed */ + public MinMax Rating { get; set; } + + /** Armor specific flea settings */ + public ArmorSettings Armor { get; set; } + + /** A multipler to apply to individual tpls price just prior to item quality adjustment */ + public Dictionary ItemPriceMultiplier { get; set; } + + /** Percentages to sell offers in each currency */ + public Dictionary Currencies { get; set; } + + /** Item tpls that should be forced to sell as a single item */ + public List ShowAsSingleStack { get; set; } + + /** Should christmas/halloween items be removed from flea when not within the seasonal bounds */ + public bool RemoveSeasonalItemsWhenNotInEvent { get; set; } + + /** Flea blacklist settings */ + public RagfairBlacklist Blacklist { get; set; } + + /** Dict of price limits keyed by item type */ + public Dictionary UnreasonableModPrices { get; set; } + + /** Custom rouble prices for items to override values from prices.json */ + public Dictionary ItemPriceOverrideRouble { get; set; } +} + +public class PriceRanges +{ + [JsonPropertyName("default")] + public MinMax Default { get; set; } + + [JsonPropertyName("preset")] + public MinMax Preset { get; set; } + + [JsonPropertyName("pack")] + public MinMax Pack { get; set; } +} + +public class BarterDetails +{ + /** Percentage change an offer is listed as a barter */ + [JsonPropertyName("chancePercent")] + public double ChancePercent { get; set; } + + /** Min number of required items for a barter requirement */ + [JsonPropertyName("itemCountMin")] + public int ItemCountMin { get; set; } + + /** Max number of required items for a barter requirement */ + [JsonPropertyName("itemCountMax")] + public int ItemCountMax { get; set; } + + /** How much can the total price of requested items vary from the item offered */ + [JsonPropertyName("priceRangeVariancePercent")] + public double PriceRangeVariancePercent { get; set; } + + /** Min rouble price for an offer to be considered for turning into a barter */ + [JsonPropertyName("minRoubleCostToBecomeBarter")] + public double MinRoubleCostToBecomeBarter { get; set; } + + /** Should barter offers only single stack */ + [JsonPropertyName("makeSingleStackOnly")] + public bool MakeSingleStackOnly { get; set; } + + /** Item Tpls to never be turned into a barter */ + [JsonPropertyName("itemTypeBlacklist")] + public List ItemTypeBlacklist { get; set; } +} + +public class PackDetails +{ + /** Percentage change an offer is listed as a pack */ + [JsonPropertyName("chancePercent")] + public double ChancePercent { get; set; } + + /** Min number of required items for a pack */ + [JsonPropertyName("itemCountMin")] + public int ItemCountMin { get; set; } + + /** Max number of required items for a pack */ + [JsonPropertyName("itemCountMax")] + public int ItemCountMax { get; set; } + + /** item types to allow being a pack */ + [JsonPropertyName("itemTypeWhitelist")] + public List ItemTypeWhitelist { get; set; } +} + +public class OfferAdjustment +{ + /// + /// Shuld offer price be adjusted when below handbook price + /// + [JsonPropertyName("adjustPriceWhenBelowHandbookPrice")] + public bool AdjustPriceWhenBelowHandbookPrice { get; set; } + + /// + /// How big a percentage difference does price need to vary from handbook to be considered for adjustment + /// + [JsonPropertyName("maxPriceDifferenceBelowHandbookPercent")] + public double MaxPriceDifferenceBelowHandbookPercent { get; set; } + + /// + /// How much to multiply the handbook price to get the new price + /// + [JsonPropertyName("handbookPriceMultipier")] + public double HandbookPriceMultiplier { get; set; } + + /// + /// What is the minimum rouble price to consider adjusting price of item + /// + [JsonPropertyName("priceThreshholdRub")] + public double PriceThresholdRub { get; set; } +} + +public class Condition +{ + /// + /// Percentage change durability is altered + /// + [JsonPropertyName("conditionChance")] + public double ConditionChance { get; set; } + + [JsonPropertyName("current")] + public MinMax Current { get; set; } + + [JsonPropertyName("max")] + public MinMax Max { get; set; } +} + +public class RagfairBlacklist +{ + /// + /// Damaged ammo packs + /// + [JsonPropertyName("damagedAmmoPacks")] + public bool DamagedAmmoPacks { get; set; } + + /// + /// Custom blacklist for item Tpls + /// + [JsonPropertyName("custom")] + public List Custom { get; set; } + + /// + /// BSG blacklist a large number of items from flea, true = use blacklist + /// + [JsonPropertyName("enableBsgList")] + public bool EnableBsgList { get; set; } + + /// + /// Should quest items be blacklisted from flea + /// + [JsonPropertyName("enableQuestList")] + public bool EnableQuestList { get; set; } + + /// + /// Should trader items that are blacklisted by bsg be listed on flea + /// + [JsonPropertyName("traderItems")] + public bool TraderItems { get; set; } + + /// + /// Maximum level an armor plate can be found in a flea-listed armor item + /// + [JsonPropertyName("armorPlate")] + public ArmorPlateBlacklistSettings ArmorPlate { get; set; } + + /// + /// Should specific categories be blacklisted from the flea, true = use blacklist + /// + [JsonPropertyName("enableCustomItemCategoryList")] + public bool EnableCustomItemCategoryList { get; set; } + + /// + /// Custom category blacklist for parent Ids + /// + [JsonPropertyName("customItemCategoryList")] + public List CustomItemCategoryList { get; set; } +} + +public class ArmorPlateBlacklistSettings { + /// + /// Max level of plates an armor can have without being removed + /// + [JsonPropertyName("maxProtectionLevel")] + public int MaxProtectionLevel { get; set; } + + /// + /// Item slots to NOT remove from items on flea + /// + [JsonPropertyName("ignoreSlots")] + public List IgnoreSlots { get; set; } +} + +public class UnreasonableModPrices { + /// + /// Enable a system that adjusts very high ragfair prices to be below a max multiple of items the handbook values + /// + [JsonPropertyName("enabled")] + public bool Enabled { get; set; } + + /// + /// Multipler to start adjusting item values from, e.g. a value of 10 means any value over 10x the handbook price gets adjusted + /// + [JsonPropertyName("handbookPriceOverMultiplier")] + public int HandbookPriceOverMultiplier { get; set; } + + /// + /// The new multiplier for items found using above property, e.g. a value of 4 means set items price to 4x handbook price + /// + [JsonPropertyName("newPriceHandbookMultiplier")] + public int NewPriceHandbookMultiplier { get; set; } +} + +public class ArmorSettings { + /// + /// % chance / 100 that armor plates will be removed from an offer before listing + /// + [JsonPropertyName("removeRemovablePlateChance")] + public int RemoveRemovablePlateChance { get; set; } + + /// + /// What slots are to be removed when removeRemovablePlateChance is true + /// + [JsonPropertyName("plateSlotIdToRemovePool")] + public List PlateSlotIdToRemovePool { get; set; } +} + +public class TieredFlea { + [JsonPropertyName("enabled")] + public bool Enabled { get; set; } + + /// + /// key: tpl, value: playerlevel + /// + [JsonPropertyName("unlocksTpl")] + public Dictionary UnlocksTpl { get; set; } + + /// + /// key: item type id, value: playerlevel + /// + [JsonPropertyName("unlocksType")] + public Dictionary UnlocksType { get; set; } + + public bool AmmoTiersEnabled { get; set; } + + [JsonPropertyName("ammoTplUnlocks")] + public Dictionary AmmoTplUnlocks { get; set; } } \ No newline at end of file diff --git a/Core/Models/Spt/Config/RepairConfig.cs b/Core/Models/Spt/Config/RepairConfig.cs index acfb770a..7ad711bb 100644 --- a/Core/Models/Spt/Config/RepairConfig.cs +++ b/Core/Models/Spt/Config/RepairConfig.cs @@ -1,6 +1,108 @@ -namespace Types.Models.Spt.Config; +namespace Core.Models.Spt.Config; -public class RepairConfig +using System.Text.Json.Serialization; + +public class RepairConfig : IBaseConfig { - + [JsonPropertyName("kind")] + public string Kind { get; set; } = "spt-repair"; + + [JsonPropertyName("priceMultiplier")] + public double PriceMultiplier { get; set; } + + [JsonPropertyName("applyRandomizeDurabilityLoss")] + public bool ApplyRandomizeDurabilityLoss { get; set; } + + [JsonPropertyName("weaponSkillRepairGain")] + public double WeaponSkillRepairGain { get; set; } + + [JsonPropertyName("armorKitSkillPointGainPerRepairPointMultiplier")] + public double ArmorKitSkillPointGainPerRepairPointMultiplier { get; set; } + + /** INT gain multiplier per repaired item type */ + [JsonPropertyName("repairKitIntellectGainMultiplier")] + public IntellectGainValues RepairKitIntellectGainMultiplier { get; set; } + + // ** How much INT can be given to player per repair action */ + [JsonPropertyName("maxIntellectGainPerRepair")] + public MaxIntellectGainValues MaxIntellectGainPerRepair { get; set; } + + [JsonPropertyName("weaponTreatment")] + public WeaponTreatmentRepairValues WeaponTreatment { get; set; } + + [JsonPropertyName("repairKit")] + public RepairKit RepairKit { get; set; } +} + +public class IntellectGainValues +{ + [JsonPropertyName("weapon")] + public double Weapon { get; set; } + + [JsonPropertyName("armor")] + public double Armor { get; set; } +} + +public class MaxIntellectGainValues +{ + [JsonPropertyName("kit")] + public double Kit { get; set; } + + [JsonPropertyName("trader")] + public double Trader { get; set; } +} + +public class WeaponTreatmentRepairValues +{ + /** The chance to gain more weapon maintenance skill */ + [JsonPropertyName("critSuccessChance")] + public double CritSuccessChance { get; set; } + + [JsonPropertyName("critSuccessAmount")] + public double CritSuccessAmount { get; set; } + + /** The chance to gain less weapon maintenance skill */ + [JsonPropertyName("critFailureChance")] + public double CritFailureChance { get; set; } + + [JsonPropertyName("critFailureAmount")] + public double CritFailureAmount { get; set; } + + /** The multiplier used for calculating weapon maintenance XP */ + [JsonPropertyName("pointGainMultiplier")] + public double PointGainMultiplier { get; set; } +} + +public class RepairKit +{ + [JsonPropertyName("armor")] + public BonusSettings Armor { get; set; } + + [JsonPropertyName("weapon")] + public BonusSettings Weapon { get; set; } +} + +public class BonusSettings +{ + [JsonPropertyName("rarityWeight")] + public Dictionary RarityWeight { get; set; } + + [JsonPropertyName("bonusTypeWeight")] + public Dictionary BonusTypeWeight { get; set; } + + [JsonPropertyName("common")] + public Dictionary Common { get; set; } + + [JsonPropertyName("rare")] + public Dictionary Rare { get; set; } +} + +public class BonusValues +{ + [JsonPropertyName("valuesMinMax")] + public MinMax ValuesMinMax { get; set; } + + /** What dura is buff active between (min max of current max) */ + [JsonPropertyName("activeDurabilityPercentMinMax")] + public MinMax ActiveDurabilityPercentMinMax { get; set; } } \ No newline at end of file diff --git a/Core/Models/Spt/Config/ScavCaseConfig.cs b/Core/Models/Spt/Config/ScavCaseConfig.cs index 60fc32c2..6bcf4a79 100644 --- a/Core/Models/Spt/Config/ScavCaseConfig.cs +++ b/Core/Models/Spt/Config/ScavCaseConfig.cs @@ -1,6 +1,78 @@ -namespace Types.Models.Spt.Config; +namespace Core.Models.Spt.Config; -public class ScavCaseConfig +using System.Text.Json.Serialization; + +public class ScavCaseConfig : BaseConfig { - + [JsonPropertyName("kind")] + public string Kind { get; set; } = "spt-scavcase"; + + [JsonPropertyName("rewardItemValueRangeRub")] + public Dictionary RewardItemValueRangeRub { get; set; } + + [JsonPropertyName("moneyRewards")] + public MoneyRewards MoneyRewards { get; set; } + + [JsonPropertyName("ammoRewards")] + public AmmoRewards AmmoRewards { get; set; } + + [JsonPropertyName("rewardItemParentBlacklist")] + public List RewardItemParentBlacklist { get; set; } + + [JsonPropertyName("rewardItemBlacklist")] + public List RewardItemBlacklist { get; set; } + + [JsonPropertyName("allowMultipleMoneyRewardsPerRarity")] + public bool AllowMultipleMoneyRewardsPerRarity { get; set; } + + [JsonPropertyName("allowMultipleAmmoRewardsPerRarity")] + public bool AllowMultipleAmmoRewardsPerRarity { get; set; } + + [JsonPropertyName("allowBossItemsAsRewards")] + public bool AllowBossItemsAsRewards { get; set; } +} + +public class MoneyRewards +{ + [JsonPropertyName("moneyRewardChancePercent")] + public int MoneyRewardChancePercent { get; set; } + + [JsonPropertyName("rubCount")] + public MoneyLevels RubCount { get; set; } + + [JsonPropertyName("usdCount")] + public MoneyLevels UsdCount { get; set; } + + [JsonPropertyName("eurCount")] + public MoneyLevels EurCount { get; set; } + + [JsonPropertyName("gpCount")] + public MoneyLevels GpCount { get; set; } +} + +public class MoneyLevels +{ + [JsonPropertyName("common")] + public MinMax Common { get; set; } + + [JsonPropertyName("rare")] + public MinMax Rare { get; set; } + + [JsonPropertyName("superrare")] + public MinMax SuperRare { get; set; } +} + +public class AmmoRewards +{ + [JsonPropertyName("ammoRewardChancePercent")] + public int AmmoRewardChancePercent { get; set; } + + [JsonPropertyName("ammoRewardBlacklist")] + public Dictionary> AmmoRewardBlacklist { get; set; } + + [JsonPropertyName("ammoRewardValueRangeRub")] + public Dictionary AmmoRewardValueRangeRub { get; set; } + + [JsonPropertyName("minStackSize")] + public int MinStackSize { get; set; } } \ No newline at end of file diff --git a/Core/Models/Spt/Config/SeasonalEventConfig.cs b/Core/Models/Spt/Config/SeasonalEventConfig.cs index 90c154fa..d04dc15d 100644 --- a/Core/Models/Spt/Config/SeasonalEventConfig.cs +++ b/Core/Models/Spt/Config/SeasonalEventConfig.cs @@ -1,6 +1,103 @@ -namespace Types.Models.Spt.Config; +using System.Text.Json.Serialization; -public class SeasonalEventConfig +namespace Core.Models.Spt.Config; + +public class SeasonalEventConfig : BaseConfig { + [JsonPropertyName("kind")] + public string Kind { get; set; } = "spt-seasonalevents"; + [JsonPropertyName("enableSeasonalEventDetection")] + public bool EnableSeasonalEventDetection { get; set; } + + /** event / botType / equipSlot / itemid */ + [JsonPropertyName("eventGear")] + public Dictionary>>> EventGear { get; set; } + + /** event / bot type / equipSlot / itemid */ + [JsonPropertyName("eventLoot")] + public Dictionary>>> EventLoot { get; set; } + + public List Events { get; set; } + + [JsonPropertyName("eventBotMapping")] + public Dictionary EventBotMapping { get; set; } + + [JsonPropertyName("eventBossSpawns")] + public Dictionary>> EventBossSpawns { get; set; } + + [JsonPropertyName("eventWaves")] + public Dictionary>> EventWaves { get; set; } + + [JsonPropertyName("gifterSettings")] + public List GifterSettings { get; set; } + + /** key = event, second key = map name */ + [JsonPropertyName("hostilitySettingsForEvent")] + public Dictionary>> HostilitySettingsForEvent { get; set; } + + /** Ids of containers on locations that only have christmas loot */ + [JsonPropertyName("christmasContainerIds")] + public List ChristmasContainerIds { get; set; } + + /** Season - botType - location (body/feet/hands/head) */ + [JsonPropertyName("botAppearanceChanges")] + public Dictionary>>> BotAppearanceChanges { get; set; } +} + +public class SeasonalEvent +{ + [JsonPropertyName("enabled")] + public bool Enabled { get; set; } + + [JsonPropertyName("name")] + public string Name { get; set; } + + [JsonPropertyName("type")] + public SeasonalEventType Type { get; set; } + + [JsonPropertyName("startDay")] + public int StartDay { get; set; } + + [JsonPropertyName("startMonth")] + public int StartMonth { get; set; } + + [JsonPropertyName("endDay")] + public int EndDay { get; set; } + + [JsonPropertyName("endMonth")] + public int EndMonth { get; set; } + + [JsonPropertyName("settings")] + public Dictionary Settings { get; set; } +} + +public class SeasonalEventSettings +{ + [JsonPropertyName("enabled")] + public bool Enabled { get; set; } +} + +public class ZombieSettings : SeasonalEventSettings +{ + [JsonPropertyName("mapInfectionAmount")] + public Dictionary MapInfectionAmount { get; set; } + + [JsonPropertyName("disableBosses")] + public List DisableBosses { get; set; } + + [JsonPropertyName("disableWaves")] + public List DisableWaves { get; set; } +} + +public class GifterSetting +{ + [JsonPropertyName("map")] + public string Map { get; set; } + + [JsonPropertyName("zones")] + public string Zones { get; set; } + + [JsonPropertyName("spawnChance")] + public int SpawnChance { get; set; } } \ No newline at end of file diff --git a/Core/Models/Spt/Config/TraderConfig.cs b/Core/Models/Spt/Config/TraderConfig.cs index f7b09c64..fa7277e1 100644 --- a/Core/Models/Spt/Config/TraderConfig.cs +++ b/Core/Models/Spt/Config/TraderConfig.cs @@ -1,6 +1,172 @@ -namespace Types.Models.Spt.Config; +using System.Text.Json.Serialization; -public class TraderConfig +namespace Core.Models.Spt.Config; + +public class TraderConfig : BaseConfig { + [JsonPropertyName("kind")] + public string Kind { get; set; } = "spt-trader"; + [JsonPropertyName("updateTime")] + public List UpdateTime { get; set; } + + [JsonPropertyName("updateTimeDefault")] + public int UpdateTimeDefault { get; set; } + + [JsonPropertyName("purchasesAreFoundInRaid")] + public bool PurchasesAreFoundInRaid { get; set; } + + /** Should trader reset times be set based on server start time (false = bsg time - on the hour) */ + [JsonPropertyName("tradersResetFromServerStart")] + public bool TradersResetFromServerStart { get; set; } + + [JsonPropertyName("traderPriceMultipler")] + public double TraderPriceMultipler { get; set; } + + [JsonPropertyName("fence")] + public FenceConfig Fence { get; set; } + + [JsonPropertyName("moddedTraders")] + public ModdedTraders ModdedTraders { get; set; } +} + +public class UpdateTime +{ + [JsonPropertyName("traderId")] + public string TraderId { get; set; } + + /** Seconds between trader resets */ + [JsonPropertyName("seconds")] + public MinMax Seconds { get; set; } +} + +public class FenceConfig +{ + [JsonPropertyName("discountOptions")] + public DiscountOptions DiscountOptions { get; set; } + + [JsonPropertyName("partialRefreshTimeSeconds")] + public int PartialRefreshTimeSeconds { get; set; } + + [JsonPropertyName("partialRefreshChangePercent")] + public double PartialRefreshChangePercent { get; set; } + + [JsonPropertyName("assortSize")] + public int AssortSize { get; set; } + + [JsonPropertyName("weaponPresetMinMax")] + public MinMax WeaponPresetMinMax { get; set; } + + [JsonPropertyName("equipmentPresetMinMax")] + public MinMax EquipmentPresetMinMax { get; set; } + + [JsonPropertyName("itemPriceMult")] + public double ItemPriceMult { get; set; } + + [JsonPropertyName("presetPriceMult")] + public double PresetPriceMult { get; set; } + + [JsonPropertyName("armorMaxDurabilityPercentMinMax")] + public ItemDurabilityCurrentMax ArmorMaxDurabilityPercentMinMax { get; set; } + + [JsonPropertyName("weaponDurabilityPercentMinMax")] + public ItemDurabilityCurrentMax WeaponDurabilityPercentMinMax { get; set; } + + /** Keyed to plate protection level */ + [JsonPropertyName("chancePlateExistsInArmorPercent")] + public Dictionary ChancePlateExistsInArmorPercent { get; set; } + + /** Key: item tpl */ + [JsonPropertyName("itemStackSizeOverrideMinMax")] + public Dictionary ItemStackSizeOverrideMinMax { get; set; } + + [JsonPropertyName("itemTypeLimits")] + public Dictionary ItemTypeLimits { get; set; } + + /** Prevent duplicate offers of items of specific categories by parentId */ + [JsonPropertyName("preventDuplicateOffersOfCategory")] + public List PreventDuplicateOffersOfCategory { get; set; } + + [JsonPropertyName("regenerateAssortsOnRefresh")] + public bool RegenerateAssortsOnRefresh { get; set; } + + /** Max rouble price before item is not listed on flea */ + [JsonPropertyName("itemCategoryRoublePriceLimit")] + public Dictionary ItemCategoryRoublePriceLimit { get; set; } + + /** Each slotid with % to be removed prior to listing on fence */ + [JsonPropertyName("presetSlotsToRemoveChancePercent")] + public Dictionary PresetSlotsToRemoveChancePercent { get; set; } + + /** Block seasonal items from appearing when season is inactive */ + [JsonPropertyName("blacklistSeasonalItems")] + public bool BlacklistSeasonalItems { get; set; } + + /** Max pen value allowed to be listed on flea - affects ammo + ammo boxes */ + [JsonPropertyName("ammoMaxPenLimit")] + public double AmmoMaxPenLimit { get; set; } + + [JsonPropertyName("blacklist")] + public List Blacklist { get; set; } + + [JsonPropertyName("coopExtractGift")] + public CoopExtractReward CoopExtractGift { get; set; } + + [JsonPropertyName("btrDeliveryExpireHours")] + public int BtrDeliveryExpireHours { get; set; } + + /** Smallest value player rep with fence can fall to */ + [JsonPropertyName("playerRepMin")] + public double PlayerRepMin { get; set; } + + /** Highest value player rep with fence can climb to */ + [JsonPropertyName("playerRepMax")] + public double PlayerRepMax { get; set; } +} + +public class ItemDurabilityCurrentMax +{ + [JsonPropertyName("current")] + public MinMax Current { get; set; } + + [JsonPropertyName("max")] + public MinMax Max { get; set; } +} + +public class CoopExtractReward : LootRequest +{ + [JsonPropertyName("sendGift")] + public bool SendGift { get; set; } + + [JsonPropertyName("messageLocaleIds")] + public List MessageLocaleIds { get; set; } + + [JsonPropertyName("giftExpiryHours")] + public int GiftExpiryHours { get; set; } +} + +public class DiscountOptions +{ + [JsonPropertyName("assortSize")] + public int AssortSize { get; set; } + + [JsonPropertyName("itemPriceMult")] + public double ItemPriceMult { get; set; } + + [JsonPropertyName("presetPriceMult")] + public double PresetPriceMult { get; set; } + + [JsonPropertyName("weaponPresetMinMax")] + public MinMax WeaponPresetMinMax { get; set; } + + [JsonPropertyName("equipmentPresetMinMax")] + public MinMax EquipmentPresetMinMax { get; set; } +} + +/** Custom trader data needed client side for things such as the clothing service */ +public class ModdedTraders +{ + /** Trader Ids to enable the clothing service for */ + [JsonPropertyName("clothingService")] + public List ClothingService { get; set; } } \ No newline at end of file diff --git a/Core/Models/Spt/Config/WeatherConfig.cs b/Core/Models/Spt/Config/WeatherConfig.cs index 8777c7f6..e5a6277f 100644 --- a/Core/Models/Spt/Config/WeatherConfig.cs +++ b/Core/Models/Spt/Config/WeatherConfig.cs @@ -1,6 +1,104 @@ -namespace Types.Models.Spt.Config; +using System.Text.Json.Serialization; -public class WeatherConfig +namespace Core.Models.Spt.Config; + +public class WeatherConfig : BaseConfig { - + [JsonPropertyName("kind")] + public string Kind { get; set; } = "spt-weather"; + + [JsonPropertyName("acceleration")] + public double Acceleration { get; set; } + + [JsonPropertyName("weather")] + public WeatherValues Weather { get; set; } + + [JsonPropertyName("seasonDates")] + public List SeasonDates { get; set; } + + [JsonPropertyName("overrideSeason")] + public Season? OverrideSeason { get; set; } +} + +public class SeasonDateTimes +{ + [JsonPropertyName("seasonType")] + public Season SeasonType { get; set; } + + [JsonPropertyName("name")] + public string Name { get; set; } + + [JsonPropertyName("startDay")] + public int StartDay { get; set; } + + [JsonPropertyName("startMonth")] + public int StartMonth { get; set; } + + [JsonPropertyName("endDay")] + public int EndDay { get; set; } + + [JsonPropertyName("endMonth")] + public int EndMonth { get; set; } +} + +public class WeatherValues +{ + [JsonPropertyName("seasonValues")] + public Dictionary SeasonValues { get; set; } + + /** How many hours to generate weather data into the future */ + [JsonPropertyName("generateWeatherAmountHours")] + public int GenerateWeatherAmountHours { get; set; } + + /** Length of each weather period */ + [JsonPropertyName("timePeriod")] + public WeatherSettings TimePeriod { get; set; } +} + +public class SeasonalValues +{ + [JsonPropertyName("clouds")] + public WeatherSettings Clouds { get; set; } + + [JsonPropertyName("windSpeed")] + public WeatherSettings WindSpeed { get; set; } + + [JsonPropertyName("windDirection")] + public WeatherSettings WindDirection { get; set; } + + [JsonPropertyName("windGustiness")] + public MinMax WindGustiness { get; set; } + + [JsonPropertyName("rain")] + public WeatherSettings Rain { get; set; } + + [JsonPropertyName("rainIntensity")] + public MinMax RainIntensity { get; set; } + + [JsonPropertyName("fog")] + public WeatherSettings Fog { get; set; } + + [JsonPropertyName("temp")] + public TempDayNight Temp { get; set; } + + [JsonPropertyName("pressure")] + public MinMax Pressure { get; set; } +} + +public class TempDayNight +{ + [JsonPropertyName("day")] + public MinMax Day { get; set; } + + [JsonPropertyName("night")] + public MinMax Night { get; set; } +} + +public class WeatherSettings +{ + [JsonPropertyName("values")] + public List Values { get; set; } + + [JsonPropertyName("weights")] + public List Weights { get; set; } } \ No newline at end of file diff --git a/Core/Models/Spt/Controllers/BotController.cs b/Core/Models/Spt/Controllers/BotController.cs index 3a08699f..66d14663 100644 --- a/Core/Models/Spt/Controllers/BotController.cs +++ b/Core/Models/Spt/Controllers/BotController.cs @@ -1,16 +1,41 @@ -// namespace Types.Models.Spt.Controllers; -// -// public class BotController -// { -// export interface IBotController { -// getBotLimit(type: string): number; -// getBotDifficulty(type: string, difficulty: string): IBotCore | IDifficultyCategories; -// isBotPmc(botRole: string): boolean; -// isBotBoss(botRole: string): boolean; -// isBotFollower(botRole: string): boolean; -// generate(info: IGenerateBotsRequestData, playerScav: boolean): IBotBase[]; -// getBotCap(): number; -// } -// } +using Core.Models.Eft.Common.Tables; -// TODO: implement in C# \ No newline at end of file +namespace Core.Models.Spt.Controllers; + +public class BotController +{ + public int GetBotLimit(string type) + { + throw new NotImplementedException(); + } + + public object GetBotDifficulty(string type, string difficulty) // IBotCore | IDifficultyCategories + { + throw new NotImplementedException(); + } + + public bool IsBotPmc(string botRole) + { + throw new NotImplementedException(); + } + + public bool IsBotBoss(string botRole) + { + throw new NotImplementedException(); + } + + public bool IsBotFollower(string botRole) + { + throw new NotImplementedException(); + } + + public List Generate(GenerateBotsRequestData info, bool playerscav) + { + throw new NotImplementedException(); + } + + public int GetBotCap() + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/Core/Models/Spt/Dialog/SendMessageDetails.cs b/Core/Models/Spt/Dialog/SendMessageDetails.cs index 42f4a473..c772dda8 100644 --- a/Core/Models/Spt/Dialog/SendMessageDetails.cs +++ b/Core/Models/Spt/Dialog/SendMessageDetails.cs @@ -1,7 +1,6 @@ -using System.Collections.Generic; -using System.Text.Json.Serialization; +using System.Text.Json.Serialization; -namespace Types.Models.Spt.Dialog; +namespace Core.Models.Spt.Dialog; public class SendMessageDetails { diff --git a/Core/Models/Spt/Fence/CreateFenceAssortsResult.cs b/Core/Models/Spt/Fence/CreateFenceAssortsResult.cs index ac3abf7a..e5b12a29 100644 --- a/Core/Models/Spt/Fence/CreateFenceAssortsResult.cs +++ b/Core/Models/Spt/Fence/CreateFenceAssortsResult.cs @@ -1,7 +1,6 @@ -using System.Collections.Generic; -using System.Text.Json.Serialization; +using System.Text.Json.Serialization; -namespace Types.Models.Spt.Fence; +namespace Core.Models.Spt.Fence; public class CreateFenceAssortsResult { diff --git a/Core/Models/Spt/Fence/FenceAssortGenerationValues.cs b/Core/Models/Spt/Fence/FenceAssortGenerationValues.cs index 3e951e4a..6c39f7bf 100644 --- a/Core/Models/Spt/Fence/FenceAssortGenerationValues.cs +++ b/Core/Models/Spt/Fence/FenceAssortGenerationValues.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace Types.Models.Spt.Fence; +namespace Core.Models.Spt.Fence; public class FenceAssortGenerationValues { diff --git a/Core/Models/Spt/Generators/BotGenerator.cs b/Core/Models/Spt/Generators/BotGenerator.cs index 57aae904..d4358de0 100644 --- a/Core/Models/Spt/Generators/BotGenerator.cs +++ b/Core/Models/Spt/Generators/BotGenerator.cs @@ -1,16 +1,11 @@ -// namespace Types.Models.Spt.Generators; -// -// public class BotGenerator -// { -// export interface IBotGenerator { -// generateInventory( -// templateInventory: IInventory, -// equipmentChances: IChances, -// generation: IGeneration, -// botRole: string, -// isPmc: boolean, -// ): PmcInventory; -// } -// } +using Core.Models.Eft.Common.Tables; -// TODO: implement in C# \ No newline at end of file +namespace Core.Models.Spt.Generators; + +public class BotGenerator +{ + public PmcInventory GenerateInventory(Inventory templateInventory, Chances equipmentChances, Generation generation, string botRole, bool isPmc) + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/Core/Models/Spt/Generators/LocationGenerator.cs b/Core/Models/Spt/Generators/LocationGenerator.cs index 22e08340..944a4422 100644 --- a/Core/Models/Spt/Generators/LocationGenerator.cs +++ b/Core/Models/Spt/Generators/LocationGenerator.cs @@ -1,21 +1,16 @@ -// namespace Types.Models.Spt.Generators; -// -// public class LocationGenerator -// { -// export interface ILocationGenerator { -// generateContainerLoot( -// containerIn: IStaticContainerProps, -// staticForced: IStaticForcedProps[], -// staticLootDist: Record, -// staticAmmoDist: Record, -// locationName: string, -// ): IStaticContainerProps; -// generateDynamicLoot( -// dynamicLootDist: ILooseLoot, -// staticAmmoDist: Record, -// locationName: string, -// ): ISpawnpointTemplate[]; -// } -// } +namespace Core.Models.Spt.Generators; -// TODO: Implement in C# \ No newline at end of file +public class LocationGenerator +{ + public StaticContainerProps GenerateContainerLoot(StaticContainerProps containerIn, List staticForced, + Dictionary staticLootDist, Dictionary> staticAmmoDist, string locationName) + { + throw new NotImplementedException(); + } + + public List GenerateDynamicLoot(LooseLoot dynamicLootDist, Dictionary> staticAmmoDist, + string locationName) + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/Core/Models/Spt/Generators/PMCLootGenerator.cs b/Core/Models/Spt/Generators/PMCLootGenerator.cs index 8a492dba..109c46bb 100644 --- a/Core/Models/Spt/Generators/PMCLootGenerator.cs +++ b/Core/Models/Spt/Generators/PMCLootGenerator.cs @@ -1,12 +1,14 @@ -// namespace Types.Models.Spt.Generators; -// -// public class PMCLootGenerator -// { -// export interface IPMCLootGenerator { -// generatePMCPocketLootPool(): string[]; -// generatePMCBackpackLootPool(): string[]; -// } -// -// } +namespace Core.Models.Spt.Generators; -// TODO: Implement in C# \ No newline at end of file +public class PMCLootGenerator +{ + public List GeneratePMCPocketLootPool() + { + throw new NotImplementedException(); + } + + public List GeneratePMCBackpackLootPool() + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/Core/Models/Spt/Generators/RagfairAssortGenerator.cs b/Core/Models/Spt/Generators/RagfairAssortGenerator.cs index 9d84f912..d4e9b76c 100644 --- a/Core/Models/Spt/Generators/RagfairAssortGenerator.cs +++ b/Core/Models/Spt/Generators/RagfairAssortGenerator.cs @@ -1,11 +1,9 @@ -// namespace Types.Models.Spt.Generators; -// -// public class RagfairAssortGenerator -// { -// export interface IRagfairAssortGenerator { -// getAssortItems(): IItem[]; -// } -// -// } +namespace Core.Models.Spt.Generators; -// TODO: implement in C# \ No newline at end of file +public class RagfairAssortGenerator +{ + public List GetAssortItems() + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/Core/Models/Spt/Generators/RagfairOfferGenerator.cs b/Core/Models/Spt/Generators/RagfairOfferGenerator.cs index 92715319..59bcd20c 100644 --- a/Core/Models/Spt/Generators/RagfairOfferGenerator.cs +++ b/Core/Models/Spt/Generators/RagfairOfferGenerator.cs @@ -1,18 +1,10 @@ -// namespace Types.Models.Spt.Generators; -// -// public class RagfairOfferGenerator -// { -// export interface IRagfairOfferGenerator { -// createOffer( -// userID: string, -// time: number, -// items: IItem[], -// barterScheme: IBarterScheme[], -// loyalLevel: number, -// price: number, -// sellInOnePiece: boolean, -// ): IRagfairOffer; -// } -// } +namespace Core.Models.Spt.Generators; -// TODO: implement in C# \ No newline at end of file +public class RagfairOfferGenerator +{ + public RagfairOffer CreateOffer(string userID, float time, List items, List barterScheme, int loyalLevel, int price, + bool sellInOnePiece) + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/Core/Models/Spt/Hideout/CircleCraftDetails.cs b/Core/Models/Spt/Hideout/CircleCraftDetails.cs index 7dc7b4fa..c496ca3e 100644 --- a/Core/Models/Spt/Hideout/CircleCraftDetails.cs +++ b/Core/Models/Spt/Hideout/CircleCraftDetails.cs @@ -1,7 +1,7 @@ using System.Text.Json.Serialization; -using Types.Models.Spt.Config; +using Core.Models.Spt.Config; -namespace Types.Models.Spt.Hideout; +namespace Core.Models.Spt.Hideout; public class CircleCraftDetails { diff --git a/Core/Models/Spt/Hideout/Hideout.cs b/Core/Models/Spt/Hideout/Hideout.cs index c698020d..441408d4 100644 --- a/Core/Models/Spt/Hideout/Hideout.cs +++ b/Core/Models/Spt/Hideout/Hideout.cs @@ -1,7 +1,7 @@ using System.Text.Json.Serialization; -using Types.Models.Spt.Repeatable; +using Core.Models.Spt.Repeatable; -namespace Types.Models.Spt.Hideout; +namespace Core.Models.Spt.Hideout; public class Hideout { diff --git a/Core/Models/Spt/Hideout/ScavCaseRewardCountsAndPrice.cs b/Core/Models/Spt/Hideout/ScavCaseRewardCountsAndPrice.cs index 7c392375..61e780e3 100644 --- a/Core/Models/Spt/Hideout/ScavCaseRewardCountsAndPrice.cs +++ b/Core/Models/Spt/Hideout/ScavCaseRewardCountsAndPrice.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace Types.Models.Spt.Hideout; +namespace Core.Models.Spt.Hideout; public class ScavCaseRewardCountsAndPrice { diff --git a/Core/Models/Spt/Inventory/OwnerInventoryItems.cs b/Core/Models/Spt/Inventory/OwnerInventoryItems.cs index 7633d9e7..390d2701 100644 --- a/Core/Models/Spt/Inventory/OwnerInventoryItems.cs +++ b/Core/Models/Spt/Inventory/OwnerInventoryItems.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace Types.Models.Spt.Inventory; +namespace Core.Models.Spt.Inventory; public class OwnerInventoryItems { diff --git a/Core/Models/Spt/Location/RaidChanges.cs b/Core/Models/Spt/Location/RaidChanges.cs index b54f5414..e8a757a4 100644 --- a/Core/Models/Spt/Location/RaidChanges.cs +++ b/Core/Models/Spt/Location/RaidChanges.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace Types.Models.Spt.Location; +namespace Core.Models.Spt.Location; public class RaidChanges { diff --git a/Core/Models/Spt/Logging/ClientLogRequest.cs b/Core/Models/Spt/Logging/ClientLogRequest.cs index d124d276..07f69215 100644 --- a/Core/Models/Spt/Logging/ClientLogRequest.cs +++ b/Core/Models/Spt/Logging/ClientLogRequest.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace Types.Models.Spt.Logging; +namespace Core.Models.Spt.Logging; public class ClientLogRequest { diff --git a/Core/Models/Spt/Logging/LogBackgroundColor.cs b/Core/Models/Spt/Logging/LogBackgroundColor.cs index 6358baf3..5d30a33f 100644 --- a/Core/Models/Spt/Logging/LogBackgroundColor.cs +++ b/Core/Models/Spt/Logging/LogBackgroundColor.cs @@ -1,4 +1,4 @@ -namespace Types.Models.Spt.Logging; +namespace Core.Models.Spt.Logging; public struct LogBackgroundColor { diff --git a/Core/Models/Spt/Logging/LogLevel.cs b/Core/Models/Spt/Logging/LogLevel.cs index 6061204e..051cde1a 100644 --- a/Core/Models/Spt/Logging/LogLevel.cs +++ b/Core/Models/Spt/Logging/LogLevel.cs @@ -1,4 +1,4 @@ -namespace Types.Models.Spt.Logging; +namespace Core.Models.Spt.Logging; public enum LogLevel { diff --git a/Core/Models/Spt/Logging/LogTextColor.cs b/Core/Models/Spt/Logging/LogTextColor.cs index 4fcde0ff..3c342812 100644 --- a/Core/Models/Spt/Logging/LogTextColor.cs +++ b/Core/Models/Spt/Logging/LogTextColor.cs @@ -1,4 +1,4 @@ -namespace Types.Models.Spt.Logging; +namespace Core.Models.Spt.Logging; public struct LogTextColor { diff --git a/Core/Models/Spt/Logging/SptLogger.cs b/Core/Models/Spt/Logging/SptLogger.cs index 2daaa9bd..cd4dd87c 100644 --- a/Core/Models/Spt/Logging/SptLogger.cs +++ b/Core/Models/Spt/Logging/SptLogger.cs @@ -1,15 +1,12 @@ -// namespace Types.Models.Spt.Logging; -// -// public class SptLogger -// { -// export interface SptLogger { -// error: (msg: string | Record) => void; -// warn: (msg: string | Record) => void; -// succ?: (msg: string | Record) => void; -// info: (msg: string | Record) => void; -// debug: (msg: string | Record) => void; -// } -// -// } +namespace Core.Models.Spt.Logging; + +public class SptLogger +{ + public object Error { get; set; } // error: (msg: string | Record) => void; + public object Warn { get; set; } // warn: (msg: string | Record) => void; + public object Succ { get; set; } // succ?: (msg: string | Record) => void; + public object Info { get; set; } // info: (msg: string | Record) => void; + public object Debug { get; set; } // debug: (msg: string | Record) => void; +} // TODO: needs to be reimplemented however we want to do it in this project \ No newline at end of file diff --git a/Core/Models/Spt/Mod/ModLoader.cs b/Core/Models/Spt/Mod/ModLoader.cs index 60f31e23..becae909 100644 --- a/Core/Models/Spt/Mod/ModLoader.cs +++ b/Core/Models/Spt/Mod/ModLoader.cs @@ -1,13 +1,16 @@ -// namespace Types.Models.Spt.Mod; -// -// public class ModLoader -// { -// export interface IModLoader { -// load(container: DependencyContainer): void; -// -// getModPath(mod: string): string; -// } -// -// } +namespace Core.Models.Spt.Mod; + +public class ModLoader +{ + public void Load(DependencyContainer container) + { + throw new NotImplementedException(); + } + + public string GetModPath(string mod) + { + throw new NotImplementedException(); + } +} // TODO: This needs to be reworked with however we do it for this project \ No newline at end of file diff --git a/Core/Models/Spt/Mod/NewItemDetails.cs b/Core/Models/Spt/Mod/NewItemDetails.cs index 1061f4f0..5c8dd015 100644 --- a/Core/Models/Spt/Mod/NewItemDetails.cs +++ b/Core/Models/Spt/Mod/NewItemDetails.cs @@ -1,61 +1,71 @@ -// namespace Types.Models.Spt.Mod; -// -// public class NewItemDetails -// { -// export abstract class NewItemDetailsBase { -// /** Price of the item on flea market */ -// fleaPriceRoubles: number; -// -// /** Price of the item in the handbook */ -// handbookPriceRoubles: number; -// -// /** Handbook ParentId for the new item */ -// handbookParentId: string; -// -// /** -// * A dictionary for locale settings, key = langauge (e.g. en,cn,es-mx,jp,fr) -// * If a language is not included, the first item in the array will be used in its place -// */ -// locales: Record; -// } -// -// export class NewItemFromCloneDetails extends NewItemDetailsBase { -// /** Id of the item to copy and use as a base */ -// itemTplToClone: string; -// -// /** Item properties that should be applied over the top of the cloned base */ -// overrideProperties: IProps; -// -// /** ParentId for the new item (item type) */ -// parentId: string; -// -// /** -// * the id the new item should have, leave blank to have one generated for you -// * This is often known as the TplId, or TemplateId -// */ -// newId = ""; -// } -// -// export class NewItemDetails extends NewItemDetailsBase { -// newItem: ITemplateItem; -// } -// -// export class LocaleDetails { -// name: string; -// shortName: string; -// description: string; -// } -// -// export class CreateItemResult { -// constructor() { -// this.success = false; -// this.errors = []; -// } -// -// success: boolean; -// itemId: string; -// errors: string[]; -// } -// } +using System.Text.Json.Serialization; + +namespace Core.Models.Spt.Mod; + +public class NewItemDetails : NewItemDetailsBase +{ + [JsonPropertyName("newItem")] + public TemplateItem NewItem { get; set; } +} + +public class NewItemFromCloneDetails : NewItemDetailsBase +{ + [JsonPropertyName("itemTplToClone")] + public string ItemTplToClone { get; set; } + + [JsonPropertyName("overrideProperties")] + public Props OverrideProperties { get; set; } + + [JsonPropertyName("parentId")] + public string ParentId { get; set; } + + [JsonPropertyName("newId")] + public string NewId { get; set; } = ""; +} + +public class NewItemDetailsBase +{ + [JsonPropertyName("fleaPriceRoubles")] + public float FleaPriceRoubles { get; set; } + + [JsonPropertyName("handbookPriceRoubles")] + public float HandbookPriceRoubles { get; set; } + + [JsonPropertyName("handbookParentId")] + public string HandbookParentId { get; set; } + + [JsonPropertyName("locales")] + public Dictionary Locales { get; set; } +} + +public class LocaleDetails +{ + [JsonPropertyName("name")] + public string Name { get; set; } + + [JsonPropertyName("shortName")] + public string ShortName { get; set; } + + [JsonPropertyName("description")] + public string Description { get; set; } +} + +public class CreateItemResult +{ + [JsonPropertyName("success")] + public bool Success { get; set; } + + [JsonPropertyName("itemId")] + public string ItemId { get; set; } + + [JsonPropertyName("errors")] + public List Errors { get; set; } + + public CreateItemResult() + { + Success = false; + Errors = new List(); + } +} // TODO: This needs to be reworked with however we do it for this project \ No newline at end of file diff --git a/Core/Models/Spt/Mod/PackageJsonData.cs b/Core/Models/Spt/Mod/PackageJsonData.cs index c588b394..e114969d 100644 --- a/Core/Models/Spt/Mod/PackageJsonData.cs +++ b/Core/Models/Spt/Mod/PackageJsonData.cs @@ -1,27 +1,57 @@ -// namespace Types.Models.Spt.Mod; -// -// public class PackageJsonData -// { -// export interface IPackageJsonData { -// incompatibilities?: string[]; -// loadBefore?: string[]; -// loadAfter?: string[]; -// dependencies?: Record; -// modDependencies?: Record; -// name: string; -// url: string; -// author: string; -// version: string; -// sptVersion: string; -// /** We deliberately purge this data */ -// scripts: Record; -// devDependencies: Record; -// licence: string; -// main: string; -// isBundleMod: boolean; -// contributors: string[]; -// } -// -// } +using System.Text.Json.Serialization; + +namespace Core.Models.Spt.Mod; + +public class PackageJsonData +{ + [JsonPropertyName("incompatibilities")] + public List? Incompatibilities { get; set; } + + [JsonPropertyName("loadBefore")] + public List? LoadBefore { get; set; } + + [JsonPropertyName("loadAfter")] + public List? LoadAfter { get; set; } + + [JsonPropertyName("dependencies")] + public Dictionary? Dependencies { get; set; } + + [JsonPropertyName("modDependencies")] + public Dictionary? ModDependencies { get; set; } + + [JsonPropertyName("name")] + public string Name { get; set; } + + [JsonPropertyName("url")] + public string Url { get; set; } + + [JsonPropertyName("author")] + public string Author { get; set; } + + [JsonPropertyName("version")] + public string Version { get; set; } + + [JsonPropertyName("sptVersion")] + public string SptVersion { get; set; } + + // We deliberately purge this data + [JsonPropertyName("scripts")] + public Dictionary Scripts { get; set; } + + [JsonPropertyName("devDependencies")] + public Dictionary? DevDependencies { get; set; } + + [JsonPropertyName("licence")] + public string Licence { get; set; } + + [JsonPropertyName("main")] + public string Main { get; set; } + + [JsonPropertyName("isBundleMod")] + public bool IsBundleMod { get; set; } + + [JsonPropertyName("contributors")] + public List Contributors { get; set; } +} // TODO: this will need changing to however we implement it in this project \ No newline at end of file diff --git a/Core/Models/Spt/Quests/GetRepeatableByIdResult.cs b/Core/Models/Spt/Quests/GetRepeatableByIdResult.cs index c1abfe7d..7fa2e8e1 100644 --- a/Core/Models/Spt/Quests/GetRepeatableByIdResult.cs +++ b/Core/Models/Spt/Quests/GetRepeatableByIdResult.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace Types.Models.Spt.Quests; +namespace Core.Models.Spt.Quests; public class GetRepeatableByIdResult { diff --git a/Core/Models/Spt/Ragfair/RagfairServerPrices.cs b/Core/Models/Spt/Ragfair/RagfairServerPrices.cs index c95c0236..74053c8d 100644 --- a/Core/Models/Spt/Ragfair/RagfairServerPrices.cs +++ b/Core/Models/Spt/Ragfair/RagfairServerPrices.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace Types.Models.Spt.Ragfair; +namespace Core.Models.Spt.Ragfair; public class RagfairServerPrices { diff --git a/Core/Models/Spt/Ragfair/TplWithFleaPrice.cs b/Core/Models/Spt/Ragfair/TplWithFleaPrice.cs index a9181ade..50bfa61a 100644 --- a/Core/Models/Spt/Ragfair/TplWithFleaPrice.cs +++ b/Core/Models/Spt/Ragfair/TplWithFleaPrice.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace Types.Models.Spt.Ragfair; +namespace Core.Models.Spt.Ragfair; public class TplWithFleaPrice { diff --git a/Core/Models/Spt/Repeatable/QuestRewardValues.cs b/Core/Models/Spt/Repeatable/QuestRewardValues.cs index 89963dd6..c0e986c0 100644 --- a/Core/Models/Spt/Repeatable/QuestRewardValues.cs +++ b/Core/Models/Spt/Repeatable/QuestRewardValues.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace Types.Models.Spt.Repeatable; +namespace Core.Models.Spt.Repeatable; public class QuestRewardValues { diff --git a/Core/Models/Spt/Repeatable/QuestTypePool.cs b/Core/Models/Spt/Repeatable/QuestTypePool.cs index ded713de..32b8e122 100644 --- a/Core/Models/Spt/Repeatable/QuestTypePool.cs +++ b/Core/Models/Spt/Repeatable/QuestTypePool.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Text.Json.Serialization; -namespace Types.Models.Spt.Repeatable; +namespace Core.Models.Spt.Repeatable; public class QuestTypePool { diff --git a/Core/Models/Spt/Server/DatabaseTables.cs b/Core/Models/Spt/Server/DatabaseTables.cs index eea46689..fa6eb47a 100644 --- a/Core/Models/Spt/Server/DatabaseTables.cs +++ b/Core/Models/Spt/Server/DatabaseTables.cs @@ -1,4 +1,4 @@ -namespace Types.Models.Spt.Server; +namespace Core.Models.Spt.Server; public class DatabaseTables { diff --git a/Core/Models/Spt/Server/LocaleBase.cs b/Core/Models/Spt/Server/LocaleBase.cs index 37feec9e..9898ffc3 100644 --- a/Core/Models/Spt/Server/LocaleBase.cs +++ b/Core/Models/Spt/Server/LocaleBase.cs @@ -1,7 +1,6 @@ using System.Text.Json.Serialization; -using System.Collections.Generic; -namespace Types.Models.Spt.Server; +namespace Core.Models.Spt.Server; public class LocaleBase { diff --git a/Core/Models/Spt/Server/Locations.cs b/Core/Models/Spt/Server/Locations.cs index 89d7f8b7..0d0fc118 100644 --- a/Core/Models/Spt/Server/Locations.cs +++ b/Core/Models/Spt/Server/Locations.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace Types.Models.Spt.Server; +namespace Core.Models.Spt.Server; public class Locations { diff --git a/Core/Models/Spt/Server/ServerBase.cs b/Core/Models/Spt/Server/ServerBase.cs index 3e12c4ad..fbf2df39 100644 --- a/Core/Models/Spt/Server/ServerBase.cs +++ b/Core/Models/Spt/Server/ServerBase.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace Types.Models.Spt.Server; +namespace Core.Models.Spt.Server; public class ServerBase { diff --git a/Core/Models/Spt/Server/SettingsBase.cs b/Core/Models/Spt/Server/SettingsBase.cs index a41cc5cd..1475d93a 100644 --- a/Core/Models/Spt/Server/SettingsBase.cs +++ b/Core/Models/Spt/Server/SettingsBase.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace Types.Models.Spt.Server; +namespace Core.Models.Spt.Server; public class SettingsBase {