diff --git a/Content.Server/Instruments/SwappableInstrumentComponent.cs b/Content.Server/Instruments/SwappableInstrumentComponent.cs index f8b2b97a10..6acf43151d 100644 --- a/Content.Server/Instruments/SwappableInstrumentComponent.cs +++ b/Content.Server/Instruments/SwappableInstrumentComponent.cs @@ -11,4 +11,11 @@ public sealed partial class SwappableInstrumentComponent : Component /// [DataField("instrumentList", required: true)] public Dictionary InstrumentList = new(); + + // Frontier: harpy instruments + /// + /// When true, only the instrument entity itself can swap its sound. + /// + [DataField] + public bool OnlySetBySelf; } diff --git a/Content.Server/Instruments/SwappableInstrumentSystem.cs b/Content.Server/Instruments/SwappableInstrumentSystem.cs index 9aef875cd6..81b3b2c100 100644 --- a/Content.Server/Instruments/SwappableInstrumentSystem.cs +++ b/Content.Server/Instruments/SwappableInstrumentSystem.cs @@ -25,6 +25,9 @@ public sealed class SwappableInstrumentSystem : EntitySystem if (!TryComp(uid, out var instrument)) return; + if (component.OnlySetBySelf && uid != args.User) // Frontier: restrict instrument changes + return; // Frontier: restrict instrument changes + var priority = 0; foreach (var entry in component.InstrumentList) { diff --git a/Resources/Prototypes/_DV/Entities/Mobs/Species/harpy.yml b/Resources/Prototypes/_DV/Entities/Mobs/Species/harpy.yml index b6c23584a6..221faf2b77 100644 --- a/Resources/Prototypes/_DV/Entities/Mobs/Species/harpy.yml +++ b/Resources/Prototypes/_DV/Entities/Mobs/Species/harpy.yml @@ -22,6 +22,7 @@ "Piano": {1: 0} "Church Organ": {19: 0} "Harp": {46: 0} + onlySetBySelf: true # Frontier - type: UserInterface interfaces: enum.InstrumentUiKey.Key: