Minor device network changes (#2499)
* Device network changes * Update too * Update Content.Server/GameObjects/EntitySystems/DeviceNetworkSystem.cs Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com> Co-authored-by: Víctor Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
This commit is contained in:
@@ -13,6 +13,7 @@ using Content.Server.GameObjects.EntitySystems.DoAfter;
|
||||
using Content.Server.Interfaces;
|
||||
using Content.Server.Interfaces.GameObjects.Components.Items;
|
||||
using Content.Server.Utility;
|
||||
using Content.Shared.GameObjects.Components;
|
||||
using Content.Shared.GameObjects.Components.Body;
|
||||
using Content.Shared.GameObjects.Components.Disposal;
|
||||
using Content.Shared.GameObjects.EntitySystems;
|
||||
@@ -603,12 +604,7 @@ namespace Content.Server.GameObjects.Components.Disposal
|
||||
UserInterface.OnReceiveMessage += OnUiReceiveMessage;
|
||||
}
|
||||
|
||||
var network = IoCManager.Resolve<IDeviceNetwork>();
|
||||
_connection = new WiredNetworkConnection(OnReceiveNetMessage, false, Owner);
|
||||
|
||||
if (Owner.TryGetComponent<ConfigurationComponent>(out var configuration))
|
||||
configuration.OnConfigUpdate += OnConfigUpdate;
|
||||
|
||||
UpdateInterface();
|
||||
}
|
||||
|
||||
@@ -673,6 +669,9 @@ namespace Content.Server.GameObjects.Components.Disposal
|
||||
|
||||
switch (message)
|
||||
{
|
||||
case SharedConfigurationComponent.ConfigUpdatedComponentMessage msg:
|
||||
OnConfigUpdate(msg.Config);
|
||||
break;
|
||||
case RelayMovementEntityMessage msg:
|
||||
if (!msg.Entity.TryGetComponent(out HandsComponent? hands) ||
|
||||
hands.Count == 0 ||
|
||||
@@ -745,7 +744,7 @@ namespace Content.Server.GameObjects.Components.Disposal
|
||||
return false;
|
||||
}
|
||||
|
||||
// Duplicated code here, not sure how else to get actor inside to make UserInterface happy.
|
||||
// Duplicated code here, not sure how else to get actor inside to make UserInterface happy.
|
||||
|
||||
if (IsValidInteraction(eventArgs))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user