Files
SPT-Server-Build/Core/Routers/SaveLoad/ProfileSaveLoadRouter.cs
T
2025-01-11 23:38:57 +00:00

23 lines
616 B
C#

using Core.Annotations;
using Core.DI;
using Core.Models.Eft.Profile;
namespace Core.Routers.SaveLoad;
[Injectable(InjectableTypeOverride = typeof(SaveLoadRouter))]
public class ProfileSaveLoadRouter : SaveLoadRouter
{
protected override List<HandledRoute> GetHandledRoutes()
{
return new List<HandledRoute>() { new HandledRoute("spt-profile", false) };
}
public override SptProfile HandleLoad(SptProfile profile)
{
if (profile.CharacterData == null)
profile.CharacterData = new Characters { PmcData = new(), ScavData = new() };
return profile;
}
}