Visual nubody (humanoid appearance refactor) (#42476)

* initial visual nubody

* oops overlay

* im so pheeming rn

* conversion...

* tests

* comeback of the underwear

* oops eyes

* blabbl

* zeds

* yaml linted

* search and visible count constraints

* reordering

* preserve previously selected markings colors

* fix test

* some ui niceties

* ordering

* make DB changes backwards-compatible/downgrade-friendly

* fix things again

* fix migration

* vulpkanin markings limit increase

* wrapping

* code cleanup and more code cleanup and more code cleanup and more code cleanup and

* fix slop ports

* better sampling API

* make filter work + use the method i made for its intended purpose

* fix test fails real quick

* magic mirror cleanup, remove TODO

* don't 0-init the organ profile data

* remove deltastates

---------

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>

# Conflicts:
#	Content.Server/Humanoid/Components/RandomHumanoidAppearanceComponent.cs
#	Content.Server/Humanoid/Systems/RandomHumanoidAppearanceSystem.cs

# Conflicts:
#	Resources/Prototypes/Species/diona.yml

# Conflicts:
#	Content.Server/Zombies/ZombieSystem.Transform.cs
This commit is contained in:
pathetic meowmeow
2026-06-29 12:43:35 +02:00
committed by Coryler
parent 4f85f1b483
commit c57721eca5
196 changed files with 9583 additions and 8052 deletions
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,29 @@
using System.Text.Json;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Content.Server.Database.Migrations.Postgres
{
/// <inheritdoc />
public partial class OrganMarkings : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<JsonDocument>(
name: "organ_markings",
table: "profile",
type: "jsonb",
nullable: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "organ_markings",
table: "profile");
}
}
}
@@ -1,5 +1,6 @@
// <auto-generated />
using System;
using System.Collections.Generic;
using System.Net;
using System.Text.Json;
using Content.Server.Database;
@@ -20,7 +21,7 @@ namespace Content.Server.Database.Migrations.Postgres
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "9.0.1")
.HasAnnotation("ProductVersion", "10.0.0")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
@@ -901,7 +902,7 @@ namespace Content.Server.Database.Migrations.Postgres
.HasColumnType("text")
.HasColumnName("admin_ooc_color");
b.PrimitiveCollection<string[]>("ConstructionFavorites")
b.PrimitiveCollection<List<string>>("ConstructionFavorites")
.IsRequired()
.HasColumnType("text[]")
.HasColumnName("construction_favorites");
@@ -980,6 +981,10 @@ namespace Content.Server.Database.Migrations.Postgres
.HasColumnType("jsonb")
.HasColumnName("markings");
b.Property<JsonDocument>("OrganMarkings")
.HasColumnType("jsonb")
.HasColumnName("organ_markings");
b.Property<int>("PreferenceId")
.HasColumnType("integer")
.HasColumnName("preference_id");
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,28 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Content.Server.Database.Migrations.Sqlite
{
/// <inheritdoc />
public partial class OrganMarkings : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<byte[]>(
name: "organ_markings",
table: "profile",
type: "jsonb",
nullable: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "organ_markings",
table: "profile");
}
}
}
@@ -15,7 +15,7 @@ namespace Content.Server.Database.Migrations.Sqlite
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "9.0.1");
modelBuilder.HasAnnotation("ProductVersion", "10.0.0");
modelBuilder.Entity("Content.Server.Database.Admin", b =>
{
@@ -927,6 +927,10 @@ namespace Content.Server.Database.Migrations.Sqlite
.HasColumnType("jsonb")
.HasColumnName("markings");
b.Property<byte[]>("OrganMarkings")
.HasColumnType("jsonb")
.HasColumnName("organ_markings");
b.Property<int>("PreferenceId")
.HasColumnType("INTEGER")
.HasColumnName("preference_id");
+1
View File
@@ -430,6 +430,7 @@ namespace Content.Server.Database
public string Sex { get; set; } = null!;
public string Gender { get; set; } = null!;
public string Species { get; set; } = null!;
[Column(TypeName = "jsonb")] public JsonDocument? OrganMarkings { get; set; } = null!;
[Column(TypeName = "jsonb")] public JsonDocument? Markings { get; set; } = null!;
public string HairName { get; set; } = null!;
public string HairColor { get; set; } = null!;
+4
View File
@@ -85,6 +85,10 @@ namespace Content.Server.Database
.Property(log => log.Markings)
.HasConversion(jsonByteArrayConverter);
modelBuilder.Entity<Profile>()
.Property(log => log.OrganMarkings)
.HasConversion(jsonByteArrayConverter);
// Begin CD - Character Records
modelBuilder.Entity<CDModel.CDProfile>()
.Property(log => log.CharacterRecords)