using Content.Shared.Popups; namespace Content.Server.Destructible.Thresholds.Behaviors; /// /// Shows a popup for everyone. /// [DataDefinition] public sealed partial class PopupBehavior : IThresholdBehavior { /// /// Locale id of the popup message. /// [DataField("popup", required: true)] public string Popup; /// /// Type of popup to show. /// [DataField("popupType")] public PopupType PopupType; public void Execute(EntityUid uid, DestructibleSystem system, EntityUid? cause = null) { var popup = system.EntityManager.System(); // popup is placed at coords since the entity could be deleted after, no more popup then var coords = system.EntityManager.GetComponent(uid).Coordinates; popup.PopupCoordinates(Loc.GetString(Popup), coords, PopupType); } }