Files
Delta-v/Content.Shared/MagicMirror/MagicMirrorComponent.cs
pathetic meowmeow c57721eca5 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
2026-06-29 12:43:35 +02:00

47 lines
1.4 KiB
C#

using Content.Shared.Body;
using Content.Shared.DoAfter;
using Content.Shared.Humanoid;
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
namespace Content.Shared.MagicMirror;
/// <summary>
/// Allows humanoids to change their appearance mid-round.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
[Access(typeof(MagicMirrorSystem))]
public sealed partial class MagicMirrorComponent : Component
{
/// <summary>
/// The id for a doAfter our <see cref="Target"/> is doing. Stored as an ushort so it can be networked and one day predicted.
/// </summary>
[DataField, AutoNetworkedField]
public ushort? DoAfter;
/// <summary>
/// Magic mirror target, used for validating UI messages.
/// </summary>
[DataField, AutoNetworkedField]
public EntityUid? Target;
[DataField(required: true)]
public HashSet<ProtoId<OrganCategoryPrototype>> Organs;
[DataField(required: true)]
public HashSet<HumanoidVisualLayers> Layers;
/// <summary>
/// Do after time to modify an entity's markings
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)]
public TimeSpan ModifyTime = TimeSpan.FromSeconds(7);
/// <summary>
/// Sound emitted when slots are changed
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)]
public SoundSpecifier? ChangeHairSound = new SoundPathSpecifier("/Audio/Items/scissors.ogg");
}