Antag preferences and antag prototype (#1264)

Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
This commit is contained in:
ike709
2020-07-06 16:24:29 -05:00
committed by GitHub
parent cee8aaa84c
commit c019d428a7
42 changed files with 833 additions and 50 deletions

View File

@@ -64,6 +64,10 @@ namespace Content.Server.Database
modelBuilder.Entity<HumanoidProfile>()
.HasIndex(p => new {p.Slot, p.PrefsId})
.IsUnique();
modelBuilder.Entity<Antag>()
.HasIndex(p => new {p.HumanoidProfileId , p.AntagName})
.IsUnique();
}
}
@@ -90,6 +94,7 @@ namespace Content.Server.Database
public string EyeColor { get; set; } = null!;
public string SkinColor { get; set; } = null!;
public List<Job> Jobs { get; } = new List<Job>();
public List<Antag> Antags { get; } = new List<Antag>();
public DbPreferenceUnavailableMode PreferenceUnavailable { get; set; }
public int PrefsId { get; set; }
@@ -114,6 +119,15 @@ namespace Content.Server.Database
High = 3
}
public class Antag
{
public int AntagId { get; set; }
public HumanoidProfile Profile { get; set; } = null!;
public int HumanoidProfileId { get; set; }
public string AntagName { get; set; } = null!;
}
public enum DbPreferenceUnavailableMode
{
// These enum values HAVE to match the ones in PreferenceUnavailableMode in Shared.