| 1234567891011121314151617181920212223242526 |
- using Robust.Shared.Serialization.Manager;
- namespace Content.Shared.Traits.Assorted;
- /// <summary>
- /// This handles removing accents when using the accentless trait.
- /// </summary>
- public sealed class AccentlessSystem : EntitySystem
- {
- /// <inheritdoc/>
- public override void Initialize()
- {
- base.Initialize();
- SubscribeLocalEvent<AccentlessComponent, ComponentStartup>(RemoveAccents);
- }
- private void RemoveAccents(EntityUid uid, AccentlessComponent component, ComponentStartup args)
- {
- foreach (var accent in component.RemovedAccents.Values)
- {
- var accentComponent = accent.Component;
- RemComp(uid, accentComponent.GetType());
- }
- }
- }
|