0
0
mirror of https://github.com/sp-tarkov/modules.git synced 2025-02-13 09:50:43 -05:00
modules/project/Aki.Custom/Models/DifficultyInfo.cs
kiobu cc2377bf72 fix: difficulties response parsing (!113)
fixed bot difficulties model to match server response for `/singleplayer/settings/bot/difficulties`
also bumps up the sptBear and sptUsec enums so they don't collide with new pmcUSEC and pmcBEAR

Reviewed-on: SPT-AKI/Modules#113
Co-authored-by: kiobu <kiobu@sdf.org>
Co-committed-by: kiobu <kiobu@sdf.org>
2024-04-28 08:17:13 +00:00

43 lines
1.1 KiB
C#

using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Reflection;
namespace Aki.Custom.Models
{
[Serializable]
public struct DifficultyInfo
{
public Dictionary<string, object> this[string key]
{
get
{
switch (key)
{
case "easy":
return easy;
case "hard":
return hard;
case "impossible":
return impossible;
case "normal":
return normal;
default:
throw new ArgumentException($"Difficulty '{key}' does not exist in DifficultyInfo.");
}
}
}
[JsonProperty("easy")]
public Dictionary<string, object> easy;
[JsonProperty("hard")]
public Dictionary<string, object> hard;
[JsonProperty("impossible")]
public Dictionary<string, object> impossible;
[JsonProperty("normal")]
public Dictionary<string, object> normal;
}
}