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