give GetAiBotBrainTypes response a type

This commit is contained in:
CWX
2025-01-29 11:28:13 +00:00
parent eec51d55fb
commit f8ce007a64
2 changed files with 21 additions and 7 deletions
+18 -6
View File
@@ -17,6 +17,7 @@ using Core.Utils.Cloners;
using SptCommon.Extensions;
using LogLevel = Core.Models.Spt.Logging.LogLevel;
using System.Diagnostics;
using System.Text.Json.Serialization;
using Microsoft.Extensions.Logging;
namespace Core.Controllers;
@@ -447,14 +448,25 @@ public class BotController(
return botCap.Value;
}
public object GetAiBotBrainTypes()
public AiBotBrainTypes GetAiBotBrainTypes()
{
// TODO: Returns `any` in the node server
return new
return new AiBotBrainTypes
{
pmc = _pmcConfig.PmcType,
assault = _botConfig.AssaultBrainType,
playerScav = _botConfig.PlayerScavBrainType,
PmcType = _pmcConfig.PmcType,
Assault = _botConfig.AssaultBrainType,
PlayerScav = _botConfig.PlayerScavBrainType,
};
}
}
public record AiBotBrainTypes
{
[JsonPropertyName("pmc")]
public Dictionary<string,Dictionary<string,Dictionary<string,double>>> PmcType { get; set; }
[JsonPropertyName("assault")]
public Dictionary<string,Dictionary<string,int>> Assault { get; set; }
[JsonPropertyName("playerScav")]
public Dictionary<string,Dictionary<string,int>> PlayerScav { get; set; }
}
@@ -458,7 +458,9 @@ public record NighttimeChanges
/// </summary>
[JsonPropertyName("equipmentModsModifiers")]
public Dictionary<string, float> EquipmentModsModifiers { get; set; }
//public Dictionary<string, float> WeaponModsModifiers { get; set; } //TODO
[JsonPropertyName("weaponModsModifiers")]
public Dictionary<string, float> WeaponModsModifiers { get; set; } // TODO: currently not in use anywhere
}
public record EquipmentFilterDetails