Predict dumping (#32394)
* 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
This commit is contained in:
@@ -1,31 +1,30 @@
|
||||
using Content.Server.DeviceNetwork.Components;
|
||||
using Content.Server.DeviceNetwork.Systems;
|
||||
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
|
||||
namespace Content.IntegrationTests.Tests.DeviceNetwork;
|
||||
|
||||
[Reflect(false)]
|
||||
public sealed class DeviceNetworkTestSystem : EntitySystem
|
||||
{
|
||||
[Reflect(false)]
|
||||
public sealed class DeviceNetworkTestSystem : EntitySystem
|
||||
public NetworkPayload LastPayload = default;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
public NetworkPayload LastPayload = default;
|
||||
base.Initialize();
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
SubscribeLocalEvent<DeviceNetworkComponent, DeviceNetworkPacketEvent>(OnPacketReceived);
|
||||
}
|
||||
|
||||
SubscribeLocalEvent<DeviceNetworkComponent, DeviceNetworkPacketEvent>(OnPacketReceived);
|
||||
}
|
||||
public void SendBaselineTestEvent(EntityUid uid)
|
||||
{
|
||||
RaiseLocalEvent(uid, new DeviceNetworkPacketEvent(0, "", 0, "", uid, new NetworkPayload()));
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
private void OnPacketReceived(EntityUid uid, DeviceNetworkComponent component, DeviceNetworkPacketEvent args)
|
||||
{
|
||||
LastPayload = args.Data;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user