added Character Setup (#511)
* added Character Setup * whoops * reverted unrelated changes * Made everything work post-rebase * Removed unused PreferencesChanged event * nope, don't need this * HumanoidProfileEditorPanel -> HumanoidProfileEditor * Set initial data for hair pickers * Fixed nullable warning * Renamed LooksComponent -> HumanoidAppearanceComponent * Renamed LooksComponentState -> HumanoidAppearanceComponentState * Final renaming maybe * Use a human-like dummy instead of a real human * Change preferences structs back to classes
This commit is contained in:
committed by
Pieter-Jan Briers
parent
d03da83fda
commit
a4e369e629
@@ -1,109 +0,0 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Content.Server.Database;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
namespace Content.Server.Database.Migrations
|
||||
{
|
||||
[DbContext(typeof(PreferencesDbContext))]
|
||||
[Migration("20200111103836_InitialCreate")]
|
||||
partial class InitialCreate
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "3.1.0");
|
||||
|
||||
modelBuilder.Entity("Content.Server.Database.HumanoidProfile", b =>
|
||||
{
|
||||
b.Property<int>("HumanoidProfileId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("Age")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("CharacterName")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("EyeColor")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("FacialHairColor")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("FacialHairName")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("HairColor")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("HairName")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int?>("PrefsId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Sex")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("SkinColor")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("Slot")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("SlotName")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("HumanoidProfileId");
|
||||
|
||||
b.HasIndex("PrefsId");
|
||||
|
||||
b.ToTable("HumanoidProfile");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Content.Server.Database.Prefs", b =>
|
||||
{
|
||||
b.Property<int>("PrefsId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("SelectedCharacterSlot")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Username")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("PrefsId");
|
||||
|
||||
b.HasIndex("Username")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("Preferences");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Content.Server.Database.HumanoidProfile", b =>
|
||||
{
|
||||
b.HasOne("Content.Server.Database.Prefs", null)
|
||||
.WithMany("HumanoidProfiles")
|
||||
.HasForeignKey("PrefsId");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,71 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Content.Server.Database.Migrations
|
||||
{
|
||||
public partial class InitialCreate : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
"Preferences",
|
||||
table => new
|
||||
{
|
||||
PrefsId = table.Column<int>()
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
Username = table.Column<string>(),
|
||||
SelectedCharacterSlot = table.Column<int>()
|
||||
},
|
||||
constraints: table => { table.PrimaryKey("PK_Preferences", x => x.PrefsId); });
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
"HumanoidProfile",
|
||||
table => new
|
||||
{
|
||||
HumanoidProfileId = table.Column<int>()
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
Slot = table.Column<int>(),
|
||||
SlotName = table.Column<string>(),
|
||||
CharacterName = table.Column<string>(),
|
||||
Age = table.Column<int>(),
|
||||
Sex = table.Column<string>(),
|
||||
HairName = table.Column<string>(),
|
||||
HairColor = table.Column<string>(),
|
||||
FacialHairName = table.Column<string>(),
|
||||
FacialHairColor = table.Column<string>(),
|
||||
EyeColor = table.Column<string>(),
|
||||
SkinColor = table.Column<string>(),
|
||||
PrefsId = table.Column<int>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_HumanoidProfile", x => x.HumanoidProfileId);
|
||||
table.ForeignKey(
|
||||
"FK_HumanoidProfile_Preferences_PrefsId",
|
||||
x => x.PrefsId,
|
||||
"Preferences",
|
||||
"PrefsId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
"IX_HumanoidProfile_PrefsId",
|
||||
"HumanoidProfile",
|
||||
"PrefsId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
"IX_Preferences_Username",
|
||||
"Preferences",
|
||||
"Username",
|
||||
unique: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
"HumanoidProfile");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
"Preferences");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,105 +0,0 @@
|
||||
// <auto-generated />
|
||||
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
|
||||
namespace Content.Server.Database.Migrations
|
||||
{
|
||||
[DbContext(typeof(PreferencesDbContext))]
|
||||
internal class PreferencesDbContextModelSnapshot : ModelSnapshot
|
||||
{
|
||||
protected override void BuildModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "3.1.0");
|
||||
|
||||
modelBuilder.Entity("Content.Server.Database.HumanoidProfile", b =>
|
||||
{
|
||||
b.Property<int>("HumanoidProfileId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("Age")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("CharacterName")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("EyeColor")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("FacialHairColor")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("FacialHairName")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("HairColor")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("HairName")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int?>("PrefsId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Sex")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("SkinColor")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("Slot")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("SlotName")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("HumanoidProfileId");
|
||||
|
||||
b.HasIndex("PrefsId");
|
||||
|
||||
b.ToTable("HumanoidProfile");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Content.Server.Database.Prefs", b =>
|
||||
{
|
||||
b.Property<int>("PrefsId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("SelectedCharacterSlot")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Username")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("PrefsId");
|
||||
|
||||
b.HasIndex("Username")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("Preferences");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Content.Server.Database.HumanoidProfile", b =>
|
||||
{
|
||||
b.HasOne("Content.Server.Database.Prefs", null)
|
||||
.WithMany("HumanoidProfiles")
|
||||
.HasForeignKey("PrefsId");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user