Files
tbd-station-14/Content.Server/_Offbrand/MMI/MMIExtractorEui.cs
Janet Blackquill 5fa17e22a1 De-MPL Offbrand
2025-09-27 22:43:24 -04:00

31 lines
773 B
C#

using Content.Server.EUI;
using Content.Shared._Offbrand.MMI;
using Content.Shared.DoAfter;
using Content.Shared.Eui;
namespace Content.Server._Offbrand.MMI;
public sealed class MMIExtractorEui : BaseEui
{
private readonly MMIExtractorSystem _mmiExtractor;
private readonly DoAfterId _doAfterId;
public MMIExtractorEui(MMIExtractorSystem mmiExtractor, DoAfterId doAfterId)
{
_mmiExtractor = mmiExtractor;
_doAfterId = doAfterId;
}
public override void HandleMessage(EuiMessageBase msg)
{
base.HandleMessage(msg);
if (msg is not MMIExtractorMessage choice || !choice.Accepted)
_mmiExtractor.Decline(_doAfterId);
else
_mmiExtractor.Accept(_doAfterId);
Close();
}
}