fix clone appearance (#37130)

This commit is contained in:
slarticodefast 2025-05-03 03:26:12 +02:00 committed by deltanedas
parent 24a73642bb
commit 1b352c01a9
3 changed files with 8 additions and 2 deletions

View File

@ -72,7 +72,7 @@ public sealed class IdentitySystem : SharedIdentitySystem
/// <summary>
/// Queues an identity update to the start of the next tick.
/// </summary>
public void QueueIdentityUpdate(EntityUid uid)
public override void QueueIdentityUpdate(EntityUid uid)
{
_queuedIdentityUpdates.Add(uid);
}

View File

@ -41,6 +41,7 @@ public abstract class SharedHumanoidAppearanceSystem : EntitySystem
[Dependency] private readonly ISerializationManager _serManager = default!;
[Dependency] private readonly MarkingManager _markingManager = default!;
[Dependency] private readonly GrammarSystem _grammarSystem = default!;
[Dependency] private readonly SharedIdentitySystem _identity = default!;
[ValidatePrototypeId<SpeciesPrototype>]
public const string DefaultSpecies = "Human";
@ -165,9 +166,9 @@ public abstract class SharedHumanoidAppearanceSystem : EntitySystem
if (TryComp<GrammarComponent>(target, out var grammar))
_grammarSystem.SetGender((target, grammar), sourceHumanoid.Gender);
_identity.QueueIdentityUpdate(target);
var appearanceEv = new AppearanceLoadedEvent(); // DeltaV
RaiseLocalEvent(target, ref appearanceEv);
Dirty(target, targetHumanoid);
}

View File

@ -39,6 +39,11 @@ public abstract class SharedIdentitySystem : EntitySystem
{
ent.Comp.Enabled = !args.Mask.Comp.IsToggled;
}
/// <summary>
/// Queues an identity update to the start of the next tick.
/// </summary>
public virtual void QueueIdentityUpdate(EntityUid uid) { }
}
/// <summary>
/// Gets called whenever an entity changes their identity.