* Predict dumping - This got soaped really fucking hard. - Dumping is predicted, this required disposals to be predicte.d - Disposals required mailing (because it's tightly coupled), and a smidge of other content systems. - I also had to fix a compnetworkgenerator issue at the same time so it wouldn't mispredict. * Fix a bunch of stuff * nasty merge * Some reviews * Some more reviews while I stash * Fix merge * Fix merge * Half of review * Review * re(h)f * lizards * feexes * feex
23 lines
684 B
C#
23 lines
684 B
C#
using Content.Shared.Disposal;
|
|
using Content.Shared.Disposal.Components;
|
|
using Content.Shared.Disposal.Mailing;
|
|
|
|
namespace Content.Client.Disposal.Mailing;
|
|
|
|
public sealed class MailingUnitSystem : SharedMailingUnitSystem
|
|
{
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
SubscribeLocalEvent<MailingUnitComponent, AfterAutoHandleStateEvent>(OnMailingState);
|
|
}
|
|
|
|
private void OnMailingState(Entity<MailingUnitComponent> ent, ref AfterAutoHandleStateEvent args)
|
|
{
|
|
if (UserInterfaceSystem.TryGetOpenUi<MailingUnitBoundUserInterface>(ent.Owner, MailingUnitUiKey.Key, out var bui))
|
|
{
|
|
bui.Refresh(ent);
|
|
}
|
|
}
|
|
}
|