Switched the library importing in the launcher to work based on a queue. As a new game is added to the queue, it should find any related data and also add it to the queue. This should result in an easier to maintain importer while reducing the load on the launcher's DAL. This may result in more RAM usage while importing. Local manifests have also been refactored to match manifests in import/export LCX files, removing the old manifest format. This is a large breaking change that will probably break existing game installations. A migration will probably have to be created.
22 lines
747 B
C#
22 lines
747 B
C#
using LANCommander.SDK.Enums;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace LANCommander.Launcher.Data.Models
|
|
{
|
|
[Table("MultiplayerModes")]
|
|
public class MultiplayerMode : BaseModel
|
|
{
|
|
public MultiplayerType Type { get; set; }
|
|
public NetworkProtocol NetworkProtocol { get; set; }
|
|
public string? Description { get; set; }
|
|
public int MinPlayers { get; set; }
|
|
public int MaxPlayers { get; set; }
|
|
public int Spectators { get; set; }
|
|
public Guid? GameId { get; set; }
|
|
[JsonIgnore]
|
|
[ForeignKey(nameof(GameId))]
|
|
[InverseProperty("MultiplayerModes")]
|
|
public virtual Game? Game { get; set; }
|
|
}
|
|
}
|