Disposal mailing (#2194)
* Implement device networking * Implement device configuration menu * Fix device network * Implement disposal mailing unit * Implement base network connection Implement wired and wireless network connection Implement device network metadata * Fix dereference null error * Fix wired network null checks * Change BaseNetworks enum to NetworkUtils class Add PingResponse function to NetworkUtils Change device network file structure * Add doc comments * Apply suggestions from code review Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com> * Add tag validation to disposal mailing unit * Add tag validation to the mailing unit component * Address reviews Change WiredNetwork can connect check Change device networking string literals to constants * Address reviews Revert changes to PowerProvider and PowerReceiver Add new NodeGroup WELP * Fix recursive access to Owner property * Integrate suggested changes * Fix TryGetWireNet acting on NullPowerProvider Fix network connections not checking if their owner has been deleted * Close device network connection when the owning entity got deleted Fix mailing unit not closing the device network connection on remove * Remove GetWireNet from NullPowerProvider Co-authored-by: Julian Giebel <j.giebel@netrocks.info> Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
This commit is contained in:
25
Content.Server/Interfaces/IDeviceNetwork.cs
Normal file
25
Content.Server/Interfaces/IDeviceNetwork.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using Content.Server.GameObjects.EntitySystems.DeviceNetwork;
|
||||
|
||||
namespace Content.Server.Interfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// Package based device network allowing devices to communicate with eachother
|
||||
/// </summary>
|
||||
public interface IDeviceNetwork
|
||||
{
|
||||
/// <summary>
|
||||
/// Registers a device with the device network
|
||||
/// </summary>
|
||||
/// <param name="netId"><see cref="NetworkUtils"/>The id of the network to register with</param>
|
||||
/// <param name="frequency">The frequency the device receives packages on. Wired networks use frequency 0</param>
|
||||
/// <param name="messageHandler">The delegate that gets called when the device receives a message</param>
|
||||
/// <param name="receiveAll">If the device should receive all packages on its frequency or only ones addressed to itself</param>
|
||||
/// <returns></returns>
|
||||
public DeviceNetworkConnection Register(int netId, int frequency, OnReceiveNetMessage messageHandler, bool receiveAll = false);
|
||||
/// <see cref="Register(int, int, OnReceiveNetMessage, bool)"/>
|
||||
public DeviceNetworkConnection Register(int netId, OnReceiveNetMessage messageHandler, bool receiveAll = false);
|
||||
|
||||
public void Update();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user