mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-06-09 10:06:34 +02:00
[Dependency] source generator part 2 (#6550)
* [Dependency] source generator No more reflection, no more codegen at runtime Also various changes to Roslyn helpers to make this easier to write. Requires all types with dependencies to be partial and not have readonly dependency fields. An analyzer enforces this at warning level, the previous injection strategies have remained in the code *for now* as a fallback. No fallback is available for [field: Dependency] properties, due to a Roslyn bug. Code Fixes exist. We love Roslyn * Apply dependencies generator changes to all code * Release notes * Preprocessor got hands * Handle nullable dependencies These are bad but gotta deal with it. * Apply suggestions from code review Co-authored-by: Moony <moony@hellomouse.net> * Fine, let's not use collection expressions --------- Co-authored-by: Moony <moony@hellomouse.net>
This commit is contained in:
committed by
GitHub
parent
b4eb85ad3c
commit
83c2a1be11
@@ -10,7 +10,7 @@ namespace Robust.Client.WebView.Cef
|
||||
{
|
||||
internal partial class WebViewManagerCef
|
||||
{
|
||||
[Dependency] private readonly IClydeInternal _clyde = default!;
|
||||
[Dependency] private IClydeInternal _clyde = default!;
|
||||
|
||||
private readonly List<WebViewWindowImpl> _browserWindows = new();
|
||||
|
||||
|
||||
@@ -132,8 +132,8 @@ namespace Robust.Client.WebView.Cef
|
||||
[Key.Pause] = VKEY_PAUSE,
|
||||
};
|
||||
|
||||
[Dependency] private readonly IClyde _clyde = default!;
|
||||
[Dependency] private readonly IInputManager _inputMgr = default!;
|
||||
[Dependency] private IClyde _clyde = default!;
|
||||
[Dependency] private IInputManager _inputMgr = default!;
|
||||
|
||||
private readonly WebViewManagerCef _manager;
|
||||
public readonly WebViewControl Owner;
|
||||
|
||||
@@ -24,14 +24,14 @@ namespace Robust.Client.WebView.Cef
|
||||
|
||||
private CefApp _app = default!;
|
||||
|
||||
[Dependency] private readonly IDependencyCollection _dependencyCollection = default!;
|
||||
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
|
||||
[Dependency] private readonly IGameControllerInternal _gameController = default!;
|
||||
[Dependency] private readonly IResourceManagerInternal _resourceManager = default!;
|
||||
[Dependency] private readonly IClientConsoleHost _consoleHost = default!;
|
||||
[Dependency] private readonly IConfigurationManager _cfg = default!;
|
||||
[Dependency] private readonly ILogManager _logManager = default!;
|
||||
[Dependency] private readonly ILocalizationManager _localization = default!;
|
||||
[Dependency] private IDependencyCollection _dependencyCollection = default!;
|
||||
[Dependency] private IPrototypeManager _prototypeManager = default!;
|
||||
[Dependency] private IGameControllerInternal _gameController = default!;
|
||||
[Dependency] private IResourceManagerInternal _resourceManager = default!;
|
||||
[Dependency] private IClientConsoleHost _consoleHost = default!;
|
||||
[Dependency] private IConfigurationManager _cfg = default!;
|
||||
[Dependency] private ILogManager _logManager = default!;
|
||||
[Dependency] private ILocalizationManager _localization = default!;
|
||||
|
||||
private ISawmill _sawmill = default!;
|
||||
|
||||
|
||||
@@ -9,9 +9,9 @@ namespace Robust.Client.WebView
|
||||
/// <summary>
|
||||
/// An UI control that presents web content.
|
||||
/// </summary>
|
||||
public sealed class WebViewControl : Control, IWebViewControl, IRawInputControl
|
||||
public sealed partial class WebViewControl : Control, IWebViewControl, IRawInputControl
|
||||
{
|
||||
[Dependency] private readonly IWebViewManagerInternal _webViewManager = default!;
|
||||
[Dependency] private IWebViewManagerInternal _webViewManager = default!;
|
||||
|
||||
private readonly IWebViewControlImpl _controlImpl;
|
||||
private bool _alwaysActive;
|
||||
|
||||
@@ -15,10 +15,10 @@ namespace Robust.Client.Audio;
|
||||
|
||||
internal sealed partial class AudioManager : IAudioInternal
|
||||
{
|
||||
[Shared.IoC.Dependency] private readonly IConfigurationManager _cfg = default!;
|
||||
[Shared.IoC.Dependency] private readonly ILogManager _logMan = default!;
|
||||
[Shared.IoC.Dependency] private readonly IReloadManager _reload = default!;
|
||||
[Shared.IoC.Dependency] private readonly IResourceCache _cache = default!;
|
||||
[Shared.IoC.Dependency] private IConfigurationManager _cfg = default!;
|
||||
[Shared.IoC.Dependency] private ILogManager _logMan = default!;
|
||||
[Shared.IoC.Dependency] private IReloadManager _reload = default!;
|
||||
[Shared.IoC.Dependency] private IResourceCache _cache = default!;
|
||||
|
||||
private Thread? _gameThread;
|
||||
|
||||
|
||||
@@ -33,16 +33,16 @@ public sealed partial class AudioSystem : SharedAudioSystem
|
||||
* but exposing the whole thing in an easy way is a lot of effort.
|
||||
*/
|
||||
|
||||
[Dependency] private readonly IPlayerManager _playerManager = default!;
|
||||
[Dependency] private readonly IReplayRecordingManager _replayRecording = default!;
|
||||
[Dependency] private readonly IEyeManager _eyeManager = default!;
|
||||
[Dependency] private readonly IResourceCache _resourceCache = default!;
|
||||
[Dependency] private readonly IParallelManager _parMan = default!;
|
||||
[Dependency] private readonly IRuntimeLog _runtimeLog = default!;
|
||||
[Dependency] private readonly IAudioInternal _audio = default!;
|
||||
[Dependency] private readonly SharedMapSystem _maps = default!;
|
||||
[Dependency] private readonly SharedTransformSystem _xformSys = default!;
|
||||
[Dependency] private readonly SharedPhysicsSystem _physics = default!;
|
||||
[Dependency] private IPlayerManager _playerManager = default!;
|
||||
[Dependency] private IReplayRecordingManager _replayRecording = default!;
|
||||
[Dependency] private IEyeManager _eyeManager = default!;
|
||||
[Dependency] private IResourceCache _resourceCache = default!;
|
||||
[Dependency] private IParallelManager _parMan = default!;
|
||||
[Dependency] private IRuntimeLog _runtimeLog = default!;
|
||||
[Dependency] private IAudioInternal _audio = default!;
|
||||
[Dependency] private SharedMapSystem _maps = default!;
|
||||
[Dependency] private SharedTransformSystem _xformSys = default!;
|
||||
[Dependency] private SharedPhysicsSystem _physics = default!;
|
||||
|
||||
/// <summary>
|
||||
/// An optional method that, if provided, will override the behavior of <see cref="ProcessStream"/>.
|
||||
|
||||
@@ -4,9 +4,9 @@ using Robust.Shared.Localization;
|
||||
|
||||
namespace Robust.Client.Audio.Midi.Commands;
|
||||
|
||||
public sealed class MidiPanicCommand : LocalizedCommands
|
||||
public sealed partial class MidiPanicCommand : LocalizedCommands
|
||||
{
|
||||
[Dependency] private readonly IMidiManager _midiManager = default!;
|
||||
[Dependency] private IMidiManager _midiManager = default!;
|
||||
|
||||
public override string Command => "midipanic";
|
||||
|
||||
|
||||
@@ -31,15 +31,15 @@ internal sealed partial class MidiManager : IMidiManager
|
||||
{
|
||||
public const string SoundfontEnvironmentVariable = "ROBUST_SOUNDFONT_OVERRIDE";
|
||||
|
||||
[Dependency] private readonly IGameTiming _timing = default!;
|
||||
[Dependency] private readonly IResourceManager _resourceManager = default!;
|
||||
[Dependency] private readonly IEntityManager _entityManager = default!;
|
||||
[Dependency] private readonly IConfigurationManager _cfgMan = default!;
|
||||
[Dependency] private readonly IAudioInternal _audio = default!;
|
||||
[Dependency] private readonly ITaskManager _taskManager = default!;
|
||||
[Dependency] private readonly ILogManager _logger = default!;
|
||||
[Dependency] private readonly IParallelManager _parallel = default!;
|
||||
[Dependency] private readonly IRuntimeLog _runtime = default!;
|
||||
[Dependency] private IGameTiming _timing = default!;
|
||||
[Dependency] private IResourceManager _resourceManager = default!;
|
||||
[Dependency] private IEntityManager _entityManager = default!;
|
||||
[Dependency] private IConfigurationManager _cfgMan = default!;
|
||||
[Dependency] private IAudioInternal _audio = default!;
|
||||
[Dependency] private ITaskManager _taskManager = default!;
|
||||
[Dependency] private ILogManager _logger = default!;
|
||||
[Dependency] private IParallelManager _parallel = default!;
|
||||
[Dependency] private IRuntimeLog _runtime = default!;
|
||||
|
||||
private AudioSystem _audioSys = default!;
|
||||
private SharedPhysicsSystem _physics = default!;
|
||||
|
||||
@@ -12,12 +12,12 @@ namespace Robust.Client.Commands;
|
||||
/// <summary>
|
||||
/// Shows a debug overlay for audio sources.
|
||||
/// </summary>
|
||||
public sealed class ShowAudioCommand : LocalizedCommands
|
||||
public sealed partial class ShowAudioCommand : LocalizedCommands
|
||||
{
|
||||
[Dependency] private readonly IResourceCache _client = default!;
|
||||
[Dependency] private readonly IEntityManager _entManager = default!;
|
||||
[Dependency] private readonly IOverlayManager _overlayManager = default!;
|
||||
[Dependency] private readonly IPlayerManager _playerMgr = default!;
|
||||
[Dependency] private IResourceCache _client = default!;
|
||||
[Dependency] private IEntityManager _entManager = default!;
|
||||
[Dependency] private IOverlayManager _overlayManager = default!;
|
||||
[Dependency] private IPlayerManager _playerMgr = default!;
|
||||
public override string Command => "showaudio";
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
|
||||
+10
-10
@@ -20,17 +20,17 @@ using Robust.Shared.Utility;
|
||||
namespace Robust.Client
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public sealed class BaseClient : IBaseClient, IPostInjectInit
|
||||
public sealed partial class BaseClient : IBaseClient, IPostInjectInit
|
||||
{
|
||||
[Dependency] private readonly IClientNetManager _net = default!;
|
||||
[Dependency] private readonly IPlayerManager _playMan = default!;
|
||||
[Dependency] private readonly IClientNetConfigurationManager _configManager = default!;
|
||||
[Dependency] private readonly IClientEntityManager _entityManager = default!;
|
||||
[Dependency] private readonly IMapManager _mapManager = default!;
|
||||
[Dependency] private readonly IDiscordRichPresence _discord = default!;
|
||||
[Dependency] private readonly IGameTiming _timing = default!;
|
||||
[Dependency] private readonly IClientGameStateManager _gameStates = default!;
|
||||
[Dependency] private readonly ILogManager _logMan = default!;
|
||||
[Dependency] private IClientNetManager _net = default!;
|
||||
[Dependency] private IPlayerManager _playMan = default!;
|
||||
[Dependency] private IClientNetConfigurationManager _configManager = default!;
|
||||
[Dependency] private IClientEntityManager _entityManager = default!;
|
||||
[Dependency] private IMapManager _mapManager = default!;
|
||||
[Dependency] private IDiscordRichPresence _discord = default!;
|
||||
[Dependency] private IGameTiming _timing = default!;
|
||||
[Dependency] private IClientGameStateManager _gameStates = default!;
|
||||
[Dependency] private ILogManager _logMan = default!;
|
||||
|
||||
/// <inheritdoc />
|
||||
public ushort DefaultPort { get; } = 1212;
|
||||
|
||||
@@ -8,9 +8,9 @@ using Robust.Shared.Physics;
|
||||
|
||||
namespace Robust.Client.ComponentTrees;
|
||||
|
||||
public sealed class SpriteTreeSystem : ComponentTreeSystem<SpriteTreeComponent, SpriteComponent>
|
||||
public sealed partial class SpriteTreeSystem : ComponentTreeSystem<SpriteTreeComponent, SpriteComponent>
|
||||
{
|
||||
[Dependency] private readonly SpriteSystem _sprite = default!;
|
||||
[Dependency] private SpriteSystem _sprite = default!;
|
||||
|
||||
#region Component Tree Overrides
|
||||
protected override bool DoFrameUpdate => true;
|
||||
|
||||
@@ -10,11 +10,11 @@ using Robust.Shared.Utility;
|
||||
|
||||
namespace Robust.Client.Configuration;
|
||||
|
||||
internal sealed class ClientNetConfigurationManager : NetConfigurationManager, IClientNetConfigurationManager
|
||||
internal sealed partial class ClientNetConfigurationManager : NetConfigurationManager, IClientNetConfigurationManager
|
||||
{
|
||||
[Dependency] private readonly IBaseClient _client = default!;
|
||||
[Dependency] private readonly IGameTiming _timing = default!;
|
||||
[Dependency] private readonly IReplayRecordingManager _replay = default!;
|
||||
[Dependency] private IBaseClient _client = default!;
|
||||
[Dependency] private IGameTiming _timing = default!;
|
||||
[Dependency] private IReplayRecordingManager _replay = default!;
|
||||
|
||||
private bool _receivedInitialNwVars = false;
|
||||
|
||||
|
||||
@@ -50,11 +50,11 @@ namespace Robust.Client.Console
|
||||
[Virtual]
|
||||
internal partial class ClientConsoleHost : ConsoleHost, IClientConsoleHost, IConsoleHostInternal, IPostInjectInit
|
||||
{
|
||||
[Dependency] private readonly IClientConGroupController _conGroup = default!;
|
||||
[Dependency] private readonly IConfigurationManager _cfg = default!;
|
||||
[Dependency] private readonly IPlayerManager _player = default!;
|
||||
[Dependency] private readonly IBaseClient _client = default!;
|
||||
[Dependency] private readonly ILogManager _logMan = default!;
|
||||
[Dependency] private IClientConGroupController _conGroup = default!;
|
||||
[Dependency] private IConfigurationManager _cfg = default!;
|
||||
[Dependency] private IPlayerManager _player = default!;
|
||||
[Dependency] private IBaseClient _client = default!;
|
||||
[Dependency] private ILogManager _logMan = default!;
|
||||
|
||||
[ViewVariables] private readonly Dictionary<string, IConsoleCommand> _availableServerCommands = new();
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@ using Robust.Shared.IoC;
|
||||
namespace Robust.Client.Console.Commands
|
||||
{
|
||||
[UsedImplicitly]
|
||||
internal sealed class AddCompCommand : LocalizedCommands
|
||||
internal sealed partial class AddCompCommand : LocalizedCommands
|
||||
{
|
||||
[Dependency] private readonly IComponentFactory _componentFactory = default!;
|
||||
[Dependency] private readonly IEntityManager _entityManager = default!;
|
||||
[Dependency] private IComponentFactory _componentFactory = default!;
|
||||
[Dependency] private IEntityManager _entityManager = default!;
|
||||
|
||||
public override string Command => "addcompc";
|
||||
|
||||
@@ -32,10 +32,10 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
|
||||
[UsedImplicitly]
|
||||
internal sealed class RemoveCompCommand : LocalizedCommands
|
||||
internal sealed partial class RemoveCompCommand : LocalizedCommands
|
||||
{
|
||||
[Dependency] private readonly IComponentFactory _componentFactory = default!;
|
||||
[Dependency] private readonly IEntityManager _entityManager = default!;
|
||||
[Dependency] private IComponentFactory _componentFactory = default!;
|
||||
[Dependency] private IEntityManager _entityManager = default!;
|
||||
|
||||
public override string Command => "rmcompc";
|
||||
|
||||
|
||||
@@ -7,10 +7,10 @@ using Robust.Shared.IoC;
|
||||
namespace Robust.Client.Console.Commands
|
||||
{
|
||||
[UsedImplicitly]
|
||||
internal sealed class ClientSpawnCommand : LocalizedCommands
|
||||
internal sealed partial class ClientSpawnCommand : LocalizedCommands
|
||||
{
|
||||
[Dependency] private readonly IPlayerManager _playerManager = default!;
|
||||
[Dependency] private readonly IEntityManager _entityManager = default!;
|
||||
[Dependency] private IPlayerManager _playerManager = default!;
|
||||
[Dependency] private IEntityManager _entityManager = default!;
|
||||
|
||||
public override string Command => "cspawn";
|
||||
|
||||
|
||||
@@ -34,9 +34,9 @@ using static Robust.Client.UserInterface.Controls.BoxContainer;
|
||||
|
||||
namespace Robust.Client.Console.Commands
|
||||
{
|
||||
internal sealed class DumpEntitiesCommand : LocalizedCommands
|
||||
internal sealed partial class DumpEntitiesCommand : LocalizedCommands
|
||||
{
|
||||
[Dependency] private readonly IEntityManager _entityManager = default!;
|
||||
[Dependency] private IEntityManager _entityManager = default!;
|
||||
|
||||
public override string Command => "dumpentities";
|
||||
|
||||
@@ -50,9 +50,9 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class GetComponentRegistrationCommand : LocalizedCommands
|
||||
internal sealed partial class GetComponentRegistrationCommand : LocalizedCommands
|
||||
{
|
||||
[Dependency] private readonly IComponentFactory _componentFactory = default!;
|
||||
[Dependency] private IComponentFactory _componentFactory = default!;
|
||||
|
||||
|
||||
public override string Command => "getcomponentregistration";
|
||||
@@ -89,9 +89,9 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class ToggleMonitorCommand : LocalizedCommands
|
||||
internal sealed partial class ToggleMonitorCommand : LocalizedCommands
|
||||
{
|
||||
[Dependency] private readonly IUserInterfaceManager _uiMgr = default!;
|
||||
[Dependency] private IUserInterfaceManager _uiMgr = default!;
|
||||
|
||||
|
||||
public override string Command => "monitor";
|
||||
@@ -173,9 +173,9 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class ShowPositionsCommand : LocalizedEntityCommands
|
||||
internal sealed partial class ShowPositionsCommand : LocalizedEntityCommands
|
||||
{
|
||||
[Dependency] private readonly DebugDrawingSystem _debugDrawing = default!;
|
||||
[Dependency] private DebugDrawingSystem _debugDrawing = default!;
|
||||
|
||||
public override string Command => "showpos";
|
||||
|
||||
@@ -185,9 +185,9 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class ShowRotationsCommand : LocalizedEntityCommands
|
||||
internal sealed partial class ShowRotationsCommand : LocalizedEntityCommands
|
||||
{
|
||||
[Dependency] private readonly DebugDrawingSystem _debugDrawing = default!;
|
||||
[Dependency] private DebugDrawingSystem _debugDrawing = default!;
|
||||
|
||||
public override string Command => "showrot";
|
||||
|
||||
@@ -197,9 +197,9 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class ShowVelocitiesCommand : LocalizedEntityCommands
|
||||
internal sealed partial class ShowVelocitiesCommand : LocalizedEntityCommands
|
||||
{
|
||||
[Dependency] private readonly DebugDrawingSystem _debugDrawing = default!;
|
||||
[Dependency] private DebugDrawingSystem _debugDrawing = default!;
|
||||
|
||||
public override string Command => "showvel";
|
||||
|
||||
@@ -209,9 +209,9 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class ShowAngularVelocitiesCommand : LocalizedEntityCommands
|
||||
internal sealed partial class ShowAngularVelocitiesCommand : LocalizedEntityCommands
|
||||
{
|
||||
[Dependency] private readonly DebugDrawingSystem _debugDrawing = default!;
|
||||
[Dependency] private DebugDrawingSystem _debugDrawing = default!;
|
||||
|
||||
public override string Command => "showangvel";
|
||||
|
||||
@@ -222,9 +222,9 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
internal sealed class ShowRayCommand : LocalizedCommands
|
||||
internal sealed partial class ShowRayCommand : LocalizedCommands
|
||||
{
|
||||
[Dependency] private readonly IEntitySystemManager _entitySystems = default!;
|
||||
[Dependency] private IEntitySystemManager _entitySystems = default!;
|
||||
|
||||
public override string Command => "showrays";
|
||||
|
||||
@@ -250,9 +250,9 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
#endif
|
||||
|
||||
internal sealed class DisconnectCommand : LocalizedCommands
|
||||
internal sealed partial class DisconnectCommand : LocalizedCommands
|
||||
{
|
||||
[Dependency] private readonly IClientNetManager _netManager = default!;
|
||||
[Dependency] private IClientNetManager _netManager = default!;
|
||||
|
||||
public override string Command => "disconnect";
|
||||
|
||||
@@ -262,9 +262,9 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class EntityInfoCommand : LocalizedCommands
|
||||
internal sealed partial class EntityInfoCommand : LocalizedCommands
|
||||
{
|
||||
[Dependency] private readonly IEntityManager _entityManager = default!;
|
||||
[Dependency] private IEntityManager _entityManager = default!;
|
||||
|
||||
public override string Command => "entfo";
|
||||
|
||||
@@ -313,9 +313,9 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class SnapGridGetCell : LocalizedEntityCommands
|
||||
internal sealed partial class SnapGridGetCell : LocalizedEntityCommands
|
||||
{
|
||||
[Dependency] private readonly SharedMapSystem _map = default!;
|
||||
[Dependency] private SharedMapSystem _map = default!;
|
||||
|
||||
public override string Command => "sggcell";
|
||||
|
||||
@@ -358,9 +358,9 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class SetPlayerName : LocalizedCommands
|
||||
internal sealed partial class SetPlayerName : LocalizedCommands
|
||||
{
|
||||
[Dependency] private readonly IBaseClient _baseClient = default!;
|
||||
[Dependency] private IBaseClient _baseClient = default!;
|
||||
|
||||
public override string Command => "overrideplayername";
|
||||
|
||||
@@ -378,10 +378,10 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class LoadResource : LocalizedCommands
|
||||
internal sealed partial class LoadResource : LocalizedCommands
|
||||
{
|
||||
[Dependency] private readonly IResourceCache _res = default!;
|
||||
[Dependency] private readonly IReflectionManager _reflection = default!;
|
||||
[Dependency] private IResourceCache _res = default!;
|
||||
[Dependency] private IReflectionManager _reflection = default!;
|
||||
|
||||
public override string Command => "ldrsc";
|
||||
|
||||
@@ -415,10 +415,10 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class ReloadResource : LocalizedCommands
|
||||
internal sealed partial class ReloadResource : LocalizedCommands
|
||||
{
|
||||
[Dependency] private readonly IResourceCache _res = default!;
|
||||
[Dependency] private readonly IReflectionManager _reflection = default!;
|
||||
[Dependency] private IResourceCache _res = default!;
|
||||
[Dependency] private IReflectionManager _reflection = default!;
|
||||
|
||||
public override string Command => "rldrsc";
|
||||
|
||||
@@ -448,9 +448,9 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class GridTileCount : LocalizedEntityCommands
|
||||
internal sealed partial class GridTileCount : LocalizedEntityCommands
|
||||
{
|
||||
[Dependency] private readonly SharedMapSystem _map = default!;
|
||||
[Dependency] private SharedMapSystem _map = default!;
|
||||
|
||||
public override string Command => "gridtc";
|
||||
|
||||
@@ -480,10 +480,10 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class GuiDumpCommand : LocalizedCommands
|
||||
internal sealed partial class GuiDumpCommand : LocalizedCommands
|
||||
{
|
||||
[Dependency] private readonly IUserInterfaceManager _ui = default!;
|
||||
[Dependency] private readonly IResourceManager _resManager = default!;
|
||||
[Dependency] private IUserInterfaceManager _ui = default!;
|
||||
[Dependency] private IResourceManager _resManager = default!;
|
||||
|
||||
public override string Command => "guidump";
|
||||
|
||||
@@ -628,9 +628,9 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class SetClipboardCommand : LocalizedCommands
|
||||
internal sealed partial class SetClipboardCommand : LocalizedCommands
|
||||
{
|
||||
[Dependency] private readonly IClipboardManager _clipboard = default!;
|
||||
[Dependency] private IClipboardManager _clipboard = default!;
|
||||
|
||||
public override string Command => "setclipboard";
|
||||
|
||||
@@ -640,9 +640,9 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class GetClipboardCommand : LocalizedCommands
|
||||
internal sealed partial class GetClipboardCommand : LocalizedCommands
|
||||
{
|
||||
[Dependency] private readonly IClipboardManager _clipboard = default!;
|
||||
[Dependency] private IClipboardManager _clipboard = default!;
|
||||
|
||||
public override string Command => "getclipboard";
|
||||
|
||||
@@ -652,9 +652,9 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class ToggleLight : LocalizedCommands
|
||||
internal sealed partial class ToggleLight : LocalizedCommands
|
||||
{
|
||||
[Dependency] private readonly ILightManager _light = default!;
|
||||
[Dependency] private ILightManager _light = default!;
|
||||
|
||||
public override string Command => "togglelight";
|
||||
|
||||
@@ -665,9 +665,9 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class ToggleFOV : LocalizedCommands
|
||||
internal sealed partial class ToggleFOV : LocalizedCommands
|
||||
{
|
||||
[Dependency] private readonly IEyeManager _eye = default!;
|
||||
[Dependency] private IEyeManager _eye = default!;
|
||||
|
||||
public override string Command => "togglefov";
|
||||
|
||||
@@ -677,9 +677,9 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class ToggleHardFOV : LocalizedCommands
|
||||
internal sealed partial class ToggleHardFOV : LocalizedCommands
|
||||
{
|
||||
[Dependency] private readonly ILightManager _light = default!;
|
||||
[Dependency] private ILightManager _light = default!;
|
||||
|
||||
public override string Command => "togglehardfov";
|
||||
|
||||
@@ -690,9 +690,9 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class ToggleShadows : LocalizedCommands
|
||||
internal sealed partial class ToggleShadows : LocalizedCommands
|
||||
{
|
||||
[Dependency] private readonly ILightManager _light = default!;
|
||||
[Dependency] private ILightManager _light = default!;
|
||||
|
||||
public override string Command => "toggleshadows";
|
||||
|
||||
@@ -703,9 +703,9 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class ToggleLightBuf : LocalizedCommands
|
||||
internal sealed partial class ToggleLightBuf : LocalizedCommands
|
||||
{
|
||||
[Dependency] private readonly ILightManager _light = default!;
|
||||
[Dependency] private ILightManager _light = default!;
|
||||
|
||||
public override string Command => "togglelightbuf";
|
||||
|
||||
@@ -716,12 +716,12 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class ChunkInfoCommand : LocalizedEntityCommands
|
||||
internal sealed partial class ChunkInfoCommand : LocalizedEntityCommands
|
||||
{
|
||||
[Dependency] private readonly IMapManager _map = default!;
|
||||
[Dependency] private readonly IEyeManager _eye = default!;
|
||||
[Dependency] private readonly IInputManager _input = default!;
|
||||
[Dependency] private readonly SharedMapSystem _mapSystem = default!;
|
||||
[Dependency] private IMapManager _map = default!;
|
||||
[Dependency] private IEyeManager _eye = default!;
|
||||
[Dependency] private IInputManager _input = default!;
|
||||
[Dependency] private SharedMapSystem _mapSystem = default!;
|
||||
|
||||
public override string Command => "chunkinfo";
|
||||
|
||||
@@ -743,11 +743,11 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class ReloadShadersCommand : LocalizedCommands
|
||||
internal sealed partial class ReloadShadersCommand : LocalizedCommands
|
||||
{
|
||||
[Dependency] private readonly IResourceCache _cache = default!;
|
||||
[Dependency] private readonly IResourceManagerInternal _resManager = default!;
|
||||
[Dependency] private readonly ITaskManager _taskManager = default!;
|
||||
[Dependency] private IResourceCache _cache = default!;
|
||||
[Dependency] private IResourceManagerInternal _resManager = default!;
|
||||
[Dependency] private ITaskManager _taskManager = default!;
|
||||
|
||||
public override string Command => "rldshader";
|
||||
|
||||
@@ -909,9 +909,9 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class ClydeDebugLayerCommand : LocalizedCommands
|
||||
internal sealed partial class ClydeDebugLayerCommand : LocalizedCommands
|
||||
{
|
||||
[Dependency] private readonly IClydeInternal _clyde = default!;
|
||||
[Dependency] private IClydeInternal _clyde = default!;
|
||||
|
||||
public override string Command => "cldbglyr";
|
||||
|
||||
@@ -932,9 +932,9 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class GetKeyInfoCommand : LocalizedCommands
|
||||
internal sealed partial class GetKeyInfoCommand : LocalizedCommands
|
||||
{
|
||||
[Dependency] private readonly IClydeInternal _clyde = default!;
|
||||
[Dependency] private IClydeInternal _clyde = default!;
|
||||
|
||||
public override string Command => "keyinfo";
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ using Robust.Shared.IoC;
|
||||
|
||||
namespace Robust.Client.Console.Commands
|
||||
{
|
||||
public sealed class DebugAnchoredCommand : LocalizedEntityCommands
|
||||
public sealed partial class DebugAnchoredCommand : LocalizedEntityCommands
|
||||
{
|
||||
[Dependency] private readonly DebugAnchoringSystem _system = default!;
|
||||
[Dependency] private DebugAnchoringSystem _system = default!;
|
||||
|
||||
public override string Command => "showanchored";
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ using Robust.Shared.IoC;
|
||||
|
||||
namespace Robust.Client.Console.Commands
|
||||
{
|
||||
public sealed class GridChunkBBCommand : LocalizedEntityCommands
|
||||
public sealed partial class GridChunkBBCommand : LocalizedEntityCommands
|
||||
{
|
||||
[Dependency] private readonly GridChunkBoundsDebugSystem _system = default!;
|
||||
[Dependency] private GridChunkBoundsDebugSystem _system = default!;
|
||||
|
||||
public override string Command => "showchunkbb";
|
||||
|
||||
|
||||
@@ -12,10 +12,10 @@ using Robust.Shared.Network;
|
||||
|
||||
namespace Robust.Client.Console.Commands
|
||||
{
|
||||
internal sealed class LauncherAuthCommand : LocalizedCommands
|
||||
internal sealed partial class LauncherAuthCommand : LocalizedCommands
|
||||
{
|
||||
[Dependency] private readonly IAuthManager _auth = default!;
|
||||
[Dependency] private readonly IGameControllerInternal _gameController = default!;
|
||||
[Dependency] private IAuthManager _auth = default!;
|
||||
[Dependency] private IGameControllerInternal _gameController = default!;
|
||||
|
||||
public override string Command => "launchauth";
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ using Robust.Shared.IoC;
|
||||
|
||||
namespace Robust.Client.Console.Commands
|
||||
{
|
||||
internal sealed class LightDebugCommand : LocalizedEntityCommands
|
||||
internal sealed partial class LightDebugCommand : LocalizedEntityCommands
|
||||
{
|
||||
[Dependency] private readonly DebugLightTreeSystem _system = default!;
|
||||
[Dependency] private DebugLightTreeSystem _system = default!;
|
||||
|
||||
public override string Command => "lightbb";
|
||||
|
||||
|
||||
@@ -7,9 +7,9 @@ using Robust.Shared.IoC;
|
||||
namespace Robust.Client.Console.Commands
|
||||
{
|
||||
[UsedImplicitly]
|
||||
public sealed class LsMonitorCommand : LocalizedCommands
|
||||
public sealed partial class LsMonitorCommand : LocalizedCommands
|
||||
{
|
||||
[Dependency] private readonly IClyde _clyde = default!;
|
||||
[Dependency] private IClyde _clyde = default!;
|
||||
|
||||
public override string Command => "lsmonitor";
|
||||
|
||||
@@ -24,9 +24,9 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
|
||||
[UsedImplicitly]
|
||||
public sealed class MonitorInfoCommand : LocalizedCommands
|
||||
public sealed partial class MonitorInfoCommand : LocalizedCommands
|
||||
{
|
||||
[Dependency] private readonly IClyde _clyde = default!;
|
||||
[Dependency] private IClyde _clyde = default!;
|
||||
|
||||
public override string Command => "monitorinfo";
|
||||
|
||||
@@ -51,9 +51,9 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
|
||||
[UsedImplicitly]
|
||||
public sealed class SetMonitorCommand : LocalizedCommands
|
||||
public sealed partial class SetMonitorCommand : LocalizedCommands
|
||||
{
|
||||
[Dependency] private readonly IClyde _clyde = default!;
|
||||
[Dependency] private IClyde _clyde = default!;
|
||||
|
||||
public override string Command => "setmonitor";
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@ using Robust.Shared.Localization;
|
||||
|
||||
namespace Robust.Client.Console.Commands
|
||||
{
|
||||
public sealed class PhysicsOverlayCommands : LocalizedCommands
|
||||
public sealed partial class PhysicsOverlayCommands : LocalizedCommands
|
||||
{
|
||||
[Dependency] private readonly IEntitySystemManager _entitySystems = default!;
|
||||
[Dependency] private IEntitySystemManager _entitySystems = default!;
|
||||
|
||||
public override string Command => "physics";
|
||||
|
||||
|
||||
@@ -9,9 +9,9 @@ using Robust.Shared.Timing;
|
||||
|
||||
namespace Robust.Client.Console.Commands;
|
||||
|
||||
public sealed class ProfileEntitySpawningCommand : IConsoleCommand
|
||||
public sealed partial class ProfileEntitySpawningCommand : IConsoleCommand
|
||||
{
|
||||
[Dependency] private readonly IEntityManager _entities = default!;
|
||||
[Dependency] private IEntityManager _entities = default!;
|
||||
|
||||
public string Command => "profileEntitySpawning";
|
||||
public string Description => "Profiles entity spawning with n entities";
|
||||
|
||||
@@ -14,9 +14,9 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
}
|
||||
|
||||
sealed class QuitCommand : LocalizedCommands
|
||||
sealed partial class QuitCommand : LocalizedCommands
|
||||
{
|
||||
[Dependency] private readonly IGameController _gameController = default!;
|
||||
[Dependency] private IGameController _gameController = default!;
|
||||
|
||||
public override string Command => "quit";
|
||||
|
||||
|
||||
@@ -4,9 +4,9 @@ using Robust.Shared.Localization;
|
||||
|
||||
namespace Robust.Client.Console.Commands
|
||||
{
|
||||
internal sealed class ReloadLocalizationsCommand : LocalizedCommands
|
||||
internal sealed partial class ReloadLocalizationsCommand : LocalizedCommands
|
||||
{
|
||||
[Dependency] private readonly ILocalizationManager _loc = default!;
|
||||
[Dependency] private ILocalizationManager _loc = default!;
|
||||
|
||||
public override string Command => "rldloc";
|
||||
|
||||
|
||||
@@ -25,9 +25,9 @@ namespace Robust.Client.Console.Commands
|
||||
}
|
||||
#endif
|
||||
|
||||
internal sealed class ServerScriptCommand : LocalizedCommands
|
||||
internal sealed partial class ServerScriptCommand : LocalizedCommands
|
||||
{
|
||||
[Dependency] private readonly IScriptClient _scriptClient = default!;
|
||||
[Dependency] private IScriptClient _scriptClient = default!;
|
||||
|
||||
public override string Command => "scsi";
|
||||
|
||||
|
||||
@@ -4,9 +4,9 @@ using Robust.Shared.Network;
|
||||
|
||||
namespace Robust.Client.Console.Commands
|
||||
{
|
||||
internal sealed class SendGarbageCommand : LocalizedCommands
|
||||
internal sealed partial class SendGarbageCommand : LocalizedCommands
|
||||
{
|
||||
[Dependency] private readonly IClientNetManager _netManager = default!;
|
||||
[Dependency] private IClientNetManager _netManager = default!;
|
||||
|
||||
public override string Command => "sendgarbage";
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@ using Robust.Shared.IoC;
|
||||
namespace Robust.Client.Console.Commands
|
||||
{
|
||||
[UsedImplicitly]
|
||||
public sealed class SetInputContextCommand : LocalizedCommands
|
||||
public sealed partial class SetInputContextCommand : LocalizedCommands
|
||||
{
|
||||
[Dependency] private readonly IInputManager _inputManager = default!;
|
||||
[Dependency] private IInputManager _inputManager = default!;
|
||||
|
||||
public override string Command => "setinputcontext";
|
||||
|
||||
|
||||
@@ -4,9 +4,9 @@ using Robust.Shared.IoC;
|
||||
|
||||
namespace Robust.Client.Console.Commands
|
||||
{
|
||||
public sealed class ShowPlayerVelocityCommand : LocalizedEntityCommands
|
||||
public sealed partial class ShowPlayerVelocityCommand : LocalizedEntityCommands
|
||||
{
|
||||
[Dependency] private readonly ShowPlayerVelocityDebugSystem _system = default!;
|
||||
[Dependency] private ShowPlayerVelocityDebugSystem _system = default!;
|
||||
|
||||
public override string Command => "showplayervelocity";
|
||||
|
||||
|
||||
@@ -7,9 +7,9 @@ using Robust.Shared.Maths;
|
||||
|
||||
namespace Robust.Client.Console.Commands;
|
||||
|
||||
internal sealed class ViewportClearAllCachedCommand : IConsoleCommand
|
||||
internal sealed partial class ViewportClearAllCachedCommand : IConsoleCommand
|
||||
{
|
||||
[Dependency] private readonly IClydeInternal _clyde = default!;
|
||||
[Dependency] private IClydeInternal _clyde = default!;
|
||||
|
||||
public string Command => "vp_clear_all_cached";
|
||||
public string Description => "Fires IClydeViewport.ClearCachedResources on all viewports";
|
||||
@@ -21,10 +21,10 @@ internal sealed class ViewportClearAllCachedCommand : IConsoleCommand
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class ViewportTestFinalizeCommand : IConsoleCommand
|
||||
internal sealed partial class ViewportTestFinalizeCommand : IConsoleCommand
|
||||
{
|
||||
[Dependency] private readonly IClyde _clyde = default!;
|
||||
[Dependency] private readonly IEyeManager _eyeManager = default!;
|
||||
[Dependency] private IClyde _clyde = default!;
|
||||
[Dependency] private IEyeManager _eyeManager = default!;
|
||||
|
||||
public string Command => "vp_test_finalize";
|
||||
public string Description => "Creates a viewport, renders it once, then leaks it (finalizes it).";
|
||||
|
||||
@@ -8,8 +8,8 @@ namespace Robust.Client.Console
|
||||
{
|
||||
public sealed partial class ScriptClient : IScriptClient
|
||||
{
|
||||
[Dependency] private readonly IClientConGroupController _conGroupController = default!;
|
||||
[Dependency] private readonly IClientNetManager _netManager = default!;
|
||||
[Dependency] private IClientConGroupController _conGroupController = default!;
|
||||
[Dependency] private IClientNetManager _netManager = default!;
|
||||
|
||||
private readonly Dictionary<int, ScriptConsoleServer> _activeConsoles = new();
|
||||
|
||||
|
||||
@@ -23,11 +23,11 @@ using Color = Robust.Shared.Maths.Color;
|
||||
|
||||
namespace Robust.Client.Console
|
||||
{
|
||||
internal sealed class ScriptConsoleClient : ScriptConsole
|
||||
internal sealed partial class ScriptConsoleClient : ScriptConsole
|
||||
{
|
||||
#pragma warning disable 649
|
||||
[Dependency] private readonly IReflectionManager _reflectionManager = default!;
|
||||
[Dependency] private readonly IDependencyCollection _dependency = default!;
|
||||
[Dependency] private IReflectionManager _reflectionManager = default!;
|
||||
[Dependency] private IDependencyCollection _dependency = default!;
|
||||
#pragma warning restore 649
|
||||
|
||||
private readonly StringBuilder _inputBuffer = new();
|
||||
@@ -192,11 +192,12 @@ namespace Robust.Client.Console
|
||||
_autoImportRepeatBuffer = (found.ToArray(), code);
|
||||
}
|
||||
|
||||
private sealed class ScriptGlobalsImpl : ScriptGlobals
|
||||
private sealed partial class ScriptGlobalsImpl : ScriptGlobals
|
||||
{
|
||||
private readonly ScriptConsoleClient _owner;
|
||||
|
||||
[field: Dependency] public override IClientViewVariablesManager vvm { get; } = default!;
|
||||
[Dependency] private IClientViewVariablesManager _vvm = null!;
|
||||
public override IClientViewVariablesManager vvm => _vvm;
|
||||
|
||||
public ScriptGlobalsImpl(ScriptConsoleClient owner) : base(owner._dependency)
|
||||
{
|
||||
|
||||
@@ -13,13 +13,13 @@ using Robust.Shared.Utility;
|
||||
|
||||
namespace Robust.Client.Debugging
|
||||
{
|
||||
public sealed class DebugAnchoringSystem : EntitySystem
|
||||
public sealed partial class DebugAnchoringSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly IEyeManager _eyeManager = default!;
|
||||
[Dependency] private readonly IInputManager _inputManager = default!;
|
||||
[Dependency] private readonly IMapManager _mapManager = default!;
|
||||
[Dependency] private readonly IUserInterfaceManager _userInterface = default!;
|
||||
[Dependency] private readonly MapSystem _mapSystem = default!;
|
||||
[Dependency] private IEyeManager _eyeManager = default!;
|
||||
[Dependency] private IInputManager _inputManager = default!;
|
||||
[Dependency] private IMapManager _mapManager = default!;
|
||||
[Dependency] private IUserInterfaceManager _userInterface = default!;
|
||||
[Dependency] private MapSystem _mapSystem = default!;
|
||||
|
||||
private Label? _label;
|
||||
|
||||
|
||||
@@ -11,11 +11,11 @@ namespace Robust.Client.Debugging;
|
||||
/// <summary>
|
||||
/// A collection of visual debug overlays for the client game.
|
||||
/// </summary>
|
||||
public sealed class DebugDrawingSystem : EntitySystem
|
||||
public sealed partial class DebugDrawingSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly IOverlayManager _overlayManager = default!;
|
||||
[Dependency] private readonly EntityLookupSystem _lookup = default!;
|
||||
[Dependency] private readonly SharedTransformSystem _transform = default!;
|
||||
[Dependency] private IOverlayManager _overlayManager = default!;
|
||||
[Dependency] private EntityLookupSystem _lookup = default!;
|
||||
[Dependency] private SharedTransformSystem _transform = default!;
|
||||
|
||||
private bool _debugPositions;
|
||||
private bool _debugRotations;
|
||||
@@ -133,7 +133,7 @@ public sealed class DebugDrawingSystem : EntitySystem
|
||||
{
|
||||
const float stubLength = 0.25f;
|
||||
|
||||
var worldHandle = (DrawingHandleWorld) args.DrawingHandle;
|
||||
var worldHandle = (DrawingHandleWorld)args.DrawingHandle;
|
||||
|
||||
foreach (var uid in _lookup.GetEntitiesIntersecting(args.MapId, args.WorldBounds))
|
||||
{
|
||||
@@ -155,7 +155,7 @@ public sealed class DebugDrawingSystem : EntitySystem
|
||||
protected internal override void Draw(in OverlayDrawArgs args)
|
||||
{
|
||||
const float stubLength = 0.25f;
|
||||
var worldHandle = (DrawingHandleWorld) args.DrawingHandle;
|
||||
var worldHandle = (DrawingHandleWorld)args.DrawingHandle;
|
||||
|
||||
foreach (var uid in _lookup.GetEntitiesIntersecting(args.MapId, args.WorldBounds))
|
||||
{
|
||||
@@ -176,12 +176,12 @@ public sealed class DebugDrawingSystem : EntitySystem
|
||||
{
|
||||
const float multiplier = 0.2f;
|
||||
|
||||
var worldHandle = (DrawingHandleWorld) args.DrawingHandle;
|
||||
var worldHandle = (DrawingHandleWorld)args.DrawingHandle;
|
||||
|
||||
var physicsQuery = _entityManager.GetEntityQuery<PhysicsComponent>();
|
||||
foreach (var uid in _lookup.GetEntitiesIntersecting(args.MapId, args.WorldBounds))
|
||||
{
|
||||
if(!physicsQuery.TryGetComponent(uid, out var physicsComp))
|
||||
if (!physicsQuery.TryGetComponent(uid, out var physicsComp))
|
||||
continue;
|
||||
|
||||
var center = _transform.GetWorldPosition(uid);
|
||||
@@ -201,12 +201,12 @@ public sealed class DebugDrawingSystem : EntitySystem
|
||||
{
|
||||
const float multiplier = (float)(0.2 / (2 * System.Math.PI));
|
||||
|
||||
var worldHandle = (DrawingHandleWorld) args.DrawingHandle;
|
||||
var worldHandle = (DrawingHandleWorld)args.DrawingHandle;
|
||||
|
||||
var physicsQuery = _entityManager.GetEntityQuery<PhysicsComponent>();
|
||||
foreach (var uid in _lookup.GetEntitiesIntersecting(args.MapId, args.WorldBounds))
|
||||
{
|
||||
if(!physicsQuery.TryGetComponent(uid, out var physicsComp))
|
||||
if (!physicsQuery.TryGetComponent(uid, out var physicsComp))
|
||||
continue;
|
||||
|
||||
var center = _transform.GetWorldPosition(uid);
|
||||
|
||||
@@ -69,7 +69,7 @@ using Robust.Shared.Physics.Systems;
|
||||
|
||||
namespace Robust.Client.Debugging
|
||||
{
|
||||
public sealed class DebugPhysicsSystem : SharedDebugPhysicsSystem
|
||||
public sealed partial class DebugPhysicsSystem : SharedDebugPhysicsSystem
|
||||
{
|
||||
/*
|
||||
* Used for debugging shapes, controllers, joints, contacts
|
||||
@@ -78,15 +78,15 @@ namespace Robust.Client.Debugging
|
||||
private const int MaxContactPoints = 2048;
|
||||
internal int PointCount;
|
||||
|
||||
[Dependency] private readonly SharedPhysicsSystem _physics = default!;
|
||||
[Dependency] private readonly EntityLookupSystem _entityLookup = default!;
|
||||
[Dependency] private readonly TransformSystem _transform = default!;
|
||||
[Dependency] private readonly IOverlayManager _overlay = default!;
|
||||
[Dependency] private readonly IEyeManager _eye = default!;
|
||||
[Dependency] private readonly IInputManager _input = default!;
|
||||
[Dependency] private readonly IMapManager _map = default!;
|
||||
[Dependency] private readonly IPlayerManager _player = default!;
|
||||
[Dependency] private readonly IResourceCache _resourceCache = default!;
|
||||
[Dependency] private SharedPhysicsSystem _physics = default!;
|
||||
[Dependency] private EntityLookupSystem _entityLookup = default!;
|
||||
[Dependency] private TransformSystem _transform = default!;
|
||||
[Dependency] private IOverlayManager _overlay = default!;
|
||||
[Dependency] private IEyeManager _eye = default!;
|
||||
[Dependency] private IInputManager _input = default!;
|
||||
[Dependency] private IMapManager _map = default!;
|
||||
[Dependency] private IPlayerManager _player = default!;
|
||||
[Dependency] private IResourceCache _resourceCache = default!;
|
||||
|
||||
internal ContactPoint[] Points = new ContactPoint[MaxContactPoints];
|
||||
|
||||
|
||||
@@ -12,11 +12,11 @@ using Robust.Shared.Timing;
|
||||
|
||||
namespace Robust.Client.Debugging
|
||||
{
|
||||
internal sealed class DebugRayDrawingSystem : SharedDebugRayDrawingSystem
|
||||
internal sealed partial class DebugRayDrawingSystem : SharedDebugRayDrawingSystem
|
||||
{
|
||||
#if DEBUG
|
||||
[Dependency] private readonly IOverlayManager _overlayManager = default!;
|
||||
[Dependency] private readonly IGameTiming _gameTimer = default!;
|
||||
[Dependency] private IOverlayManager _overlayManager = default!;
|
||||
[Dependency] private IGameTiming _gameTimer = default!;
|
||||
|
||||
private readonly List<RayWithLifetime> _raysWithLifeTime = new();
|
||||
private bool _debugDrawRays;
|
||||
|
||||
@@ -8,13 +8,13 @@ using Robust.Shared.Utility;
|
||||
namespace Robust.Client.Debugging;
|
||||
|
||||
[ToolshedCommand]
|
||||
internal sealed class OverlayCommand : ToolshedCommand
|
||||
internal sealed partial class OverlayCommand : ToolshedCommand
|
||||
{
|
||||
[Dependency] private readonly IOverlayManager _overlay = default!;
|
||||
[Dependency] private readonly IDynamicTypeFactoryInternal _factory = default!;
|
||||
[Dependency] private IOverlayManager _overlay = default!;
|
||||
[Dependency] private IDynamicTypeFactoryInternal _factory = default!;
|
||||
|
||||
[CommandImplementation("toggle")]
|
||||
internal void Toggle([CommandArgument(customParser:typeof(ReflectionTypeParser<Overlay>))] Type overlay)
|
||||
internal void Toggle([CommandArgument(customParser: typeof(ReflectionTypeParser<Overlay>))] Type overlay)
|
||||
{
|
||||
if (!overlay.IsSubclassOf(typeof(Overlay)))
|
||||
throw new ArgumentException("Type must be a subclass of overlay");
|
||||
@@ -38,7 +38,7 @@ internal sealed class OverlayCommand : ToolshedCommand
|
||||
return;
|
||||
|
||||
// TODO OVERLAYS Give overlays the ContentAccessAllowedAttribute?
|
||||
var instance = (Overlay) _factory.CreateInstanceUnchecked(overlay, oneOff: true);
|
||||
var instance = (Overlay)_factory.CreateInstanceUnchecked(overlay, oneOff: true);
|
||||
if (instance is IPostInjectInit init)
|
||||
init.PostInject();
|
||||
|
||||
|
||||
@@ -21,14 +21,14 @@ namespace Robust.Client.Debugging.Overlays;
|
||||
/// This is an abstract helper class that can be used to create simple debug overlays that need to render tile based data.
|
||||
/// </summary>
|
||||
[UsedImplicitly]
|
||||
public abstract class TileDebugOverlay : Overlay, IPostInjectInit
|
||||
public abstract partial class TileDebugOverlay : Overlay, IPostInjectInit
|
||||
{
|
||||
[Dependency] protected readonly IEntityManager Entity = default!;
|
||||
[Dependency] protected readonly IEyeManager Eye = default!;
|
||||
[Dependency] protected readonly IMapManager MapMan = default!;
|
||||
[Dependency] protected readonly IInputManager Input = default!;
|
||||
[Dependency] protected readonly IUserInterfaceManager Ui = default!;
|
||||
[Dependency] protected readonly IResourceCache Cache = default!;
|
||||
[Dependency] protected IEntityManager Entity = default!;
|
||||
[Dependency] protected IEyeManager Eye = default!;
|
||||
[Dependency] protected IMapManager MapMan = default!;
|
||||
[Dependency] protected IInputManager Input = default!;
|
||||
[Dependency] protected IUserInterfaceManager Ui = default!;
|
||||
[Dependency] protected IResourceCache Cache = default!;
|
||||
|
||||
protected SharedTransformSystem Transform = default!;
|
||||
protected MapSystem Map = default!;
|
||||
|
||||
@@ -17,8 +17,8 @@ namespace Robust.Client
|
||||
private IGameLoop? _mainLoop;
|
||||
private bool _dontStart;
|
||||
|
||||
[Dependency] private readonly IClientGameTiming _gameTiming = default!;
|
||||
[Dependency] private readonly IDependencyCollection _dependencyCollection = default!;
|
||||
[Dependency] private IClientGameTiming _gameTiming = default!;
|
||||
[Dependency] private IDependencyCollection _dependencyCollection = default!;
|
||||
|
||||
private static bool _hasStarted;
|
||||
|
||||
|
||||
@@ -53,55 +53,55 @@ namespace Robust.Client
|
||||
{
|
||||
internal sealed partial class GameController : IGameControllerInternal
|
||||
{
|
||||
[Dependency] private readonly INetConfigurationManagerInternal _configurationManager = default!;
|
||||
[Dependency] private readonly IResourceCacheInternal _resourceCache = default!;
|
||||
[Dependency] private readonly IResourceManagerInternal _resManager = default!;
|
||||
[Dependency] private readonly IRobustSerializer _serializer = default!;
|
||||
[Dependency] private readonly IXamlProxyManager _xamlProxyManager = default!;
|
||||
[Dependency] private readonly IXamlHotReloadManager _xamlHotReloadManager = default!;
|
||||
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
|
||||
[Dependency] private readonly IClientNetManager _networkManager = default!;
|
||||
[Dependency] private readonly IMapManager _mapManager = default!;
|
||||
[Dependency] private readonly IStateManager _stateManager = default!;
|
||||
[Dependency] private readonly IUserInterfaceManagerInternal _userInterfaceManager = default!;
|
||||
[Dependency] private readonly IBaseClient _client = default!;
|
||||
[Dependency] private readonly IInputManager _inputManager = default!;
|
||||
[Dependency] private readonly IClientConsoleHost _console = default!;
|
||||
[Dependency] private readonly ITimerManager _timerManager = default!;
|
||||
[Dependency] private readonly IClientEntityManager _entityManager = default!;
|
||||
[Dependency] private readonly IPlacementManager _placementManager = default!;
|
||||
[Dependency] private readonly IClientGameStateManager _gameStateManager = default!;
|
||||
[Dependency] private readonly IOverlayManagerInternal _overlayManager = default!;
|
||||
[Dependency] private readonly ILogManager _logManager = default!;
|
||||
[Dependency] private readonly ITaskManager _taskManager = default!;
|
||||
[Dependency] private readonly IClientViewVariablesManagerInternal _viewVariablesManager = default!;
|
||||
[Dependency] private readonly IDiscordRichPresence _discord = default!;
|
||||
[Dependency] private readonly IClydeInternal _clyde = default!;
|
||||
[Dependency] private readonly IAudioInternal _audio = default!;
|
||||
[Dependency] private readonly IFontManagerInternal _fontManager = default!;
|
||||
[Dependency] private readonly IModLoaderInternal _modLoader = default!;
|
||||
[Dependency] private readonly IScriptClient _scriptClient = default!;
|
||||
[Dependency] private readonly IRobustMappedStringSerializer _stringSerializer = default!;
|
||||
[Dependency] private readonly IAuthManager _authManager = default!;
|
||||
[Dependency] private readonly IMidiManager _midiManager = default!;
|
||||
[Dependency] private readonly IEyeManager _eyeManager = default!;
|
||||
[Dependency] private readonly IParallelManagerInternal _parallelMgr = default!;
|
||||
[Dependency] private readonly ProfManager _prof = default!;
|
||||
[Dependency] private readonly IRuntimeLog _runtimeLog = default!;
|
||||
[Dependency] private readonly ISerializationManager _serializationManager = default!;
|
||||
[Dependency] private readonly MarkupTagManager _tagManager = default!;
|
||||
[Dependency] private readonly IGamePrototypeLoadManager _protoLoadMan = default!;
|
||||
[Dependency] private readonly NetworkResourceManager _netResMan = default!;
|
||||
[Dependency] private readonly IReplayLoadManager _replayLoader = default!;
|
||||
[Dependency] private readonly IReplayPlaybackManager _replayPlayback = default!;
|
||||
[Dependency] private readonly IReplayRecordingManagerInternal _replayRecording = default!;
|
||||
[Dependency] private readonly IReflectionManager _reflectionManager = default!;
|
||||
[Dependency] private readonly IReloadManager _reload = default!;
|
||||
[Dependency] private readonly ILocalizationManager _loc = default!;
|
||||
[Dependency] private readonly ISystemFontManagerInternal _systemFontManager = default!;
|
||||
[Dependency] private readonly LoadingScreenManager _loadscr = default!;
|
||||
[Dependency] private readonly ITransferManager _transfer = default!;
|
||||
[Dependency] private readonly ClientTransferTestManager _transferTest = default!;
|
||||
[Dependency] private INetConfigurationManagerInternal _configurationManager = default!;
|
||||
[Dependency] private IResourceCacheInternal _resourceCache = default!;
|
||||
[Dependency] private IResourceManagerInternal _resManager = default!;
|
||||
[Dependency] private IRobustSerializer _serializer = default!;
|
||||
[Dependency] private IXamlProxyManager _xamlProxyManager = default!;
|
||||
[Dependency] private IXamlHotReloadManager _xamlHotReloadManager = default!;
|
||||
[Dependency] private IPrototypeManager _prototypeManager = default!;
|
||||
[Dependency] private IClientNetManager _networkManager = default!;
|
||||
[Dependency] private IMapManager _mapManager = default!;
|
||||
[Dependency] private IStateManager _stateManager = default!;
|
||||
[Dependency] private IUserInterfaceManagerInternal _userInterfaceManager = default!;
|
||||
[Dependency] private IBaseClient _client = default!;
|
||||
[Dependency] private IInputManager _inputManager = default!;
|
||||
[Dependency] private IClientConsoleHost _console = default!;
|
||||
[Dependency] private ITimerManager _timerManager = default!;
|
||||
[Dependency] private IClientEntityManager _entityManager = default!;
|
||||
[Dependency] private IPlacementManager _placementManager = default!;
|
||||
[Dependency] private IClientGameStateManager _gameStateManager = default!;
|
||||
[Dependency] private IOverlayManagerInternal _overlayManager = default!;
|
||||
[Dependency] private ILogManager _logManager = default!;
|
||||
[Dependency] private ITaskManager _taskManager = default!;
|
||||
[Dependency] private IClientViewVariablesManagerInternal _viewVariablesManager = default!;
|
||||
[Dependency] private IDiscordRichPresence _discord = default!;
|
||||
[Dependency] private IClydeInternal _clyde = default!;
|
||||
[Dependency] private IAudioInternal _audio = default!;
|
||||
[Dependency] private IFontManagerInternal _fontManager = default!;
|
||||
[Dependency] private IModLoaderInternal _modLoader = default!;
|
||||
[Dependency] private IScriptClient _scriptClient = default!;
|
||||
[Dependency] private IRobustMappedStringSerializer _stringSerializer = default!;
|
||||
[Dependency] private IAuthManager _authManager = default!;
|
||||
[Dependency] private IMidiManager _midiManager = default!;
|
||||
[Dependency] private IEyeManager _eyeManager = default!;
|
||||
[Dependency] private IParallelManagerInternal _parallelMgr = default!;
|
||||
[Dependency] private ProfManager _prof = default!;
|
||||
[Dependency] private IRuntimeLog _runtimeLog = default!;
|
||||
[Dependency] private ISerializationManager _serializationManager = default!;
|
||||
[Dependency] private MarkupTagManager _tagManager = default!;
|
||||
[Dependency] private IGamePrototypeLoadManager _protoLoadMan = default!;
|
||||
[Dependency] private NetworkResourceManager _netResMan = default!;
|
||||
[Dependency] private IReplayLoadManager _replayLoader = default!;
|
||||
[Dependency] private IReplayPlaybackManager _replayPlayback = default!;
|
||||
[Dependency] private IReplayRecordingManagerInternal _replayRecording = default!;
|
||||
[Dependency] private IReflectionManager _reflectionManager = default!;
|
||||
[Dependency] private IReloadManager _reload = default!;
|
||||
[Dependency] private ILocalizationManager _loc = default!;
|
||||
[Dependency] private ISystemFontManagerInternal _systemFontManager = default!;
|
||||
[Dependency] private LoadingScreenManager _loadscr = default!;
|
||||
[Dependency] private ITransferManager _transfer = default!;
|
||||
[Dependency] private ClientTransferTestManager _transferTest = default!;
|
||||
|
||||
private IWebViewManagerHook? _webViewHook;
|
||||
|
||||
|
||||
@@ -19,12 +19,12 @@ namespace Robust.Client.GameObjects
|
||||
/// </summary>
|
||||
public sealed partial class ClientEntityManager : EntityManager, IClientEntityManagerInternal
|
||||
{
|
||||
[Dependency] private readonly IPlayerManager _playerManager = default!;
|
||||
[Dependency] private readonly IClientNetManager _networkManager = default!;
|
||||
[Dependency] private readonly IClientGameTiming _gameTiming = default!;
|
||||
[Dependency] private readonly IClientGameStateManager _stateMan = default!;
|
||||
[Dependency] private readonly IBaseClient _client = default!;
|
||||
[Dependency] private readonly IReplayRecordingManager _replayRecording = default!;
|
||||
[Dependency] private IPlayerManager _playerManager = default!;
|
||||
[Dependency] private IClientNetManager _networkManager = default!;
|
||||
[Dependency] private IClientGameTiming _gameTiming = default!;
|
||||
[Dependency] private IClientGameStateManager _stateMan = default!;
|
||||
[Dependency] private IBaseClient _client = default!;
|
||||
[Dependency] private IReplayRecordingManager _replayRecording = default!;
|
||||
|
||||
internal event Action? AfterStartup;
|
||||
internal event Action? AfterShutdown;
|
||||
|
||||
@@ -10,9 +10,9 @@ using Robust.Shared.Utility;
|
||||
|
||||
namespace Robust.Client.GameObjects
|
||||
{
|
||||
public sealed class ShowSpriteBBCommand : LocalizedEntityCommands
|
||||
public sealed partial class ShowSpriteBBCommand : LocalizedEntityCommands
|
||||
{
|
||||
[Dependency] private readonly SpriteBoundsSystem _system = default!;
|
||||
[Dependency] private SpriteBoundsSystem _system = default!;
|
||||
|
||||
public override string Command => "showspritebb";
|
||||
|
||||
@@ -22,9 +22,9 @@ namespace Robust.Client.GameObjects
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class SpriteBoundsSystem : EntitySystem
|
||||
public sealed partial class SpriteBoundsSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly IOverlayManager _overlayManager = default!;
|
||||
[Dependency] private IOverlayManager _overlayManager = default!;
|
||||
|
||||
private SpriteBoundsOverlay? _overlay;
|
||||
|
||||
|
||||
@@ -39,10 +39,10 @@ namespace Robust.Client.GameObjects
|
||||
{
|
||||
public const string LogCategory = "go.comp.sprite";
|
||||
|
||||
[Dependency] private readonly IResourceCache resourceCache = default!;
|
||||
[Dependency] private readonly IPrototypeManager prototypes = default!;
|
||||
[Dependency] private readonly EntityManager entities = default!;
|
||||
[Dependency] private readonly IReflectionManager reflection = default!;
|
||||
[Dependency] private IResourceCache resourceCache = default!;
|
||||
[Dependency] private IPrototypeManager prototypes = default!;
|
||||
[Dependency] private EntityManager entities = default!;
|
||||
[Dependency] private IReflectionManager reflection = default!;
|
||||
|
||||
/// <summary>
|
||||
/// See <see cref="CVars.RenderSpriteDirectionBias"/>.
|
||||
|
||||
@@ -7,7 +7,7 @@ using Robust.Shared.Utility;
|
||||
|
||||
namespace Robust.Client.GameObjects
|
||||
{
|
||||
public sealed class AnimationPlayerSystem : EntitySystem
|
||||
public sealed partial class AnimationPlayerSystem : EntitySystem
|
||||
{
|
||||
private readonly List<Entity<AnimationPlayerComponent>> _activeAnimations = new();
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace Robust.Client.GameObjects
|
||||
private EntityQuery<MetaDataComponent> _metaQuery;
|
||||
|
||||
#if DEBUG
|
||||
[Dependency] private readonly IComponentFactory _compFact = default!;
|
||||
[Dependency] private IComponentFactory _compFact = default!;
|
||||
#endif
|
||||
|
||||
public override void Initialize()
|
||||
|
||||
@@ -11,10 +11,10 @@ using Robust.Shared.Serialization.Manager;
|
||||
namespace Robust.Client.GameObjects
|
||||
{
|
||||
[UsedImplicitly]
|
||||
public sealed class AppearanceSystem : SharedAppearanceSystem
|
||||
public sealed partial class AppearanceSystem : SharedAppearanceSystem
|
||||
{
|
||||
private readonly Queue<(EntityUid uid, AppearanceComponent)> _queuedUpdates = new();
|
||||
[Dependency] private readonly ISerializationManager _serialization = default!;
|
||||
[Dependency] private ISerializationManager _serialization = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
|
||||
@@ -18,10 +18,10 @@ namespace Robust.Client.GameObjects;
|
||||
// Whereas the tree stuff is precise.
|
||||
// Also I just realized this and I cba to refactor this again.
|
||||
[UsedImplicitly]
|
||||
internal sealed class ClientOccluderSystem : OccluderSystem
|
||||
internal sealed partial class ClientOccluderSystem : OccluderSystem
|
||||
{
|
||||
private readonly HashSet<EntityUid> _dirtyEntities = new();
|
||||
[Dependency] private readonly SharedMapSystem _mapSystem = default!;
|
||||
[Dependency] private SharedMapSystem _mapSystem = default!;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void Initialize()
|
||||
|
||||
@@ -13,11 +13,11 @@ using static Robust.Shared.Containers.ContainerManagerComponent;
|
||||
|
||||
namespace Robust.Client.GameObjects
|
||||
{
|
||||
public sealed class ContainerSystem : SharedContainerSystem
|
||||
public sealed partial class ContainerSystem : SharedContainerSystem
|
||||
{
|
||||
[Dependency] private readonly IRobustSerializer _serializer = default!;
|
||||
[Dependency] private readonly IDynamicTypeFactoryInternal _dynFactory = default!;
|
||||
[Dependency] private readonly PointLightSystem _lightSys = default!;
|
||||
[Dependency] private IRobustSerializer _serializer = default!;
|
||||
[Dependency] private IDynamicTypeFactoryInternal _dynFactory = default!;
|
||||
[Dependency] private PointLightSystem _lightSys = default!;
|
||||
|
||||
private EntityQuery<PointLightComponent> _pointLightQuery;
|
||||
private EntityQuery<SpriteComponent> _spriteQuery;
|
||||
@@ -116,7 +116,7 @@ namespace Robust.Client.GameObjects
|
||||
if (!component.Containers.TryGetValue(id, out var container))
|
||||
{
|
||||
var type = _serializer.FindSerializedType(typeof(BaseContainer), data.ContainerType);
|
||||
container = _dynFactory.CreateInstanceUnchecked<BaseContainer>(type!, inject:false);
|
||||
container = _dynFactory.CreateInstanceUnchecked<BaseContainer>(type!, inject: false);
|
||||
container.Init(this, id, (uid, component));
|
||||
component.Containers.Add(id, container);
|
||||
}
|
||||
@@ -241,7 +241,7 @@ namespace Robust.Client.GameObjects
|
||||
|
||||
if (TryComp(uid, out MetaDataComponent? meta))
|
||||
{
|
||||
DebugTools.Assert((meta.Flags & ( MetaDataFlags.Detached | MetaDataFlags.InContainer) ) == MetaDataFlags.Detached,
|
||||
DebugTools.Assert((meta.Flags & (MetaDataFlags.Detached | MetaDataFlags.InContainer)) == MetaDataFlags.Detached,
|
||||
$"Adding entity {ToPrettyString(uid)} to list of expected entities for container {container.ID} in {ToPrettyString(container.Owner)}, despite it already being in a container.");
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -11,9 +11,9 @@ using Color = Robust.Shared.Maths.Color;
|
||||
|
||||
namespace Robust.Client.GameObjects;
|
||||
|
||||
public sealed class DebugEntityLookupCommand : LocalizedEntityCommands
|
||||
public sealed partial class DebugEntityLookupCommand : LocalizedEntityCommands
|
||||
{
|
||||
[Dependency] private readonly DebugEntityLookupSystem _system = default!;
|
||||
[Dependency] private DebugEntityLookupSystem _system = default!;
|
||||
|
||||
public override string Command => "togglelookup";
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@ using Robust.Shared.Player;
|
||||
|
||||
namespace Robust.Client.GameObjects;
|
||||
|
||||
public sealed class EyeSystem : SharedEyeSystem
|
||||
public sealed partial class EyeSystem : SharedEyeSystem
|
||||
{
|
||||
[Dependency] private readonly IEyeManager _eyeManager = default!;
|
||||
[Dependency] private IEyeManager _eyeManager = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
|
||||
@@ -8,10 +8,10 @@ namespace Robust.Client.GameObjects;
|
||||
/// <summary>
|
||||
/// A generic visualizer system that modifies sprite layer data.
|
||||
/// </summary>
|
||||
public sealed class GenericVisualizerSystem : VisualizerSystem<GenericVisualizerComponent>
|
||||
public sealed partial class GenericVisualizerSystem : VisualizerSystem<GenericVisualizerComponent>
|
||||
{
|
||||
[Dependency] private readonly IReflectionManager _refMan = default!;
|
||||
[Dependency] private readonly SharedAppearanceSystem _appearanceSys = default!;
|
||||
[Dependency] private IReflectionManager _refMan = default!;
|
||||
[Dependency] private SharedAppearanceSystem _appearanceSys = default!;
|
||||
|
||||
protected override void OnAppearanceChange(EntityUid uid, GenericVisualizerComponent component, ref AppearanceChangeEvent args)
|
||||
{
|
||||
|
||||
@@ -13,13 +13,13 @@ using Robust.Shared.Utility;
|
||||
|
||||
namespace Robust.Client.GameObjects
|
||||
{
|
||||
public sealed class GridChunkBoundsDebugSystem : EntitySystem
|
||||
public sealed partial class GridChunkBoundsDebugSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly IEyeManager _eyeManager = default!;
|
||||
[Dependency] private readonly IMapManager _mapManager = default!;
|
||||
[Dependency] private readonly IOverlayManager _overlayManager = default!;
|
||||
[Dependency] private readonly TransformSystem _transform = default!;
|
||||
[Dependency] private readonly SharedMapSystem _map = default!;
|
||||
[Dependency] private IEyeManager _eyeManager = default!;
|
||||
[Dependency] private IMapManager _mapManager = default!;
|
||||
[Dependency] private IOverlayManager _overlayManager = default!;
|
||||
[Dependency] private TransformSystem _transform = default!;
|
||||
[Dependency] private SharedMapSystem _map = default!;
|
||||
|
||||
private GridChunkBoundsOverlay? _overlay;
|
||||
|
||||
|
||||
@@ -18,15 +18,15 @@ namespace Robust.Client.GameObjects
|
||||
/// <summary>
|
||||
/// Client-side processing of all input commands through the simulation.
|
||||
/// </summary>
|
||||
public sealed class InputSystem : SharedInputSystem, IPostInjectInit
|
||||
public sealed partial class InputSystem : SharedInputSystem, IPostInjectInit
|
||||
{
|
||||
[Dependency] private readonly IInputManager _inputManager = default!;
|
||||
[Dependency] private readonly IPlayerManager _playerManager = default!;
|
||||
[Dependency] private readonly IClientGameStateManager _stateManager = default!;
|
||||
[Dependency] private readonly IConsoleHost _conHost = default!;
|
||||
[Dependency] private readonly IGameTiming _timing = default!;
|
||||
[Dependency] private readonly ILogManager _logManager = default!;
|
||||
[Dependency] private readonly SharedTransformSystem _transform = default!;
|
||||
[Dependency] private IInputManager _inputManager = default!;
|
||||
[Dependency] private IPlayerManager _playerManager = default!;
|
||||
[Dependency] private IClientGameStateManager _stateManager = default!;
|
||||
[Dependency] private IConsoleHost _conHost = default!;
|
||||
[Dependency] private IGameTiming _timing = default!;
|
||||
[Dependency] private ILogManager _logManager = default!;
|
||||
[Dependency] private SharedTransformSystem _transform = default!;
|
||||
|
||||
private ISawmill _sawmillInputContext = default!;
|
||||
|
||||
@@ -52,12 +52,12 @@ namespace Robust.Client.GameObjects
|
||||
/// old input that was saved or buffered until further processing could be done</param>
|
||||
public bool HandleInputCommand(ICommonSession? session, BoundKeyFunction function, IFullInputCmdMessage message, bool replay = false)
|
||||
{
|
||||
#if DEBUG
|
||||
#if DEBUG
|
||||
|
||||
var funcId = _inputManager.NetworkBindMap.KeyFunctionID(function);
|
||||
DebugTools.Assert(funcId == message.InputFunctionId, "Function ID in message does not match function.");
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (!replay)
|
||||
{
|
||||
@@ -223,7 +223,7 @@ namespace Robust.Client.GameObjects
|
||||
|
||||
private void SetEntityContextActive(IInputManager inputMan, EntityUid entity)
|
||||
{
|
||||
if(entity == default || !Exists(entity))
|
||||
if (entity == default || !Exists(entity))
|
||||
throw new ArgumentNullException(nameof(entity));
|
||||
|
||||
if (!TryComp(entity, out InputComponent? inputComp))
|
||||
|
||||
@@ -5,9 +5,9 @@ using Robust.Shared.IoC;
|
||||
|
||||
namespace Robust.Client.GameObjects
|
||||
{
|
||||
public sealed class MidiSystem : EntitySystem
|
||||
public sealed partial class MidiSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly IMidiManager _midiManager = default!;
|
||||
[Dependency] private IMidiManager _midiManager = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
|
||||
@@ -8,10 +8,10 @@ using Robust.Shared.Maths;
|
||||
|
||||
namespace Robust.Client.GameObjects
|
||||
{
|
||||
public sealed class PointLightSystem : SharedPointLightSystem
|
||||
public sealed partial class PointLightSystem : SharedPointLightSystem
|
||||
{
|
||||
[Dependency] private readonly IResourceCache _resourceCache = default!;
|
||||
[Dependency] private readonly LightTreeSystem _lightTree = default!;
|
||||
[Dependency] private IResourceCache _resourceCache = default!;
|
||||
[Dependency] private LightTreeSystem _lightTree = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
|
||||
@@ -9,12 +9,12 @@ using Robust.Shared.Physics.Components;
|
||||
|
||||
namespace Robust.Client.GameObjects;
|
||||
|
||||
public sealed class ShowPlayerVelocityDebugSystem : EntitySystem
|
||||
public sealed partial class ShowPlayerVelocityDebugSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly IEyeManager _eyeManager = default!;
|
||||
[Dependency] private readonly IPlayerManager _playerManager = default!;
|
||||
[Dependency] private readonly TransformSystem _transform = default!;
|
||||
[Dependency] private readonly IUserInterfaceManager _uiManager = default!;
|
||||
[Dependency] private IEyeManager _eyeManager = default!;
|
||||
[Dependency] private IPlayerManager _playerManager = default!;
|
||||
[Dependency] private TransformSystem _transform = default!;
|
||||
[Dependency] private IUserInterfaceManager _uiManager = default!;
|
||||
|
||||
internal bool Enabled
|
||||
{
|
||||
|
||||
@@ -28,18 +28,18 @@ namespace Robust.Client.GameObjects
|
||||
[UsedImplicitly]
|
||||
public sealed partial class SpriteSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly IConfigurationManager _cfg = default!;
|
||||
[Dependency] private readonly IEyeManager _eye = default!;
|
||||
[Dependency] private readonly IGameTiming _timing = default!;
|
||||
[Dependency] private readonly IPrototypeManager _proto = default!;
|
||||
[Dependency] private readonly IResourceCache _resourceCache = default!;
|
||||
[Dependency] private readonly ILogManager _logManager = default!;
|
||||
[Dependency] private readonly IComponentFactory _factory = default!;
|
||||
[Dependency] private IConfigurationManager _cfg = default!;
|
||||
[Dependency] private IEyeManager _eye = default!;
|
||||
[Dependency] private IGameTiming _timing = default!;
|
||||
[Dependency] private IPrototypeManager _proto = default!;
|
||||
[Dependency] private IResourceCache _resourceCache = default!;
|
||||
[Dependency] private ILogManager _logManager = default!;
|
||||
[Dependency] private IComponentFactory _factory = default!;
|
||||
|
||||
// Note that any new system dependencies have to be added to RobustUnitTest.BaseSetup()
|
||||
[Dependency] private readonly SharedTransformSystem _xforms = default!;
|
||||
[Dependency] private readonly SpriteTreeSystem _tree = default!;
|
||||
[Dependency] private readonly AppearanceSystem _appearance = default!;
|
||||
[Dependency] private SharedTransformSystem _xforms = default!;
|
||||
[Dependency] private SpriteTreeSystem _tree = default!;
|
||||
[Dependency] private AppearanceSystem _appearance = default!;
|
||||
|
||||
public static readonly ProtoId<ShaderPrototype> UnshadedId = "unshaded";
|
||||
private readonly Queue<SpriteComponent> _inertUpdateQueue = new();
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace Robust.Client.GameObjects
|
||||
private const float MinInterpolationDistance = 0.001f;
|
||||
private const float MinInterpolationDistanceSquared = MinInterpolationDistance * MinInterpolationDistance;
|
||||
|
||||
[Dependency] private readonly IGameTiming _gameTiming = default!;
|
||||
[Dependency] private IGameTiming _gameTiming = default!;
|
||||
|
||||
// Only keep track of transforms actively lerping.
|
||||
// Much faster than iterating 3000+ transforms every frame.
|
||||
|
||||
@@ -6,12 +6,12 @@ namespace Robust.Client.GameObjects;
|
||||
/// <summary>
|
||||
/// An abstract entity system inheritor for systems that deal with appearance data.
|
||||
/// </summary>
|
||||
public abstract class VisualizerSystem<T> : EntitySystem
|
||||
where T: Component
|
||||
public abstract partial class VisualizerSystem<T> : EntitySystem
|
||||
where T : Component
|
||||
{
|
||||
[Dependency] protected readonly AppearanceSystem AppearanceSystem = default!;
|
||||
[Dependency] protected readonly AnimationPlayerSystem AnimationSystem = default!;
|
||||
[Dependency] protected readonly SpriteSystem SpriteSystem = default!;
|
||||
[Dependency] protected AppearanceSystem AppearanceSystem = default!;
|
||||
[Dependency] protected AnimationPlayerSystem AnimationSystem = default!;
|
||||
[Dependency] protected SpriteSystem SpriteSystem = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -20,5 +20,5 @@ public abstract class VisualizerSystem<T> : EntitySystem
|
||||
SubscribeLocalEvent<T, AppearanceChangeEvent>(OnAppearanceChange);
|
||||
}
|
||||
|
||||
protected virtual void OnAppearanceChange(EntityUid uid, T component, ref AppearanceChangeEvent args) {}
|
||||
protected virtual void OnAppearanceChange(EntityUid uid, T component, ref AppearanceChangeEvent args) { }
|
||||
}
|
||||
|
||||
@@ -10,10 +10,10 @@ namespace Robust.Client.GameStates;
|
||||
/// <summary>
|
||||
/// Tracks dirty entities on the client for the purposes of gamestatemanager.
|
||||
/// </summary>
|
||||
public sealed class ClientDirtySystem : EntitySystem
|
||||
public sealed partial class ClientDirtySystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly IClientGameTiming _timing = default!;
|
||||
[Dependency] private readonly IComponentFactory _compFact = default!;
|
||||
[Dependency] private IClientGameTiming _timing = default!;
|
||||
[Dependency] private IComponentFactory _compFact = default!;
|
||||
|
||||
// Entities that have removed networked components
|
||||
// could pool the ushort sets, but predicted component changes are rare... soo...
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace Robust.Client.GameStates
|
||||
{
|
||||
/// <inheritdoc />
|
||||
[UsedImplicitly]
|
||||
public sealed class ClientGameStateManager : IClientGameStateManager
|
||||
public sealed partial class ClientGameStateManager : IClientGameStateManager
|
||||
{
|
||||
private GameStateProcessor _processor = default!;
|
||||
|
||||
@@ -77,20 +77,20 @@ namespace Robust.Client.GameStates
|
||||
private uint _metaCompNetId;
|
||||
private uint _xformCompNetId;
|
||||
|
||||
[Dependency] private readonly IReplayRecordingManager _replayRecording = default!;
|
||||
[Dependency] private readonly IComponentFactory _compFactory = default!;
|
||||
[Dependency] private readonly IPlayerManager _players = default!;
|
||||
[Dependency] private readonly IClientNetManager _network = default!;
|
||||
[Dependency] private readonly IBaseClient _client = default!;
|
||||
[Dependency] private readonly IClientGameTiming _timing = default!;
|
||||
[Dependency] private readonly INetConfigurationManager _config = default!;
|
||||
[Dependency] private readonly IEntitySystemManager _entitySystemManager = default!;
|
||||
[Dependency] private readonly IConsoleHost _conHost = default!;
|
||||
[Dependency] private readonly ClientEntityManager _entities = default!;
|
||||
[Dependency] private readonly IInputManager _inputManager = default!;
|
||||
[Dependency] private readonly ProfManager _prof = default!;
|
||||
[Dependency] private readonly IRuntimeLog _runtimeLog = default!;
|
||||
[Dependency] private readonly ILogManager _logMan = default!;
|
||||
[Dependency] private IReplayRecordingManager _replayRecording = default!;
|
||||
[Dependency] private IComponentFactory _compFactory = default!;
|
||||
[Dependency] private IPlayerManager _players = default!;
|
||||
[Dependency] private IClientNetManager _network = default!;
|
||||
[Dependency] private IBaseClient _client = default!;
|
||||
[Dependency] private IClientGameTiming _timing = default!;
|
||||
[Dependency] private INetConfigurationManager _config = default!;
|
||||
[Dependency] private IEntitySystemManager _entitySystemManager = default!;
|
||||
[Dependency] private IConsoleHost _conHost = default!;
|
||||
[Dependency] private ClientEntityManager _entities = default!;
|
||||
[Dependency] private IInputManager _inputManager = default!;
|
||||
[Dependency] private ProfManager _prof = default!;
|
||||
[Dependency] private IRuntimeLog _runtimeLog = default!;
|
||||
[Dependency] private ILogManager _logMan = default!;
|
||||
|
||||
private ISawmill _sawmill = default!;
|
||||
|
||||
@@ -176,7 +176,7 @@ namespace Robust.Client.GameStates
|
||||
_conHost.RegisterCommand("resetallents", Loc.GetString("cmd-reset-all-ents-desc"), Loc.GetString("cmd-reset-all-ents-help"), ResetAllEnts);
|
||||
_conHost.RegisterCommand("detachent", Loc.GetString("cmd-detach-ent-desc"), Loc.GetString("cmd-detach-ent-help"), DetachEntCommand);
|
||||
_conHost.RegisterCommand("localdelete", Loc.GetString("cmd-local-delete-desc"), Loc.GetString("cmd-local-delete-help"), LocalDeleteEntCommand);
|
||||
_conHost.RegisterCommand("fullstatereset", Loc.GetString("cmd-full-state-reset-desc"), Loc.GetString("cmd-full-state-reset-help"), (_,_,_) => RequestFullState());
|
||||
_conHost.RegisterCommand("fullstatereset", Loc.GetString("cmd-full-state-reset-desc"), Loc.GetString("cmd-full-state-reset-help"), (_, _, _) => RequestFullState());
|
||||
|
||||
_entities.ComponentAdded += OnComponentAdded;
|
||||
|
||||
@@ -301,7 +301,7 @@ namespace Robust.Client.GameStates
|
||||
{
|
||||
// If we have been waiting for a full state for a long time, re-request a full state.
|
||||
if (_processor.WaitingForFull
|
||||
&& _processor.LastFullStateRequested is {} last
|
||||
&& _processor.LastFullStateRequested is { } last
|
||||
&& DateTime.UtcNow - last.Time > FullStateTimeout)
|
||||
{
|
||||
// Re-request a full state.
|
||||
@@ -468,7 +468,7 @@ namespace Robust.Client.GameStates
|
||||
|
||||
var ping = (_network.ServerChannel?.Ping ?? 0) / 1000f + PredictLagBias; // seconds.
|
||||
var lagTickCount = Math.Ceiling(_timing.TickRate * ping / _timing.TimeScale);
|
||||
var predictionTarget = _timing.LastProcessedTick + (uint) (_processor.TargetBufferSize + lagTickCount + PredictTickBias);
|
||||
var predictionTarget = _timing.LastProcessedTick + (uint)(_processor.TargetBufferSize + lagTickCount + PredictTickBias);
|
||||
|
||||
if (IsPredictionEnabled)
|
||||
{
|
||||
@@ -478,14 +478,14 @@ namespace Robust.Client.GameStates
|
||||
|
||||
using (_prof.Group("Tick"))
|
||||
{
|
||||
_entities.TickUpdate((float) _timing.TickPeriod.TotalSeconds, noPredictions: !IsPredictionEnabled, histogram: null);
|
||||
_entities.TickUpdate((float)_timing.TickPeriod.TotalSeconds, noPredictions: !IsPredictionEnabled, histogram: null);
|
||||
}
|
||||
}
|
||||
|
||||
public void RequestFullState(NetEntity? missingEntity = null, GameTick? tick = null)
|
||||
{
|
||||
_sawmill.Info("Requesting full server state");
|
||||
_network.ClientSendMessage(new MsgStateRequestFull { Tick = _timing.LastRealTick , MissingEntity = missingEntity ?? NetEntity.Invalid });
|
||||
_network.ClientSendMessage(new MsgStateRequestFull { Tick = _timing.LastRealTick, MissingEntity = missingEntity ?? NetEntity.Invalid });
|
||||
_processor.OnFullStateRequested(tick ?? _timing.LastRealTick);
|
||||
}
|
||||
|
||||
@@ -880,7 +880,7 @@ namespace Robust.Client.GameStates
|
||||
ref var state = ref CollectionsMarshal.GetValueRefOrAddDefault(_toApply, uid.Value, out var exists);
|
||||
|
||||
state = exists
|
||||
? state with {NextState = es}
|
||||
? state with { NextState = es }
|
||||
: new(uid.Value, es.NetEntity, meta, false, false, GameTick.Zero, null, es, null);
|
||||
}
|
||||
}
|
||||
@@ -906,7 +906,7 @@ namespace Robust.Client.GameStates
|
||||
ref var state = ref CollectionsMarshal.GetValueRefOrAddDefault(_toApply, uid, out var exists);
|
||||
|
||||
state = exists
|
||||
? state with {PendingReapply = pending}
|
||||
? state with { PendingReapply = pending }
|
||||
: new(uid, meta.NetEntity, meta, false, false, GameTick.Zero, null, null, pending);
|
||||
}
|
||||
|
||||
@@ -1031,7 +1031,7 @@ namespace Robust.Client.GameStates
|
||||
// TODO GAME STATE
|
||||
// store MetaData & Transform information separately.
|
||||
var metaState =
|
||||
(MetaDataComponentState?) state.ComponentChanges.Value?.FirstOrDefault(c => c.NetID == _metaCompNetId)
|
||||
(MetaDataComponentState?)state.ComponentChanges.Value?.FirstOrDefault(c => c.NetID == _metaCompNetId)
|
||||
.State;
|
||||
|
||||
if (metaState == null)
|
||||
@@ -1119,7 +1119,7 @@ namespace Robust.Client.GameStates
|
||||
&& data.CurState.ComponentChanges.Value
|
||||
.TryFirstOrNull(c => c.NetID == _xformCompNetId, out var found))
|
||||
{
|
||||
var state = (TransformComponentState) found.Value.State!;
|
||||
var state = (TransformComponentState)found.Value.State!;
|
||||
return _entities.GetEntity(state.ParentID);
|
||||
}
|
||||
|
||||
@@ -1361,7 +1361,7 @@ namespace Robust.Client.GameStates
|
||||
_compStateWork.Clear();
|
||||
|
||||
// First remove any deleted components
|
||||
if (data.CurState?.NetComponents is {} netComps)
|
||||
if (data.CurState?.NetComponents is { } netComps)
|
||||
{
|
||||
_toRemove.Clear();
|
||||
|
||||
@@ -1439,7 +1439,7 @@ namespace Robust.Client.GameStates
|
||||
|
||||
// If we have a NetEntity we reference come in then apply their state.
|
||||
DebugTools.Assert(_pendingReapplyNetStates.ContainsKey(data.Uid) == (data.PendingReapply != null));
|
||||
if (data.PendingReapply is {} reapplyTypes)
|
||||
if (data.PendingReapply is { } reapplyTypes)
|
||||
{
|
||||
var lastState = _processor.GetLastServerStates(data.NetEntity);
|
||||
|
||||
|
||||
@@ -20,12 +20,12 @@ namespace Robust.Client.GameStates
|
||||
/// A network entity report that lists all entities as they are updated through game states.
|
||||
/// https://developer.valvesoftware.com/wiki/Networking_Entities#cl_entityreport
|
||||
/// </summary>
|
||||
sealed class NetEntityOverlay : Overlay
|
||||
sealed partial class NetEntityOverlay : Overlay
|
||||
{
|
||||
[Dependency] private readonly IClientGameTiming _gameTiming = default!;
|
||||
[Dependency] private readonly IClientNetManager _netManager = default!;
|
||||
[Dependency] private readonly IClientGameStateManager _gameStateManager = default!;
|
||||
[Dependency] private readonly IEntityManager _entityManager = default!;
|
||||
[Dependency] private IClientGameTiming _gameTiming = default!;
|
||||
[Dependency] private IClientNetManager _netManager = default!;
|
||||
[Dependency] private IClientGameStateManager _gameStateManager = default!;
|
||||
[Dependency] private IEntityManager _entityManager = default!;
|
||||
|
||||
private const uint TrafficHistorySize = 64; // Size of the traffic history bar in game ticks.
|
||||
private const int _maxEnts = 128; // maximum number of entities to track.
|
||||
@@ -176,7 +176,7 @@ namespace Robust.Client.GameStates
|
||||
private sealed class NetEntData
|
||||
{
|
||||
public GameTick LastUpdate = GameTick.Zero;
|
||||
public readonly OverflowDictionary<GameTick, EntState> Traffic = new((int) TrafficHistorySize);
|
||||
public readonly OverflowDictionary<GameTick, EntState> Traffic = new((int)TrafficHistorySize);
|
||||
public bool Exists = true;
|
||||
public bool InPVS = true;
|
||||
|
||||
|
||||
@@ -20,14 +20,14 @@ namespace Robust.Client.GameStates
|
||||
/// <summary>
|
||||
/// Visual debug overlay for the network diagnostic graph.
|
||||
/// </summary>
|
||||
internal sealed class NetGraphOverlay : Overlay
|
||||
internal sealed partial class NetGraphOverlay : Overlay
|
||||
{
|
||||
[Dependency] private readonly IGameTiming _gameTiming = default!;
|
||||
[Dependency] private readonly IClientNetManager _netManager = default!;
|
||||
[Dependency] private readonly IClientGameStateManager _gameStateManager = default!;
|
||||
[Dependency] private readonly IComponentFactory _componentFactory = default!;
|
||||
[Dependency] private readonly IConsoleHost _host = default!;
|
||||
[Dependency] private readonly IEntityManager _entManager = default!;
|
||||
[Dependency] private IGameTiming _gameTiming = default!;
|
||||
[Dependency] private IClientNetManager _netManager = default!;
|
||||
[Dependency] private IClientGameStateManager _gameStateManager = default!;
|
||||
[Dependency] private IComponentFactory _componentFactory = default!;
|
||||
[Dependency] private IConsoleHost _host = default!;
|
||||
[Dependency] private IEntityManager _entManager = default!;
|
||||
|
||||
private const int HistorySize = 60 * 5; // number of ticks to keep in history.
|
||||
private const int TargetPayloadBps = 56000 / 8; // Target Payload size in Bytes per second. A mind-numbing fifty-six thousand bits per second, who would ever need more?
|
||||
@@ -43,7 +43,7 @@ namespace Robust.Client.GameStates
|
||||
|
||||
private readonly Font _font;
|
||||
|
||||
private readonly List<(GameTick Tick, int Payload, int lag, int Buffer)> _history = new(HistorySize+10);
|
||||
private readonly List<(GameTick Tick, int Payload, int lag, int Buffer)> _history = new(HistorySize + 10);
|
||||
|
||||
// sum of all data point sizes in bytes
|
||||
private int _totalHistoryPayload;
|
||||
@@ -74,7 +74,7 @@ namespace Robust.Client.GameStates
|
||||
_history.Add((toSeq, sz, lag, buffer));
|
||||
|
||||
// not watching an ent
|
||||
if(!WatchEntId.IsValid() || _entManager.IsClientSide(WatchEntId))
|
||||
if (!WatchEntId.IsValid() || _entManager.IsClientSide(WatchEntId))
|
||||
return;
|
||||
|
||||
string? entStateString = null;
|
||||
@@ -175,7 +175,7 @@ namespace Robust.Client.GameStates
|
||||
// the minimum size seems to be about 10 bytes.
|
||||
// 10 bytes = 15 pixel, then doubling every 15 more pixels.
|
||||
bytes = Math.Max(bytes - 10, 1);
|
||||
return (int) Math.Round((1 + Math.Log2(bytes)) * 15);
|
||||
return (int)Math.Round((1 + Math.Log2(bytes)) * 15);
|
||||
}
|
||||
|
||||
protected internal override void Draw(in OverlayDrawArgs args)
|
||||
@@ -209,9 +209,9 @@ namespace Robust.Client.GameStates
|
||||
handle.DrawLine(new Vector2(xOff, height), new Vector2(xOff, yoff), Color.LimeGreen.WithAlpha(0.8f));
|
||||
|
||||
// second tick marks
|
||||
if (state.Tick.Value % (_gameTiming.TickRate/5) == 0)
|
||||
if (state.Tick.Value % (_gameTiming.TickRate / 5) == 0)
|
||||
{
|
||||
handle.DrawLine(new Vector2(xOff, height), new Vector2(xOff, height+2), Color.LightGray);
|
||||
handle.DrawLine(new Vector2(xOff, height), new Vector2(xOff, height + 2), Color.LightGray);
|
||||
}
|
||||
|
||||
// lag data
|
||||
@@ -222,9 +222,9 @@ namespace Robust.Client.GameStates
|
||||
|
||||
// interp data
|
||||
Color interpColor;
|
||||
if(state.Buffer < _gameStateManager.MinBufferSize)
|
||||
if (state.Buffer < _gameStateManager.MinBufferSize)
|
||||
interpColor = Color.Red;
|
||||
else if(state.Buffer < _gameStateManager.TargetBufferSize)
|
||||
else if (state.Buffer < _gameStateManager.TargetBufferSize)
|
||||
interpColor = Color.Yellow;
|
||||
else
|
||||
interpColor = Color.Green;
|
||||
@@ -234,7 +234,7 @@ namespace Robust.Client.GameStates
|
||||
}
|
||||
|
||||
// average payload line
|
||||
var avg = height - BytesToPixels(_totalHistoryPayload/HistorySize);
|
||||
var avg = height - BytesToPixels(_totalHistoryPayload / HistorySize);
|
||||
var avgEnd = new Vector2(LeftMargin + width, avg) + new Vector2(70, 0);
|
||||
handle.DrawLine(new Vector2(LeftMargin, avg), avgEnd, Color.DarkGray.WithAlpha(0.8f));
|
||||
|
||||
@@ -264,7 +264,7 @@ namespace Robust.Client.GameStates
|
||||
handle.DrawString(_font, avgEnd - new Vector2(lineHeight, lineHeight), "average");
|
||||
|
||||
// lag text info
|
||||
if(lastLagY != -1)
|
||||
if (lastLagY != -1)
|
||||
handle.DrawString(_font, new Vector2(LeftMargin + width, lastLagY), $"{lastLagMs.ToString()}ms");
|
||||
|
||||
// buffer text
|
||||
@@ -286,7 +286,7 @@ namespace Robust.Client.GameStates
|
||||
{
|
||||
var overlayMan = IoCManager.Resolve<IOverlayManager>();
|
||||
|
||||
if(!overlayMan.HasOverlay(typeof(NetGraphOverlay)))
|
||||
if (!overlayMan.HasOverlay(typeof(NetGraphOverlay)))
|
||||
{
|
||||
overlayMan.AddOverlay(new NetGraphOverlay());
|
||||
shell.WriteLine("Enabled network overlay.");
|
||||
@@ -299,11 +299,11 @@ namespace Robust.Client.GameStates
|
||||
}
|
||||
}
|
||||
|
||||
private sealed class NetWatchEntCommand : LocalizedCommands
|
||||
private sealed partial class NetWatchEntCommand : LocalizedCommands
|
||||
{
|
||||
[Dependency] private readonly IEntityManager _entManager = default!;
|
||||
[Dependency] private readonly IOverlayManager _overlayManager = default!;
|
||||
[Dependency] private readonly IPlayerManager _playerManager = default!;
|
||||
[Dependency] private IEntityManager _entManager = default!;
|
||||
[Dependency] private IOverlayManager _overlayManager = default!;
|
||||
[Dependency] private IPlayerManager _playerManager = default!;
|
||||
|
||||
public override string Command => "net_watchent";
|
||||
|
||||
|
||||
@@ -11,13 +11,13 @@ using Robust.Shared.Timing;
|
||||
|
||||
namespace Robust.Client.GameStates
|
||||
{
|
||||
internal sealed class NetInterpOverlay : Overlay
|
||||
internal sealed partial class NetInterpOverlay : Overlay
|
||||
{
|
||||
private static readonly ProtoId<ShaderPrototype> UnshadedShader = "unshaded";
|
||||
|
||||
[Dependency] private readonly IGameTiming _timing = default!;
|
||||
[Dependency] private readonly IEntityManager _entityManager = default!;
|
||||
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
|
||||
[Dependency] private IGameTiming _timing = default!;
|
||||
[Dependency] private IEntityManager _entityManager = default!;
|
||||
[Dependency] private IPrototypeManager _prototypeManager = default!;
|
||||
private readonly EntityLookupSystem _lookup;
|
||||
|
||||
public override OverlaySpace Space => OverlaySpace.WorldSpace;
|
||||
@@ -43,7 +43,7 @@ namespace Robust.Client.GameStates
|
||||
{
|
||||
var handle = args.DrawingHandle;
|
||||
handle.UseShader(_shader);
|
||||
var worldHandle = (DrawingHandleWorld) handle;
|
||||
var worldHandle = (DrawingHandleWorld)handle;
|
||||
var viewport = args.WorldAABB;
|
||||
|
||||
var query = _entityManager.AllEntityQueryEnumerator<TransformComponent>();
|
||||
@@ -57,7 +57,7 @@ namespace Robust.Client.GameStates
|
||||
continue;
|
||||
|
||||
var delta = (_timing.CurTick.Value - transform.LastLerp.Value) * _timing.TickPeriod;
|
||||
if(!transform.ActivelyLerping && delta > Delay)
|
||||
if (!transform.ActivelyLerping && delta > Delay)
|
||||
continue;
|
||||
|
||||
var aabb = _lookup.GetWorldAABB(uid);
|
||||
@@ -90,10 +90,10 @@ namespace Robust.Client.GameStates
|
||||
}
|
||||
}
|
||||
|
||||
private sealed class NetShowInterpCommand : LocalizedCommands
|
||||
private sealed partial class NetShowInterpCommand : LocalizedCommands
|
||||
{
|
||||
[Dependency] private readonly IEntityManager _entManager = default!;
|
||||
[Dependency] private readonly IOverlayManager _overlay = default!;
|
||||
[Dependency] private IEntityManager _entManager = default!;
|
||||
[Dependency] private IOverlayManager _overlay = default!;
|
||||
|
||||
public override string Command => "net_draw_interp";
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ using Robust.Shared.Maths;
|
||||
namespace Robust.Client.Graphics
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public sealed class EyeManager : IEyeManager
|
||||
public sealed partial class EyeManager : IEyeManager
|
||||
{
|
||||
// If you modify this make sure to edit the value in the Robust.Shared.Audio.AudioParams struct default too!
|
||||
// No I can't be bothered to make this a shared constant.
|
||||
@@ -22,9 +22,9 @@ namespace Robust.Client.Graphics
|
||||
/// </summary>
|
||||
public const int PixelsPerMeter = 32;
|
||||
|
||||
[Dependency] private readonly IClyde _displayManager = default!;
|
||||
[Dependency] private readonly IEntityManager _entityManager = default!;
|
||||
[Dependency] private readonly IUserInterfaceManager _uiManager = default!;
|
||||
[Dependency] private IClyde _displayManager = default!;
|
||||
[Dependency] private IEntityManager _entityManager = default!;
|
||||
[Dependency] private IUserInterfaceManager _uiManager = default!;
|
||||
private ISawmill _logMill = default!;
|
||||
|
||||
// We default to this when we get set to a null eye.
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace Robust.Client.Graphics.Clyde;
|
||||
// this partial class contains code specific to querying, processing & sorting sprites.
|
||||
internal partial class Clyde
|
||||
{
|
||||
[Shared.IoC.Dependency] private readonly IParallelManager _parMan = default!;
|
||||
[Shared.IoC.Dependency] private IParallelManager _parMan = default!;
|
||||
private readonly RefList<SpriteData> _drawingSpriteList = new();
|
||||
private const int _spriteProcessingBatchSize = 25;
|
||||
|
||||
|
||||
@@ -34,25 +34,25 @@ namespace Robust.Client.Graphics.Clyde
|
||||
/// </summary>
|
||||
internal sealed partial class Clyde : IClydeInternal, IPostInjectInit, IEntityEventSubscriber
|
||||
{
|
||||
[Dependency] private readonly IClydeTileDefinitionManager _tileDefinitionManager = default!;
|
||||
[Dependency] private readonly ILightManager _lightManager = default!;
|
||||
[Dependency] private readonly ILogManager _logManager = default!;
|
||||
[Dependency] private readonly IMapManager _mapManager = default!;
|
||||
[Dependency] private readonly IOverlayManager _overlayManager = default!;
|
||||
[Dependency] private readonly IResourceCache _resourceCache = default!;
|
||||
[Dependency] private readonly IResourceManager _resManager = default!;
|
||||
[Dependency] private readonly IUserInterfaceManagerInternal _userInterfaceManager = default!;
|
||||
[Dependency] private readonly IEntitySystemManager _entitySystemManager = default!;
|
||||
[Dependency] private readonly IGameTiming _gameTiming = default!;
|
||||
[Dependency] private readonly IConfigurationManager _cfg = default!;
|
||||
[Dependency] private readonly ProfManager _prof = default!;
|
||||
[Dependency] private readonly IDependencyCollection _deps = default!;
|
||||
[Dependency] private readonly ILocalizationManager _loc = default!;
|
||||
[Dependency] private readonly IInputManager _inputManager = default!;
|
||||
[Dependency] private readonly ClientEntityManager _entityManager = default!;
|
||||
[Dependency] private readonly IPrototypeManager _proto = default!;
|
||||
[Dependency] private readonly IReloadManager _reloads = default!;
|
||||
[Dependency] private readonly LoadingScreenManager _loadingScreenManager = default!;
|
||||
[Dependency] private IClydeTileDefinitionManager _tileDefinitionManager = default!;
|
||||
[Dependency] private ILightManager _lightManager = default!;
|
||||
[Dependency] private ILogManager _logManager = default!;
|
||||
[Dependency] private IMapManager _mapManager = default!;
|
||||
[Dependency] private IOverlayManager _overlayManager = default!;
|
||||
[Dependency] private IResourceCache _resourceCache = default!;
|
||||
[Dependency] private IResourceManager _resManager = default!;
|
||||
[Dependency] private IUserInterfaceManagerInternal _userInterfaceManager = default!;
|
||||
[Dependency] private IEntitySystemManager _entitySystemManager = default!;
|
||||
[Dependency] private IGameTiming _gameTiming = default!;
|
||||
[Dependency] private IConfigurationManager _cfg = default!;
|
||||
[Dependency] private ProfManager _prof = default!;
|
||||
[Dependency] private IDependencyCollection _deps = default!;
|
||||
[Dependency] private ILocalizationManager _loc = default!;
|
||||
[Dependency] private IInputManager _inputManager = default!;
|
||||
[Dependency] private ClientEntityManager _entityManager = default!;
|
||||
[Dependency] private IPrototypeManager _proto = default!;
|
||||
[Dependency] private IReloadManager _reloads = default!;
|
||||
[Dependency] private LoadingScreenManager _loadingScreenManager = default!;
|
||||
|
||||
private GLUniformBuffer<ProjViewMatrices> ProjViewUBO = default!;
|
||||
private GLUniformBuffer<UniformConstants> UniformConstantsUBO = default!;
|
||||
|
||||
@@ -14,8 +14,8 @@ internal partial class Clyde
|
||||
{
|
||||
private sealed partial class Sdl3WindowingImpl : IWindowingImpl
|
||||
{
|
||||
[Dependency] private readonly ILogManager _logManager = default!;
|
||||
[Dependency] private readonly IConfigurationManager _cfg = default!;
|
||||
[Dependency] private ILogManager _logManager = default!;
|
||||
[Dependency] private IConfigurationManager _cfg = default!;
|
||||
|
||||
private readonly Clyde _clyde;
|
||||
private GCHandle _selfGCHandle;
|
||||
|
||||
@@ -16,7 +16,7 @@ internal sealed partial class SystemFontDebugWindow : DefaultWindow
|
||||
private static readonly int[] ExampleFontSizes = [8, 12, 16, 24, 36];
|
||||
private const string ExampleString = "The quick brown fox jumps over the lazy dog";
|
||||
|
||||
[Dependency] private readonly ISystemFontManager _systemFontManager = default!;
|
||||
[Dependency] private ISystemFontManager _systemFontManager = default!;
|
||||
|
||||
public SystemFontDebugWindow()
|
||||
{
|
||||
|
||||
@@ -35,12 +35,12 @@ internal interface ILoadingScreenManager
|
||||
/// <summary>
|
||||
/// Manager that creates and displays a basic splash screen and loading bar.
|
||||
/// </summary>
|
||||
internal sealed class LoadingScreenManager : ILoadingScreenManager
|
||||
internal sealed partial class LoadingScreenManager : ILoadingScreenManager
|
||||
{
|
||||
[Dependency] private readonly IResourceCache _resourceCache = default!;
|
||||
[Dependency] private readonly IClydeInternal _clyde = default!;
|
||||
[Dependency] private readonly IConfigurationManager _cfg = default!;
|
||||
[Dependency] private readonly ILogManager _logManager = default!;
|
||||
[Dependency] private IResourceCache _resourceCache = default!;
|
||||
[Dependency] private IClydeInternal _clyde = default!;
|
||||
[Dependency] private IConfigurationManager _cfg = default!;
|
||||
[Dependency] private ILogManager _logManager = default!;
|
||||
|
||||
private ISawmill _sawmill = default!;
|
||||
|
||||
@@ -226,7 +226,7 @@ internal sealed class LoadingScreenManager : ILoadingScreenManager
|
||||
var drawSize = textureResource.Texture.Size * scale;
|
||||
|
||||
handle.DrawingHandleScreen.DrawTextureRect(textureResource.Texture, UIBox2.FromDimensions(startLocation - drawSize / 2, drawSize));
|
||||
startLocation += Vector2i.Up * (int) drawSize.Y / 2;
|
||||
startLocation += Vector2i.Up * (int)drawSize.Y / 2;
|
||||
}
|
||||
|
||||
private void DrawLoadingBar(IRenderHandle handle, ref Vector2i location, float scale)
|
||||
@@ -237,7 +237,7 @@ internal sealed class LoadingScreenManager : ILoadingScreenManager
|
||||
|
||||
// Always do the offsets, it looks a lot better!
|
||||
location.X -= barWidth / 2;
|
||||
location += (Vector2i) (LogoLoadingBarOffset * scale);
|
||||
location += (Vector2i)(LogoLoadingBarOffset * scale);
|
||||
|
||||
if (!_showLoadingBar)
|
||||
return;
|
||||
@@ -299,9 +299,9 @@ internal sealed class LoadingScreenManager : ILoadingScreenManager
|
||||
#endregion // Drawing functions
|
||||
}
|
||||
|
||||
internal sealed class ShowTopLoadingTimesCommand : IConsoleCommand
|
||||
internal sealed partial class ShowTopLoadingTimesCommand : IConsoleCommand
|
||||
{
|
||||
[Dependency] private readonly LoadingScreenManager _mgr = default!;
|
||||
[Dependency] private LoadingScreenManager _mgr = default!;
|
||||
|
||||
public string Command => "loading_top";
|
||||
public string Description => "";
|
||||
|
||||
@@ -8,9 +8,9 @@ using Robust.Shared.ViewVariables;
|
||||
|
||||
namespace Robust.Client.Graphics;
|
||||
|
||||
internal sealed class OverlayManager : IOverlayManagerInternal, IPostInjectInit
|
||||
internal sealed partial class OverlayManager : IOverlayManagerInternal, IPostInjectInit
|
||||
{
|
||||
[Dependency] private readonly ILogManager _logMan = default!;
|
||||
[Dependency] private ILogManager _logMan = default!;
|
||||
|
||||
[ViewVariables]
|
||||
private readonly Dictionary<Type, Overlay> _overlays = new();
|
||||
|
||||
@@ -13,11 +13,11 @@ namespace Robust.Client.Graphics;
|
||||
/// Implementation of <see cref="ISystemFontManager"/> that proxies to platform-specific implementations,
|
||||
/// and adds additional logging.
|
||||
/// </summary>
|
||||
internal sealed class SystemFontManager : ISystemFontManagerInternal, IPostInjectInit
|
||||
internal sealed partial class SystemFontManager : ISystemFontManagerInternal, IPostInjectInit
|
||||
{
|
||||
[Dependency] private readonly IFontManagerInternal _fontManager = default!;
|
||||
[Dependency] private readonly ILogManager _logManager = default!;
|
||||
[Dependency] private readonly IConfigurationManager _cfg = default!;
|
||||
[Dependency] private IFontManagerInternal _fontManager = default!;
|
||||
[Dependency] private ILogManager _logManager = default!;
|
||||
[Dependency] private IConfigurationManager _cfg = default!;
|
||||
|
||||
private ISawmill _sawmill = default!;
|
||||
|
||||
|
||||
@@ -8,9 +8,9 @@ using Robust.Shared.Network;
|
||||
|
||||
namespace Robust.Client.HWId;
|
||||
|
||||
internal sealed class BasicHWId : IHWId
|
||||
internal sealed partial class BasicHWId : IHWId
|
||||
{
|
||||
[Dependency] private readonly IGameControllerInternal _gameController = default!;
|
||||
[Dependency] private IGameControllerInternal _gameController = default!;
|
||||
|
||||
public const int LengthHwid = 32;
|
||||
|
||||
@@ -31,7 +31,7 @@ internal sealed class BasicHWId : IHWId
|
||||
else
|
||||
raw = GetFileHWid();
|
||||
|
||||
return [0, ..raw];
|
||||
return [0, .. raw];
|
||||
}
|
||||
|
||||
private static byte[] GetWindowsHWid(string keyName)
|
||||
|
||||
@@ -5,9 +5,9 @@ using Robust.Shared.Maths;
|
||||
|
||||
namespace Robust.Client.Input
|
||||
{
|
||||
internal sealed class ClydeInputManager : InputManager
|
||||
internal sealed partial class ClydeInputManager : InputManager
|
||||
{
|
||||
[Dependency] private readonly IClydeInternal _clyde = default!;
|
||||
[Dependency] private IClydeInternal _clyde = default!;
|
||||
|
||||
public override ScreenCoordinates MouseScreenPosition => _clyde.MouseScreenPosition;
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ using static Robust.Client.Input.Keyboard;
|
||||
namespace Robust.Client.Input
|
||||
{
|
||||
[Virtual]
|
||||
internal class InputManager : IInputManager
|
||||
internal partial class InputManager : IInputManager
|
||||
{
|
||||
// This is for both userdata and resources.
|
||||
private const string KeybindsPath = "/keybinds.yml";
|
||||
@@ -43,11 +43,11 @@ namespace Robust.Client.Input
|
||||
|
||||
[ViewVariables] public virtual ScreenCoordinates MouseScreenPosition => default;
|
||||
|
||||
[Dependency] private readonly IResourceManager _resourceMan = default!;
|
||||
[Dependency] private readonly IReflectionManager _reflectionManager = default!;
|
||||
[Dependency] private readonly IUserInterfaceManagerInternal _uiMgr = default!;
|
||||
[Dependency] private readonly IConsoleHost _console = default!;
|
||||
[Dependency] private readonly ISerializationManager _serialization = default!;
|
||||
[Dependency] private IResourceManager _resourceMan = default!;
|
||||
[Dependency] private IReflectionManager _reflectionManager = default!;
|
||||
[Dependency] private IUserInterfaceManagerInternal _uiMgr = default!;
|
||||
[Dependency] private IConsoleHost _console = default!;
|
||||
[Dependency] private ISerializationManager _serialization = default!;
|
||||
private ISawmill _logger = default!;
|
||||
|
||||
private bool _currentlyFindingViewport;
|
||||
@@ -181,7 +181,7 @@ namespace Robust.Client.Input
|
||||
|
||||
var path = new ResPath(KeybindsPath);
|
||||
using var writer = _resourceMan.UserData.OpenWriteText(path);
|
||||
var stream = new YamlStream {new(mapping.ToYaml())};
|
||||
var stream = new YamlStream { new(mapping.ToYaml()) };
|
||||
stream.Save(new YamlMappingFix(new Emitter(writer)), false);
|
||||
}
|
||||
|
||||
@@ -229,7 +229,7 @@ namespace Robust.Client.Input
|
||||
return;
|
||||
}
|
||||
|
||||
_keysPressed[(int) args.Key] = true;
|
||||
_keysPressed[(int)args.Key] = true;
|
||||
|
||||
PackedKeyCombo matchedCombo = default;
|
||||
|
||||
@@ -306,7 +306,7 @@ namespace Robust.Client.Input
|
||||
args.Key,
|
||||
args.ScanCode,
|
||||
action,
|
||||
(Vector2i) (mousePos ?? Vector2.Zero),
|
||||
(Vector2i)(mousePos ?? Vector2.Zero),
|
||||
args.RawCode);
|
||||
|
||||
var block = rawInput.RawKeyEvent(keyEvent);
|
||||
@@ -338,7 +338,7 @@ namespace Robust.Client.Input
|
||||
}
|
||||
}
|
||||
|
||||
_keysPressed[(int) args.Key] = false;
|
||||
_keysPressed[(int)args.Key] = false;
|
||||
|
||||
if (hasCanFocus)
|
||||
{
|
||||
@@ -486,10 +486,10 @@ namespace Robust.Client.Input
|
||||
{
|
||||
var (baseKey, mod1, mod2, mod3) = packed;
|
||||
|
||||
if (!_keysPressed[(int) baseKey]) return false;
|
||||
if (mod1 != Key.Unknown && !_keysPressed[(int) mod1]) return false;
|
||||
if (mod2 != Key.Unknown && !_keysPressed[(int) mod2]) return false;
|
||||
if (mod3 != Key.Unknown && !_keysPressed[(int) mod3]) return false;
|
||||
if (!_keysPressed[(int)baseKey]) return false;
|
||||
if (mod1 != Key.Unknown && !_keysPressed[(int)mod1]) return false;
|
||||
if (mod2 != Key.Unknown && !_keysPressed[(int)mod2]) return false;
|
||||
if (mod3 != Key.Unknown && !_keysPressed[(int)mod3]) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -510,7 +510,7 @@ namespace Robust.Client.Input
|
||||
{
|
||||
for (var i = 0; i < 32; i += 8)
|
||||
{
|
||||
var key = (Key) ((subPackedCombo.Packed >> i) & 0b_1111_1111);
|
||||
var key = (Key)((subPackedCombo.Packed >> i) & 0b_1111_1111);
|
||||
if (key != Key.Unknown && !PackedContainsKey(packedCombo, key))
|
||||
{
|
||||
return false;
|
||||
@@ -541,7 +541,7 @@ namespace Robust.Client.Input
|
||||
using var _ = reader;
|
||||
|
||||
var documents = DataNodeParser.ParseYamlStream(reader).First();
|
||||
var mapping = (MappingDataNode) documents.Root;
|
||||
var mapping = (MappingDataNode)documents.Root;
|
||||
|
||||
if (mapping.TryGet("binds", out var BaseKeyRegsNode))
|
||||
{
|
||||
@@ -628,7 +628,7 @@ namespace Robust.Client.Input
|
||||
public void RemoveBinding(IKeyBinding binding, bool markModified = true)
|
||||
{
|
||||
var bindings = _bindingsByFunction[binding.Function];
|
||||
var cast = (KeyBinding) binding;
|
||||
var cast = (KeyBinding)binding;
|
||||
if (!bindings.Remove(cast))
|
||||
{
|
||||
// Keybind does not exist.
|
||||
@@ -714,7 +714,7 @@ namespace Robust.Client.Input
|
||||
|
||||
public bool IsKeyDown(Key key)
|
||||
{
|
||||
return _keysPressed[(int) key];
|
||||
return _keysPressed[(int)key];
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
@@ -968,9 +968,9 @@ namespace Robust.Client.Input
|
||||
}
|
||||
|
||||
[UsedImplicitly]
|
||||
internal sealed class BindCommand : LocalizedCommands
|
||||
internal sealed partial class BindCommand : LocalizedCommands
|
||||
{
|
||||
[Dependency] private readonly IInputManager _inputManager = default!;
|
||||
[Dependency] private IInputManager _inputManager = default!;
|
||||
|
||||
public override string Command => "bind";
|
||||
|
||||
@@ -1018,7 +1018,7 @@ namespace Robust.Client.Input
|
||||
|
||||
if (args.Length == 2)
|
||||
{
|
||||
var options = Enum.GetNames<KeyBindingType>().Except(new []{nameof(KeyBindingType.Unknown)});
|
||||
var options = Enum.GetNames<KeyBindingType>().Except(new[] { nameof(KeyBindingType.Unknown) });
|
||||
return CompletionResult.FromHintOptions(options, Loc.GetString("cmd-bind-arg-mode"));
|
||||
}
|
||||
|
||||
@@ -1042,9 +1042,9 @@ namespace Robust.Client.Input
|
||||
}
|
||||
|
||||
[UsedImplicitly]
|
||||
internal sealed class SaveBindCommand : LocalizedCommands
|
||||
internal sealed partial class SaveBindCommand : LocalizedCommands
|
||||
{
|
||||
[Dependency] private readonly IInputManager _inputManager = default!;
|
||||
[Dependency] private IInputManager _inputManager = default!;
|
||||
|
||||
public override string Command => "svbind";
|
||||
|
||||
|
||||
@@ -4,9 +4,9 @@ using Robust.Shared.Utility;
|
||||
|
||||
namespace Robust.Client.Localization;
|
||||
|
||||
internal sealed class ClientLocalizationManager : LocalizationManager, ILocalizationManagerInternal
|
||||
internal sealed partial class ClientLocalizationManager : LocalizationManager, ILocalizationManagerInternal
|
||||
{
|
||||
[Dependency] private readonly IReloadManager _reload = default!;
|
||||
[Dependency] private IReloadManager _reload = default!;
|
||||
|
||||
void ILocalizationManager.Initialize() => Initialize();
|
||||
|
||||
|
||||
@@ -19,12 +19,12 @@ using SixLabors.ImageSharp.Processing;
|
||||
|
||||
namespace Robust.Client.Map
|
||||
{
|
||||
internal sealed class ClydeTileDefinitionManager : TileDefinitionManager, IClydeTileDefinitionManager, IPostInjectInit
|
||||
internal sealed partial class ClydeTileDefinitionManager : TileDefinitionManager, IClydeTileDefinitionManager, IPostInjectInit
|
||||
{
|
||||
[Dependency] private readonly IPrototypeManager _protoManager = default!;
|
||||
[Dependency] private readonly IReloadManager _reload = default!;
|
||||
[Dependency] private readonly IResourceManager _manager = default!;
|
||||
[Dependency] private readonly ILogManager _logManager = default!;
|
||||
[Dependency] private IPrototypeManager _protoManager = default!;
|
||||
[Dependency] private IReloadManager _reload = default!;
|
||||
[Dependency] private IResourceManager _manager = default!;
|
||||
[Dependency] private ILogManager _logManager = default!;
|
||||
|
||||
private ISawmill _sawmill = default!;
|
||||
|
||||
@@ -107,14 +107,14 @@ namespace Robust.Client.Map
|
||||
|
||||
var tileCount = defList.Select(x => x.Variants + x.EdgeSprites.Count).Sum() + 1;
|
||||
|
||||
var dimensionX = (int) Math.Ceiling(Math.Sqrt(tileCount));
|
||||
var dimensionY = (int) Math.Ceiling((float) tileCount / dimensionX);
|
||||
var dimensionX = (int)Math.Ceiling(Math.Sqrt(tileCount));
|
||||
var dimensionY = (int)Math.Ceiling((float)tileCount / dimensionX);
|
||||
|
||||
var imgWidth = dimensionX * tileSize;
|
||||
var imgHeight = dimensionY * tileSize;
|
||||
var sheet = new Image<Rgba32>(imgWidth, imgHeight);
|
||||
var w = (float) sheet.Width;
|
||||
var h = (float) sheet.Height;
|
||||
var w = (float)sheet.Width;
|
||||
var h = (float)sheet.Height;
|
||||
|
||||
// Add in the missing tile texture sprite as tile texture 0.
|
||||
{
|
||||
@@ -265,9 +265,9 @@ namespace Robust.Client.Map
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class ReloadTileTexturesCommand : LocalizedCommands
|
||||
public sealed partial class ReloadTileTexturesCommand : LocalizedCommands
|
||||
{
|
||||
[Dependency] private readonly ClydeTileDefinitionManager _tile = default!;
|
||||
[Dependency] private ClydeTileDefinitionManager _tile = default!;
|
||||
|
||||
public override string Command => "reloadtiletextures";
|
||||
|
||||
|
||||
@@ -14,9 +14,9 @@ using TerraFX.Interop.DirectX;
|
||||
|
||||
namespace Robust.Client.Physics
|
||||
{
|
||||
internal sealed class PhysicsIslandCommand : LocalizedCommands
|
||||
internal sealed partial class PhysicsIslandCommand : LocalizedCommands
|
||||
{
|
||||
[Dependency] private readonly IEntitySystemManager _entitySystemManager = default!;
|
||||
[Dependency] private IEntitySystemManager _entitySystemManager = default!;
|
||||
|
||||
public override string Command => "showislands";
|
||||
|
||||
@@ -33,12 +33,12 @@ namespace Robust.Client.Physics
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class DebugPhysicsIslandSystem : EntitySystem
|
||||
internal sealed partial class DebugPhysicsIslandSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly IGameTiming _gameTiming = default!;
|
||||
[Dependency] private readonly IEyeManager _eyeManager = default!;
|
||||
[Dependency] private readonly IOverlayManager _overlayManager = default!;
|
||||
[Dependency] private readonly EntityLookupSystem _lookup = default!;
|
||||
[Dependency] private IGameTiming _gameTiming = default!;
|
||||
[Dependency] private IEyeManager _eyeManager = default!;
|
||||
[Dependency] private IOverlayManager _overlayManager = default!;
|
||||
[Dependency] private EntityLookupSystem _lookup = default!;
|
||||
|
||||
public DebugPhysicsIslandMode Mode { get; set; } = DebugPhysicsIslandMode.None;
|
||||
|
||||
|
||||
@@ -10,12 +10,12 @@ using Robust.Shared.Maths;
|
||||
|
||||
namespace Robust.Client.Physics
|
||||
{
|
||||
internal sealed class GridFixtureSystem : SharedGridFixtureSystem
|
||||
internal sealed partial class GridFixtureSystem : SharedGridFixtureSystem
|
||||
{
|
||||
[Dependency] private readonly IOverlayManager _overlay = default!;
|
||||
[Dependency] private readonly IMapManager _mapManager = default!;
|
||||
[Dependency] private readonly SharedTransformSystem _transform = default!;
|
||||
[Dependency] private readonly SharedMapSystem _map = default!;
|
||||
[Dependency] private IOverlayManager _overlay = default!;
|
||||
[Dependency] private IMapManager _mapManager = default!;
|
||||
[Dependency] private SharedTransformSystem _transform = default!;
|
||||
[Dependency] private SharedMapSystem _map = default!;
|
||||
|
||||
public bool EnableDebug
|
||||
{
|
||||
@@ -132,9 +132,9 @@ namespace Robust.Client.Physics
|
||||
// Add an offset to yIndex so we at least have some colour that isn't grey at 0,0
|
||||
var actualIndex = chunk.Indices.X * 20 + (chunk.Indices.Y + 20) * 35 + index * 50;
|
||||
|
||||
var red = (byte) (actualIndex % 255);
|
||||
var green = (byte) (actualIndex * 20 % 255);
|
||||
var blue = (byte) (actualIndex * 30 % 255);
|
||||
var red = (byte)(actualIndex % 255);
|
||||
var green = (byte)(actualIndex * 20 % 255);
|
||||
var blue = (byte)(actualIndex * 30 % 255);
|
||||
|
||||
return new Color(red, green, blue, 85);
|
||||
}
|
||||
|
||||
@@ -4,9 +4,9 @@ using Robust.Shared.IoC;
|
||||
|
||||
namespace Robust.Client.Physics;
|
||||
|
||||
public sealed class GridSplitVisualCommand : LocalizedCommands
|
||||
public sealed partial class GridSplitVisualCommand : LocalizedCommands
|
||||
{
|
||||
[Dependency] private readonly IEntitySystemManager _systemManager = default!;
|
||||
[Dependency] private IEntitySystemManager _systemManager = default!;
|
||||
|
||||
public override string Command => SharedGridFixtureSystem.ShowGridNodesCommand;
|
||||
|
||||
|
||||
@@ -14,9 +14,9 @@ namespace Robust.Client.Physics
|
||||
[UsedImplicitly]
|
||||
public sealed partial class PhysicsSystem : SharedPhysicsSystem
|
||||
{
|
||||
[Dependency] private readonly IGameTiming _gameTiming = default!;
|
||||
[Dependency] private readonly SharedTransformSystem _transform = default!;
|
||||
[Dependency] private readonly SharedBroadphaseSystem _broadphase = default!;
|
||||
[Dependency] private IGameTiming _gameTiming = default!;
|
||||
[Dependency] private SharedTransformSystem _transform = default!;
|
||||
[Dependency] private SharedBroadphaseSystem _broadphase = default!;
|
||||
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
|
||||
@@ -28,21 +28,21 @@ namespace Robust.Client.Placement
|
||||
{
|
||||
public sealed partial class PlacementManager : IPlacementManager, IDisposable, IEntityEventSubscriber
|
||||
{
|
||||
[Dependency] private readonly ILogManager _logManager = default!;
|
||||
[Dependency] private readonly IClientNetManager _networkManager = default!;
|
||||
[Dependency] internal readonly IPlayerManager PlayerManager = default!;
|
||||
[Dependency] internal readonly IResourceCache ResourceCache = default!;
|
||||
[Dependency] private readonly IReflectionManager _reflectionManager = default!;
|
||||
[Dependency] private readonly IMapManager _mapManager = default!;
|
||||
[Dependency] private readonly IGameTiming _time = default!;
|
||||
[Dependency] private readonly IEyeManager _eyeManager = default!;
|
||||
[Dependency] internal readonly IInputManager InputManager = default!;
|
||||
[Dependency] private readonly IEntitySystemManager _entitySystemManager = default!;
|
||||
[Dependency] private readonly IEntityManager _entityManager = default!;
|
||||
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
|
||||
[Dependency] private readonly IBaseClient _baseClient = default!;
|
||||
[Dependency] private readonly IOverlayManager _overlayManager = default!;
|
||||
[Dependency] internal readonly IClyde Clyde = default!;
|
||||
[Dependency] private ILogManager _logManager = default!;
|
||||
[Dependency] private IClientNetManager _networkManager = default!;
|
||||
[Dependency] internal IPlayerManager PlayerManager = default!;
|
||||
[Dependency] internal IResourceCache ResourceCache = default!;
|
||||
[Dependency] private IReflectionManager _reflectionManager = default!;
|
||||
[Dependency] private IMapManager _mapManager = default!;
|
||||
[Dependency] private IGameTiming _time = default!;
|
||||
[Dependency] private IEyeManager _eyeManager = default!;
|
||||
[Dependency] internal IInputManager InputManager = default!;
|
||||
[Dependency] private IEntitySystemManager _entitySystemManager = default!;
|
||||
[Dependency] private IEntityManager _entityManager = default!;
|
||||
[Dependency] private IPrototypeManager _prototypeManager = default!;
|
||||
[Dependency] private IBaseClient _baseClient = default!;
|
||||
[Dependency] private IOverlayManager _overlayManager = default!;
|
||||
[Dependency] internal IClyde Clyde = default!;
|
||||
|
||||
private static readonly ProtoId<ShaderPrototype> UnshadedShader = "unshaded";
|
||||
|
||||
|
||||
@@ -4,13 +4,13 @@ using Robust.Shared.Player;
|
||||
|
||||
namespace Robust.Client.Player
|
||||
{
|
||||
internal sealed class FilterSystem : SharedFilterSystem
|
||||
internal sealed partial class FilterSystem : SharedFilterSystem
|
||||
{
|
||||
[Dependency] private readonly IPlayerManager _playerManager = default!;
|
||||
[Dependency] private IPlayerManager _playerManager = default!;
|
||||
|
||||
public override Filter FromEntities(Filter filter, params EntityUid[] entities)
|
||||
{
|
||||
if (_playerManager.LocalEntity is not {Valid: true} attachedUid)
|
||||
if (_playerManager.LocalEntity is not { Valid: true } attachedUid)
|
||||
return filter;
|
||||
|
||||
foreach (var uid in entities)
|
||||
|
||||
@@ -17,15 +17,15 @@ namespace Robust.Client.Player
|
||||
/// Why not just attach the inputs directly? It's messy! This makes the whole thing nicely encapsulated.
|
||||
/// This class also communicates with the server to let the server control what entity it is attached to.
|
||||
/// </summary>
|
||||
internal sealed class PlayerManager : SharedPlayerManager, IPlayerManager
|
||||
internal sealed partial class PlayerManager : SharedPlayerManager, IPlayerManager
|
||||
{
|
||||
[Dependency] private readonly IClientNetManager _network = default!;
|
||||
[Dependency] private readonly IBaseClient _client = default!;
|
||||
[Dependency] private IClientNetManager _network = default!;
|
||||
[Dependency] private IBaseClient _client = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Received player states that had an unknown <see cref="NetEntity"/>.
|
||||
/// </summary>
|
||||
private Dictionary<NetUserId, SessionState> _pendingStates = new ();
|
||||
private Dictionary<NetUserId, SessionState> _pendingStates = new();
|
||||
private List<SessionState> _pending = new();
|
||||
|
||||
/// <inheritdoc />
|
||||
@@ -34,7 +34,7 @@ namespace Robust.Client.Player
|
||||
get
|
||||
{
|
||||
return LocalSession != null
|
||||
? new [] { LocalSession }
|
||||
? new[] { LocalSession }
|
||||
: Array.Empty<ICommonSession>();
|
||||
}
|
||||
}
|
||||
@@ -94,7 +94,7 @@ namespace Robust.Client.Player
|
||||
|
||||
var old = LocalSession;
|
||||
|
||||
if (old?.AttachedEntity is {} oldUid)
|
||||
if (old?.AttachedEntity is { } oldUid)
|
||||
{
|
||||
LocalSession = null;
|
||||
LocalPlayer = null;
|
||||
@@ -108,7 +108,7 @@ namespace Robust.Client.Player
|
||||
Sawmill.Info($"Changing local session from {old?.ToString() ?? "null"} to {session?.ToString() ?? "null"}.");
|
||||
LocalSessionChanged?.Invoke((old, LocalSession));
|
||||
|
||||
if (session?.AttachedEntity is {} newUid)
|
||||
if (session?.AttachedEntity is { } newUid)
|
||||
{
|
||||
Sawmill.Info($"Attaching local player to {EntManager.ToPrettyString(newUid)}.");
|
||||
EntManager.EventBus.RaiseLocalEvent(newUid, new LocalPlayerAttachedEvent(newUid), true);
|
||||
@@ -210,7 +210,7 @@ namespace Robust.Client.Player
|
||||
{
|
||||
dirty = true;
|
||||
if (!EntManager.TryGetEntity(state.ControlledEntity, out var uid)
|
||||
&& state.ControlledEntity is { Valid:true } )
|
||||
&& state.ControlledEntity is { Valid: true })
|
||||
{
|
||||
Sawmill.Error($"Received player state for local player with an unknown net entity!");
|
||||
_pendingStates[state.UserId] = state;
|
||||
@@ -247,7 +247,7 @@ namespace Robust.Client.Player
|
||||
users.Add(state.UserId);
|
||||
|
||||
if (!EntManager.TryGetEntity(state.ControlledEntity, out var controlled)
|
||||
&& state.ControlledEntity is {Valid: true})
|
||||
&& state.ControlledEntity is { Valid: true })
|
||||
{
|
||||
_pendingStates[state.UserId] = state;
|
||||
}
|
||||
|
||||
@@ -10,10 +10,10 @@ using Robust.Shared.Utility;
|
||||
|
||||
namespace Robust.Client.Profiling;
|
||||
|
||||
public sealed class LiveProfileViewControl : Control
|
||||
public sealed partial class LiveProfileViewControl : Control
|
||||
{
|
||||
[Dependency] private readonly ProfManager _profManager = default!;
|
||||
[Dependency] private readonly IResourceCache _resourceCache = default!;
|
||||
[Dependency] private ProfManager _profManager = default!;
|
||||
[Dependency] private IResourceCache _resourceCache = default!;
|
||||
|
||||
public int MaxDepth { get; set; } = 2;
|
||||
|
||||
|
||||
@@ -10,10 +10,10 @@ namespace Robust.Client.Profiling;
|
||||
/// <summary>
|
||||
/// Manager for managing recording and snapshots of profiles, consuming shared <see cref="ProfManager"/>
|
||||
/// </summary>
|
||||
public sealed class ProfViewManager
|
||||
public sealed partial class ProfViewManager
|
||||
{
|
||||
[Dependency]
|
||||
private readonly ProfManager _profManager = default!;
|
||||
private ProfManager _profManager = default!;
|
||||
|
||||
public ValueList<Snapshot> Snapshots;
|
||||
|
||||
@@ -121,9 +121,9 @@ public sealed class ProfViewManager
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class ProfSnapshotCommand : LocalizedCommands
|
||||
public sealed partial class ProfSnapshotCommand : LocalizedCommands
|
||||
{
|
||||
[Dependency] private readonly ProfViewManager _profView = default!;
|
||||
[Dependency] private ProfViewManager _profView = default!;
|
||||
|
||||
// ReSharper disable once StringLiteralTypo
|
||||
public override string Command => "profsnap";
|
||||
|
||||
@@ -10,14 +10,14 @@ using Robust.Shared.Utility;
|
||||
|
||||
namespace Robust.Client.Prototypes
|
||||
{
|
||||
public sealed class ClientPrototypeManager : PrototypeManager
|
||||
public sealed partial class ClientPrototypeManager : PrototypeManager
|
||||
{
|
||||
[Dependency] private readonly INetManager _netManager = default!;
|
||||
[Dependency] private INetManager _netManager = default!;
|
||||
#if TOOLS
|
||||
[Dependency] private readonly IClientGameTiming _timing = default!;
|
||||
[Dependency] private IClientGameTiming _timing = default!;
|
||||
#endif
|
||||
[Dependency] private readonly IGameControllerInternal _controller = default!;
|
||||
[Dependency] private readonly IReloadManager _reload = default!;
|
||||
[Dependency] private IGameControllerInternal _controller = default!;
|
||||
[Dependency] private IReloadManager _reload = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
|
||||
@@ -8,13 +8,13 @@ using Robust.Shared.Replays;
|
||||
|
||||
namespace Robust.Client.Replays.Commands;
|
||||
|
||||
public abstract class BaseReplayCommand : LocalizedCommands
|
||||
public abstract partial class BaseReplayCommand : LocalizedCommands
|
||||
{
|
||||
[Dependency] protected readonly IReplayPlaybackManager PlaybackManager = default!;
|
||||
[Dependency] protected IReplayPlaybackManager PlaybackManager = default!;
|
||||
|
||||
public override string Description => Loc.GetString($"cmd-{Command.Replace('_','-')}-desc");
|
||||
public override string Description => Loc.GetString($"cmd-{Command.Replace('_', '-')}-desc");
|
||||
|
||||
public override string Help => Loc.GetString($"cmd-{Command.Replace('_','-')}-help");
|
||||
public override string Help => Loc.GetString($"cmd-{Command.Replace('_', '-')}-help");
|
||||
|
||||
protected bool AssertPlaying(IConsoleShell shell, [NotNullWhen(true)] out ReplayData? replay)
|
||||
{
|
||||
|
||||
@@ -14,12 +14,12 @@ using Robust.Shared.Utility;
|
||||
namespace Robust.Client.Replays.Commands;
|
||||
|
||||
[UsedImplicitly]
|
||||
public sealed class ReplayLoadCommand : BaseReplayCommand
|
||||
public sealed partial class ReplayLoadCommand : BaseReplayCommand
|
||||
{
|
||||
[Dependency] private readonly IResourceManager _resMan = default!;
|
||||
[Dependency] private readonly IReplayLoadManager _loadMan = default!;
|
||||
[Dependency] private readonly IBaseClient _client = default!;
|
||||
[Dependency] private readonly IConfigurationManager _cfg = default!;
|
||||
[Dependency] private IResourceManager _resMan = default!;
|
||||
[Dependency] private IReplayLoadManager _loadMan = default!;
|
||||
[Dependency] private IBaseClient _client = default!;
|
||||
[Dependency] private IConfigurationManager _cfg = default!;
|
||||
|
||||
public override string Command => IReplayPlaybackManager.LoadCommand;
|
||||
|
||||
|
||||
@@ -9,9 +9,9 @@ using Robust.Shared.IoC;
|
||||
namespace Robust.Client.Replays.Commands;
|
||||
|
||||
[UsedImplicitly]
|
||||
public sealed class ReplaySkipCommand : BaseReplayCommand
|
||||
public sealed partial class ReplaySkipCommand : BaseReplayCommand
|
||||
{
|
||||
[Dependency] private readonly IConfigurationManager _cfg = default!;
|
||||
[Dependency] private IConfigurationManager _cfg = default!;
|
||||
|
||||
public override string Command => IReplayPlaybackManager.SkipCommand;
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ using Robust.Shared.IoC;
|
||||
|
||||
namespace Robust.Client.Replays.Commands;
|
||||
|
||||
public sealed class ReplayToggleUiCommand : BaseReplayCommand
|
||||
public sealed partial class ReplayToggleUiCommand : BaseReplayCommand
|
||||
{
|
||||
[Dependency] private readonly IUserInterfaceManager _userInterfaceManager = default!;
|
||||
[Dependency] private IUserInterfaceManager _userInterfaceManager = default!;
|
||||
|
||||
public override string Command => "replay_toggleui";
|
||||
|
||||
|
||||
@@ -17,18 +17,18 @@ namespace Robust.Client.Replays.Loading;
|
||||
|
||||
public sealed partial class ReplayLoadManager : IReplayLoadManager
|
||||
{
|
||||
[Dependency] private readonly ILogManager _logMan = default!;
|
||||
[Dependency] private readonly IBaseClient _client = default!;
|
||||
[Dependency] private readonly EntityManager _entMan = default!;
|
||||
[Dependency] private readonly IClientGameTiming _timing = default!;
|
||||
[Dependency] private readonly IComponentFactory _factory = default!;
|
||||
[Dependency] private readonly IPrototypeManager _protoMan = default!;
|
||||
[Dependency] private readonly ILocalizationManager _locMan = default!;
|
||||
[Dependency] private readonly IConfigurationManager _confMan = default!;
|
||||
[Dependency] private readonly NetworkResourceManager _netResMan = default!;
|
||||
[Dependency] private readonly IClientGameStateManager _gameState = default!;
|
||||
[Dependency] private readonly IClientRobustSerializer _serializer = default!;
|
||||
[Dependency] private readonly IReplayPlaybackManager _replayPlayback = default!;
|
||||
[Dependency] private ILogManager _logMan = default!;
|
||||
[Dependency] private IBaseClient _client = default!;
|
||||
[Dependency] private EntityManager _entMan = default!;
|
||||
[Dependency] private IClientGameTiming _timing = default!;
|
||||
[Dependency] private IComponentFactory _factory = default!;
|
||||
[Dependency] private IPrototypeManager _protoMan = default!;
|
||||
[Dependency] private ILocalizationManager _locMan = default!;
|
||||
[Dependency] private IConfigurationManager _confMan = default!;
|
||||
[Dependency] private NetworkResourceManager _netResMan = default!;
|
||||
[Dependency] private IClientGameStateManager _gameState = default!;
|
||||
[Dependency] private IClientRobustSerializer _serializer = default!;
|
||||
[Dependency] private IReplayPlaybackManager _replayPlayback = default!;
|
||||
|
||||
private ushort _metaId;
|
||||
private bool _initialized;
|
||||
|
||||
@@ -26,22 +26,22 @@ namespace Robust.Client.Replays.Playback;
|
||||
|
||||
internal sealed partial class ReplayPlaybackManager : IReplayPlaybackManager
|
||||
{
|
||||
[Dependency] private readonly ILogManager _logMan = default!;
|
||||
[Dependency] private readonly IBaseClient _client = default!;
|
||||
[Dependency] private readonly IMidiManager _midi = default!;
|
||||
[Dependency] private readonly IPlayerManager _player = default!;
|
||||
[Dependency] private readonly IAudioInternal _clydeAudio = default!;
|
||||
[Dependency] private readonly IClientGameTiming _timing = default!;
|
||||
[Dependency] private readonly IClientNetManager _netMan = default!;
|
||||
[Dependency] private readonly IComponentFactory _factory = default!;
|
||||
[Dependency] private readonly IPrototypeManager _protoMan = default!;
|
||||
[Dependency] private readonly IGameController _controller = default!;
|
||||
[Dependency] private readonly IClientEntityManager _cEntManager = default!;
|
||||
[Dependency] private readonly ClientEntityManager _entMan = default!;
|
||||
[Dependency] private readonly IConfigurationManager _confMan = default!;
|
||||
[Dependency] private readonly NetworkResourceManager _netResMan = default!;
|
||||
[Dependency] private readonly IClientGameStateManager _gameState = default!;
|
||||
[Dependency] private readonly IClientNetConfigurationManager _netConf = default!;
|
||||
[Dependency] private ILogManager _logMan = default!;
|
||||
[Dependency] private IBaseClient _client = default!;
|
||||
[Dependency] private IMidiManager _midi = default!;
|
||||
[Dependency] private IPlayerManager _player = default!;
|
||||
[Dependency] private IAudioInternal _clydeAudio = default!;
|
||||
[Dependency] private IClientGameTiming _timing = default!;
|
||||
[Dependency] private IClientNetManager _netMan = default!;
|
||||
[Dependency] private IComponentFactory _factory = default!;
|
||||
[Dependency] private IPrototypeManager _protoMan = default!;
|
||||
[Dependency] private IGameController _controller = default!;
|
||||
[Dependency] private IClientEntityManager _cEntManager = default!;
|
||||
[Dependency] private ClientEntityManager _entMan = default!;
|
||||
[Dependency] private IConfigurationManager _confMan = default!;
|
||||
[Dependency] private NetworkResourceManager _netResMan = default!;
|
||||
[Dependency] private IClientGameStateManager _gameState = default!;
|
||||
[Dependency] private IClientNetConfigurationManager _netConf = default!;
|
||||
|
||||
public event Action<MappingDataNode, List<object>>? ReplayPlaybackStarted;
|
||||
public event Action? ReplayPlaybackStopped;
|
||||
|
||||
@@ -18,13 +18,13 @@ using Robust.Shared.Utility;
|
||||
|
||||
namespace Robust.Client.Replays;
|
||||
|
||||
internal sealed class ReplayRecordingManager : SharedReplayRecordingManager
|
||||
internal sealed partial class ReplayRecordingManager : SharedReplayRecordingManager
|
||||
{
|
||||
[Dependency] private readonly IBaseClient _client = default!;
|
||||
[Dependency] private readonly IEntityManager _entMan = default!;
|
||||
[Dependency] private readonly IPlayerManager _player = default!;
|
||||
[Dependency] private readonly IClientGameStateManager _state = default!;
|
||||
[Dependency] private readonly IClientGameTiming _timing = default!;
|
||||
[Dependency] private IBaseClient _client = default!;
|
||||
[Dependency] private IEntityManager _entMan = default!;
|
||||
[Dependency] private IPlayerManager _player = default!;
|
||||
[Dependency] private IClientGameStateManager _state = default!;
|
||||
[Dependency] private IClientGameTiming _timing = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
|
||||
@@ -18,8 +18,8 @@ namespace Robust.Client.Replays.UI;
|
||||
[GenerateTypedNameReferences]
|
||||
public sealed partial class ReplayControlWidget : UIWidget // AKA Tardis - The funny time control box.
|
||||
{
|
||||
[Dependency] private readonly IReplayPlaybackManager _playback = default!;
|
||||
[Dependency] private readonly IConfigurationManager _cfg = default!;
|
||||
[Dependency] private IReplayPlaybackManager _playback = default!;
|
||||
[Dependency] private IConfigurationManager _cfg = default!;
|
||||
|
||||
public const string TimeFormat = @"hh\:mm\:ss";
|
||||
|
||||
|
||||
@@ -24,12 +24,13 @@ namespace Robust.Client.ResourceManagement
|
||||
{
|
||||
internal partial class ResourceCache
|
||||
{
|
||||
[field: Dependency] public IClyde Clyde { get; } = default!;
|
||||
[field: Dependency] public IAudioInternal ClydeAudio { get; } = default!;
|
||||
[Dependency] private readonly IResourceManager _manager = default!;
|
||||
[field: Dependency] public IFontManager FontManager { get; } = default!;
|
||||
[Dependency] private readonly ILogManager _logManager = default!;
|
||||
[Dependency] private readonly IConfigurationManager _configurationManager = default!;
|
||||
[Dependency] private IClyde _clyde = null!;
|
||||
public IClyde Clyde => _clyde;
|
||||
[Dependency] private IResourceManager _manager = default!;
|
||||
[Dependency] private IFontManager _fontManager = null!;
|
||||
public IFontManager FontManager => _fontManager;
|
||||
[Dependency] private ILogManager _logManager = default!;
|
||||
[Dependency] private IConfigurationManager _configurationManager = default!;
|
||||
|
||||
public void PreloadTextures()
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace Robust.Client.Serialization;
|
||||
|
||||
internal sealed partial class ClientRobustSerializer : RobustSerializer, IClientRobustSerializer
|
||||
{
|
||||
[Dependency] private readonly IBaseClient _client = default!;
|
||||
[Dependency] private IBaseClient _client = default!;
|
||||
|
||||
public void SetStringSerializerPackage(byte[] hash, byte[] package)
|
||||
{
|
||||
|
||||
@@ -6,10 +6,10 @@ using Robust.Shared.Timing;
|
||||
|
||||
namespace Robust.Client.State
|
||||
{
|
||||
internal sealed class StateManager : IStateManager
|
||||
internal sealed partial class StateManager : IStateManager
|
||||
{
|
||||
[Dependency] private readonly IDynamicTypeFactory _typeFactory = default!;
|
||||
[Dependency] private readonly IUserInterfaceManager _interfaceManager = default!;
|
||||
[Dependency] private IDynamicTypeFactory _typeFactory = default!;
|
||||
[Dependency] private IUserInterfaceManager _interfaceManager = default!;
|
||||
public event Action<StateChangedEventArgs>? OnStateChanged;
|
||||
public State CurrentState { get; private set; }
|
||||
|
||||
@@ -25,12 +25,12 @@ namespace Robust.Client.State
|
||||
|
||||
public T RequestStateChange<T>() where T : State, new()
|
||||
{
|
||||
return (T) RequestStateChange(typeof(T));
|
||||
return (T)RequestStateChange(typeof(T));
|
||||
}
|
||||
|
||||
public State RequestStateChange(Type type)
|
||||
{
|
||||
if(!typeof(State).IsAssignableFrom(type))
|
||||
if (!typeof(State).IsAssignableFrom(type))
|
||||
throw new ArgumentException($"Needs to be derived from {typeof(State).FullName}", nameof(type));
|
||||
|
||||
return CurrentState?.GetType() == type ? CurrentState : SwitchToState(type);
|
||||
|
||||
@@ -6,9 +6,9 @@ using Robust.Shared.Utility;
|
||||
|
||||
namespace Robust.Client.Timing
|
||||
{
|
||||
public sealed class ClientGameTiming : GameTiming, IClientGameTiming
|
||||
public sealed partial class ClientGameTiming : GameTiming, IClientGameTiming
|
||||
{
|
||||
[Dependency] private readonly IClientNetManager _netManager = default!;
|
||||
[Dependency] private IClientNetManager _netManager = default!;
|
||||
|
||||
public override bool InPrediction => !ApplyingState && CurTick > LastRealTick;
|
||||
|
||||
|
||||
@@ -9,11 +9,11 @@ using Robust.Shared.Utility;
|
||||
|
||||
namespace Robust.Client.Upload.Commands;
|
||||
|
||||
public sealed class UploadFileCommand : IConsoleCommand
|
||||
public sealed partial class UploadFileCommand : IConsoleCommand
|
||||
{
|
||||
[Dependency] private readonly IConfigurationManager _cfgManager = default!;
|
||||
[Dependency] private readonly IFileDialogManager _dialog = default!;
|
||||
[Dependency] private readonly NetworkResourceManager _netRes = default!;
|
||||
[Dependency] private IConfigurationManager _cfgManager = default!;
|
||||
[Dependency] private IFileDialogManager _dialog = default!;
|
||||
[Dependency] private NetworkResourceManager _netRes = default!;
|
||||
|
||||
public string Command => "uploadfile";
|
||||
public string Description => "Uploads a resource to the server.";
|
||||
|
||||
@@ -11,11 +11,11 @@ using Robust.Shared.Utility;
|
||||
|
||||
namespace Robust.Client.Upload.Commands;
|
||||
|
||||
public sealed class UploadFolderCommand : IConsoleCommand
|
||||
public sealed partial class UploadFolderCommand : IConsoleCommand
|
||||
{
|
||||
[Dependency] private readonly IResourceManager _resourceManager = default!;
|
||||
[Dependency] private readonly IConfigurationManager _configManager = default!;
|
||||
[Dependency] private readonly NetworkResourceManager _netRes = default!;
|
||||
[Dependency] private IResourceManager _resourceManager = default!;
|
||||
[Dependency] private IConfigurationManager _configManager = default!;
|
||||
[Dependency] private NetworkResourceManager _netRes = default!;
|
||||
|
||||
public string Command => "uploadfolder";
|
||||
public string Description => Loc.GetString("uploadfolder-command-description");
|
||||
@@ -29,14 +29,14 @@ public sealed class UploadFolderCommand : IConsoleCommand
|
||||
|
||||
if (!_configManager.GetCVar(CVars.ResourceUploadingEnabled))
|
||||
{
|
||||
shell.WriteError( Loc.GetString("uploadfolder-command-resource-upload-disabled"));
|
||||
shell.WriteError(Loc.GetString("uploadfolder-command-resource-upload-disabled"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (args.Length != 1)
|
||||
{
|
||||
shell.WriteError( Loc.GetString("uploadfolder-command-wrong-args"));
|
||||
shell.WriteLine( Loc.GetString("uploadfolder-command-help"));
|
||||
shell.WriteError(Loc.GetString("uploadfolder-command-wrong-args"));
|
||||
shell.WriteLine(Loc.GetString("uploadfolder-command-help"));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -44,20 +44,20 @@ public sealed class UploadFolderCommand : IConsoleCommand
|
||||
|
||||
if (!_resourceManager.UserData.Exists(folderPath))
|
||||
{
|
||||
shell.WriteError( Loc.GetString("uploadfolder-command-folder-not-found",("folder", folderPath)));
|
||||
shell.WriteError(Loc.GetString("uploadfolder-command-folder-not-found", ("folder", folderPath)));
|
||||
return; // bomb out if the folder doesnt exist in /UploadFolder
|
||||
}
|
||||
|
||||
//Grab all files in specified folder and upload them
|
||||
var files = new List<(ResPath Relative, byte[] Data)>();
|
||||
foreach (var filepath in _resourceManager.UserData.Find($"{folderPath.ToRelativePath()}/").files )
|
||||
foreach (var filepath in _resourceManager.UserData.Find($"{folderPath.ToRelativePath()}/").files)
|
||||
{
|
||||
await using var filestream = _resourceManager.UserData.Open(filepath, FileMode.Open);
|
||||
{
|
||||
var sizeLimit = _configManager.GetCVar(CVars.ResourceUploadingLimitMb);
|
||||
if (sizeLimit > 0f && filestream.Length * SharedNetworkResourceManager.BytesToMegabytes > sizeLimit)
|
||||
{
|
||||
shell.WriteError( Loc.GetString("uploadfolder-command-file-too-big", ("filename",filepath), ("sizeLimit",sizeLimit)));
|
||||
shell.WriteError(Loc.GetString("uploadfolder-command-file-too-big", ("filename", filepath), ("sizeLimit", sizeLimit)));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -71,6 +71,6 @@ public sealed class UploadFolderCommand : IConsoleCommand
|
||||
|
||||
_netRes.UploadResources(files);
|
||||
|
||||
shell.WriteLine( Loc.GetString("uploadfolder-command-success",("fileCount",fileCount)));
|
||||
shell.WriteLine(Loc.GetString("uploadfolder-command-success", ("fileCount", fileCount)));
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user