fix clone appearance (#37130)

This commit is contained in:
slarticodefast
2025-05-03 03:26:12 +02:00
committed by GitHub
parent 4ba8945c5b
commit 5d26a38a1d
3 changed files with 8 additions and 1 deletions

View File

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

View File

@@ -39,6 +39,7 @@ public abstract class SharedHumanoidAppearanceSystem : EntitySystem
[Dependency] private readonly ISerializationManager _serManager = default!; [Dependency] private readonly ISerializationManager _serManager = default!;
[Dependency] private readonly MarkingManager _markingManager = default!; [Dependency] private readonly MarkingManager _markingManager = default!;
[Dependency] private readonly GrammarSystem _grammarSystem = default!; [Dependency] private readonly GrammarSystem _grammarSystem = default!;
[Dependency] private readonly SharedIdentitySystem _identity = default!;
[ValidatePrototypeId<SpeciesPrototype>] [ValidatePrototypeId<SpeciesPrototype>]
public const string DefaultSpecies = "Human"; public const string DefaultSpecies = "Human";
@@ -161,6 +162,7 @@ public abstract class SharedHumanoidAppearanceSystem : EntitySystem
if (TryComp<GrammarComponent>(target, out var grammar)) if (TryComp<GrammarComponent>(target, out var grammar))
_grammarSystem.SetGender((target, grammar), sourceHumanoid.Gender); _grammarSystem.SetGender((target, grammar), sourceHumanoid.Gender);
_identity.QueueIdentityUpdate(target);
Dirty(target, targetHumanoid); Dirty(target, targetHumanoid);
} }

View File

@@ -39,6 +39,11 @@ public abstract class SharedIdentitySystem : EntitySystem
{ {
ent.Comp.Enabled = !args.Mask.Comp.IsToggled; 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> /// <summary>
/// Gets called whenever an entity changes their identity. /// Gets called whenever an entity changes their identity.