Give silicons proper lobby/character editor previews (#33763)

* Give silicons proper lobby/character editor previews

No more naked dummies, properly show a borg/AI sprite now.

This means taking the JobEntity into account when spawning the dummy. For AIs I had to add a "JobPreviewEntity" field because they'd look like a posibrain otherwise. AI therefore uses a custom dummy entity I defined.

Also I had to add some margins to the UI, because otherwise the 32x32 sprite of the AI would look bad.

* Update Content.Shared/Roles/JobPrototype.cs

* Update Content.Client/Lobby/LobbyUIController.cs

* Update Resources/Prototypes/Entities/Mobs/Player/silicon.yml

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
This commit is contained in:
Pieter-Jan Briers
2024-12-08 02:46:41 +01:00
committed by GitHub
parent 3d53e748fa
commit 299b13f21b
6 changed files with 39 additions and 4 deletions

View File

@@ -119,6 +119,13 @@ namespace Content.Shared.Roles
[DataField("jobEntity", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
public string? JobEntity = null;
/// <summary>
/// Entity to use as a preview in the lobby/character editor.
/// Same restrictions as <see cref="JobEntity"/> apply.
/// </summary>
[DataField]
public EntProtoId? JobPreviewEntity = null;
[DataField]
public ProtoId<JobIconPrototype> Icon { get; private set; } = "JobIconUnknown";