using Content.Shared.Actions; using Robust.Shared.Prototypes; using Robust.Shared.Random; namespace Content.Shared.Language.Systems; public abstract class SharedLanguageSystem : EntitySystem { /// /// The language used as a fallback in cases where an entity suddenly becomes a language speaker (e.g. the usage of make-sentient) /// [ValidatePrototypeId] public static readonly string FallbackLanguagePrototype = "GalacticCommon"; /// /// The language whose speakers are assumed to understand and speak every language. Should never be added directly. /// [ValidatePrototypeId] public static readonly string UniversalPrototype = "Universal"; /// /// A cached instance of /// public static LanguagePrototype Universal { get; private set; } = default!; [Dependency] protected readonly IPrototypeManager _prototype = default!; [Dependency] protected readonly IRobustRandom _random = default!; public override void Initialize() { Universal = _prototype.Index("Universal"); } public LanguagePrototype? GetLanguagePrototype(string id) { _prototype.TryIndex(id, out var proto); return proto; } }