diff --git a/Content.Shared/Traits/Assorted/Components/SingerComponent.cs b/Content.Shared/Traits/Assorted/Components/SingerComponent.cs index 9c79166ef6c..f36969e7425 100644 --- a/Content.Shared/Traits/Assorted/Components/SingerComponent.cs +++ b/Content.Shared/Traits/Assorted/Components/SingerComponent.cs @@ -11,6 +11,9 @@ public sealed partial class SingerComponent : Component [DataField(required: true), AutoNetworkedField] public ProtoId Proto = string.Empty; + [DataField(serverOnly: true)] + public EntProtoId? MidiActionId = "ActionHarpyPlayMidi"; + [DataField(serverOnly: true)] public EntityUid? MidiAction; } diff --git a/Content.Shared/Traits/Assorted/Systems/SharedSingerSystem.cs b/Content.Shared/Traits/Assorted/Systems/SharedSingerSystem.cs index f772075dfb5..56f76af9bb0 100644 --- a/Content.Shared/Traits/Assorted/Systems/SharedSingerSystem.cs +++ b/Content.Shared/Traits/Assorted/Systems/SharedSingerSystem.cs @@ -33,17 +33,12 @@ private void OnStartup(Entity ent, ref ComponentStartup args) if (!ProtoMan.TryIndex(ent.Comp.Proto, out var singer)) return; - _actionsSystem.AddAction(ent, ref ent.Comp.MidiAction, singer.MidiActionId); + _actionsSystem.AddAction(ent, ref ent.Comp.MidiAction, ent.Comp.MidiActionId); var instrumentComp = EnsureInstrumentComp(ent); var defaultData = singer.InstrumentList[singer.DefaultInstrument]; _instrument.SetInstrumentProgram(instrumentComp, defaultData.Item1, defaultData.Item2); SetUpSwappableInstrument(ent, singer); - - EntityManager.TryGetComponent(ent.Owner, out var comp); - var entui = new Entity(ent.Owner, comp); - if (singer.MidiUi is { } uiKey && !_ui.IsUiOpen(entui, uiKey)) - _ui.OpenUi(entui, uiKey, entui); } private void OnShutdown(Entity ent, ref ComponentShutdown args) diff --git a/Resources/Prototypes/Entities/Mobs/Species/base.yml b/Resources/Prototypes/Entities/Mobs/Species/base.yml index 271ef0c1bda..c0d23c489c0 100644 --- a/Resources/Prototypes/Entities/Mobs/Species/base.yml +++ b/Resources/Prototypes/Entities/Mobs/Species/base.yml @@ -197,6 +197,9 @@ type: HumanoidMarkingModifierBoundUserInterface enum.StrippingUiKey.Key: type: StrippableBoundUserInterface + enum.InstrumentUiKey.Key: + type: InstrumentBoundUserInterface + requireInputValidation: false - type: Puller - type: Speech speechSounds: Alto