DungeonBuilder UI Attempt.2

This commit is contained in:
dingo
2026-01-03 15:14:50 -05:00
parent f51ccffbee
commit 6d3fddfa1a
5 changed files with 3792 additions and 2 deletions
File diff suppressed because it is too large Load Diff
+266
View File
@@ -0,0 +1,266 @@
using System;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace SystemRevivalServer.Migrations
{
/// <inheritdoc />
public partial class DungeonBuilder : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "builder_room_templates",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Name = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Description = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Type = table.Column<int>(type: "int", nullable: false),
Tags = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Biome = table.Column<string>(type: "varchar(32)", maxLength: 32, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Width = table.Column<int>(type: "int", nullable: false),
Height = table.Column<int>(type: "int", nullable: false),
TileGridJson = table.Column<string>(type: "json", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
TilePlacementsJson = table.Column<string>(type: "json", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
ObjectPlacementsJson = table.Column<string>(type: "json", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
ConnectionPointsJson = table.Column<string>(type: "json", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
MobSpawnsJson = table.Column<string>(type: "json", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
ItemSpawnsJson = table.Column<string>(type: "json", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
PlayerSpawnX = table.Column<int>(type: "int", nullable: true),
PlayerSpawnY = table.Column<int>(type: "int", nullable: true),
ExitPortalX = table.Column<int>(type: "int", nullable: true),
ExitPortalY = table.Column<int>(type: "int", nullable: true),
Weight = table.Column<int>(type: "int", nullable: false),
MinTier = table.Column<int>(type: "int", nullable: false),
MaxTier = table.Column<int>(type: "int", nullable: false),
MinConnections = table.Column<int>(type: "int", nullable: false),
MaxConnections = table.Column<int>(type: "int", nullable: false),
AllowRotation = table.Column<bool>(type: "tinyint(1)", nullable: false),
AllowMirror = table.Column<bool>(type: "tinyint(1)", nullable: false),
IsEnabled = table.Column<bool>(type: "tinyint(1)", nullable: false),
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
UpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_builder_room_templates", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "dungeon_palettes",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Name = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Description = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Biome = table.Column<string>(type: "varchar(32)", maxLength: 32, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Tags = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
FloorTemplateIdsJson = table.Column<string>(type: "json", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
WallTemplateIdsJson = table.Column<string>(type: "json", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
DoorTemplateIdsJson = table.Column<string>(type: "json", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
DecorationIdsJson = table.Column<string>(type: "json", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
ContainerIdsJson = table.Column<string>(type: "json", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
TrapIdsJson = table.Column<string>(type: "json", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
RoomTemplateIdsJson = table.Column<string>(type: "json", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
MinRooms = table.Column<int>(type: "int", nullable: false),
MaxRooms = table.Column<int>(type: "int", nullable: false),
MinRoomWidth = table.Column<int>(type: "int", nullable: false),
MaxRoomWidth = table.Column<int>(type: "int", nullable: false),
MinRoomHeight = table.Column<int>(type: "int", nullable: false),
MaxRoomHeight = table.Column<int>(type: "int", nullable: false),
MinCorridorWidth = table.Column<int>(type: "int", nullable: false),
MaxCorridorWidth = table.Column<int>(type: "int", nullable: false),
DecorationDensity = table.Column<int>(type: "int", nullable: false),
TrapDensity = table.Column<int>(type: "int", nullable: false),
ContainerDensity = table.Column<int>(type: "int", nullable: false),
IsEnabled = table.Column<bool>(type: "tinyint(1)", nullable: false),
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
UpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_dungeon_palettes", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "object_templates",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Name = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Description = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Type = table.Column<int>(type: "int", nullable: false),
Tags = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Biome = table.Column<string>(type: "varchar(32)", maxLength: 32, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
SpriteSheetId = table.Column<int>(type: "int", nullable: true),
FrameIndex = table.Column<int>(type: "int", nullable: false),
SpritePath = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Width = table.Column<int>(type: "int", nullable: false),
Height = table.Column<int>(type: "int", nullable: false),
OffsetX = table.Column<int>(type: "int", nullable: false),
OffsetY = table.Column<int>(type: "int", nullable: false),
ZIndex = table.Column<int>(type: "int", nullable: false),
BlocksMovement = table.Column<bool>(type: "tinyint(1)", nullable: false),
BlocksProjectiles = table.Column<bool>(type: "tinyint(1)", nullable: false),
BlocksLineOfSight = table.Column<bool>(type: "tinyint(1)", nullable: false),
BlockedCellsJson = table.Column<string>(type: "json", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
IsAnimated = table.Column<bool>(type: "tinyint(1)", nullable: false),
AnimationFrameCount = table.Column<int>(type: "int", nullable: false),
AnimationFps = table.Column<float>(type: "float", nullable: false),
AnimationLoops = table.Column<bool>(type: "tinyint(1)", nullable: false),
AnimationStatesJson = table.Column<string>(type: "json", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
DefaultState = table.Column<string>(type: "varchar(32)", maxLength: 32, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
IsInteractable = table.Column<bool>(type: "tinyint(1)", nullable: false),
TriggeredByWalk = table.Column<bool>(type: "tinyint(1)", nullable: false),
InteractionType = table.Column<int>(type: "int", nullable: false),
InteractionState = table.Column<string>(type: "varchar(32)", maxLength: 32, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
InteractionCooldown = table.Column<float>(type: "float", nullable: false),
RequiredItemId = table.Column<int>(type: "int", nullable: true),
LootTableId = table.Column<int>(type: "int", nullable: true),
GoldAmount = table.Column<int>(type: "int", nullable: false),
XpReward = table.Column<int>(type: "int", nullable: false),
IsDestructible = table.Column<bool>(type: "tinyint(1)", nullable: false),
Health = table.Column<int>(type: "int", nullable: false),
DestroyedState = table.Column<string>(type: "varchar(32)", maxLength: 32, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
DestroyedLootTableId = table.Column<int>(type: "int", nullable: true),
Damage = table.Column<int>(type: "int", nullable: false),
DamageTypeKey = table.Column<string>(type: "varchar(32)", maxLength: 32, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
TriggerDelay = table.Column<float>(type: "float", nullable: false),
ResetTime = table.Column<float>(type: "float", nullable: false),
Weight = table.Column<int>(type: "int", nullable: false),
MinTier = table.Column<int>(type: "int", nullable: false),
MaxTier = table.Column<int>(type: "int", nullable: false),
MaxPerRoom = table.Column<int>(type: "int", nullable: false),
Placement = table.Column<int>(type: "int", nullable: false),
IsEnabled = table.Column<bool>(type: "tinyint(1)", nullable: false),
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
UpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_object_templates", x => x.Id);
table.ForeignKey(
name: "FK_object_templates_tilemap_sheets_SpriteSheetId",
column: x => x.SpriteSheetId,
principalTable: "tilemap_sheets",
principalColumn: "Id");
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "tile_templates",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Name = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Description = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Category = table.Column<int>(type: "int", nullable: false),
Tags = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Biome = table.Column<string>(type: "varchar(32)", maxLength: 32, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Width = table.Column<int>(type: "int", nullable: false),
Height = table.Column<int>(type: "int", nullable: false),
TilesJson = table.Column<string>(type: "json", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
PrimaryTileDefinitionId = table.Column<int>(type: "int", nullable: true),
IsWalkable = table.Column<bool>(type: "tinyint(1)", nullable: false),
BlocksProjectiles = table.Column<bool>(type: "tinyint(1)", nullable: false),
BlocksLineOfSight = table.Column<bool>(type: "tinyint(1)", nullable: false),
BlocksMovement = table.Column<bool>(type: "tinyint(1)", nullable: false),
SocketN = table.Column<int>(type: "int", nullable: false),
SocketE = table.Column<int>(type: "int", nullable: false),
SocketS = table.Column<int>(type: "int", nullable: false),
SocketW = table.Column<int>(type: "int", nullable: false),
SocketCustom = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Weight = table.Column<int>(type: "int", nullable: false),
MinTier = table.Column<int>(type: "int", nullable: false),
MaxTier = table.Column<int>(type: "int", nullable: false),
IsEnabled = table.Column<bool>(type: "tinyint(1)", nullable: false),
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
UpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_tile_templates", x => x.Id);
table.ForeignKey(
name: "FK_tile_templates_tile_definitions_PrimaryTileDefinitionId",
column: x => x.PrimaryTileDefinitionId,
principalTable: "tile_definitions",
principalColumn: "Id");
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateIndex(
name: "IX_object_templates_SpriteSheetId",
table: "object_templates",
column: "SpriteSheetId");
migrationBuilder.CreateIndex(
name: "IX_tile_templates_PrimaryTileDefinitionId",
table: "tile_templates",
column: "PrimaryTileDefinitionId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "builder_room_templates");
migrationBuilder.DropTable(
name: "dungeon_palettes");
migrationBuilder.DropTable(
name: "object_templates");
migrationBuilder.DropTable(
name: "tile_templates");
}
}
}
+472
View File
@@ -81,6 +81,105 @@ namespace SystemRevivalServer.Migrations
b.ToTable("accounts", (string)null);
});
modelBuilder.Entity("DataServer.Data.Entities.BuilderRoomTemplate", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<bool>("AllowMirror")
.HasColumnType("tinyint(1)");
b.Property<bool>("AllowRotation")
.HasColumnType("tinyint(1)");
b.Property<string>("Biome")
.HasMaxLength(32)
.HasColumnType("varchar(32)");
b.Property<string>("ConnectionPointsJson")
.HasColumnType("json");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)");
b.Property<string>("Description")
.HasMaxLength(256)
.HasColumnType("varchar(256)");
b.Property<int?>("ExitPortalX")
.HasColumnType("int");
b.Property<int?>("ExitPortalY")
.HasColumnType("int");
b.Property<int>("Height")
.HasColumnType("int");
b.Property<bool>("IsEnabled")
.HasColumnType("tinyint(1)");
b.Property<string>("ItemSpawnsJson")
.HasColumnType("json");
b.Property<int>("MaxConnections")
.HasColumnType("int");
b.Property<int>("MaxTier")
.HasColumnType("int");
b.Property<int>("MinConnections")
.HasColumnType("int");
b.Property<int>("MinTier")
.HasColumnType("int");
b.Property<string>("MobSpawnsJson")
.HasColumnType("json");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("varchar(64)");
b.Property<string>("ObjectPlacementsJson")
.HasColumnType("json");
b.Property<int?>("PlayerSpawnX")
.HasColumnType("int");
b.Property<int?>("PlayerSpawnY")
.HasColumnType("int");
b.Property<string>("Tags")
.HasMaxLength(256)
.HasColumnType("varchar(256)");
b.Property<string>("TileGridJson")
.HasColumnType("json");
b.Property<string>("TilePlacementsJson")
.HasColumnType("json");
b.Property<int>("Type")
.HasColumnType("int");
b.Property<DateTime>("UpdatedAt")
.HasColumnType("datetime(6)");
b.Property<int>("Weight")
.HasColumnType("int");
b.Property<int>("Width")
.HasColumnType("int");
b.HasKey("Id");
b.ToTable("builder_room_templates");
});
modelBuilder.Entity("DataServer.Data.Entities.ClientAsset", b =>
{
b.Property<int>("Id")
@@ -1272,6 +1371,99 @@ namespace SystemRevivalServer.Migrations
b.ToTable("dungeon_objects");
});
modelBuilder.Entity("DataServer.Data.Entities.DungeonPalette", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<string>("Biome")
.HasMaxLength(32)
.HasColumnType("varchar(32)");
b.Property<int>("ContainerDensity")
.HasColumnType("int");
b.Property<string>("ContainerIdsJson")
.HasColumnType("json");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)");
b.Property<int>("DecorationDensity")
.HasColumnType("int");
b.Property<string>("DecorationIdsJson")
.HasColumnType("json");
b.Property<string>("Description")
.HasMaxLength(256)
.HasColumnType("varchar(256)");
b.Property<string>("DoorTemplateIdsJson")
.HasColumnType("json");
b.Property<string>("FloorTemplateIdsJson")
.HasColumnType("json");
b.Property<bool>("IsEnabled")
.HasColumnType("tinyint(1)");
b.Property<int>("MaxCorridorWidth")
.HasColumnType("int");
b.Property<int>("MaxRoomHeight")
.HasColumnType("int");
b.Property<int>("MaxRoomWidth")
.HasColumnType("int");
b.Property<int>("MaxRooms")
.HasColumnType("int");
b.Property<int>("MinCorridorWidth")
.HasColumnType("int");
b.Property<int>("MinRoomHeight")
.HasColumnType("int");
b.Property<int>("MinRoomWidth")
.HasColumnType("int");
b.Property<int>("MinRooms")
.HasColumnType("int");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("varchar(64)");
b.Property<string>("RoomTemplateIdsJson")
.HasColumnType("json");
b.Property<string>("Tags")
.HasMaxLength(256)
.HasColumnType("varchar(256)");
b.Property<int>("TrapDensity")
.HasColumnType("int");
b.Property<string>("TrapIdsJson")
.HasColumnType("json");
b.Property<DateTime>("UpdatedAt")
.HasColumnType("datetime(6)");
b.Property<string>("WallTemplateIdsJson")
.HasColumnType("json");
b.HasKey("Id");
b.ToTable("dungeon_palettes");
});
modelBuilder.Entity("DataServer.Data.Entities.DungeonPersistence", b =>
{
b.Property<Guid>("Id")
@@ -1855,6 +2047,175 @@ namespace SystemRevivalServer.Migrations
b.ToTable("mob_sprite_sheets");
});
modelBuilder.Entity("DataServer.Data.Entities.ObjectTemplate", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<float>("AnimationFps")
.HasColumnType("float");
b.Property<int>("AnimationFrameCount")
.HasColumnType("int");
b.Property<bool>("AnimationLoops")
.HasColumnType("tinyint(1)");
b.Property<string>("AnimationStatesJson")
.HasColumnType("json");
b.Property<string>("Biome")
.HasMaxLength(32)
.HasColumnType("varchar(32)");
b.Property<string>("BlockedCellsJson")
.HasColumnType("json");
b.Property<bool>("BlocksLineOfSight")
.HasColumnType("tinyint(1)");
b.Property<bool>("BlocksMovement")
.HasColumnType("tinyint(1)");
b.Property<bool>("BlocksProjectiles")
.HasColumnType("tinyint(1)");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)");
b.Property<int>("Damage")
.HasColumnType("int");
b.Property<string>("DamageTypeKey")
.HasMaxLength(32)
.HasColumnType("varchar(32)");
b.Property<string>("DefaultState")
.HasMaxLength(32)
.HasColumnType("varchar(32)");
b.Property<string>("Description")
.HasMaxLength(256)
.HasColumnType("varchar(256)");
b.Property<int?>("DestroyedLootTableId")
.HasColumnType("int");
b.Property<string>("DestroyedState")
.HasMaxLength(32)
.HasColumnType("varchar(32)");
b.Property<int>("FrameIndex")
.HasColumnType("int");
b.Property<int>("GoldAmount")
.HasColumnType("int");
b.Property<int>("Health")
.HasColumnType("int");
b.Property<int>("Height")
.HasColumnType("int");
b.Property<float>("InteractionCooldown")
.HasColumnType("float");
b.Property<string>("InteractionState")
.HasMaxLength(32)
.HasColumnType("varchar(32)");
b.Property<int>("InteractionType")
.HasColumnType("int");
b.Property<bool>("IsAnimated")
.HasColumnType("tinyint(1)");
b.Property<bool>("IsDestructible")
.HasColumnType("tinyint(1)");
b.Property<bool>("IsEnabled")
.HasColumnType("tinyint(1)");
b.Property<bool>("IsInteractable")
.HasColumnType("tinyint(1)");
b.Property<int?>("LootTableId")
.HasColumnType("int");
b.Property<int>("MaxPerRoom")
.HasColumnType("int");
b.Property<int>("MaxTier")
.HasColumnType("int");
b.Property<int>("MinTier")
.HasColumnType("int");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("varchar(64)");
b.Property<int>("OffsetX")
.HasColumnType("int");
b.Property<int>("OffsetY")
.HasColumnType("int");
b.Property<int>("Placement")
.HasColumnType("int");
b.Property<int?>("RequiredItemId")
.HasColumnType("int");
b.Property<float>("ResetTime")
.HasColumnType("float");
b.Property<string>("SpritePath")
.HasMaxLength(256)
.HasColumnType("varchar(256)");
b.Property<int?>("SpriteSheetId")
.HasColumnType("int");
b.Property<string>("Tags")
.HasMaxLength(256)
.HasColumnType("varchar(256)");
b.Property<float>("TriggerDelay")
.HasColumnType("float");
b.Property<bool>("TriggeredByWalk")
.HasColumnType("tinyint(1)");
b.Property<int>("Type")
.HasColumnType("int");
b.Property<DateTime>("UpdatedAt")
.HasColumnType("datetime(6)");
b.Property<int>("Weight")
.HasColumnType("int");
b.Property<int>("Width")
.HasColumnType("int");
b.Property<int>("XpReward")
.HasColumnType("int");
b.Property<int>("ZIndex")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("SpriteSheetId");
b.ToTable("object_templates");
});
modelBuilder.Entity("DataServer.Data.Entities.RoomTemplate", b =>
{
b.Property<int>("Id")
@@ -2056,6 +2417,99 @@ namespace SystemRevivalServer.Migrations
b.ToTable("tilemap_sheets");
});
modelBuilder.Entity("DataServer.Data.Entities.TileTemplate", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<string>("Biome")
.HasMaxLength(32)
.HasColumnType("varchar(32)");
b.Property<bool>("BlocksLineOfSight")
.HasColumnType("tinyint(1)");
b.Property<bool>("BlocksMovement")
.HasColumnType("tinyint(1)");
b.Property<bool>("BlocksProjectiles")
.HasColumnType("tinyint(1)");
b.Property<int>("Category")
.HasColumnType("int");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)");
b.Property<string>("Description")
.HasMaxLength(256)
.HasColumnType("varchar(256)");
b.Property<int>("Height")
.HasColumnType("int");
b.Property<bool>("IsEnabled")
.HasColumnType("tinyint(1)");
b.Property<bool>("IsWalkable")
.HasColumnType("tinyint(1)");
b.Property<int>("MaxTier")
.HasColumnType("int");
b.Property<int>("MinTier")
.HasColumnType("int");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("varchar(64)");
b.Property<int?>("PrimaryTileDefinitionId")
.HasColumnType("int");
b.Property<string>("SocketCustom")
.HasMaxLength(128)
.HasColumnType("varchar(128)");
b.Property<int>("SocketE")
.HasColumnType("int");
b.Property<int>("SocketN")
.HasColumnType("int");
b.Property<int>("SocketS")
.HasColumnType("int");
b.Property<int>("SocketW")
.HasColumnType("int");
b.Property<string>("Tags")
.HasMaxLength(256)
.HasColumnType("varchar(256)");
b.Property<string>("TilesJson")
.HasColumnType("json");
b.Property<DateTime>("UpdatedAt")
.HasColumnType("datetime(6)");
b.Property<int>("Weight")
.HasColumnType("int");
b.Property<int>("Width")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("PrimaryTileDefinitionId");
b.ToTable("tile_templates");
});
modelBuilder.Entity("DataServer.Data.Session", b =>
{
b.Property<ulong>("Id")
@@ -2500,6 +2954,15 @@ namespace SystemRevivalServer.Migrations
b.Navigation("SpriteSheet");
});
modelBuilder.Entity("DataServer.Data.Entities.ObjectTemplate", b =>
{
b.HasOne("DataServer.Data.Entities.TileMapSheet", "SpriteSheet")
.WithMany()
.HasForeignKey("SpriteSheetId");
b.Navigation("SpriteSheet");
});
modelBuilder.Entity("DataServer.Data.Entities.TileDefinition", b =>
{
b.HasOne("DataServer.Data.Entities.TileMapSheet", "TileMapSheet")
@@ -2511,6 +2974,15 @@ namespace SystemRevivalServer.Migrations
b.Navigation("TileMapSheet");
});
modelBuilder.Entity("DataServer.Data.Entities.TileTemplate", b =>
{
b.HasOne("DataServer.Data.Entities.TileDefinition", "PrimaryTileDefinition")
.WithMany()
.HasForeignKey("PrimaryTileDefinitionId");
b.Navigation("PrimaryTileDefinition");
});
modelBuilder.Entity("DataServer.Data.Session", b =>
{
b.HasOne("DataServer.Data.Account", "Account")
@@ -269,7 +269,7 @@
<option value="">-- None --</option>
@foreach (var dt in Model.DamageTypes)
{
<option value="@dt.Key">@dt.Name</option>
<option value="@dt.Key">@dt.DisplayName</option>
}
</select>
</div>
@@ -156,7 +156,7 @@ public class ObjectEditModel : AdminPageModel
.ToListAsync();
DamageTypes = await _db.DamageResistanceTypes
.OrderBy(d => d.Name)
.OrderBy(d => d.DisplayName)
.ToListAsync();
}