mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
Move INetManager dependency from PrototypeManager to Server/ClientPrototypeManager
This commit is contained in:
@@ -19,6 +19,7 @@ namespace Robust.Client.Prototypes
|
||||
public sealed class ClientPrototypeManager : PrototypeManager
|
||||
{
|
||||
[Dependency] private readonly IClyde _clyde = default!;
|
||||
[Dependency] private readonly INetManager _netManager = default!;
|
||||
|
||||
private readonly List<FileSystemWatcher> _watchers = new();
|
||||
private readonly TimeSpan _reloadDelay = TimeSpan.FromMilliseconds(10);
|
||||
@@ -29,7 +30,7 @@ namespace Robust.Client.Prototypes
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
NetManager.RegisterNetMessage<MsgReloadPrototypes>(MsgReloadPrototypes.NAME, accept: NetMessageAccept.Server);
|
||||
_netManager.RegisterNetMessage<MsgReloadPrototypes>(MsgReloadPrototypes.NAME, accept: NetMessageAccept.Server);
|
||||
|
||||
_clyde.OnWindowFocused += WindowFocusedChanged;
|
||||
|
||||
@@ -56,9 +57,9 @@ namespace Robust.Client.Prototypes
|
||||
#if !FULL_RELEASE
|
||||
var sw = Stopwatch.StartNew();
|
||||
|
||||
var msg = NetManager.CreateNetMessage<MsgReloadPrototypes>();
|
||||
var msg = _netManager.CreateNetMessage<MsgReloadPrototypes>();
|
||||
msg.Paths = _reloadQueue.ToArray();
|
||||
NetManager.ClientSendMessage(msg);
|
||||
_netManager.ClientSendMessage(msg);
|
||||
|
||||
ReloadPrototypes(_reloadQueue);
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ namespace Robust.Server.Prototypes
|
||||
{
|
||||
[Dependency] private readonly IPlayerManager _playerManager = default!;
|
||||
[Dependency] private readonly IConGroupController _conGroups = default!;
|
||||
[Dependency] private readonly INetManager _netManager = default!;
|
||||
|
||||
public ServerPrototypeManager()
|
||||
{
|
||||
@@ -23,7 +24,7 @@ namespace Robust.Server.Prototypes
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
NetManager.RegisterNetMessage<MsgReloadPrototypes>(MsgReloadPrototypes.NAME, HandleReloadPrototypes, NetMessageAccept.Server);
|
||||
_netManager.RegisterNetMessage<MsgReloadPrototypes>(MsgReloadPrototypes.NAME, HandleReloadPrototypes, NetMessageAccept.Server);
|
||||
}
|
||||
|
||||
private void HandleReloadPrototypes(MsgReloadPrototypes msg)
|
||||
|
||||
@@ -200,7 +200,6 @@ namespace Robust.Shared.Prototypes
|
||||
[Dependency] public readonly IResourceManager Resources = default!;
|
||||
[Dependency] private readonly IEntityManager _entityManager = default!;
|
||||
[Dependency] public readonly ITaskManager TaskManager = default!;
|
||||
[Dependency] public readonly INetManager NetManager = default!;
|
||||
[Dependency] private readonly ISerializationManager _serializationManager = default!;
|
||||
|
||||
private readonly Dictionary<string, Type> prototypeTypes = new();
|
||||
|
||||
Reference in New Issue
Block a user