From 2f997f6a8516635cf609b2be4dc7ca679afe5941 Mon Sep 17 00:00:00 2001 From: CWX Date: Mon, 6 Jan 2025 00:32:55 +0000 Subject: [PATCH 1/9] addded more types, some are unfinished, ill come back to these tomorrow --- .gitignore | 3 + Core/Models/Spt/Config/AirdropConfig.cs | 127 +++++ Core/Models/Spt/Config/BackupConfig.cs | 30 + Core/Models/Spt/Config/BaseConfig.cs | 18 + Core/Models/Spt/Config/BotConfig.cs | 523 ++++++++++++++++++ Core/Models/Spt/Config/BotDurability.cs | 115 ++++ Core/Models/Spt/Config/CoreConfig.cs | 197 +++++++ Core/Models/Spt/Config/GiftsConfig.cs | 63 +++ Core/Models/Spt/Config/HealthConfig.cs | 33 ++ Core/Models/Spt/Config/HideoutConfig.cs | 142 +++++ Core/Models/Spt/Config/HttpConfig.cs | 39 ++ Core/Models/Spt/Config/InRaidConfig.cs | 6 + Core/Models/Spt/Config/InsuranceConfig.cs | 6 + Core/Models/Spt/Config/InventoryConfig.cs | 6 + Core/Models/Spt/Config/ItemConfig.cs | 6 + Core/Models/Spt/Config/LocaleConfig.cs | 6 + Core/Models/Spt/Config/LocationConfig.cs | 6 + Core/Models/Spt/Config/LootConfig.cs | 6 + Core/Models/Spt/Config/LostOnDeathConfig.cs | 6 + Core/Models/Spt/Config/MatchConfig.cs | 6 + Core/Models/Spt/Config/PlayerScavConfig.cs | 6 + Core/Models/Spt/Config/PmcChatResponse.cs | 6 + Core/Models/Spt/Config/PmcConfig.cs | 6 + Core/Models/Spt/Config/QuestConfig.cs | 6 + Core/Models/Spt/Config/RagfairConfig.cs | 6 + Core/Models/Spt/Config/RepairConfig.cs | 6 + Core/Models/Spt/Config/ScavCaseConfig.cs | 6 + Core/Models/Spt/Config/SeasonalEventConfig.cs | 6 + Core/Models/Spt/Config/TraderConfig.cs | 6 + Core/Models/Spt/Config/WeatherConfig.cs | 6 + Core/Models/Spt/Controllers/BotController.cs | 16 + Core/Models/Spt/Dialog/SendMessageDetails.cs | 106 ++++ .../Spt/Fence/CreateFenceAssortsResult.cs | 16 + .../Spt/Fence/FenceAssortGenerationValues.cs | 24 + Core/Models/Spt/Generators/BotGenerator.cs | 16 + .../Spt/Generators/LocationGenerator.cs | 21 + .../Models/Spt/Generators/PMCLootGenerator.cs | 12 + .../Spt/Generators/RagfairAssortGenerator.cs | 11 + .../Spt/Generators/RagfairOfferGenerator.cs | 18 + Core/Models/Spt/Hideout/CircleCraftDetails.cs | 19 + Core/Models/Spt/Hideout/Hideout.cs | 22 + .../Hideout/ScavCaseRewardCountsAndPrice.cs | 30 + .../Spt/Inventory/OwnerInventoryItems.cs | 18 + Core/Models/Spt/Location/RaidChanges.cs | 15 + Core/Models/Spt/Logging/ClientLogRequest.cs | 21 + Core/Models/Spt/Logging/LogBackgroundColor.cs | 14 + Core/Models/Spt/Logging/LogLevel.cs | 13 + Core/Models/Spt/Logging/LogTextColor.cs | 14 + Core/Models/Spt/Logging/SptLogger.cs | 15 + Core/Models/Spt/Mod/ModLoader.cs | 13 + Core/Models/Spt/Mod/NewItemDetails.cs | 61 ++ Core/Models/Spt/Mod/PackageJsonData.cs | 27 + Core/Models/Spt/Repeatable/QuestTypePool.cs | 24 +- 53 files changed, 1938 insertions(+), 12 deletions(-) create mode 100644 Core/Models/Spt/Config/AirdropConfig.cs create mode 100644 Core/Models/Spt/Config/BackupConfig.cs create mode 100644 Core/Models/Spt/Config/BaseConfig.cs create mode 100644 Core/Models/Spt/Config/BotConfig.cs create mode 100644 Core/Models/Spt/Config/BotDurability.cs create mode 100644 Core/Models/Spt/Config/CoreConfig.cs create mode 100644 Core/Models/Spt/Config/GiftsConfig.cs create mode 100644 Core/Models/Spt/Config/HealthConfig.cs create mode 100644 Core/Models/Spt/Config/HideoutConfig.cs create mode 100644 Core/Models/Spt/Config/HttpConfig.cs create mode 100644 Core/Models/Spt/Config/InRaidConfig.cs create mode 100644 Core/Models/Spt/Config/InsuranceConfig.cs create mode 100644 Core/Models/Spt/Config/InventoryConfig.cs create mode 100644 Core/Models/Spt/Config/ItemConfig.cs create mode 100644 Core/Models/Spt/Config/LocaleConfig.cs create mode 100644 Core/Models/Spt/Config/LocationConfig.cs create mode 100644 Core/Models/Spt/Config/LootConfig.cs create mode 100644 Core/Models/Spt/Config/LostOnDeathConfig.cs create mode 100644 Core/Models/Spt/Config/MatchConfig.cs create mode 100644 Core/Models/Spt/Config/PlayerScavConfig.cs create mode 100644 Core/Models/Spt/Config/PmcChatResponse.cs create mode 100644 Core/Models/Spt/Config/PmcConfig.cs create mode 100644 Core/Models/Spt/Config/QuestConfig.cs create mode 100644 Core/Models/Spt/Config/RagfairConfig.cs create mode 100644 Core/Models/Spt/Config/RepairConfig.cs create mode 100644 Core/Models/Spt/Config/ScavCaseConfig.cs create mode 100644 Core/Models/Spt/Config/SeasonalEventConfig.cs create mode 100644 Core/Models/Spt/Config/TraderConfig.cs create mode 100644 Core/Models/Spt/Config/WeatherConfig.cs create mode 100644 Core/Models/Spt/Controllers/BotController.cs create mode 100644 Core/Models/Spt/Dialog/SendMessageDetails.cs create mode 100644 Core/Models/Spt/Fence/CreateFenceAssortsResult.cs create mode 100644 Core/Models/Spt/Fence/FenceAssortGenerationValues.cs create mode 100644 Core/Models/Spt/Generators/BotGenerator.cs create mode 100644 Core/Models/Spt/Generators/LocationGenerator.cs create mode 100644 Core/Models/Spt/Generators/PMCLootGenerator.cs create mode 100644 Core/Models/Spt/Generators/RagfairAssortGenerator.cs create mode 100644 Core/Models/Spt/Generators/RagfairOfferGenerator.cs create mode 100644 Core/Models/Spt/Hideout/CircleCraftDetails.cs create mode 100644 Core/Models/Spt/Hideout/Hideout.cs create mode 100644 Core/Models/Spt/Hideout/ScavCaseRewardCountsAndPrice.cs create mode 100644 Core/Models/Spt/Inventory/OwnerInventoryItems.cs create mode 100644 Core/Models/Spt/Location/RaidChanges.cs create mode 100644 Core/Models/Spt/Logging/ClientLogRequest.cs create mode 100644 Core/Models/Spt/Logging/LogBackgroundColor.cs create mode 100644 Core/Models/Spt/Logging/LogLevel.cs create mode 100644 Core/Models/Spt/Logging/LogTextColor.cs create mode 100644 Core/Models/Spt/Logging/SptLogger.cs create mode 100644 Core/Models/Spt/Mod/ModLoader.cs create mode 100644 Core/Models/Spt/Mod/NewItemDetails.cs create mode 100644 Core/Models/Spt/Mod/PackageJsonData.cs diff --git a/.gitignore b/.gitignore index 8df737a2..3b3780b5 100644 --- a/.gitignore +++ b/.gitignore @@ -30,6 +30,9 @@ bld/ [Oo]bj/ [Ll]og/ +# Rider specific +.idea + # Visual Studio 2015/2017 cache/options directory .vs/ # Uncomment if you have tasks that create the project's static files in wwwroot diff --git a/Core/Models/Spt/Config/AirdropConfig.cs b/Core/Models/Spt/Config/AirdropConfig.cs new file mode 100644 index 00000000..36644ea1 --- /dev/null +++ b/Core/Models/Spt/Config/AirdropConfig.cs @@ -0,0 +1,127 @@ +using System.Collections.Generic; +using System.Text.Json.Serialization; + +namespace Types.Models.Spt.Config; + +public class AirdropConfig : BaseConfig +{ + [JsonPropertyName("kind")] + public string Kind { get; set; } = "spt-airdrop"; + + [JsonPropertyName("airdropTypeWeightings")] + public Dictionary AirdropTypeWeightings { get; set; } + + /// + /// What rewards will the loot crate contain, keyed by drop type e.g. mixed/weaponArmor/foodMedical/barter + /// + [JsonPropertyName("loot")] + public Dictionary Loot { get; set; } + + [JsonPropertyName("customAirdropMapping")] + public Dictionary CustomAirdropMapping { get; set; } +} + +/// +/// Chance map will have an airdrop occur out of 100 - locations not included count as 0% +/// +public class AirdropChancePercent +{ + [JsonPropertyName("bigmap")] + public double Bigmap { get; set; } + + [JsonPropertyName("woods")] + public double Woods { get; set; } + + [JsonPropertyName("lighthouse")] + public double Lighthouse { get; set; } + + [JsonPropertyName("shoreline")] + public double Shoreline { get; set; } + + [JsonPropertyName("interchange")] + public double Interchange { get; set; } + + [JsonPropertyName("reserve")] + public double Reserve { get; set; } + + [JsonPropertyName("tarkovStreets")] + public double TarkovStreets { get; set; } + + [JsonPropertyName("sandbox")] + public double Sandbox { get; set; } +} + +/// +/// Loot inside crate +/// +public class AirdropLoot +{ + [JsonPropertyName("Icon")] + public AirdropTypeEnum Icon { get; set; } + + /// + /// Min/max of weapons inside crate + /// + [JsonPropertyName("weaponPresetCount")] + public MinMax? WeaponPresetCount { get; set; } + + /// + /// Min/max of armors (head/chest/rig) inside crate + /// + [JsonPropertyName("armorPresetCount")] + public MinMax? ArmorPresetCount { get; set; } + + /// + /// Min/max of items inside crate + /// + [JsonPropertyName("itemCount")] + public MinMax ItemCount { get; set; } + + /// + /// Min/max of sealed weapon boxes inside crate + /// + [JsonPropertyName("weaponCrateCount")] + public MinMax WeaponCrateCount { get; set; } + + /// + /// Items to never allow - tpls + /// + [JsonPropertyName("itemBlacklist")] + public List ItemBlacklist { get; set; } + + /// + /// Item type (parentId) to allow inside crate + /// + [JsonPropertyName("itemTypeWhitelist")] + public List ItemTypeWhitelist { get; set; } + + /// + /// Item type/ item tpls to limit count of inside crate - key: item base type: value: max count + /// + [JsonPropertyName("itemLimits")] + public Dictionary ItemLimits { get; set; } + + /// + /// Items to limit stack size of key: item tpl value: min/max stack size + /// + [JsonPropertyName("itemStackLimits")] + public Dictionary ItemStackLimits { get; set; } + + /// + /// Armor levels to allow inside crate e.g. [4,5,6] + /// + [JsonPropertyName("armorLevelWhitelist")] + public List? ArmorLevelWhitelist { get; set; } + + /// + /// Should boss items be added to airdrop crate + /// + [JsonPropertyName("allowBossItems")] + public bool AllowBossItems { get; set; } + + [JsonPropertyName("useForcedLoot")] + public bool? UseForcedLoot { get; set; } + + [JsonPropertyName("forcedLoot")] + public Dictionary? ForcedLoot { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Spt/Config/BackupConfig.cs b/Core/Models/Spt/Config/BackupConfig.cs new file mode 100644 index 00000000..96568506 --- /dev/null +++ b/Core/Models/Spt/Config/BackupConfig.cs @@ -0,0 +1,30 @@ +namespace Types.Models.Spt.Config; + +using System.Text.Json.Serialization; + +public class BackupConfig : BaseConfig +{ + [JsonPropertyName("kind")] + public string Kind { get; set; } = "spt-backup"; + + [JsonPropertyName("enabled")] + public bool Enabled { get; set; } + + [JsonPropertyName("maxBackups")] + public int MaxBackups { get; set; } + + [JsonPropertyName("directory")] + public string Directory { get; set; } + + [JsonPropertyName("backupInterval")] + public BackupConfigInterval BackupInterval { get; set; } +} + +public class BackupConfigInterval +{ + [JsonPropertyName("enabled")] + public bool Enabled { get; set; } + + [JsonPropertyName("intervalMinutes")] + public int IntervalMinutes { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Spt/Config/BaseConfig.cs b/Core/Models/Spt/Config/BaseConfig.cs new file mode 100644 index 00000000..82a345d8 --- /dev/null +++ b/Core/Models/Spt/Config/BaseConfig.cs @@ -0,0 +1,18 @@ +using System.Text.Json.Serialization; + +namespace Types.Models.Spt.Config; + +public class BaseConfig +{ + [JsonPropertyName("kind")] + public string Kind { get; set; } +} + +public class RunIntervalValues +{ + [JsonPropertyName("inRaid")] + public int InRaid { get; set; } + + [JsonPropertyName("outOfRaid")] + public int OutOfRaid { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Spt/Config/BotConfig.cs b/Core/Models/Spt/Config/BotConfig.cs new file mode 100644 index 00000000..704b3baf --- /dev/null +++ b/Core/Models/Spt/Config/BotConfig.cs @@ -0,0 +1,523 @@ +using System.Collections.Generic; +using System.Text.Json.Serialization; + +namespace Types.Models.Spt.Config; + +public class BotConfig : BaseConfig +{ + [JsonPropertyName("kind")] + public string Kind { get; set; } = "spt-bot"; + + /** How many variants of each bot should be generated on raid start */ + [JsonPropertyName("presetBatch")] + public PresetBatch PresetBatch { get; set; } + + /** Bot roles that should not have PMC types (pmcBEAR/pmcUSEC) added as enemies to */ + [JsonPropertyName("botsToNotAddPMCsAsEnemiesTo")] + public List BotsToNotAddPMCsAsEnemiesTo { get; set; } + + /** What bot types should be classified as bosses */ + [JsonPropertyName("bosses")] + public List Bosses { get; set; } + + /** Control weapon/armor durability min/max values for each bot type */ + [JsonPropertyName("durability")] + public BotDurability Durability { get; set; } + + /** Controls the percentage values of randomization item resources */ + [JsonPropertyName("lootItemResourceRandomization")] + public Dictionary LootItemResourceRandomization { get; set; } + + /** Control what bots are added to a bots revenge list key: bottype, value: bottypes to revenge on seeing their death */ + [JsonPropertyName("revenge")] + public Dictionary> Revenge { get; set; } + + /** Control how many items are allowed to spawn on a bot + * key: bottype, value: */ + [JsonPropertyName("itemSpawnLimits")] + public Dictionary> ItemSpawnLimits { get; set; } + + /** Blacklist/whitelist items on a bot */ + [JsonPropertyName("equipment")] + public Dictionary Equipment { get; set; } + + /** Show a bots botType value after their name */ + [JsonPropertyName("showTypeInNickname")] + public bool ShowTypeInNickname { get; set; } + + /** What ai brain should a normal scav use per map */ + [JsonPropertyName("assaultBrainType")] + public Dictionary> AssaultBrainType { get; set; } + + /** What ai brain should a player scav use per map */ + [JsonPropertyName("playerScavBrainType")] + public Dictionary> PlayerScavBrainType { get; set; } + + /** Max number of bots that can be spawned in a raid at any one time */ + [JsonPropertyName("maxBotCap")] + public Dictionary MaxBotCap { get; set; } + + /** Chance scav has fake pscav name e.g. Scav name (player name) */ + [JsonPropertyName("chanceAssaultScavHasPlayerScavName")] + public int ChanceAssaultScavHasPlayerScavName { get; set; } + + /** How many stacks of secret ammo should a bot have in its bot secure container */ + [JsonPropertyName("secureContainerAmmoStackCount")] + public int SecureContainerAmmoStackCount { get; set; } + + /** Bot roles in this array will be given a dog tag on generation */ + [JsonPropertyName("botRolesWithDogTags")] + public List BotRolesWithDogTags { get; set; } + + /** Settings to control the items that get added into wallets on bots */ + [JsonPropertyName("walletLoot")] + public WalletLootSettings WalletLoot { get; set; } + + /** Currency weights, Keyed by botrole / currency */ + [JsonPropertyName("currencyStackSize")] + public Dictionary>> CurrencyStackSize { get; set; } + + /** Tpls for low profile gas blocks */ + [JsonPropertyName("lowProfileGasBlockTpls")] + public List LowProfileGasBlockTpls { get; set; } + + /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ + [JsonPropertyName("disableLootOnBotTypes")] + public List DisableLootOnBotTypes { get; set; } + + [JsonPropertyName("assaultToBossConversion")] + public AssaultToBossConversion AssaultToBossConversion { get; set; } + + /** Max length a bots name can be */ + [JsonPropertyName("botNameLengthLimit")] + public int BotNameLengthLimit { get; set; } + + /** Bot roles that must have a unique name when generated vs other bots in raid */ + [JsonPropertyName("botRolesThatMustHaveUniqueName")] + public List BotRolesThatMustHaveUniqueName { get; set; } +} + +public class AssaultToBossConversion +{ + [JsonPropertyName("bossConvertEnabled")] + public bool BossConvertEnabled { get; set; } + + [JsonPropertyName("bossesToConvertToWeights")] + public Dictionary BossesToConvertToWeights { get; set; } + + [JsonPropertyName("bossConvertMinMax")] + public Dictionary BossConvertMinMax { get; set; } +} + +/** Number of bots to generate and store in cache on raid start per bot type */ +public class PresetBatch +{ + [JsonPropertyName("assault")] + public int Assault { get; set; } + + [JsonPropertyName("bossBully")] + public int BossBully { get; set; } + + [JsonPropertyName("bossGluhar")] + public int BossGluhar { get; set; } + + [JsonPropertyName("bossKilla")] + public int BossKilla { get; set; } + + [JsonPropertyName("bossKojaniy")] + public int BossKojaniy { get; set; } + + [JsonPropertyName("bossSanitar")] + public int BossSanitar { get; set; } + + [JsonPropertyName("bossTagilla")] + public int BossTagilla { get; set; } + + [JsonPropertyName("bossKnight")] + public int BossKnight { get; set; } + + [JsonPropertyName("bossTest")] + public int BossTest { get; set; } + + [JsonPropertyName("cursedAssault")] + public int CursedAssault { get; set; } + + [JsonPropertyName("followerBully")] + public int FollowerBully { get; set; } + + [JsonPropertyName("followerGluharAssault")] + public int FollowerGluharAssault { get; set; } + + [JsonPropertyName("followerGluharScout")] + public int FollowerGluharScout { get; set; } + + [JsonPropertyName("followerGluharSecurity")] + public int FollowerGluharSecurity { get; set; } + + [JsonPropertyName("followerGluharSnipe")] + public int FollowerGluharSnipe { get; set; } + + [JsonPropertyName("followerKojaniy")] + public int FollowerKojaniy { get; set; } + + [JsonPropertyName("followerSanitar")] + public int FollowerSanitar { get; set; } + + [JsonPropertyName("followerTagilla")] + public int FollowerTagilla { get; set; } + + [JsonPropertyName("followerBirdEye")] + public int FollowerBirdEye { get; set; } + + [JsonPropertyName("followerBigPipe")] + public int FollowerBigPipe { get; set; } + + [JsonPropertyName("followerTest")] + public int FollowerTest { get; set; } + + [JsonPropertyName("followerBoar")] + public int FollowerBoar { get; set; } + + [JsonPropertyName("marksman")] + public int Marksman { get; set; } + + [JsonPropertyName("pmcBot")] + public int PmcBot { get; set; } + + [JsonPropertyName("sectantPriest")] + public int SectantPriest { get; set; } + + [JsonPropertyName("sectantWarrior")] + public int SectantWarrior { get; set; } + + [JsonPropertyName("gifter")] + public int Gifter { get; set; } + + [JsonPropertyName("test")] + public int Test { get; set; } + + [JsonPropertyName("exUsec")] + public int ExUsec { get; set; } + + [JsonPropertyName("arenaFighterEvent")] + public int ArenaFighterEvent { get; set; } + + [JsonPropertyName("arenaFighter")] + public int ArenaFighter { get; set; } + + [JsonPropertyName("crazyAssaultEvent")] + public int CrazyAssaultEvent { get; set; } + + [JsonPropertyName("bossBoar")] + public int BossBoar { get; set; } + + [JsonPropertyName("bossBoarSniper")] + public int BossBoarSniper { get; set; } + + [JsonPropertyName("pmcUSEC")] + public int PmcUSEC { get; set; } + + [JsonPropertyName("pmcBEAR")] + public int PmcBEAR { get; set; } +} + +public class WalletLootSettings +{ + /// + /// Chance wallets have loot in them + /// + [JsonPropertyName("chancePercent")] + public float ChancePercent { get; set; } + + [JsonPropertyName("itemCount")] + public MinMax ItemCount { get; set; } + + [JsonPropertyName("stackSizeWeight")] + public Dictionary StackSizeWeight { get; set; } + + [JsonPropertyName("currencyWeight")] + public Dictionary CurrencyWeight { get; set; } + + /// + /// What wallets will have money in them + /// + [JsonPropertyName("walletTplPool")] + public List WalletTplPool { get; set; } +} + +public class EquipmentFilters +{ + /// + /// Limits for mod types per weapon .e.g. scopes + /// + [JsonPropertyName("weaponModLimits")] + public ModLimits WeaponModLimits { get; set; } + + /// + /// Whitelist for weapon sight types allowed per gun + /// + [JsonPropertyName("weaponSightWhitelist")] + public Dictionary> WeaponSightWhitelist { get; set; } + + /// + /// Chance face shield is down/active + /// + [JsonPropertyName("faceShieldIsActiveChancePercent")] + public float? FaceShieldIsActiveChancePercent { get; set; } + + /// + /// Chance gun flashlight is active during the day + /// + [JsonPropertyName("lightIsActiveDayChancePercent")] + public float? LightIsActiveDayChancePercent { get; set; } + + /// + /// Chance gun flashlight is active during the night + /// + [JsonPropertyName("lightIsActiveNightChancePercent")] + public float? LightIsActiveNightChancePercent { get; set; } + + /// + /// Chance gun laser is active during the day + /// + [JsonPropertyName("laserIsActiveChancePercent")] + public float? LaserIsActiveChancePercent { get; set; } + + /// + /// Chance NODS are down/active during the day + /// + [JsonPropertyName("NvgIsActiveChanceDayPercent")] + public float? NvgIsActiveChanceDayPercent { get; set; } + + /// + /// Chance NODS are down/active during the night + /// + [JsonPropertyName("nvgIsActiveChanceNightPercent")] + public float? NvgIsActiveChanceNightPercent { get; set; } + + [JsonPropertyName("forceOnlyArmoredRigWhenNoArmor")] + public bool? ForceOnlyArmoredRigWhenNoArmor { get; set; } + + /// + /// Should plates be filtered by level + /// + [JsonPropertyName("filterPlatesByLevel")] + public bool? FilterPlatesByLevel { get; set; } + + /// + /// What additional slot ids should be seen as required when choosing a mod to add to a weapon + /// + [JsonPropertyName("weaponSlotIdsToMakeRequired")] + public List? WeaponSlotIdsToMakeRequired { get; set; } + + /// + /// Adjust weighting/chances of items on bot by level of bot + /// + [JsonPropertyName("randomisation")] + public List Randomisation { get; set; } + + /// + /// Blacklist equipment by level of bot + /// + [JsonPropertyName("blacklist")] + public List Blacklist { get; set; } + + /// + /// Whitelist equipment by level of bot + /// + [JsonPropertyName("whitelist")] + public List Whitelist { get; set; } + + /// + /// Adjust equipment/ammo + /// + [JsonPropertyName("weightingAdjustmentsByBotLevel")] + public List WeightingAdjustmentsByBotLevel { get; set; } + + /// + /// Same as weightingAdjustments but based on player level instead of bot level + /// + [JsonPropertyName("weightingAdjustmentsByPlayerLevel")] + public List? WeightingAdjustmentsByPlayerLevel { get; set; } + + /// + /// Should the stock mod be forced to spawn on bot + /// + [JsonPropertyName("forceStock")] + public bool? ForceStock { get; set; } + + [JsonPropertyName("armorPlateWeighting")] + public List? ArmorPlateWeighting { get; set; } + + [JsonPropertyName("forceRigWhenNoVest")] + public bool? ForceRigWhenNoVest { get; set; } +} + +public class ModLimits +{ + /// + /// How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR + /// + [JsonPropertyName("scopeLimit")] + public int? ScopeLimit { get; set; } + + /// + /// How many lasers or lights are allowed on a weapon - hard coded to work with TACTICAL_COMBO, and FLASHLIGHT + /// + [JsonPropertyName("lightLaserLimit")] + public int? LightLaserLimit { get; set; } +} + +public class RandomisationDetails +{ + /// + /// Between what levels do these randomisation setting apply to + /// + [JsonPropertyName("levelRange")] + public MinMax LevelRange { get; set; } + + [JsonPropertyName("generation")] + public Dictionary? Generation { get; set; } + + /// + /// Mod slots that should be fully randomised -ignores mods from bottype.json and instead creates a pool using items.json + /// + [JsonPropertyName("randomisedWeaponModSlots")] + public List? RandomisedWeaponModSlots { get; set; } + + /// + /// Armor slots that should be randomised e.g. 'Headwear, Armband' + /// + [JsonPropertyName("randomisedArmorSlots")] + public List? RandomisedArmorSlots { get; set; } + + /// + /// Equipment chances + /// + [JsonPropertyName("equipment")] + public Dictionary? Equipment { get; set; } + + /// + /// Weapon mod chances + /// + [JsonPropertyName("weaponMods")] + public Dictionary? WeaponMods { get; set; } + + /// + /// Equipment mod chances + /// + [JsonPropertyName("equipmentMods")] + public Dictionary? EquipmentMods { get; set; } + + [JsonPropertyName("nighttimeChanges")] + public NighttimeChanges? NighttimeChanges { get; set; } + + /// + /// Key = weapon tpl, value = min size of magazine allowed + /// + [JsonPropertyName("minimumMagazineSize")] + public Dictionary? MinimumMagazineSize { get; set; } +} + +public class NighttimeChanges +{ + /// + /// Applies changes to values stored in equipmentMods + /// + [JsonPropertyName("equipmentModsModifiers")] + public Dictionary EquipmentModsModifiers { get; set; } + //public Dictionary WeaponModsModifiers { get; set; } //TODO +} + +public class EquipmentFilterDetails +{ + /// + /// Between what levels do these equipment filter setting apply to + /// + [JsonPropertyName("levelRange")] + public MinMax LevelRange { get; set; } + + /// + /// Key: mod slot name e.g. mod_magazine, value: item tpls + /// + [JsonPropertyName("equipment")] + public Dictionary>? Equipment { get; set; } + + /// + /// Key: equipment slot name e.g. FirstPrimaryWeapon, value: item tpls + /// + [JsonPropertyName("gear")] + public Dictionary>? Gear { get; set; } + + /// + /// Key: cartridge type e.g. Caliber23x75, value: item tpls + /// + [JsonPropertyName("cartridge")] + public Dictionary>? Cartridge { get; set; } +} + +public class WeightingAdjustmentDetails +{ + /// + /// Between what levels do these weight settings apply to + /// + [JsonPropertyName("levelRange")] + public MinMax LevelRange { get; set; } + + /// + /// Key: ammo type e.g. Caliber556x45NATO, value: item tpl + weight + /// + [JsonPropertyName("ammo")] + public AdjustmentDetails? Ammo { get; set; } + + /// + /// Key: equipment slot e.g. TacticalVest, value: item tpl + weight + /// + [JsonPropertyName("equipment")] + public AdjustmentDetails? Equipment { get; set; } + + /// + /// Key: clothing slot e.g. feet, value: item tpl + weight + /// + [JsonPropertyName("clothing")] + public AdjustmentDetails? Clothing { get; set; } +} + +public class AdjustmentDetails +{ + [JsonPropertyName("add")] + public Dictionary> Add { get; set; } + + [JsonPropertyName("edit")] + public Dictionary> Edit { get; set; } +} + +public class ArmorPlateWeights : Dictionary +{ + [JsonPropertyName("levelRange")] + public MinMax LevelRange { get; set; } +} + +public class RandomisedResourceDetails +{ + [JsonPropertyName("food")] + public RandomisedResourceValues Food { get; set; } + + [JsonPropertyName("meds")] + public RandomisedResourceValues Meds { get; set; } +} + +public class RandomisedResourceValues +{ + /// + /// Minimum percent of item to randomized between min and max resource + /// + [JsonPropertyName("resourcePercent")] + public float ResourcePercent { get; set; } + + /// + /// Chance for randomization to not occur + /// + [JsonPropertyName("chanceMaxResourcePercent")] + public float ChanceMaxResourcePercent { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Spt/Config/BotDurability.cs b/Core/Models/Spt/Config/BotDurability.cs new file mode 100644 index 00000000..7e437154 --- /dev/null +++ b/Core/Models/Spt/Config/BotDurability.cs @@ -0,0 +1,115 @@ +using System.Text.Json.Serialization; + +namespace Types.Models.Spt.Config; + +public class BotDurability +{ + [JsonPropertyName("default")] + public DefaultDurability Default { get; set; } + + [JsonPropertyName("pmc")] + public PmcDurability Pmc { get; set; } + + [JsonPropertyName("boss")] + public BotDurability Boss { get; set; } + + [JsonPropertyName("follower")] + public BotDurability Follower { get; set; } + + [JsonPropertyName("assault")] + public BotDurability Assault { get; set; } + + [JsonPropertyName("cursedassault")] + public BotDurability CursedAssault { get; set; } + + [JsonPropertyName("marksman")] + public BotDurability Marksman { get; set; } + + [JsonPropertyName("pmcbot")] + public BotDurability PmcBot { get; set; } + + [JsonPropertyName("arenafighterevent")] + public BotDurability ArenaFighterEvent { get; set; } + + [JsonPropertyName("arenafighter")] + public BotDurability ArenaFighter { get; set; } + + [JsonPropertyName("crazyassaultevent")] + public BotDurability CrazyAssaultEvent { get; set; } + + [JsonPropertyName("exusec")] + public BotDurability Exusec { get; set; } + + [JsonPropertyName("gifter")] + public BotDurability Gifter { get; set; } + + [JsonPropertyName("sectantpriest")] + public BotDurability SectantPriest { get; set; } + + [JsonPropertyName("sectantwarrior")] + public BotDurability SectantWarrior { get; set; } +} + +/** Durability values to be used when a more specific bot type can't be found */ +public class DefaultDurability +{ + [JsonPropertyName("armor")] + public ArmorDurability Armor { get; set; } + + [JsonPropertyName("weapon")] + public WeaponDurability Weapon { get; set; } +} + +public class PmcDurability +{ + [JsonPropertyName("armor")] + public PmcDurabilityArmor Armor { get; set; } + + [JsonPropertyName("weapon")] + public WeaponDurability Weapon { get; set; } +} + +public class PmcDurabilityArmor +{ + [JsonPropertyName("lowestMaxPercent")] + public double LowestMaxPercent { get; set; } + + [JsonPropertyName("highestMaxPercent")] + public double HighestMaxPercent { get; set; } + + [JsonPropertyName("maxDelta")] + public double MaxDelta { get; set; } + + [JsonPropertyName("minDelta")] + public double MinDelta { get; set; } +} + +public class ArmorDurability +{ + [JsonPropertyName("maxDelta")] + public double MaxDelta { get; set; } + + [JsonPropertyName("minDelta")] + public double MinDelta { get; set; } + + [JsonPropertyName("minLimitPercent")] + public double MinLimitPercent { get; set; } +} + +public class WeaponDurability +{ + [JsonPropertyName("lowestMax")] + public double LowestMax { get; set; } + + [JsonPropertyName("highestMax")] + public double HighestMax { get; set; } + + [JsonPropertyName("maxDelta")] + public double MaxDelta { get; set; } + + [JsonPropertyName("minDelta")] + public double MinDelta { get; set; } + + [JsonPropertyName("minLimitPercent")] + public double MinLimitPercent { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Spt/Config/CoreConfig.cs b/Core/Models/Spt/Config/CoreConfig.cs new file mode 100644 index 00000000..1808a074 --- /dev/null +++ b/Core/Models/Spt/Config/CoreConfig.cs @@ -0,0 +1,197 @@ +using System.Text.Json.Serialization; + +namespace Types.Models.Spt.Config; + +public class CoreConfig : BaseConfig +{ + [JsonPropertyName("kind")] + public string Kind { get; set; } = "spt-core"; + + [JsonPropertyName("sptVersion")] + public string SptVersion { get; set; } + + [JsonPropertyName("projectName")] + public string ProjectName { get; set; } + + [JsonPropertyName("compatibleTarkovVersion")] + public string CompatibleTarkovVersion { get; set; } + + [JsonPropertyName("serverName")] + public string ServerName { get; set; } + + [JsonPropertyName("profileSaveIntervalSeconds")] + public int ProfileSaveIntervalInSeconds { get; set; } + + [JsonPropertyName("sptFriendNickname")] + public string SptFriendNickname { get; set; } + + [JsonPropertyName("allowProfileWipe")] + public bool AllowProfileWipe { get; set; } + + [JsonPropertyName("bsgLogging")] + public BsgLogging BsgLogging { get; set; } + + [JsonPropertyName("release")] + public Release Release { get; set; } + + [JsonPropertyName("fixes")] + public GameFixes Fixes { get; set; } + + [JsonPropertyName("survey")] + public SurveyResponseData Survey { get; set; } + + [JsonPropertyName("features")] + public ServerFeatures Features { get; set; } + + /** Commit hash build server was created from */ + [JsonPropertyName("commit")] + public string? Commit { get; set; } + + /** Timestamp of server build */ + [JsonPropertyName("buildTime")] + public string? BuildTime { get; set; } + + /** Server locale keys that will be added to the bottom of the startup watermark */ + [JsonPropertyName("customWatermarkLocaleKeys")] + public List? CustomWatermarkLocaleKeys { get; set; } +} + +public class BsgLogging +{ + /** + * verbosity of what to log, yes I know this is backwards, but its how nlog deals with ordinals. + * complain to them about it! In all cases, better exceptions will be logged. + * WARNING: trace-info logging will quickly create log files in the megabytes. + * 0 - trace + * 1 - debug + * 2 - info + * 3 - warn + * 4 - error + * 5 - fatal + * 6 - off + */ + [JsonPropertyName("verbosity")] + public int Verbosity { get; set; } + + // Should we send the logging to the server + [JsonPropertyName("sendToServer")] + public bool SendToServer { get; set; } +} + +public class Release +{ + // Disclaimer outlining the intended usage of bleeding edge + [JsonPropertyName("betaDisclaimerText")] + public string? BetaDisclaimerText { get; set; } + + // Text logged when users agreed to terms + [JsonPropertyName("betaDisclaimerAcceptText")] + public string BetaDisclaimerAcceptText { get; set; } + + // Server mods loaded message + [JsonPropertyName("serverModsLoadedText")] + public string ServerModsLoadedText { get; set; } + + // Server mods loaded debug message text + [JsonPropertyName("serverModsLoadedDebugText")] + public string ServerModsLoadedDebugText { get; set; } + + // Client mods loaded message + [JsonPropertyName("clientModsLoadedText")] + public string ClientModsLoadedText { get; set; } + + // Client mods loaded debug message text + [JsonPropertyName("clientModsLoadedDebugText")] + public string ClientModsLoadedDebugText { get; set; } + + // Illegal plugins log message + [JsonPropertyName("illegalPluginsLoadedText")] + public string IllegalPluginsLoadedText { get; set; } + + // Illegal plugins exception + [JsonPropertyName("illegalPluginsExceptionText")] + public string IllegalPluginsExceptionText { get; set; } + + // Summary of release changes + [JsonPropertyName("releaseSummaryText")] + public string? ReleaseSummaryText { get; set; } + + // Enables the cool watermark in-game + [JsonPropertyName("isBeta")] + public bool? IsBeta { get; set; } + + // Whether mods are enabled + [JsonPropertyName("isModdable")] + public bool? IsModdable { get; set; } + + // Are mods loaded on the server? + [JsonPropertyName("isModded")] + public bool IsModded { get; set; } + + // How long before the messagebox times out and closes the game + [JsonPropertyName("betaDisclaimerTimeoutDelay")] + public int BetaDisclaimerTimeoutDelay { get; set; } +} + +public class GameFixes +{ + /** Shotguns use a different value than normal guns causing huge pellet dispersion */ + [JsonPropertyName("fixShotgunDispersion")] + public bool FixShotgunDispersion { get; set; } + + /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load */ + [JsonPropertyName("removeModItemsFromProfile")] + public bool RemoveModItemsFromProfile { get; set; } + + /** Remove invalid traders from profile - trader data can be leftover when player removes trader mod */ + [JsonPropertyName("removeInvalidTradersFromProfile")] + public bool RemoveInvalidTradersFromProfile { get; set; } + + /** Fix issues that cause the game to not start due to inventory item issues */ + [JsonPropertyName("fixProfileBreakingInventoryItemIssues")] + public bool FixProfileBreakingInventoryItemIssues { get; set; } +} + +public class ServerFeatures +{ + /* Controls whether or not the server attempts to download mod dependencies not included in the server's executable */ + [JsonPropertyName("autoInstallModDependencies")] + public bool AutoInstallModDependencies { get; set; } + + [JsonPropertyName("compressProfile")] + public bool CompressProfile { get; set; } + + [JsonPropertyName("chatbotFeatures")] + public ChatbotFeatures ChatbotFeatures { get; set; } + + /** Keyed to profile type e.g. "Standard" or "SPT Developer" */ + [JsonPropertyName("createNewProfileTypesBlacklist")] + public List CreateNewProfileTypesBlacklist { get; set; } +} + +public class ChatbotFeatures +{ + [JsonPropertyName("sptFriendEnabled")] + public bool SptFriendEnabled { get; set; } + + [JsonPropertyName("sptFriendGiftsEnabled")] + public bool SptFriendGiftsEnabled { get; set; } + + [JsonPropertyName("commandoEnabled")] + public bool CommandoEnabled { get; set; } + + [JsonPropertyName("commandoFeatures")] + public CommandoFeatures CommandoFeatures { get; set; } + + [JsonPropertyName("commandUseLimits")] + public Dictionary CommandUseLimits { get; set; } + + [JsonPropertyName("ids")] + public Dictionary Ids { get; set; } +} + +public class CommandoFeatures +{ + [JsonPropertyName("giveCommandEnabled")] + public bool GiveCommandEnabled { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Spt/Config/GiftsConfig.cs b/Core/Models/Spt/Config/GiftsConfig.cs new file mode 100644 index 00000000..91b03a36 --- /dev/null +++ b/Core/Models/Spt/Config/GiftsConfig.cs @@ -0,0 +1,63 @@ +using System.Text.Json.Serialization; + +namespace Types.Models.Spt.Config; + +public class Gift +{ + /// + /// Items to send to player + /// + [JsonPropertyName("items")] + public List Items { get; set; } + + /// + /// Who is sending the gift to player + /// + [JsonPropertyName("sender")] + public GiftSenderType Sender { get; set; } + + /// + /// Optional - supply a users id to send from, not necessary when sending from SYSTEM or TRADER + /// + [JsonPropertyName("senderId")] + public string? SenderId { get; set; } + + [JsonPropertyName("senderDetails")] + public UserDialogInfo SenderDetails { get; set; } + + /// + /// Optional - supply a trader type to send from, not necessary when sending from SYSTEM or USER + /// + [JsonPropertyName("trader")] + public Traders? Trader { get; set; } + + [JsonPropertyName("messageText")] + public string MessageText { get; set; } + + /// + /// Optional - if sending text from the client locale file + /// + [JsonPropertyName("localeTextId")] + public string? LocaleTextId { get; set; } + + /// + /// Optional - Used by Seasonal events to send on specific day + /// + [JsonPropertyName("timestampToSend")] + public long? TimestampToSend { get; set; } + + [JsonPropertyName("associatedEvent")] + public SeasonalEventType AssociatedEvent { get; set; } + + [JsonPropertyName("collectionTimeHours")] + public int CollectionTimeHours { get; set; } + + /// + /// Optional, can be used to change profile settings like level/skills + /// + [JsonPropertyName("profileChangeEvents")] + public List? ProfileChangeEvents { get; set; } + + [JsonPropertyName("maxToSendPlayer")] + public int? MaxToSendPlayer { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Spt/Config/HealthConfig.cs b/Core/Models/Spt/Config/HealthConfig.cs new file mode 100644 index 00000000..42a3fbec --- /dev/null +++ b/Core/Models/Spt/Config/HealthConfig.cs @@ -0,0 +1,33 @@ +using System.Text.Json.Serialization; + +namespace Types.Models.Spt.Config; + +public class HealthConfig : BaseConfig +{ + [JsonPropertyName("kind")] + public string Kind { get; set; } = "spt-health"; + + [JsonPropertyName("healthMultipliers")] + public HealthMultipliers HealthMultipliers { get; set; } + + [JsonPropertyName("save")] + public Save Save { get; set; } +} + +public class HealthMultipliers +{ + [JsonPropertyName("death")] + public double Death { get; set; } + + [JsonPropertyName("blacked")] + public double Blacked { get; set; } +} + +public class Save +{ + [JsonPropertyName("health")] + public bool Health { get; set; } + + [JsonPropertyName("effects")] + public bool Effects { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Spt/Config/HideoutConfig.cs b/Core/Models/Spt/Config/HideoutConfig.cs new file mode 100644 index 00000000..b7674535 --- /dev/null +++ b/Core/Models/Spt/Config/HideoutConfig.cs @@ -0,0 +1,142 @@ +using System.Collections.Generic; +using System.Text.Json.Serialization; + +namespace Types.Models.Spt.Config; + +public class HideoutConfig : BaseConfig +{ + [JsonPropertyName("kind")] + public string Kind { get; set; } = "spt-hideout"; + + /// + /// How many seconds should pass before hideout crafts / fuel usage is checked and processed + /// + [JsonPropertyName("runIntervalSeconds")] + public int RunIntervalSeconds { get; set; } + + /// + /// Default values used to hydrate `RunIntervalSeconds` with + /// + [JsonPropertyName("runIntervalValues")] + public IRunIntervalValues RunIntervalValues { get; set; } + + [JsonPropertyName("hoursForSkillCrafting")] + public int HoursForSkillCrafting { get; set; } + + [JsonPropertyName("expCraftAmount")] + public int ExpCraftAmount { get; set; } + + [JsonPropertyName("overrideCraftTimeSeconds")] + public int OverrideCraftTimeSeconds { get; set; } + + [JsonPropertyName("overrideBuildTimeSeconds")] + public int OverrideBuildTimeSeconds { get; set; } + + /// + /// Only process a profile's hideout crafts when it has been active in the last x minutes + /// + [JsonPropertyName("updateProfileHideoutWhenActiveWithinMinutes")] + public int UpdateProfileHideoutWhenActiveWithinMinutes { get; set; } + + [JsonPropertyName("cultistCircle")] + public CultistCircleSettings CultistCircle { get; set; } +} + +public class CultistCircleSettings +{ + [JsonPropertyName("maxRewardItemCount")] + public int MaxRewardItemCount { get; set; } + + [JsonPropertyName("maxAttemptsToPickRewardsWithinBudget")] + public int MaxAttemptsToPickRewardsWithinBudget { get; set; } + + [JsonPropertyName("rewardPriceMultiplerMinMax")] + public MinMax RewardPriceMultiplerMinMax { get; set; } + + /// + /// The odds that meeting the highest threshold gives you a bonus to crafting time + /// + [JsonPropertyName("bonusAmountMultiplier")] + public double BonusAmountMultiplier { get; set; } + + [JsonPropertyName("bonusChanceMultiplier")] + public double BonusChanceMultiplier { get; set; } + + /// + /// What is considered a "high-value" item + /// + [JsonPropertyName("highValueThresholdRub")] + public int HighValueThresholdRub { get; set; } + + /// + /// Hideout/task reward crafts have a unique craft time + /// + [JsonPropertyName("hideoutTaskRewardTimeSeconds")] + public int HideoutTaskRewardTimeSeconds { get; set; } + + /// + /// Rouble amount player needs to sacrifice to get chance of hideout/task rewards + /// + [JsonPropertyName("hideoutCraftSacrificeThresholdRub")] + public int HideoutCraftSacrificeThresholdRub { get; set; } + + [JsonPropertyName("craftTimeThreshholds")] + public List CraftTimeThreshholds { get; set; } + + /// + /// -1 means no override, value in seconds + /// + [JsonPropertyName("craftTimeOverride")] + public int CraftTimeOverride { get; set; } + + /// + /// Specific reward pool when player sacrifices specific item(s) + /// + [JsonPropertyName("directRewards")] + public List DirectRewards { get; set; } + + /// + /// Overrides for reward stack sizes, keyed by item tpl + /// + [JsonPropertyName("directRewardStackSize")] + public Dictionary DirectRewardStackSize { get; set; } + + /// + /// Item tpls to exclude from the reward pool + /// + [JsonPropertyName("rewardItemBlacklist")] + public List RewardItemBlacklist { get; set; } + + /// + /// Item tpls to include in the reward pool + /// + [JsonPropertyName("additionalRewardItemPool")] + public List AdditionalRewardItemPool { get; set; } + + [JsonPropertyName("currencyRewards")] + public Dictionary CurrencyRewards { get; set; } +} + +public class CraftTimeThreshhold : MinMax +{ + [JsonPropertyName("craftTimeSeconds")] + public int CraftTimeSeconds { get; set; } +} + +public class DirectRewardSettings +{ + [JsonPropertyName("reward")] + public List Reward { get; set; } + + [JsonPropertyName("requiredItems")] + public List RequiredItems { get; set; } + + [JsonPropertyName("craftTimeSeconds")] + public int CraftTimeSeconds { get; set; } + + /// + /// Is the reward a one time reward or can it be given multiple times + /// + [JsonPropertyName("repeatable")] + public bool Repeatable { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Spt/Config/HttpConfig.cs b/Core/Models/Spt/Config/HttpConfig.cs new file mode 100644 index 00000000..04dda2ea --- /dev/null +++ b/Core/Models/Spt/Config/HttpConfig.cs @@ -0,0 +1,39 @@ +using System.Text.Json.Serialization; + +namespace Types.Models.Spt.Config; + +public class HttpConfig : BaseConfig +{ + [JsonPropertyName("kind")] + public string Kind { get; set; } = "spt-http"; + + /// + /// Address used by webserver + /// + [JsonPropertyName("ip")] + public string Ip { get; set; } + + [JsonPropertyName("port")] + public int Port { get; set; } + + /// + /// Address used by game client to connect to + /// + [JsonPropertyName("backendIp")] + public string BackendIp { get; set; } + + [JsonPropertyName("backendPort")] + public string BackendPort { get; set; } + + [JsonPropertyName("webSocketPingDelayMs")] + public int WebSocketPingDelayMs { get; set; } + + [JsonPropertyName("logRequests")] + public bool LogRequests { get; set; } + + /// + /// e.g. "SPT_Data/Server/images/traders/579dc571d53a0658a154fbec.png": "SPT_Data/Server/images/traders/NewTraderImage.png" + /// + [JsonPropertyName("serverImagePathOverride")] + public Dictionary ServerImagePathOverride { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Spt/Config/InRaidConfig.cs b/Core/Models/Spt/Config/InRaidConfig.cs new file mode 100644 index 00000000..919dea0b --- /dev/null +++ b/Core/Models/Spt/Config/InRaidConfig.cs @@ -0,0 +1,6 @@ +namespace Types.Models.Spt.Config; + +public class InRaidConfig +{ + +} \ No newline at end of file diff --git a/Core/Models/Spt/Config/InsuranceConfig.cs b/Core/Models/Spt/Config/InsuranceConfig.cs new file mode 100644 index 00000000..2a557154 --- /dev/null +++ b/Core/Models/Spt/Config/InsuranceConfig.cs @@ -0,0 +1,6 @@ +namespace Types.Models.Spt.Config; + +public class InsuranceConfig +{ + +} \ No newline at end of file diff --git a/Core/Models/Spt/Config/InventoryConfig.cs b/Core/Models/Spt/Config/InventoryConfig.cs new file mode 100644 index 00000000..76f8424e --- /dev/null +++ b/Core/Models/Spt/Config/InventoryConfig.cs @@ -0,0 +1,6 @@ +namespace Types.Models.Spt.Config; + +public class InventoryConfig +{ + +} \ No newline at end of file diff --git a/Core/Models/Spt/Config/ItemConfig.cs b/Core/Models/Spt/Config/ItemConfig.cs new file mode 100644 index 00000000..ef9080f0 --- /dev/null +++ b/Core/Models/Spt/Config/ItemConfig.cs @@ -0,0 +1,6 @@ +namespace Types.Models.Spt.Config; + +public class ItemConfig +{ + +} \ No newline at end of file diff --git a/Core/Models/Spt/Config/LocaleConfig.cs b/Core/Models/Spt/Config/LocaleConfig.cs new file mode 100644 index 00000000..1535c27d --- /dev/null +++ b/Core/Models/Spt/Config/LocaleConfig.cs @@ -0,0 +1,6 @@ +namespace Types.Models.Spt.Config; + +public class LocaleConfig +{ + +} \ No newline at end of file diff --git a/Core/Models/Spt/Config/LocationConfig.cs b/Core/Models/Spt/Config/LocationConfig.cs new file mode 100644 index 00000000..f2c96fd0 --- /dev/null +++ b/Core/Models/Spt/Config/LocationConfig.cs @@ -0,0 +1,6 @@ +namespace Types.Models.Spt.Config; + +public class LocationConfig +{ + +} \ No newline at end of file diff --git a/Core/Models/Spt/Config/LootConfig.cs b/Core/Models/Spt/Config/LootConfig.cs new file mode 100644 index 00000000..b2c5ec60 --- /dev/null +++ b/Core/Models/Spt/Config/LootConfig.cs @@ -0,0 +1,6 @@ +namespace Types.Models.Spt.Config; + +public class LootConfig +{ + +} \ No newline at end of file diff --git a/Core/Models/Spt/Config/LostOnDeathConfig.cs b/Core/Models/Spt/Config/LostOnDeathConfig.cs new file mode 100644 index 00000000..1ed695ad --- /dev/null +++ b/Core/Models/Spt/Config/LostOnDeathConfig.cs @@ -0,0 +1,6 @@ +namespace Types.Models.Spt.Config; + +public class LostOnDeathConfig +{ + +} \ No newline at end of file diff --git a/Core/Models/Spt/Config/MatchConfig.cs b/Core/Models/Spt/Config/MatchConfig.cs new file mode 100644 index 00000000..f0cd1b63 --- /dev/null +++ b/Core/Models/Spt/Config/MatchConfig.cs @@ -0,0 +1,6 @@ +namespace Types.Models.Spt.Config; + +public class MatchConfig +{ + +} \ No newline at end of file diff --git a/Core/Models/Spt/Config/PlayerScavConfig.cs b/Core/Models/Spt/Config/PlayerScavConfig.cs new file mode 100644 index 00000000..79bbd9ac --- /dev/null +++ b/Core/Models/Spt/Config/PlayerScavConfig.cs @@ -0,0 +1,6 @@ +namespace Types.Models.Spt.Config; + +public class PlayerScavConfig +{ + +} \ No newline at end of file diff --git a/Core/Models/Spt/Config/PmcChatResponse.cs b/Core/Models/Spt/Config/PmcChatResponse.cs new file mode 100644 index 00000000..072704ea --- /dev/null +++ b/Core/Models/Spt/Config/PmcChatResponse.cs @@ -0,0 +1,6 @@ +namespace Types.Models.Spt.Config; + +public class PmcChatResponse +{ + +} \ No newline at end of file diff --git a/Core/Models/Spt/Config/PmcConfig.cs b/Core/Models/Spt/Config/PmcConfig.cs new file mode 100644 index 00000000..8033166e --- /dev/null +++ b/Core/Models/Spt/Config/PmcConfig.cs @@ -0,0 +1,6 @@ +namespace Types.Models.Spt.Config; + +public class PmcConfig +{ + +} \ No newline at end of file diff --git a/Core/Models/Spt/Config/QuestConfig.cs b/Core/Models/Spt/Config/QuestConfig.cs new file mode 100644 index 00000000..9cde6954 --- /dev/null +++ b/Core/Models/Spt/Config/QuestConfig.cs @@ -0,0 +1,6 @@ +namespace Types.Models.Spt.Config; + +public class QuestConfig +{ + +} \ No newline at end of file diff --git a/Core/Models/Spt/Config/RagfairConfig.cs b/Core/Models/Spt/Config/RagfairConfig.cs new file mode 100644 index 00000000..a695c5bd --- /dev/null +++ b/Core/Models/Spt/Config/RagfairConfig.cs @@ -0,0 +1,6 @@ +namespace Types.Models.Spt.Config; + +public class RagfairConfig +{ + +} \ No newline at end of file diff --git a/Core/Models/Spt/Config/RepairConfig.cs b/Core/Models/Spt/Config/RepairConfig.cs new file mode 100644 index 00000000..acfb770a --- /dev/null +++ b/Core/Models/Spt/Config/RepairConfig.cs @@ -0,0 +1,6 @@ +namespace Types.Models.Spt.Config; + +public class RepairConfig +{ + +} \ No newline at end of file diff --git a/Core/Models/Spt/Config/ScavCaseConfig.cs b/Core/Models/Spt/Config/ScavCaseConfig.cs new file mode 100644 index 00000000..60fc32c2 --- /dev/null +++ b/Core/Models/Spt/Config/ScavCaseConfig.cs @@ -0,0 +1,6 @@ +namespace Types.Models.Spt.Config; + +public class ScavCaseConfig +{ + +} \ No newline at end of file diff --git a/Core/Models/Spt/Config/SeasonalEventConfig.cs b/Core/Models/Spt/Config/SeasonalEventConfig.cs new file mode 100644 index 00000000..90c154fa --- /dev/null +++ b/Core/Models/Spt/Config/SeasonalEventConfig.cs @@ -0,0 +1,6 @@ +namespace Types.Models.Spt.Config; + +public class SeasonalEventConfig +{ + +} \ No newline at end of file diff --git a/Core/Models/Spt/Config/TraderConfig.cs b/Core/Models/Spt/Config/TraderConfig.cs new file mode 100644 index 00000000..f7b09c64 --- /dev/null +++ b/Core/Models/Spt/Config/TraderConfig.cs @@ -0,0 +1,6 @@ +namespace Types.Models.Spt.Config; + +public class TraderConfig +{ + +} \ No newline at end of file diff --git a/Core/Models/Spt/Config/WeatherConfig.cs b/Core/Models/Spt/Config/WeatherConfig.cs new file mode 100644 index 00000000..8777c7f6 --- /dev/null +++ b/Core/Models/Spt/Config/WeatherConfig.cs @@ -0,0 +1,6 @@ +namespace Types.Models.Spt.Config; + +public class WeatherConfig +{ + +} \ No newline at end of file diff --git a/Core/Models/Spt/Controllers/BotController.cs b/Core/Models/Spt/Controllers/BotController.cs new file mode 100644 index 00000000..3a08699f --- /dev/null +++ b/Core/Models/Spt/Controllers/BotController.cs @@ -0,0 +1,16 @@ +// 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; +// } +// } + +// TODO: implement in C# \ No newline at end of file diff --git a/Core/Models/Spt/Dialog/SendMessageDetails.cs b/Core/Models/Spt/Dialog/SendMessageDetails.cs new file mode 100644 index 00000000..42f4a473 --- /dev/null +++ b/Core/Models/Spt/Dialog/SendMessageDetails.cs @@ -0,0 +1,106 @@ +using System.Collections.Generic; +using System.Text.Json.Serialization; + +namespace Types.Models.Spt.Dialog; + +public class SendMessageDetails +{ + /// + /// Player id + /// + [JsonPropertyName("recipientId")] + public string RecipientId { get; set; } + + /// + /// Who is sending this message + /// + [JsonPropertyName("sender")] + public MessageType Sender { get; set; } + + /// + /// Optional - leave blank to use sender value + /// + [JsonPropertyName("dialogType")] + public MessageType? DialogType { get; set; } + + /// + /// Optional - if sender is USER these details are used + /// + [JsonPropertyName("senderDetails")] + public IUserDialogInfo? SenderDetails { get; set; } + + /// + /// Optional - the trader sending the message + /// + [JsonPropertyName("trader")] + public Traders? Trader { get; set; } + + /// + /// Optional - used in player/system messages, otherwise templateId is used + /// + [JsonPropertyName("messageText")] + public string? MessageText { get; set; } + + /// + /// Optional - Items to send to player + /// + [JsonPropertyName("items")] + public List? Items { get; set; } + + /// + /// Optional - How long items will be stored in mail before expiry + /// + [JsonPropertyName("itemsMaxStorageLifetimeSeconds")] + public int? ItemsMaxStorageLifetimeSeconds { get; set; } + + /// + /// Optional - Used when sending messages from traders who send text from locale json + /// + [JsonPropertyName("templateId")] + public string? TemplateId { get; set; } + + /// + /// Optional - ragfair related + /// + [JsonPropertyName("systemData")] + public ISystemData? SystemData { get; set; } + + /// + /// Optional - Used by ragfair messages + /// + [JsonPropertyName("ragfairDetails")] + public IMessageContentRagfair? RagfairDetails { get; set; } + + /// + /// OPTIONAL - allows modification of profile settings via mail + /// + [JsonPropertyName("profileChangeEvents")] + public List? ProfileChangeEvents { get; set; } +} + +public class ProfileChangeEvent +{ + [JsonPropertyName("_id")] + public string Id { get; set; } + + [JsonPropertyName("Type")] + public ProfileChangeEventType Type { get; set; } + + [JsonPropertyName("value")] + public int Value { get; set; } + + [JsonPropertyName("entity")] + public string? Entity { get; set; } +} + +public struct ProfileChangeEventType +{ + public const string TRADER_SALES_SUM = "TraderSalesSum"; + public const string TRADER_STANDING = "TraderStanding"; + public const string PROFILE_LEVEL = "ProfileLevel"; + public const string SKILL_POINTS = "SkillPoints"; + public const string EXAMINE_ALL_ITEMS = "ExamineAllItems"; + public const string UNLOCK_TRADER = "UnlockTrader"; + public const string ASSORT_UNLOCK_RULE = "AssortmentUnlockRule"; + public const string HIDEOUT_AREA_LEVEL = "HideoutAreaLevel"; +} \ No newline at end of file diff --git a/Core/Models/Spt/Fence/CreateFenceAssortsResult.cs b/Core/Models/Spt/Fence/CreateFenceAssortsResult.cs new file mode 100644 index 00000000..ac3abf7a --- /dev/null +++ b/Core/Models/Spt/Fence/CreateFenceAssortsResult.cs @@ -0,0 +1,16 @@ +using System.Collections.Generic; +using System.Text.Json.Serialization; + +namespace Types.Models.Spt.Fence; + +public class CreateFenceAssortsResult +{ + [JsonPropertyName("sptItems")] + public List> SptItems { get; set; } + + [JsonPropertyName("barter_scheme")] + public Dictionary>> BarterScheme { get; set; } + + [JsonPropertyName("loyal_level_items")] + public Dictionary LoyalLevelItems { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Spt/Fence/FenceAssortGenerationValues.cs b/Core/Models/Spt/Fence/FenceAssortGenerationValues.cs new file mode 100644 index 00000000..3e951e4a --- /dev/null +++ b/Core/Models/Spt/Fence/FenceAssortGenerationValues.cs @@ -0,0 +1,24 @@ +using System.Text.Json.Serialization; + +namespace Types.Models.Spt.Fence; + +public class FenceAssortGenerationValues +{ + [JsonPropertyName("normal")] + public GenerationAssortValues Normal { get; set; } + + [JsonPropertyName("discount")] + public GenerationAssortValues Discount { get; set; } +} + +public class GenerationAssortValues +{ + [JsonPropertyName("item")] + public int Item { get; set; } + + [JsonPropertyName("weaponPreset")] + public int WeaponPreset { get; set; } + + [JsonPropertyName("equipmentPreset")] + public int EquipmentPreset { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Spt/Generators/BotGenerator.cs b/Core/Models/Spt/Generators/BotGenerator.cs new file mode 100644 index 00000000..57aae904 --- /dev/null +++ b/Core/Models/Spt/Generators/BotGenerator.cs @@ -0,0 +1,16 @@ +// namespace Types.Models.Spt.Generators; +// +// public class BotGenerator +// { +// export interface IBotGenerator { +// generateInventory( +// templateInventory: IInventory, +// equipmentChances: IChances, +// generation: IGeneration, +// botRole: string, +// isPmc: boolean, +// ): PmcInventory; +// } +// } + +// TODO: implement in C# \ No newline at end of file diff --git a/Core/Models/Spt/Generators/LocationGenerator.cs b/Core/Models/Spt/Generators/LocationGenerator.cs new file mode 100644 index 00000000..22e08340 --- /dev/null +++ b/Core/Models/Spt/Generators/LocationGenerator.cs @@ -0,0 +1,21 @@ +// 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[]; +// } +// } + +// TODO: Implement in C# \ No newline at end of file diff --git a/Core/Models/Spt/Generators/PMCLootGenerator.cs b/Core/Models/Spt/Generators/PMCLootGenerator.cs new file mode 100644 index 00000000..8a492dba --- /dev/null +++ b/Core/Models/Spt/Generators/PMCLootGenerator.cs @@ -0,0 +1,12 @@ +// namespace Types.Models.Spt.Generators; +// +// public class PMCLootGenerator +// { +// export interface IPMCLootGenerator { +// generatePMCPocketLootPool(): string[]; +// generatePMCBackpackLootPool(): string[]; +// } +// +// } + +// TODO: Implement in C# \ No newline at end of file diff --git a/Core/Models/Spt/Generators/RagfairAssortGenerator.cs b/Core/Models/Spt/Generators/RagfairAssortGenerator.cs new file mode 100644 index 00000000..9d84f912 --- /dev/null +++ b/Core/Models/Spt/Generators/RagfairAssortGenerator.cs @@ -0,0 +1,11 @@ +// namespace Types.Models.Spt.Generators; +// +// public class RagfairAssortGenerator +// { +// export interface IRagfairAssortGenerator { +// getAssortItems(): IItem[]; +// } +// +// } + +// TODO: implement in C# \ No newline at end of file diff --git a/Core/Models/Spt/Generators/RagfairOfferGenerator.cs b/Core/Models/Spt/Generators/RagfairOfferGenerator.cs new file mode 100644 index 00000000..92715319 --- /dev/null +++ b/Core/Models/Spt/Generators/RagfairOfferGenerator.cs @@ -0,0 +1,18 @@ +// 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; +// } +// } + +// TODO: implement in C# \ No newline at end of file diff --git a/Core/Models/Spt/Hideout/CircleCraftDetails.cs b/Core/Models/Spt/Hideout/CircleCraftDetails.cs new file mode 100644 index 00000000..7dc7b4fa --- /dev/null +++ b/Core/Models/Spt/Hideout/CircleCraftDetails.cs @@ -0,0 +1,19 @@ +using System.Text.Json.Serialization; +using Types.Models.Spt.Config; + +namespace Types.Models.Spt.Hideout; + +public class CircleCraftDetails +{ + [JsonPropertyName("time")] + public int Time { get; set; } // this might not be the right "number" type + + [JsonPropertyName("rewardType")] + public CircleRewardType RewardType { get; set; } + + [JsonPropertyName("rewardAmountRoubles")] + public int RewardAmountRoubles { get; set; } + + [JsonPropertyName("rewardDetails")] + public CraftTimeThreshhold? RewardDetails { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Spt/Hideout/Hideout.cs b/Core/Models/Spt/Hideout/Hideout.cs new file mode 100644 index 00000000..c698020d --- /dev/null +++ b/Core/Models/Spt/Hideout/Hideout.cs @@ -0,0 +1,22 @@ +using System.Text.Json.Serialization; +using Types.Models.Spt.Repeatable; + +namespace Types.Models.Spt.Hideout; + +public class Hideout +{ + [JsonPropertyName("areas")] + public List Areas { get; set; } + + [JsonPropertyName("customisation")] + public HideoutCustomisation Customisation { get; set; } + + [JsonPropertyName("production")] + public HideoutProductionData Production { get; set; } + + [JsonPropertyName("settings")] + public HideoutSettingsBase Settings { get; set; } + + [JsonPropertyName("qte")] + public List Qte { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Spt/Hideout/ScavCaseRewardCountsAndPrice.cs b/Core/Models/Spt/Hideout/ScavCaseRewardCountsAndPrice.cs new file mode 100644 index 00000000..7c392375 --- /dev/null +++ b/Core/Models/Spt/Hideout/ScavCaseRewardCountsAndPrice.cs @@ -0,0 +1,30 @@ +using System.Text.Json.Serialization; + +namespace Types.Models.Spt.Hideout; + +public class ScavCaseRewardCountsAndPrice +{ + [JsonPropertyName("Common")] + public RewardCountAndPriceDetails Common { get; set; } + + [JsonPropertyName("Rare")] + public RewardCountAndPriceDetails Rare { get; set; } + + [JsonPropertyName("Superrare")] + public RewardCountAndPriceDetails Superrare { get; set; } +} + +public class RewardCountAndPriceDetails +{ + [JsonPropertyName("minCount")] + public int MinCount { get; set; } + + [JsonPropertyName("maxCount")] + public int MaxCount { get; set; } + + [JsonPropertyName("minPriceRub")] + public int MinPriceRub { get; set; } + + [JsonPropertyName("maxPriceRub")] + public int MaxPriceRub { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Spt/Inventory/OwnerInventoryItems.cs b/Core/Models/Spt/Inventory/OwnerInventoryItems.cs new file mode 100644 index 00000000..7633d9e7 --- /dev/null +++ b/Core/Models/Spt/Inventory/OwnerInventoryItems.cs @@ -0,0 +1,18 @@ +using System.Text.Json.Serialization; + +namespace Types.Models.Spt.Inventory; + +public class OwnerInventoryItems +{ + [JsonPropertyName("from")] + public List From { get; set; } + + [JsonPropertyName("to")] + public List To { get; set; } + + [JsonPropertyName("sameInventory")] + public bool SameInventory { get; set; } + + [JsonPropertyName("isMail")] + public bool IsMail { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Spt/Location/RaidChanges.cs b/Core/Models/Spt/Location/RaidChanges.cs new file mode 100644 index 00000000..b54f5414 --- /dev/null +++ b/Core/Models/Spt/Location/RaidChanges.cs @@ -0,0 +1,15 @@ +using System.Text.Json.Serialization; + +namespace Types.Models.Spt.Location; + +public class RaidChanges +{ + [JsonPropertyName("dynamicLootPercent")] + public float DynamicLootPercent { get; set; } + + [JsonPropertyName("staticLootPercent")] + public float StaticLootPercent { get; set; } + + [JsonPropertyName("simulatedRaidStartSeconds")] + public int SimulatedRaidStartSeconds { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Spt/Logging/ClientLogRequest.cs b/Core/Models/Spt/Logging/ClientLogRequest.cs new file mode 100644 index 00000000..d124d276 --- /dev/null +++ b/Core/Models/Spt/Logging/ClientLogRequest.cs @@ -0,0 +1,21 @@ +using System.Text.Json.Serialization; + +namespace Types.Models.Spt.Logging; + +public class ClientLogRequest +{ + [JsonPropertyName("Source")] + public string Source { get; set; } + + [JsonPropertyName("Level")] + public LogLevel Level { get; set; } + + [JsonPropertyName("Message")] + public string Message { get; set; } + + [JsonPropertyName("Color")] + public string? Color { get; set; } + + [JsonPropertyName("BackgroundColor")] + public string? BackgroundColor { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Spt/Logging/LogBackgroundColor.cs b/Core/Models/Spt/Logging/LogBackgroundColor.cs new file mode 100644 index 00000000..6358baf3 --- /dev/null +++ b/Core/Models/Spt/Logging/LogBackgroundColor.cs @@ -0,0 +1,14 @@ +namespace Types.Models.Spt.Logging; + +public struct LogBackgroundColor +{ + public const string DEFAULT = ""; + public const string BLACK = "blackBG"; + public const string RED = "redBG"; + public const string GREEN = "greenBG"; + public const string YELLOW = "yellowBG"; + public const string BLUE = "blueBG"; + public const string MAGENTA = "magentaBG"; + public const string CYAN = "cyanBG"; + public const string WHITE = "whiteBG"; +} \ No newline at end of file diff --git a/Core/Models/Spt/Logging/LogLevel.cs b/Core/Models/Spt/Logging/LogLevel.cs new file mode 100644 index 00000000..6061204e --- /dev/null +++ b/Core/Models/Spt/Logging/LogLevel.cs @@ -0,0 +1,13 @@ +namespace Types.Models.Spt.Logging; + +public enum LogLevel +{ + ERROR = 0, + WARN = 1, + SUCCESS = 2, + INFO = 3, + CUSTOM = 4, + DEBUG = 5 +} + +// TODO: needs to be moved to enums namespace \ No newline at end of file diff --git a/Core/Models/Spt/Logging/LogTextColor.cs b/Core/Models/Spt/Logging/LogTextColor.cs new file mode 100644 index 00000000..4fcde0ff --- /dev/null +++ b/Core/Models/Spt/Logging/LogTextColor.cs @@ -0,0 +1,14 @@ +namespace Types.Models.Spt.Logging; + +public struct LogTextColor +{ + public const string BLACK = "black"; + public const string RED = "red"; + public const string GREEN = "green"; + public const string YELLOW = "yellow"; + public const string BLUE = "blue"; + public const string MAGENTA = "Magenta"; + public const string CYAN = "cyan"; + public const string WHITE = "white"; + public const string GRAY = "gray"; +} \ No newline at end of file diff --git a/Core/Models/Spt/Logging/SptLogger.cs b/Core/Models/Spt/Logging/SptLogger.cs new file mode 100644 index 00000000..2daaa9bd --- /dev/null +++ b/Core/Models/Spt/Logging/SptLogger.cs @@ -0,0 +1,15 @@ +// 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; +// } +// +// } + +// 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 new file mode 100644 index 00000000..60f31e23 --- /dev/null +++ b/Core/Models/Spt/Mod/ModLoader.cs @@ -0,0 +1,13 @@ +// namespace Types.Models.Spt.Mod; +// +// public class ModLoader +// { +// export interface IModLoader { +// load(container: DependencyContainer): void; +// +// getModPath(mod: string): string; +// } +// +// } + +// 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 new file mode 100644 index 00000000..1061f4f0 --- /dev/null +++ b/Core/Models/Spt/Mod/NewItemDetails.cs @@ -0,0 +1,61 @@ +// 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[]; +// } +// } + +// 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 new file mode 100644 index 00000000..c588b394 --- /dev/null +++ b/Core/Models/Spt/Mod/PackageJsonData.cs @@ -0,0 +1,27 @@ +// 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[]; +// } +// +// } + +// 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/Repeatable/QuestTypePool.cs b/Core/Models/Spt/Repeatable/QuestTypePool.cs index ad73a0d7..ded713de 100644 --- a/Core/Models/Spt/Repeatable/QuestTypePool.cs +++ b/Core/Models/Spt/Repeatable/QuestTypePool.cs @@ -27,7 +27,7 @@ public class QuestPool public class ExplorationPool { [JsonPropertyName("locations")] - public Dictionary> Locations { get; set; } + public Dictionary> Locations { get; set; } // TODO: check the type, originally - Partial> } public class EliminationPool @@ -39,37 +39,37 @@ public class EliminationPool public class EliminationTargetPool { [JsonPropertyName("Savage")] - public TargetLocation Savage { get; set; } + public TargetLocation? Savage { get; set; } [JsonPropertyName("AnyPmc")] - public TargetLocation AnyPmc { get; set; } + public TargetLocation? AnyPmc { get; set; } [JsonPropertyName("bossBully")] - public TargetLocation BossBully { get; set; } + public TargetLocation? BossBully { get; set; } [JsonPropertyName("bossGluhar")] - public TargetLocation BossGluhar { get; set; } + public TargetLocation? BossGluhar { get; set; } [JsonPropertyName("bossKilla")] - public TargetLocation BossKilla { get; set; } + public TargetLocation? BossKilla { get; set; } [JsonPropertyName("bossSanitar")] - public TargetLocation BossSanitar { get; set; } + public TargetLocation? BossSanitar { get; set; } [JsonPropertyName("bossTagilla")] - public TargetLocation BossTagilla { get; set; } + public TargetLocation? BossTagilla { get; set; } [JsonPropertyName("bossKnight")] - public TargetLocation BossKnight { get; set; } + public TargetLocation? BossKnight { get; set; } [JsonPropertyName("bossZryachiy")] - public TargetLocation BossZryachiy { get; set; } + public TargetLocation? BossZryachiy { get; set; } [JsonPropertyName("bossBoar")] - public TargetLocation BossBoar { get; set; } + public TargetLocation? BossBoar { get; set; } [JsonPropertyName("bossBoarSniper")] - public TargetLocation BossBoarSniper { get; set; } + public TargetLocation? BossBoarSniper { get; set; } } public class TargetLocation From bf4f9837d99936665057d139ec71b52a98ba9617 Mon Sep 17 00:00:00 2001 From: CWX Date: Mon, 6 Jan 2025 00:34:44 +0000 Subject: [PATCH 2/9] removed .idea files with gitignore change in last commit --- .idea/.idea.server-csharp/.idea/.gitignore | 13 ------------- .idea/.idea.server-csharp/.idea/encodings.xml | 4 ---- .idea/.idea.server-csharp/.idea/indexLayout.xml | 8 -------- .idea/.idea.server-csharp/.idea/vcs.xml | 6 ------ 4 files changed, 31 deletions(-) delete mode 100644 .idea/.idea.server-csharp/.idea/.gitignore delete mode 100644 .idea/.idea.server-csharp/.idea/encodings.xml delete mode 100644 .idea/.idea.server-csharp/.idea/indexLayout.xml delete mode 100644 .idea/.idea.server-csharp/.idea/vcs.xml diff --git a/.idea/.idea.server-csharp/.idea/.gitignore b/.idea/.idea.server-csharp/.idea/.gitignore deleted file mode 100644 index be6be836..00000000 --- a/.idea/.idea.server-csharp/.idea/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Rider ignored files -/.idea.server-csharp.iml -/modules.xml -/projectSettingsUpdater.xml -/contentModel.xml -# Editor-based HTTP Client requests -/httpRequests/ -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml diff --git a/.idea/.idea.server-csharp/.idea/encodings.xml b/.idea/.idea.server-csharp/.idea/encodings.xml deleted file mode 100644 index df87cf95..00000000 --- a/.idea/.idea.server-csharp/.idea/encodings.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/.idea.server-csharp/.idea/indexLayout.xml b/.idea/.idea.server-csharp/.idea/indexLayout.xml deleted file mode 100644 index 7b08163c..00000000 --- a/.idea/.idea.server-csharp/.idea/indexLayout.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/.idea.server-csharp/.idea/vcs.xml b/.idea/.idea.server-csharp/.idea/vcs.xml deleted file mode 100644 index 35eb1ddf..00000000 --- a/.idea/.idea.server-csharp/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file From b95ccad7c680817c2d80691994e8eac9d8fafb1a Mon Sep 17 00:00:00 2001 From: CWX Date: Mon, 6 Jan 2025 15:51:27 +0000 Subject: [PATCH 3/9] 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 { From ce11652ee750967014f268e7bc8f46c5748ab98b Mon Sep 17 00:00:00 2001 From: CWX Date: Mon, 6 Jan 2025 16:09:37 +0000 Subject: [PATCH 4/9] more types --- Core/Models/Spt/Callbacks/HideoutCallbacks.cs | 50 ++++++++++++++++++- Core/Models/Spt/Callbacks/HttpCallbacks.cs | 15 +++++- .../Spt/Callbacks/InsuranceCallbacks.cs | 20 +++++++- 3 files changed, 82 insertions(+), 3 deletions(-) diff --git a/Core/Models/Spt/Callbacks/HideoutCallbacks.cs b/Core/Models/Spt/Callbacks/HideoutCallbacks.cs index cf3e75d5..d95efcd6 100644 --- a/Core/Models/Spt/Callbacks/HideoutCallbacks.cs +++ b/Core/Models/Spt/Callbacks/HideoutCallbacks.cs @@ -2,5 +2,53 @@ public class HideoutCallbacks { - + public ItemEventRouterRepsonse Upgrade(PmcData pmcData, HideoutUpgraderequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public ItemEventRouterRepsonse UpgradeComplete(PmcData pmcData, HideoutUpgradeCompleterequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public ItemEventRouterRepsonse PutItemsInAreaSlots(PmcData pmcData, HideoutPutItemInRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public ItemEventRouterRepsonse TakeItemsFromAreaSlots(PmcData pmcData, HideoutTakeItemOutRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public ItemEventRouterRepsonse ToggleArea(PmcData pmcData, HideoutToggleAreaRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public ItemEventRouterRepsonse SingleProductionStart(PmcData pmcData, HideoutSingleProductionStartRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public ItemEventRouterRepsonse ScavCaseProductionStart(PmcData pmcData, HideoutScavCaseStartRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public ItemEventRouterRepsonse ContinuousProductionStart(PmcData pmcData, HideoutContinuousProductionRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public ItemEventRouterRepsonse TakeProduction(PmcData pmcData, HideoutTakeProductionRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public bool Update(int timeSinceLastRun) + { + throw new NotImplementedException(); + } } \ No newline at end of file diff --git a/Core/Models/Spt/Callbacks/HttpCallbacks.cs b/Core/Models/Spt/Callbacks/HttpCallbacks.cs index 970f4ec7..42e2076a 100644 --- a/Core/Models/Spt/Callbacks/HttpCallbacks.cs +++ b/Core/Models/Spt/Callbacks/HttpCallbacks.cs @@ -2,5 +2,18 @@ public class HttpCallbacks { - + public void Load() + { + throw new NotImplementedException(); + } + + public void SendImage(string sessionID, object req, object resp, object body) + { + throw new NotImplementedException(); + } + + public string GetImage() + { + throw new NotImplementedException(); + } } \ No newline at end of file diff --git a/Core/Models/Spt/Callbacks/InsuranceCallbacks.cs b/Core/Models/Spt/Callbacks/InsuranceCallbacks.cs index 65a45288..d8225f76 100644 --- a/Core/Models/Spt/Callbacks/InsuranceCallbacks.cs +++ b/Core/Models/Spt/Callbacks/InsuranceCallbacks.cs @@ -2,5 +2,23 @@ public class InsuranceCallbacks { - + public SptProfile OnLoad(string sessionID) + { + throw new NotImplementedException(); + } + + public object GetInsuranceCost(string url, GetInsuranceCostRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public object Insure(PmcData pmcData, InsureRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public bool Update(int secondsSinceLastRun) + { + throw new NotImplementedException(); + } } \ No newline at end of file From 1d6520da317f66b2f5b1ac5327cdb27873a8e775 Mon Sep 17 00:00:00 2001 From: CWX Date: Mon, 6 Jan 2025 16:14:01 +0000 Subject: [PATCH 5/9] InventoryCallbacks --- .../Spt/Callbacks/InventoryCallbacks.cs | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/Core/Models/Spt/Callbacks/InventoryCallbacks.cs b/Core/Models/Spt/Callbacks/InventoryCallbacks.cs index 31bbf43e..ce8d6f0d 100644 --- a/Core/Models/Spt/Callbacks/InventoryCallbacks.cs +++ b/Core/Models/Spt/Callbacks/InventoryCallbacks.cs @@ -2,5 +2,83 @@ public class InventoryCallbacks { + public ItemEventRouterResponse MoveItem(PmcData pmcData, InventoryMoveRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + public ItemEventRouterResponse RemoveItem(PmcData pmcData, InventoryRemoveRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public ItemEventRouterResponse SplitItem(PmcData pmcData, InventorySplitRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public ItemEventRouterResponse MergeItem(PmcData pmcData, InventoryMergeRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public ItemEventRouterResponse TransferItem(PmcData pmcData, InventoryTransferRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public ItemEventRouterResponse SwapItem(PmcData pmcData, InventorySwapRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public ItemEventRouterResponse FoldItem(PmcData pmcData, InventoryFoldRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public ItemEventRouterResponse ToggleItem(PmcData pmcData, InventoryToggleRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public ItemEventRouterResponse TagItem(PmcData pmcData, InventoryTagRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public ItemEventRouterResponse BindItem(PmcData pmcData, InventoryBindRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public ItemEventRouterResponse ExamineItem(PmcData pmcData, InventoryExamineRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public ItemEventRouterResponse ReadEncyclopedia(PmcData pmcData, InventoryReadEncyclopediaRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public ItemEventRouterResponse SortInventory(PmcData pmcData, InventorySortRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public ItemEventRouterResponse CreateMapMarker(PmcData pmcData, InventoryCreateMarkerRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public ItemEventRouterResponse DeleteMapMarker(PmcData pmcData, InventoryDeleteMarkerRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public ItemEventRouterResponse EditMapMarker(PmcData pmcData, InventoryEditMarkerRequestData info, string sessionID) + { + throw new NotImplementedException(); + } } \ No newline at end of file From 0454dbdf28228fbc607e37769733b05ff69b7e33 Mon Sep 17 00:00:00 2001 From: CWX Date: Mon, 6 Jan 2025 17:38:02 +0000 Subject: [PATCH 6/9] enum fix and imports --- Core/Models/Spt/Dialog/SendMessageDetails.cs | 27 ++++++++++--------- .../Spt/Fence/CreateFenceAssortsResult.cs | 1 + .../Spt/Generators/LocationGenerator.cs | 4 ++- .../Spt/Generators/RagfairAssortGenerator.cs | 4 ++- .../Spt/Generators/RagfairOfferGenerator.cs | 5 +++- .../Spt/Inventory/OwnerInventoryItems.cs | 1 + Core/Models/Spt/Mod/NewItemDetails.cs | 1 + 7 files changed, 27 insertions(+), 16 deletions(-) diff --git a/Core/Models/Spt/Dialog/SendMessageDetails.cs b/Core/Models/Spt/Dialog/SendMessageDetails.cs index c772dda8..a0d24b7b 100644 --- a/Core/Models/Spt/Dialog/SendMessageDetails.cs +++ b/Core/Models/Spt/Dialog/SendMessageDetails.cs @@ -1,4 +1,5 @@ using System.Text.Json.Serialization; +using Core.Models.Eft.Common.Tables; namespace Core.Models.Spt.Dialog; @@ -44,7 +45,7 @@ public class SendMessageDetails /// Optional - Items to send to player /// [JsonPropertyName("items")] - public List? Items { get; set; } + public List? Items { get; set; } /// /// Optional - How long items will be stored in mail before expiry @@ -62,19 +63,19 @@ public class SendMessageDetails /// Optional - ragfair related /// [JsonPropertyName("systemData")] - public ISystemData? SystemData { get; set; } + public SystemData? SystemData { get; set; } /// /// Optional - Used by ragfair messages /// [JsonPropertyName("ragfairDetails")] - public IMessageContentRagfair? RagfairDetails { get; set; } + public MessageContentRagfair? RagfairDetails { get; set; } /// /// OPTIONAL - allows modification of profile settings via mail /// [JsonPropertyName("profileChangeEvents")] - public List? ProfileChangeEvents { get; set; } + public List? ProfileChangeEvents { get; set; } } public class ProfileChangeEvent @@ -92,14 +93,14 @@ public class ProfileChangeEvent public string? Entity { get; set; } } -public struct ProfileChangeEventType +public enum ProfileChangeEventType { - public const string TRADER_SALES_SUM = "TraderSalesSum"; - public const string TRADER_STANDING = "TraderStanding"; - public const string PROFILE_LEVEL = "ProfileLevel"; - public const string SKILL_POINTS = "SkillPoints"; - public const string EXAMINE_ALL_ITEMS = "ExamineAllItems"; - public const string UNLOCK_TRADER = "UnlockTrader"; - public const string ASSORT_UNLOCK_RULE = "AssortmentUnlockRule"; - public const string HIDEOUT_AREA_LEVEL = "HideoutAreaLevel"; + TraderSalesSum, + TraderStanding, + ProfileLevel, + SkillPoints, + ExamineAllItems, + UnlockTrader, + AssortmentUnlockRule, + HideoutAreaLevel } \ No newline at end of file diff --git a/Core/Models/Spt/Fence/CreateFenceAssortsResult.cs b/Core/Models/Spt/Fence/CreateFenceAssortsResult.cs index e5b12a29..2d0c2eed 100644 --- a/Core/Models/Spt/Fence/CreateFenceAssortsResult.cs +++ b/Core/Models/Spt/Fence/CreateFenceAssortsResult.cs @@ -1,4 +1,5 @@ using System.Text.Json.Serialization; +using Core.Models.Eft.Common.Tables; namespace Core.Models.Spt.Fence; diff --git a/Core/Models/Spt/Generators/LocationGenerator.cs b/Core/Models/Spt/Generators/LocationGenerator.cs index 944a4422..8885a98a 100644 --- a/Core/Models/Spt/Generators/LocationGenerator.cs +++ b/Core/Models/Spt/Generators/LocationGenerator.cs @@ -1,4 +1,6 @@ -namespace Core.Models.Spt.Generators; +using Core.Models.Eft.Common; + +namespace Core.Models.Spt.Generators; public class LocationGenerator { diff --git a/Core/Models/Spt/Generators/RagfairAssortGenerator.cs b/Core/Models/Spt/Generators/RagfairAssortGenerator.cs index d4e9b76c..15ac2bf9 100644 --- a/Core/Models/Spt/Generators/RagfairAssortGenerator.cs +++ b/Core/Models/Spt/Generators/RagfairAssortGenerator.cs @@ -1,4 +1,6 @@ -namespace Core.Models.Spt.Generators; +using Core.Models.Eft.Common.Tables; + +namespace Core.Models.Spt.Generators; public class RagfairAssortGenerator { diff --git a/Core/Models/Spt/Generators/RagfairOfferGenerator.cs b/Core/Models/Spt/Generators/RagfairOfferGenerator.cs index 59bcd20c..aae34448 100644 --- a/Core/Models/Spt/Generators/RagfairOfferGenerator.cs +++ b/Core/Models/Spt/Generators/RagfairOfferGenerator.cs @@ -1,4 +1,7 @@ -namespace Core.Models.Spt.Generators; +using Core.Models.Eft.Common.Tables; +using Core.Models.Eft.Ragfair; + +namespace Core.Models.Spt.Generators; public class RagfairOfferGenerator { diff --git a/Core/Models/Spt/Inventory/OwnerInventoryItems.cs b/Core/Models/Spt/Inventory/OwnerInventoryItems.cs index 390d2701..02f5e2ae 100644 --- a/Core/Models/Spt/Inventory/OwnerInventoryItems.cs +++ b/Core/Models/Spt/Inventory/OwnerInventoryItems.cs @@ -1,4 +1,5 @@ using System.Text.Json.Serialization; +using Core.Models.Eft.Common.Tables; namespace Core.Models.Spt.Inventory; diff --git a/Core/Models/Spt/Mod/NewItemDetails.cs b/Core/Models/Spt/Mod/NewItemDetails.cs index 5c8dd015..d2617d07 100644 --- a/Core/Models/Spt/Mod/NewItemDetails.cs +++ b/Core/Models/Spt/Mod/NewItemDetails.cs @@ -1,4 +1,5 @@ using System.Text.Json.Serialization; +using Core.Models.Eft.Common; namespace Core.Models.Spt.Mod; From 4d3eafad6c16f5b6ad3ae6ebf84d9d01adae3926 Mon Sep 17 00:00:00 2001 From: CWX Date: Mon, 6 Jan 2025 17:49:22 +0000 Subject: [PATCH 7/9] add imports --- Core/Models/Spt/Config/AirdropConfig.cs | 1 + Core/Models/Spt/Config/BotConfig.cs | 2 + Core/Models/Spt/Config/GiftsConfig.cs | 2 + Core/Models/Spt/Config/HideoutConfig.cs | 3 +- Core/Models/Spt/Config/InventoryConfig.cs | 1 + Core/Models/Spt/Config/LocationConfig.cs | 2 + Core/Models/Spt/Config/LootConfig.cs | 1 + Core/Models/Spt/Config/PlayerScavConfig.cs | 1 + Core/Models/Spt/Config/PmcConfig.cs | 3 ++ Core/Models/Spt/Config/QuestConfig.cs | 41 +++++++++++-------- Core/Models/Spt/Config/RagfairConfig.cs | 39 +++++++++++++++--- Core/Models/Spt/Config/RepairConfig.cs | 6 ++- Core/Models/Spt/Config/ScavCaseConfig.cs | 4 +- Core/Models/Spt/Config/SeasonalEventConfig.cs | 1 + Core/Models/Spt/Config/TraderConfig.cs | 1 + Core/Models/Spt/Config/WeatherConfig.cs | 1 + 16 files changed, 82 insertions(+), 27 deletions(-) diff --git a/Core/Models/Spt/Config/AirdropConfig.cs b/Core/Models/Spt/Config/AirdropConfig.cs index f982c8de..51d95197 100644 --- a/Core/Models/Spt/Config/AirdropConfig.cs +++ b/Core/Models/Spt/Config/AirdropConfig.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using System.Text.Json.Serialization; +using Core.Models.Common; namespace Core.Models.Spt.Config; diff --git a/Core/Models/Spt/Config/BotConfig.cs b/Core/Models/Spt/Config/BotConfig.cs index 932fafd7..45a9e31d 100644 --- a/Core/Models/Spt/Config/BotConfig.cs +++ b/Core/Models/Spt/Config/BotConfig.cs @@ -1,5 +1,7 @@ using System.Collections.Generic; using System.Text.Json.Serialization; +using Core.Models.Common; +using Core.Models.Eft.Common.Tables; namespace Core.Models.Spt.Config; diff --git a/Core/Models/Spt/Config/GiftsConfig.cs b/Core/Models/Spt/Config/GiftsConfig.cs index 9c05afbd..5a0d300d 100644 --- a/Core/Models/Spt/Config/GiftsConfig.cs +++ b/Core/Models/Spt/Config/GiftsConfig.cs @@ -1,4 +1,6 @@ using System.Text.Json.Serialization; +using Core.Models.Eft.Common.Tables; +using Core.Models.Spt.Dialog; namespace Core.Models.Spt.Config; diff --git a/Core/Models/Spt/Config/HideoutConfig.cs b/Core/Models/Spt/Config/HideoutConfig.cs index b7479156..29c1ab78 100644 --- a/Core/Models/Spt/Config/HideoutConfig.cs +++ b/Core/Models/Spt/Config/HideoutConfig.cs @@ -1,4 +1,5 @@ using System.Text.Json.Serialization; +using Core.Models.Common; namespace Core.Models.Spt.Config; @@ -17,7 +18,7 @@ public class HideoutConfig : BaseConfig /// Default values used to hydrate `RunIntervalSeconds` with /// [JsonPropertyName("runIntervalValues")] - public IRunIntervalValues RunIntervalValues { get; set; } + public RunIntervalValues RunIntervalValues { get; set; } [JsonPropertyName("hoursForSkillCrafting")] public int HoursForSkillCrafting { get; set; } diff --git a/Core/Models/Spt/Config/InventoryConfig.cs b/Core/Models/Spt/Config/InventoryConfig.cs index 38f98e3e..58ae9cb4 100644 --- a/Core/Models/Spt/Config/InventoryConfig.cs +++ b/Core/Models/Spt/Config/InventoryConfig.cs @@ -1,4 +1,5 @@ using System.Text.Json.Serialization; +using Core.Models.Common; namespace Core.Models.Spt.Config; diff --git a/Core/Models/Spt/Config/LocationConfig.cs b/Core/Models/Spt/Config/LocationConfig.cs index 7f20643a..05effbec 100644 --- a/Core/Models/Spt/Config/LocationConfig.cs +++ b/Core/Models/Spt/Config/LocationConfig.cs @@ -1,4 +1,6 @@ using System.Text.Json.Serialization; +using Core.Models.Common; +using Core.Models.Eft.Common; namespace Core.Models.Spt.Config; diff --git a/Core/Models/Spt/Config/LootConfig.cs b/Core/Models/Spt/Config/LootConfig.cs index 01aca581..5646fbe0 100644 --- a/Core/Models/Spt/Config/LootConfig.cs +++ b/Core/Models/Spt/Config/LootConfig.cs @@ -1,4 +1,5 @@ using System.Text.Json.Serialization; +using Core.Models.Eft.Common; namespace Core.Models.Spt.Config; diff --git a/Core/Models/Spt/Config/PlayerScavConfig.cs b/Core/Models/Spt/Config/PlayerScavConfig.cs index e1c141d7..bc52102e 100644 --- a/Core/Models/Spt/Config/PlayerScavConfig.cs +++ b/Core/Models/Spt/Config/PlayerScavConfig.cs @@ -1,4 +1,5 @@ using System.Text.Json.Serialization; +using Core.Models.Eft.Common.Tables; namespace Core.Models.Spt.Config; diff --git a/Core/Models/Spt/Config/PmcConfig.cs b/Core/Models/Spt/Config/PmcConfig.cs index 75467735..89149ee8 100644 --- a/Core/Models/Spt/Config/PmcConfig.cs +++ b/Core/Models/Spt/Config/PmcConfig.cs @@ -1,4 +1,7 @@ using System.Text.Json.Serialization; +using Core.Models.Common; +using Core.Models.Eft.Common; +using Core.Models.Enums; namespace Core.Models.Spt.Config; diff --git a/Core/Models/Spt/Config/QuestConfig.cs b/Core/Models/Spt/Config/QuestConfig.cs index 8e81ec9f..62a17e9a 100644 --- a/Core/Models/Spt/Config/QuestConfig.cs +++ b/Core/Models/Spt/Config/QuestConfig.cs @@ -1,4 +1,6 @@ using System.Text.Json.Serialization; +using Core.Models.Common; +using Core.Models.Enums; namespace Core.Models.Spt.Config; @@ -141,28 +143,28 @@ 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; } } @@ -171,16 +173,16 @@ 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; } } @@ -189,13 +191,13 @@ 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; } } @@ -344,17 +346,20 @@ public class BossInfo public bool IsPmc { get; set; } } -public class BodyPart : ProbabilityObject { +public class BodyPart : ProbabilityObject +{ [JsonPropertyName("data")] public string[] Data { get; set; } } -public class WeaponRequirement : ProbabilityObject { +public class WeaponRequirement : ProbabilityObject +{ [JsonPropertyName("data")] public string[] Data { get; set; } } -public class ProbabilityObject { +public class ProbabilityObject +{ [JsonPropertyName("key")] public string Key { get; set; } diff --git a/Core/Models/Spt/Config/RagfairConfig.cs b/Core/Models/Spt/Config/RagfairConfig.cs index f2ad68ea..a1ced8ff 100644 --- a/Core/Models/Spt/Config/RagfairConfig.cs +++ b/Core/Models/Spt/Config/RagfairConfig.cs @@ -1,4 +1,6 @@ -namespace Core.Models.Spt.Config; +using Core.Models.Common; + +namespace Core.Models.Spt.Config; using System.Text.Json.Serialization; @@ -70,70 +72,93 @@ public class Chance public class Dynamic { + [JsonPropertyName("purchasesAreFoundInRaid")] // Should a purchased dynamic offers items be flagged as found in raid public bool PurchasesAreFoundInRaid { get; set; } + [JsonPropertyName("useTraderPriceForOffersIfHigher")] /** Use the highest trader price for an offer if its greater than the price in templates/prices.json */ public bool UseTraderPriceForOffersIfHigher { get; set; } + [JsonPropertyName("barter")] /** Barter offer specific settings */ public BarterDetails Barter { get; set; } + [JsonPropertyName("pack")] public PackDetails Pack { get; set; } + [JsonPropertyName("offerAdjustment")] /** Dynamic offer price below handbook adjustment values */ public OfferAdjustment OfferAdjustment { get; set; } + [JsonPropertyName("expiredOfferThreshold")] /** How many offers should expire before an offer regeneration occurs */ public int ExpiredOfferThreshold { get; set; } + [JsonPropertyName("offerItemCount")] /** How many offers should be listed */ public MinMax OfferItemCount { get; set; } + [JsonPropertyName("priceRanges")] /** How much should the price of an offer vary by (percent 0.8 = 80%, 1.2 = 120%) */ public PriceRanges PriceRanges { get; set; } + [JsonPropertyName("showDefaultPresetsOnly")] /** Should default presets to listed only or should non-standard presets found in globals.json be listed too */ public bool ShowDefaultPresetsOnly { get; set; } + [JsonPropertyName("ignoreQualityPriceVarianceBlacklist")] /** Tpls that should not use the variable price system when their quality is < 100% (lower dura/uses = lower price) */ public List IgnoreQualityPriceVarianceBlacklist { get; set; } + [JsonPropertyName("endTimeSeconds")] public MinMax EndTimeSeconds { get; set; } + [JsonPropertyName("condition")] /** Settings to control the durability range of item items listed on flea */ public Condition Condition { get; set; } + [JsonPropertyName("stackablePercent")] /** Size stackable items should be listed for in percent of max stack size */ public MinMax StackablePercent { get; set; } + [JsonPropertyName("nonStackableCount")] /** Items that cannot be stacked can have multiples sold in one offer, what range of values can be listed */ public MinMax NonStackableCount { get; set; } + [JsonPropertyName("rating")] /** Range of rating offers for items being listed */ public MinMax Rating { get; set; } + [JsonPropertyName("armor")] /** Armor specific flea settings */ public ArmorSettings Armor { get; set; } + [JsonPropertyName("itemPriceMultiplier")] /** A multipler to apply to individual tpls price just prior to item quality adjustment */ public Dictionary ItemPriceMultiplier { get; set; } + [JsonPropertyName("currencies")] /** Percentages to sell offers in each currency */ public Dictionary Currencies { get; set; } + [JsonPropertyName("showAsSingleStack")] /** Item tpls that should be forced to sell as a single item */ public List ShowAsSingleStack { get; set; } + [JsonPropertyName("removeSeasonalItemsWhenNotInEvent")] /** Should christmas/halloween items be removed from flea when not within the seasonal bounds */ public bool RemoveSeasonalItemsWhenNotInEvent { get; set; } + [JsonPropertyName("blacklist")] /** Flea blacklist settings */ public RagfairBlacklist Blacklist { get; set; } + [JsonPropertyName("unreasonableModPrices")] /** Dict of price limits keyed by item type */ public Dictionary UnreasonableModPrices { get; set; } + [JsonPropertyName("itemPriceOverrideRouble")] /** Custom rouble prices for items to override values from prices.json */ public Dictionary ItemPriceOverrideRouble { get; set; } } @@ -293,7 +318,8 @@ public class RagfairBlacklist public List CustomItemCategoryList { get; set; } } -public class ArmorPlateBlacklistSettings { +public class ArmorPlateBlacklistSettings +{ /// /// Max level of plates an armor can have without being removed /// @@ -307,7 +333,8 @@ public class ArmorPlateBlacklistSettings { public List IgnoreSlots { get; set; } } -public class UnreasonableModPrices { +public class UnreasonableModPrices +{ /// /// Enable a system that adjusts very high ragfair prices to be below a max multiple of items the handbook values /// @@ -327,7 +354,8 @@ public class UnreasonableModPrices { public int NewPriceHandbookMultiplier { get; set; } } -public class ArmorSettings { +public class ArmorSettings +{ /// /// % chance / 100 that armor plates will be removed from an offer before listing /// @@ -341,7 +369,8 @@ public class ArmorSettings { public List PlateSlotIdToRemovePool { get; set; } } -public class TieredFlea { +public class TieredFlea +{ [JsonPropertyName("enabled")] public bool Enabled { get; set; } diff --git a/Core/Models/Spt/Config/RepairConfig.cs b/Core/Models/Spt/Config/RepairConfig.cs index 7ad711bb..a585e591 100644 --- a/Core/Models/Spt/Config/RepairConfig.cs +++ b/Core/Models/Spt/Config/RepairConfig.cs @@ -1,8 +1,10 @@ -namespace Core.Models.Spt.Config; +using Core.Models.Common; + +namespace Core.Models.Spt.Config; using System.Text.Json.Serialization; -public class RepairConfig : IBaseConfig +public class RepairConfig : BaseConfig { [JsonPropertyName("kind")] public string Kind { get; set; } = "spt-repair"; diff --git a/Core/Models/Spt/Config/ScavCaseConfig.cs b/Core/Models/Spt/Config/ScavCaseConfig.cs index 6bcf4a79..776f1589 100644 --- a/Core/Models/Spt/Config/ScavCaseConfig.cs +++ b/Core/Models/Spt/Config/ScavCaseConfig.cs @@ -1,4 +1,6 @@ -namespace Core.Models.Spt.Config; +using Core.Models.Common; + +namespace Core.Models.Spt.Config; using System.Text.Json.Serialization; diff --git a/Core/Models/Spt/Config/SeasonalEventConfig.cs b/Core/Models/Spt/Config/SeasonalEventConfig.cs index d04dc15d..b5754904 100644 --- a/Core/Models/Spt/Config/SeasonalEventConfig.cs +++ b/Core/Models/Spt/Config/SeasonalEventConfig.cs @@ -1,4 +1,5 @@ using System.Text.Json.Serialization; +using Core.Models.Eft.Common; namespace Core.Models.Spt.Config; diff --git a/Core/Models/Spt/Config/TraderConfig.cs b/Core/Models/Spt/Config/TraderConfig.cs index fa7277e1..cefaebab 100644 --- a/Core/Models/Spt/Config/TraderConfig.cs +++ b/Core/Models/Spt/Config/TraderConfig.cs @@ -1,4 +1,5 @@ using System.Text.Json.Serialization; +using Core.Models.Common; namespace Core.Models.Spt.Config; diff --git a/Core/Models/Spt/Config/WeatherConfig.cs b/Core/Models/Spt/Config/WeatherConfig.cs index e5a6277f..fb70cf67 100644 --- a/Core/Models/Spt/Config/WeatherConfig.cs +++ b/Core/Models/Spt/Config/WeatherConfig.cs @@ -1,4 +1,5 @@ using System.Text.Json.Serialization; +using Core.Models.Common; namespace Core.Models.Spt.Config; From f5faf1b6af5c76fa06fc09d56d6c3eb336f6412f Mon Sep 17 00:00:00 2001 From: CWX Date: Mon, 6 Jan 2025 17:57:38 +0000 Subject: [PATCH 8/9] added comments for multitypes --- Core/Models/Spt/Config/SeasonalEventConfig.cs | 2 +- Core/Models/Spt/Controllers/BotController.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/Models/Spt/Config/SeasonalEventConfig.cs b/Core/Models/Spt/Config/SeasonalEventConfig.cs index b5754904..bd624ae0 100644 --- a/Core/Models/Spt/Config/SeasonalEventConfig.cs +++ b/Core/Models/Spt/Config/SeasonalEventConfig.cs @@ -70,7 +70,7 @@ public class SeasonalEvent public int EndMonth { get; set; } [JsonPropertyName("settings")] - public Dictionary Settings { get; set; } + public Dictionary Settings { get; set; } // TODO: Type was Record } public class SeasonalEventSettings diff --git a/Core/Models/Spt/Controllers/BotController.cs b/Core/Models/Spt/Controllers/BotController.cs index 66d14663..ef680442 100644 --- a/Core/Models/Spt/Controllers/BotController.cs +++ b/Core/Models/Spt/Controllers/BotController.cs @@ -9,7 +9,7 @@ public class BotController throw new NotImplementedException(); } - public object GetBotDifficulty(string type, string difficulty) // IBotCore | IDifficultyCategories + public object GetBotDifficulty(string type, string difficulty) // TODO: return type was: IBotCore | IDifficultyCategories { throw new NotImplementedException(); } From 256f820f17b57c3c98268793a7c28a9fbda1d46f Mon Sep 17 00:00:00 2001 From: CWX Date: Mon, 6 Jan 2025 18:22:04 +0000 Subject: [PATCH 9/9] more types --- .../Spt/Callbacks/ItemEventCallbacks.cs | 5 +- .../Models/Spt/Callbacks/LauncherCallbacks.cs | 65 ++++++++++++++++++- .../Models/Spt/Callbacks/LocationCallbacks.cs | 14 +++- Core/Models/Spt/Callbacks/ModCallbacks.cs | 20 +++++- Core/Models/Spt/Callbacks/NoteCallbacks.cs | 15 ++++- .../Models/Spt/Callbacks/NotifierCallbacks.cs | 31 ++++++++- Core/Models/Spt/Logging/LogBackgroundColor.cs | 28 ++++---- Core/Models/Spt/Logging/LogTextColor.cs | 28 ++++---- 8 files changed, 173 insertions(+), 33 deletions(-) diff --git a/Core/Models/Spt/Callbacks/ItemEventCallbacks.cs b/Core/Models/Spt/Callbacks/ItemEventCallbacks.cs index 9e5f2ade..49549a5d 100644 --- a/Core/Models/Spt/Callbacks/ItemEventCallbacks.cs +++ b/Core/Models/Spt/Callbacks/ItemEventCallbacks.cs @@ -2,5 +2,8 @@ public class ItemEventCallbacks { - + public GetBodyResponseData HandleEvents(string url, ItemEventRouterRequest info, string sessionID) + { + throw new NotImplementedException(); + } } \ No newline at end of file diff --git a/Core/Models/Spt/Callbacks/LauncherCallbacks.cs b/Core/Models/Spt/Callbacks/LauncherCallbacks.cs index 1bff8558..f7aac738 100644 --- a/Core/Models/Spt/Callbacks/LauncherCallbacks.cs +++ b/Core/Models/Spt/Callbacks/LauncherCallbacks.cs @@ -2,5 +2,68 @@ public class LauncherCallbacks { - + public string Connect() + { + throw new NotImplementedException(); + } + + public string Login(string url, LoginRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public string Register(string url, RegisterData info, string sessionID) + { + throw new NotImplementedException(); + } + + public string Get(string url, LoginRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public string ChangeUsername(string url, ChangeRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public string ChangePassword(string url, ChangeRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public string Wipe(string url, RegisterData info, string sessionID) + { + throw new NotImplementedException(); + } + + public string GetMiniProfile(string url, GetMiniProfileRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public string GetAllMiniProfiles(string url, object info, string sessionID) + { + throw new NotImplementedException(); + } + + public string GetServerVersion() + { + throw new NotImplementedException(); + } + + public string Ping(string url, object info, string sessionID) + { + throw new NotImplementedException(); + } + + public string RemoveProfile(string url, RemoveProfileData info, string sessionID) + { + throw new NotImplementedException(); + } + + public string GetCompatibleTarkovVersion() + { + throw new NotImplementedException(); + } } \ No newline at end of file diff --git a/Core/Models/Spt/Callbacks/LocationCallbacks.cs b/Core/Models/Spt/Callbacks/LocationCallbacks.cs index dd4322ae..803df66d 100644 --- a/Core/Models/Spt/Callbacks/LocationCallbacks.cs +++ b/Core/Models/Spt/Callbacks/LocationCallbacks.cs @@ -1,6 +1,16 @@ -namespace Core.Models.Spt.Callbacks; +using Core.Models.Eft.Common; + +namespace Core.Models.Spt.Callbacks; public class LocationCallbacks { - + public GetBodyResponseData GetLocationData(string url, object info, string sessionID) + { + throw new NotImplementedException(); + } + + public GetBodyResponseData GetLocation(string url, GetLocationRequestData info, string sessionID) + { + throw new NotImplementedException(); + } } \ No newline at end of file diff --git a/Core/Models/Spt/Callbacks/ModCallbacks.cs b/Core/Models/Spt/Callbacks/ModCallbacks.cs index fe2cf935..211906f6 100644 --- a/Core/Models/Spt/Callbacks/ModCallbacks.cs +++ b/Core/Models/Spt/Callbacks/ModCallbacks.cs @@ -2,5 +2,23 @@ public class ModCallbacks { - + public void Load() + { + throw new NotImplementedException(); + } + + public void SendBundle(string sessionID, object req, object resp, 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/NoteCallbacks.cs b/Core/Models/Spt/Callbacks/NoteCallbacks.cs index 1727e4eb..920a0cde 100644 --- a/Core/Models/Spt/Callbacks/NoteCallbacks.cs +++ b/Core/Models/Spt/Callbacks/NoteCallbacks.cs @@ -2,5 +2,18 @@ public class NoteCallbacks { - + public ItemEventRouterResponse AddNote(PmcData pmcData, NoteActionData info, string sessionID) + { + throw new NotImplementedException(); + } + + public ItemEventRouterResponse EditNote(PmcData pmcData, NoteActionData info, string sessionID) + { + throw new NotImplementedException(); + } + + public ItemEventRouterResponse DeleteNote(PmcData pmcData, NoteActionData info, string sessionID) + { + throw new NotImplementedException(); + } } \ No newline at end of file diff --git a/Core/Models/Spt/Callbacks/NotifierCallbacks.cs b/Core/Models/Spt/Callbacks/NotifierCallbacks.cs index 1b7ca1e7..d910aa65 100644 --- a/Core/Models/Spt/Callbacks/NotifierCallbacks.cs +++ b/Core/Models/Spt/Callbacks/NotifierCallbacks.cs @@ -2,5 +2,34 @@ public class NotifierCallbacks { - + /** + * If we don't have anything to send, it's ok to not send anything back + * because notification requests can be long-polling. In fact, we SHOULD wait + * until we actually have something to send because otherwise we'd spam the client + * and the client would abort the connection due to spam. + */ + public void SendNotification(string sessionID, object req, object resp, object data) + { + throw new NotImplementedException(); + } + + public GetBodyResponseData> GetNotifier(string url, object info, string sessionID) + { + throw new NotImplementedException(); + } + + public GetBodyResponseData CreateNotifierChannel(string url, EmptyRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public GetBodyResponseData SelectProfile(string url, UIDRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public string Notify(string url, object info, string sessionID) + { + throw new NotImplementedException(); + } } \ No newline at end of file diff --git a/Core/Models/Spt/Logging/LogBackgroundColor.cs b/Core/Models/Spt/Logging/LogBackgroundColor.cs index 5d30a33f..f5853895 100644 --- a/Core/Models/Spt/Logging/LogBackgroundColor.cs +++ b/Core/Models/Spt/Logging/LogBackgroundColor.cs @@ -1,14 +1,16 @@ -namespace Core.Models.Spt.Logging; +// namespace Core.Models.Spt.Logging; +// +// public struct LogBackgroundColor +// { +// public const string DEFAULT = ""; +// public const string BLACK = "blackBG"; +// public const string RED = "redBG"; +// public const string GREEN = "greenBG"; +// public const string YELLOW = "yellowBG"; +// public const string BLUE = "blueBG"; +// public const string MAGENTA = "magentaBG"; +// public const string CYAN = "cyanBG"; +// public const string WHITE = "whiteBG"; +// } -public struct LogBackgroundColor -{ - public const string DEFAULT = ""; - public const string BLACK = "blackBG"; - public const string RED = "redBG"; - public const string GREEN = "greenBG"; - public const string YELLOW = "yellowBG"; - public const string BLUE = "blueBG"; - public const string MAGENTA = "magentaBG"; - public const string CYAN = "cyanBG"; - public const string WHITE = "whiteBG"; -} \ No newline at end of file +// TODO: this likely wont be used anymore, so commenting out insteaad of reimplementing \ No newline at end of file diff --git a/Core/Models/Spt/Logging/LogTextColor.cs b/Core/Models/Spt/Logging/LogTextColor.cs index 3c342812..cf7e1a20 100644 --- a/Core/Models/Spt/Logging/LogTextColor.cs +++ b/Core/Models/Spt/Logging/LogTextColor.cs @@ -1,14 +1,16 @@ -namespace Core.Models.Spt.Logging; +// namespace Core.Models.Spt.Logging; +// +// public struct LogTextColor +// { +// public const string BLACK = "black"; +// public const string RED = "red"; +// public const string GREEN = "green"; +// public const string YELLOW = "yellow"; +// public const string BLUE = "blue"; +// public const string MAGENTA = "Magenta"; +// public const string CYAN = "cyan"; +// public const string WHITE = "white"; +// public const string GRAY = "gray"; +// } -public struct LogTextColor -{ - public const string BLACK = "black"; - public const string RED = "red"; - public const string GREEN = "green"; - public const string YELLOW = "yellow"; - public const string BLUE = "blue"; - public const string MAGENTA = "Magenta"; - public const string CYAN = "cyan"; - public const string WHITE = "white"; - public const string GRAY = "gray"; -} \ No newline at end of file +// TODO: this likely wont be used anymore, so commenting out insteaad of reimplementing \ No newline at end of file