Add a system for modifying entity names without causing conflicts (#27863)

This commit is contained in:
Tayrtahn
2024-06-16 15:38:53 -04:00
committed by GitHub
parent ee2769ed9f
commit 89a9f07c3a
30 changed files with 326 additions and 123 deletions

View File

@@ -0,0 +1,20 @@
using Content.Shared.NameModifier.EntitySystems;
using Robust.Shared.GameStates;
namespace Content.Shared.NameModifier.Components;
/// <summary>
/// Used to manage modifiers on an entity's name and handle renaming in a way
/// that survives being renamed by multiple systems.
/// </summary>
[RegisterComponent]
[NetworkedComponent, AutoGenerateComponentState]
[Access(typeof(NameModifierSystem))]
public sealed partial class NameModifierComponent : Component
{
/// <summary>
/// The entity's name without any modifiers applied.
/// </summary>
[DataField, AutoNetworkedField]
public string BaseName = string.Empty;
}