Files
tbd-station-14/Content.Shared/Alert/IAlertClick.cs
chairbender 7a3c281f60 Actions System + UI (#2710)
Co-authored-by: Vera Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
2020-12-13 23:28:20 +01:00

38 lines
962 B
C#

using System;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Serialization;
namespace Content.Shared.Alert
{
/// <summary>
/// Defines what should happen when an alert is clicked.
/// </summary>
public interface IAlertClick : IExposeData
{
/// <summary>
/// Invoked on server side when user clicks an alert.
/// </summary>
/// <param name="args"></param>
void AlertClicked(ClickAlertEventArgs args);
}
public class ClickAlertEventArgs : EventArgs
{
/// <summary>
/// Player clicking the alert
/// </summary>
public readonly IEntity Player;
/// <summary>
/// Alert that was clicked
/// </summary>
public readonly AlertPrototype Alert;
public ClickAlertEventArgs(IEntity player, AlertPrototype alert)
{
Player = player;
Alert = alert;
}
}
}