* 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
31 lines
881 B
C#
31 lines
881 B
C#
using Content.Shared.DeviceNetwork;
|
|
using Content.Shared.DeviceNetwork.Events;
|
|
using Robust.Shared.GameObjects;
|
|
using Robust.Shared.Reflection;
|
|
using Content.Shared.DeviceNetwork.Components;
|
|
|
|
namespace Content.IntegrationTests.Tests.DeviceNetwork;
|
|
|
|
[Reflect(false)]
|
|
public sealed class DeviceNetworkTestSystem : EntitySystem
|
|
{
|
|
public NetworkPayload LastPayload = default;
|
|
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
|
|
SubscribeLocalEvent<DeviceNetworkComponent, DeviceNetworkPacketEvent>(OnPacketReceived);
|
|
}
|
|
|
|
public void SendBaselineTestEvent(EntityUid uid)
|
|
{
|
|
RaiseLocalEvent(uid, new DeviceNetworkPacketEvent(0, "", 0, "", uid, new NetworkPayload()));
|
|
}
|
|
|
|
private void OnPacketReceived(EntityUid uid, DeviceNetworkComponent component, DeviceNetworkPacketEvent args)
|
|
{
|
|
LastPayload = args.Data;
|
|
}
|
|
}
|