diff --git a/source/LootDumpProcessor/Model/FireMode.cs b/source/LootDumpProcessor/Model/FireMode.cs index 3e85067..768ef45 100644 --- a/source/LootDumpProcessor/Model/FireMode.cs +++ b/source/LootDumpProcessor/Model/FireMode.cs @@ -3,12 +3,4 @@ using System.Text.Json.Serialization; namespace LootDumpProcessor.Model; -public class FireMode : ICloneable -{ - [JsonPropertyName("FireMode")] public string? FireModeType { get; set; } - - public object Clone() => new FireMode - { - FireModeType = FireModeType - }; -} \ No newline at end of file +public readonly record struct FireMode([property: JsonPropertyName("FireMode")] string FireModeType); \ No newline at end of file diff --git a/source/LootDumpProcessor/Model/Foldable.cs b/source/LootDumpProcessor/Model/Foldable.cs index 29e12f9..97781db 100644 --- a/source/LootDumpProcessor/Model/Foldable.cs +++ b/source/LootDumpProcessor/Model/Foldable.cs @@ -1,11 +1,3 @@ namespace LootDumpProcessor.Model; -public class Foldable : ICloneable -{ - public bool? Folded { get; set; } - - public object Clone() => new Foldable - { - Folded = Folded - }; -} \ No newline at end of file +public readonly record struct Foldable(bool Folded); \ No newline at end of file diff --git a/source/LootDumpProcessor/Model/GroupPosition.cs b/source/LootDumpProcessor/Model/GroupPosition.cs index 13a3938..3bb0343 100644 --- a/source/LootDumpProcessor/Model/GroupPosition.cs +++ b/source/LootDumpProcessor/Model/GroupPosition.cs @@ -1,26 +1,17 @@ -using LootDumpProcessor.Utils; - - namespace LootDumpProcessor.Model; public class GroupPosition : ICloneable { - public string? Name { get; set; } - - - public int? Weight { get; set; } - - - public Vector3? Position { get; set; } - - - public Vector3? Rotation { get; set; } + public string Name { get; set; } + public int Weight { get; set; } + public Vector3 Position { get; set; } + public Vector3 Rotation { get; set; } public object Clone() => new GroupPosition { Name = Name, Weight = Weight, - Position = ProcessorUtil.Copy(Position), - Rotation = ProcessorUtil.Copy(Rotation) + Position = Position, + Rotation = Rotation }; } \ No newline at end of file diff --git a/source/LootDumpProcessor/Model/Input/AdditionalHostilitySetting.cs b/source/LootDumpProcessor/Model/Input/AdditionalHostilitySetting.cs index 4c0b498..d7098cc 100644 --- a/source/LootDumpProcessor/Model/Input/AdditionalHostilitySetting.cs +++ b/source/LootDumpProcessor/Model/Input/AdditionalHostilitySetting.cs @@ -1,16 +1,15 @@ namespace LootDumpProcessor.Model.Input; -public class AdditionalHostilitySetting -{ - public string? BotRole { get; set; } - public List? AlwaysEnemies { get; set; } - public List? ChancedEnemies { get; set; } - public List? Warn { get; set; } - public List? Neutral { get; set; } - public List? AlwaysFriends { get; set; } - public string? SavagePlayerBehaviour { get; set; } - public string? BearPlayerBehaviour { get; set; } - public int? BearEnemyChance { get; set; } - public string? UsecPlayerBehaviour { get; set; } - public int? UsecEnemyChance { get; set; } -} \ No newline at end of file +public readonly record struct AdditionalHostilitySetting( + string BotRole, + IReadOnlyList AlwaysEnemies, + IReadOnlyList ChancedEnemies, + IReadOnlyList Warn, + IReadOnlyList Neutral, + IReadOnlyList AlwaysFriends, + string SavagePlayerBehaviour, + string BearPlayerBehaviour, + int BearEnemyChance, + string UsecPlayerBehaviour, + int UsecEnemyChance +); \ No newline at end of file diff --git a/source/LootDumpProcessor/Model/Input/AirdropParameter.cs b/source/LootDumpProcessor/Model/Input/AirdropParameter.cs index 7950aee..05157c2 100644 --- a/source/LootDumpProcessor/Model/Input/AirdropParameter.cs +++ b/source/LootDumpProcessor/Model/Input/AirdropParameter.cs @@ -1,15 +1,14 @@ namespace LootDumpProcessor.Model.Input; -public class AirdropParameter -{ - public int? PlaneAirdropStartMin { get; set; } - public int? PlaneAirdropStartMax { get; set; } - public int? PlaneAirdropEnd { get; set; } - public float? PlaneAirdropChance { get; set; } - public int? PlaneAirdropMax { get; set; } - public int? PlaneAirdropCooldownMin { get; set; } - public int? PlaneAirdropCooldownMax { get; set; } - public int? AirdropPointDeactivateDistance { get; set; } - public int? MinPlayersCountToSpawnAirdrop { get; set; } - public int? UnsuccessfulTryPenalty { get; set; } -} \ No newline at end of file +public readonly record struct AirdropParameter( + int PlaneAirdropStartMin, + int PlaneAirdropStartMax, + int PlaneAirdropEnd, + float PlaneAirdropChance, + int PlaneAirdropMax, + int PlaneAirdropCooldownMin, + int PlaneAirdropCooldownMax, + int AirdropPointDeactivateDistance, + int MinPlayersCountToSpawnAirdrop, + int UnsuccessfulTryPenalty +); \ No newline at end of file diff --git a/source/LootDumpProcessor/Model/Input/BTRServerSettings.cs b/source/LootDumpProcessor/Model/Input/BTRServerSettings.cs index 44fa023..a8c608d 100644 --- a/source/LootDumpProcessor/Model/Input/BTRServerSettings.cs +++ b/source/LootDumpProcessor/Model/Input/BTRServerSettings.cs @@ -1,20 +1,19 @@ namespace LootDumpProcessor.Model.Input; -public class BTRServerSettings -{ - public float? ChanceSpawn { get; set; } - public Vector3? SpawnPeriod { get; set; } - public float? MoveSpeed { get; set; } - public float? ReadyToDepartureTime { get; set; } - public float? CheckTurnDistanceTime { get; set; } - public float? TurnCheckSensitivity { get; set; } - public float? DecreaseSpeedOnTurnLimit { get; set; } - public float? EndSplineDecelerationDistance { get; set; } - public float? AccelerationSpeed { get; set; } - public float? DecelerationSpeed { get; set; } - public Vector3? PauseDurationRange { get; set; } - public float? BodySwingReturnSpeed { get; set; } - public float? BodySwingDamping { get; set; } - public float? BodySwingIntensity { get; set; } - public ServerMapBTRSettings? ServerMapBTRSettings { get; set; } -} \ No newline at end of file +public readonly record struct BTRServerSettings( + float ChanceSpawn, + Vector3 SpawnPeriod, + float MoveSpeed, + float ReadyToDepartureTime, + float CheckTurnDistanceTime, + float TurnCheckSensitivity, + float DecreaseSpeedOnTurnLimit, + float EndSplineDecelerationDistance, + float AccelerationSpeed, + float DecelerationSpeed, + Vector3 PauseDurationRange, + float BodySwingReturnSpeed, + float BodySwingDamping, + float BodySwingIntensity, + ServerMapBTRSettings ServerMapBTRSettings +); \ No newline at end of file diff --git a/source/LootDumpProcessor/Model/Input/Banner.cs b/source/LootDumpProcessor/Model/Input/Banner.cs index 1c50c82..f5a02cf 100644 --- a/source/LootDumpProcessor/Model/Input/Banner.cs +++ b/source/LootDumpProcessor/Model/Input/Banner.cs @@ -1,7 +1,6 @@ namespace LootDumpProcessor.Model.Input; -public class Banner -{ - public string? Id { get; set; } - public Pic? Pic { get; set; } -} \ No newline at end of file +public readonly record struct Banner( + string Id, + Pic Pic +); \ No newline at end of file diff --git a/source/LootDumpProcessor/Model/Input/BotLocationModifier.cs b/source/LootDumpProcessor/Model/Input/BotLocationModifier.cs index e711de7..168376f 100644 --- a/source/LootDumpProcessor/Model/Input/BotLocationModifier.cs +++ b/source/LootDumpProcessor/Model/Input/BotLocationModifier.cs @@ -1,19 +1,18 @@ namespace LootDumpProcessor.Model.Input; -public class BotLocationModifier -{ - public float? AccuracySpeed { get; set; } - public float? Scattering { get; set; } - public float? GainSight { get; set; } - public float? MarksmanAccuratyCoef { get; set; } - public float? VisibleDistance { get; set; } - public float? DistToPersueAxemanCoef { get; set; } - public int? KhorovodChance { get; set; } - public float? MinExfiltrationTime { get; set; } - public float? MaxExfiltrationTime { get; set; } - public float? DistToActivatePvE { get; set; } - public float? DistToSleepPvE { get; set; } - public float? DistToActivate { get; set; } - public float? DistToSleep { get; set; } - public List? AdditionalHostilitySettings { get; set; } -} \ No newline at end of file +public readonly record struct BotLocationModifier( + float AccuracySpeed, + float Scattering, + float GainSight, + float MarksmanAccuratyCoef, + float VisibleDistance, + float DistToPersueAxemanCoef, + int KhorovodChance, + float MinExfiltrationTime, + float MaxExfiltrationTime, + float DistToActivatePvE, + float DistToSleepPvE, + float DistToActivate, + float DistToSleep, + IReadOnlyList AdditionalHostilitySettings +); \ No newline at end of file diff --git a/source/LootDumpProcessor/Model/Input/ChancedEnemy.cs b/source/LootDumpProcessor/Model/Input/ChancedEnemy.cs index 220b46c..b86add4 100644 --- a/source/LootDumpProcessor/Model/Input/ChancedEnemy.cs +++ b/source/LootDumpProcessor/Model/Input/ChancedEnemy.cs @@ -1,7 +1,6 @@ namespace LootDumpProcessor.Model.Input; -public class ChancedEnemy -{ - public int? EnemyChance { get; set; } - public string? Role { get; set; } -} \ No newline at end of file +public readonly record struct ChancedEnemy( + int EnemyChance, + string Role +); \ No newline at end of file diff --git a/source/LootDumpProcessor/Model/Input/ColliderParams.cs b/source/LootDumpProcessor/Model/Input/ColliderParams.cs index d6d36bf..f7750ab 100644 --- a/source/LootDumpProcessor/Model/Input/ColliderParams.cs +++ b/source/LootDumpProcessor/Model/Input/ColliderParams.cs @@ -1,7 +1,6 @@ namespace LootDumpProcessor.Model.Input; -public class ColliderParams -{ - public string? Parent { get; set; } - public Props? Props { get; set; } -} \ No newline at end of file +public readonly record struct ColliderParams( + string Parent, + Props Props +); \ No newline at end of file diff --git a/source/LootDumpProcessor/Model/Input/CompletedQuest.cs b/source/LootDumpProcessor/Model/Input/CompletedQuest.cs index 6bdbd26..dd0198d 100644 --- a/source/LootDumpProcessor/Model/Input/CompletedQuest.cs +++ b/source/LootDumpProcessor/Model/Input/CompletedQuest.cs @@ -1,6 +1,3 @@ namespace LootDumpProcessor.Model.Input; -public class CompletedQuest -{ - public string? QuestID { get; set; } -} \ No newline at end of file +public readonly record struct CompletedQuest(string QuestId); \ No newline at end of file diff --git a/source/LootDumpProcessor/Model/Input/Data.cs b/source/LootDumpProcessor/Model/Input/Data.cs index 06b2514..1bf572d 100644 --- a/source/LootDumpProcessor/Model/Input/Data.cs +++ b/source/LootDumpProcessor/Model/Input/Data.cs @@ -1,9 +1,8 @@ namespace LootDumpProcessor.Model.Input; -public class Data -{ - public string? ServerID { get; set; } - public ServerSettings? ServerSettings { get; set; } - public object? Profile { get; set; } - public required LocationLoot LocationLoot { get; set; } -} \ No newline at end of file +public readonly record struct Data( + string ServerId, + ServerSettings ServerSettings, + object Profile, + LocationLoot LocationLoot +); \ No newline at end of file diff --git a/source/LootDumpProcessor/Model/Input/Exit.cs b/source/LootDumpProcessor/Model/Input/Exit.cs index 7efb0ae..0d9fdb5 100644 --- a/source/LootDumpProcessor/Model/Input/Exit.cs +++ b/source/LootDumpProcessor/Model/Input/Exit.cs @@ -1,25 +1,24 @@ namespace LootDumpProcessor.Model.Input; -public class Exit -{ - public string? Name { get; set; } - public string? EntryPoints { get; set; } - public float? Chance { get; set; } - public int? MinTime { get; set; } - public int? MaxTime { get; set; } - public int? PlayersCount { get; set; } - public float? ExfiltrationTime { get; set; } - public string? PassageRequirement { get; set; } - public string? ExfiltrationType { get; set; } - public string? RequiredSlot { get; set; } - public string? Id { get; set; } - public string? RequirementTip { get; set; } - public int? Count { get; set; } - public bool? EventAvailable { get; set; } - public int? MinTimePVE { get; set; } - public int? MaxTimePVE { get; set; } - public float? ChancePVE { get; set; } - public int? CountPVE { get; set; } - public float? ExfiltrationTimePVE { get; set; } - public int? PlayersCountPVE { get; set; } -} \ No newline at end of file +public readonly record struct Exit( + string Name, + string EntryPoints, + float Chance, + int MinTime, + int MaxTime, + int PlayersCount, + float ExfiltrationTime, + string PassageRequirement, + string ExfiltrationType, + string RequiredSlot, + string Id, + string RequirementTip, + int Count, + bool EventAvailable, + int MinTimePve, + int MaxTimePve, + float ChancePve, + int CountPve, + float ExfiltrationTimePve, + int PlayersCountPve +); \ No newline at end of file diff --git a/source/LootDumpProcessor/Model/Input/ItemCost.cs b/source/LootDumpProcessor/Model/Input/ItemCost.cs index 2b79260..f3dabab 100644 --- a/source/LootDumpProcessor/Model/Input/ItemCost.cs +++ b/source/LootDumpProcessor/Model/Input/ItemCost.cs @@ -1,6 +1,3 @@ namespace LootDumpProcessor.Model.Input; -public class ItemCost -{ - public int? Count { get; set; } -} \ No newline at end of file +public readonly record struct ItemCost(int Count); \ No newline at end of file diff --git a/source/LootDumpProcessor/Model/Input/LocationLoot.cs b/source/LootDumpProcessor/Model/Input/LocationLoot.cs index edd6483..cff1ad2 100644 --- a/source/LootDumpProcessor/Model/Input/LocationLoot.cs +++ b/source/LootDumpProcessor/Model/Input/LocationLoot.cs @@ -1,193 +1,100 @@ using System.Text.Json.Serialization; - namespace LootDumpProcessor.Model.Input; -public class LocationLoot -{ - public bool? Enabled { get; set; } - public bool? EnableCoop { get; set; } - public bool? ForceOnlineRaidInPVE { get; set; } - public bool? Locked { get; set; } - public bool? Insurance { get; set; } - public bool? SafeLocation { get; set; } - public string? Name { get; set; } - public string? Description { get; set; } - public Scene? Scene { get; set; } - public float? Area { get; set; } - public int? RequiredPlayerLevelMin { get; set; } - public int? RequiredPlayerLevelMax { get; set; } - public int? PmcMaxPlayersInGroup { get; set; } - public int? ScavMaxPlayersInGroup { get; set; } - public int? MinPlayers { get; set; } - public int? MaxPlayers { get; set; } - public int? MaxCoopGroup { get; set; } - public int? ExitCount { get; set; } - public int? ExitAccessTime { get; set; } - public int? ExitTime { get; set; } - public Preview? Preview { get; set; } - public int? IconX { get; set; } - public int? IconY { get; set; } - public List? FilterEx { get; set; } - public List? Waves { get; set; } - public List? Limits { get; set; } - public int? AveragePlayTime { get; set; } - public int? AveragePlayerLevel { get; set; } - public int? EscapeTimeLimit { get; set; } - public int? EscapeTimeLimitPVE { get; set; } - public int? EscapeTimeLimitCoop { get; set; } - public string? Rules { get; set; } - public bool? IsSecret { get; set; } - public List? Doors { get; set; } - [JsonPropertyName("tmp_location_field_remove_me")] public int? TmpLocationFieldRemoveMe { get; set; } - public int? MinDistToExitPoint { get; set; } - public int? MaxDistToFreePoint { get; set; } - public int? MinDistToFreePoint { get; set; } - public int? MaxBotPerZone { get; set; } - public string? OpenZones { get; set; } - public bool? OcculsionCullingEnabled { get; set; } - public float? GlobalLootChanceModifier { get; set; } - public float? GlobalLootChanceModifierPvE { get; set; } - public bool? OldSpawn { get; set; } - public bool? OfflineOldSpawn { get; set; } - public bool? NewSpawn { get; set; } - public bool? OfflineNewSpawn { get; set; } - public int? BotMax { get; set; } - - - public int? BotMaxPvE { get; set; } - - - public int? BotStart { get; set; } - - - public int? BotStartPlayer { get; set; } - - - public int? BotStop { get; set; } - - - public int? BotMaxTimePlayer { get; set; } - - - public int? BotSpawnTimeOnMin { get; set; } - - - public int? BotSpawnTimeOnMax { get; set; } - - - public int? BotSpawnTimeOffMin { get; set; } - - - public int? BotSpawnTimeOffMax { get; set; } - - - public int? BotMaxPlayer { get; set; } - - - public int? BotEasy { get; set; } - - - public int? BotNormal { get; set; } - - - public int? BotHard { get; set; } - - - public int? BotImpossible { get; set; } - - - public int? BotAssault { get; set; } - - - public int? BotMarksman { get; set; } - - - public string? DisabledScavExits { get; set; } - - - public int? MinPlayerLvlAccessKeys { get; set; } - - public List? AccessKeys { get; set; } - - - public int? UnixDateTime { get; set; } - - - [JsonPropertyName("users_gather_seconds")] public int? UsersGatherSeconds { get; set; } - - - [JsonPropertyName("users_spawn_seconds_n")] public int? UsersSpawnSecondsN { get; set; } - - - [JsonPropertyName("users_spawn_seconds_n2")] public int? UsersSpawnSecondsN2 { get; set; } - - - [JsonPropertyName("users_summon_seconds")] public int? UsersSummonSeconds { get; set; } - - - [JsonPropertyName("sav_summon_seconds")] public int? SavSummonSeconds { get; set; } - - - [JsonPropertyName("matching_min_seconds")] public int? MatchingMinSeconds { get; set; } - - - public bool? GenerateLocalLootCache { get; set; } - - - public int? PlayersRequestCount { get; set; } - - - public NonWaveGroupScenario? NonWaveGroupScenario { get; set; } - - - public int? BotSpawnCountStep { get; set; } - - - public int? BotSpawnPeriodCheck { get; set; } - - - public float? GlobalContainerChanceModifier { get; set; } - - - public List? MinMaxBots { get; set; } - - - public BotLocationModifier? BotLocationModifier { get; set; } - - - public List? Exits { get; set; } - - - public bool? DisabledForScav { get; set; } - - - public List? BossLocationSpawn { get; set; } - - - public List? SpawnPointParams { get; set; } - - - public List? MaxItemCountInLocation { get; set; } - - - public List? AirdropParameters { get; set; } - - - public List? MatchMakerMinPlayersByWaitTime { get; set; } - - - public List? Transits { get; set; } - - - public required string Id { get; set; } - - - [JsonPropertyName("_Id")] public string? Id0 { get; set; } - - - public required List