From: Mr. 27 <45323883+Dutch-VanDerLinde@users.noreply.github.com> Date: Thu, 31 Jul 2025 13:22:33 +0000 (-0400) Subject: Allow EmoteSoundsPrototype to have parents (#38890) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=66f64bc9523228e338071dc530926a4ff99dac92;p=space-station-14.git Allow EmoteSoundsPrototype to have parents (#38890) * inital * Update Content.Shared/Chat/Prototypes/EmoteSoundsPrototype.cs Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com> * ProtoId * Unneeded * Update Content.Shared/Chat/Prototypes/EmoteSoundsPrototype.cs * Update Content.Shared/Chat/Prototypes/EmoteSoundsPrototype.cs --------- Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com> --- diff --git a/Content.Shared/Chat/Prototypes/EmoteSoundsPrototype.cs b/Content.Shared/Chat/Prototypes/EmoteSoundsPrototype.cs index 4364e13d84..0138009ef9 100644 --- a/Content.Shared/Chat/Prototypes/EmoteSoundsPrototype.cs +++ b/Content.Shared/Chat/Prototypes/EmoteSoundsPrototype.cs @@ -1,7 +1,6 @@ using Robust.Shared.Audio; using Robust.Shared.Prototypes; -using Robust.Shared.Serialization; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Dictionary; +using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Array; namespace Content.Shared.Chat.Prototypes; @@ -10,11 +9,20 @@ namespace Content.Shared.Chat.Prototypes; /// Different entities may use different sounds collections. /// [Prototype] -public sealed partial class EmoteSoundsPrototype : IPrototype +public sealed partial class EmoteSoundsPrototype : IPrototype, IInheritingPrototype { [IdDataField] public string ID { get; private set; } = default!; + /// + [ParentDataField(typeof(AbstractPrototypeIdArraySerializer))] + public string[]? Parents { get; private set; } + + /// + [AbstractDataField] + [NeverPushInheritance] + public bool Abstract { get; } + /// /// Optional fallback sound that will play if collection /// doesn't have specific sound for this emote id. @@ -32,6 +40,7 @@ public sealed partial class EmoteSoundsPrototype : IPrototype /// /// Collection of emote prototypes and their sounds. /// - [DataField("sounds", customTypeSerializer: typeof(PrototypeIdDictionarySerializer))] - public Dictionary Sounds = new(); + [DataField] + [AlwaysPushInheritance] + public Dictionary, SoundSpecifier> Sounds = new(); }