diff --git a/Robust.Server/GameObjects/EntitySystems/ServerMetaDataSystem.cs b/Robust.Server/GameObjects/EntitySystems/ServerMetaDataSystem.cs index 961c5ac547..e826eb9c04 100644 --- a/Robust.Server/GameObjects/EntitySystems/ServerMetaDataSystem.cs +++ b/Robust.Server/GameObjects/EntitySystems/ServerMetaDataSystem.cs @@ -6,7 +6,7 @@ namespace Robust.Server.GameObjects; public sealed class ServerMetaDataSystem : MetaDataSystem { - [Dependency] private readonly PVSSystem _pvsSystem = default!; + [Dependency] private readonly PvsSystem _pvsSystem = default!; public override void Initialize() { @@ -60,7 +60,7 @@ public sealed class ServerMetaDataSystem : MetaDataSystem /// /// If a new player gets attached to an entity, this will ensure that the player receives session-restricted - /// component states by dirtying any restricted components. + /// component states by dirtying any restricted components. /// private void OnActorPlayerAttach(EntityUid uid, MetaDataComponent meta, PlayerAttachedEvent args) { diff --git a/Robust.Server/GameStates/PVSCollection.cs b/Robust.Server/GameStates/PvsCollection.cs similarity index 99% rename from Robust.Server/GameStates/PVSCollection.cs rename to Robust.Server/GameStates/PvsCollection.cs index 5f1ba0b768..67c5b5177f 100644 --- a/Robust.Server/GameStates/PVSCollection.cs +++ b/Robust.Server/GameStates/PvsCollection.cs @@ -58,7 +58,7 @@ public sealed class PVSCollection : IPVSCollection where TIndex : ICompa [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector2i GetChunkIndices(Vector2 coordinates) { - return (coordinates / PVSSystem.ChunkSize).Floored(); + return (coordinates / PvsSystem.ChunkSize).Floored(); } /// diff --git a/Robust.Server/GameStates/PVSEntityVisiblity.cs b/Robust.Server/GameStates/PvsEntityVisibility.cs similarity index 70% rename from Robust.Server/GameStates/PVSEntityVisiblity.cs rename to Robust.Server/GameStates/PvsEntityVisibility.cs index 1759b87bdf..182c40a283 100644 --- a/Robust.Server/GameStates/PVSEntityVisiblity.cs +++ b/Robust.Server/GameStates/PvsEntityVisibility.cs @@ -1,6 +1,6 @@ namespace Robust.Server.GameStates; -public enum PVSEntityVisiblity : byte +public enum PvsEntityVisibility : byte { Entered, StayedUnchanged, diff --git a/Robust.Server/GameStates/PVSOverrideSystem.cs b/Robust.Server/GameStates/PvsOverrideSystem.cs similarity index 87% rename from Robust.Server/GameStates/PVSOverrideSystem.cs rename to Robust.Server/GameStates/PvsOverrideSystem.cs index 9de646c4f3..0c0813fad5 100644 --- a/Robust.Server/GameStates/PVSOverrideSystem.cs +++ b/Robust.Server/GameStates/PvsOverrideSystem.cs @@ -4,12 +4,12 @@ using Robust.Shared.Players; namespace Robust.Server.GameStates; /// -/// Placeholder system to expose some parts of the internal that allows entities to ignore +/// Placeholder system to expose some parts of the internal that allows entities to ignore /// normal PVS rules, such that they are always sent to clients. /// -public sealed partial class PVSOverrideSystem : EntitySystem +public sealed class PvsOverrideSystem : EntitySystem { - [Shared.IoC.Dependency] private readonly PVSSystem _pvs = default!; + [Shared.IoC.Dependency] private readonly PvsSystem _pvs = default!; /// /// Used to ensure that an entity is always sent to every client. Overrides any client-specific overrides. diff --git a/Robust.Server/GameStates/PVSSystem.Ack.cs b/Robust.Server/GameStates/PvsSystem.Ack.cs similarity index 96% rename from Robust.Server/GameStates/PVSSystem.Ack.cs rename to Robust.Server/GameStates/PvsSystem.Ack.cs index 53cf624096..7ef278e2c0 100644 --- a/Robust.Server/GameStates/PVSSystem.Ack.cs +++ b/Robust.Server/GameStates/PvsSystem.Ack.cs @@ -8,7 +8,7 @@ using Robust.Shared.Utility; namespace Robust.Server.GameStates; // This partial class contains code relating to acknowledging game states received by clients. -internal sealed partial class PVSSystem +internal sealed partial class PvsSystem { /// /// Invoked when a client ack message is received. Queues up for processing in parallel prior to sending game @@ -45,7 +45,7 @@ internal sealed partial class PVSSystem return; var ackedTick = sessionData.LastReceivedAck; - Dictionary? ackedData; + Dictionary? ackedData; if (sessionData.Overflow != null && sessionData.Overflow.Value.Tick <= ackedTick) { diff --git a/Robust.Server/GameStates/PVSSystem.Dirty.cs b/Robust.Server/GameStates/PvsSystem.Dirty.cs similarity index 98% rename from Robust.Server/GameStates/PVSSystem.Dirty.cs rename to Robust.Server/GameStates/PvsSystem.Dirty.cs index 6bc059dccc..b14fc08dff 100644 --- a/Robust.Server/GameStates/PVSSystem.Dirty.cs +++ b/Robust.Server/GameStates/PvsSystem.Dirty.cs @@ -11,7 +11,7 @@ namespace Robust.Server.GameStates /// /// Caching for dirty bodies /// - internal sealed partial class PVSSystem + internal sealed partial class PvsSystem { [Dependency] private readonly IGameTiming _gameTiming = default!; diff --git a/Robust.Server/GameStates/PVSSystem.cs b/Robust.Server/GameStates/PvsSystem.cs similarity index 96% rename from Robust.Server/GameStates/PVSSystem.cs rename to Robust.Server/GameStates/PvsSystem.cs index f2f891d44a..98e216c072 100644 --- a/Robust.Server/GameStates/PVSSystem.cs +++ b/Robust.Server/GameStates/PvsSystem.cs @@ -24,7 +24,7 @@ using Robust.Shared.Utility; namespace Robust.Server.GameStates; -internal sealed partial class PVSSystem : EntitySystem +internal sealed partial class PvsSystem : EntitySystem { [Shared.IoC.Dependency] private readonly IMapManagerInternal _mapManager = default!; [Shared.IoC.Dependency] private readonly IPlayerManager _playerManager = default!; @@ -69,9 +69,9 @@ internal sealed partial class PVSSystem : EntitySystem private readonly List _pvsCollections = new(); - private readonly ObjectPool> _visSetPool - = new DefaultObjectPool>( - new DictPolicy(), MaxVisPoolSize); + private readonly ObjectPool> _visSetPool + = new DefaultObjectPool>( + new DictPolicy(), MaxVisPoolSize); private readonly ObjectPool> _stackPool = new DefaultObjectPool>( @@ -785,10 +785,10 @@ internal sealed partial class PVSSystem : EntitySystem continue; } - if (visiblity == PVSEntityVisiblity.StayedUnchanged) + if (visiblity == PvsEntityVisibility.StayedUnchanged) continue; - var entered = visiblity == PVSEntityVisiblity.Entered; + var entered = visiblity == PvsEntityVisibility.Entered; var entFromTick = entered ? lastSeen.GetValueOrDefault(uid) : fromTick; var state = GetEntityState(session, uid, entFromTick, mQuery.GetComponent(uid)); @@ -835,8 +835,8 @@ internal sealed partial class PVSSystem : EntitySystem /// in a separate net message. /// private List? ProcessLeavePVS( - Dictionary visibleEnts, - Dictionary? lastSent) + Dictionary visibleEnts, + Dictionary? lastSent) { if (lastSent == null) return null; @@ -854,9 +854,9 @@ internal sealed partial class PVSSystem : EntitySystem [MethodImpl(MethodImplOptions.AggressiveOptimization)] private void RecursivelyAddTreeNode(in EntityUid nodeIndex, RobustTree tree, - Dictionary? lastAcked, - Dictionary? lastSent, - Dictionary toSend, + Dictionary? lastAcked, + Dictionary? lastSent, + Dictionary toSend, Dictionary lastSeen, Dictionary metaDataCache, Stack stack, @@ -900,9 +900,9 @@ internal sealed partial class PVSSystem : EntitySystem public bool RecursivelyAddOverride( in EntityUid uid, - Dictionary? lastAcked, - Dictionary? lastSent, - Dictionary toSend, + Dictionary? lastAcked, + Dictionary? lastSent, + Dictionary toSend, Dictionary lastSeen, in EntityQuery metaQuery, in EntityQuery transQuery, @@ -940,8 +940,8 @@ internal sealed partial class PVSSystem : EntitySystem } private (bool Entered, bool ShouldAdd) ProcessEntry(in EntityUid uid, - Dictionary? lastAcked, - Dictionary? lastSent, + Dictionary? lastAcked, + Dictionary? lastSent, Dictionary lastSeen, ref int newEntityCount, ref int enteredEntityCount, @@ -973,7 +973,7 @@ internal sealed partial class PVSSystem : EntitySystem return (entered, true); } - private void AddToSendSet(in EntityUid uid, MetaDataComponent metaDataComponent, Dictionary toSend, GameTick fromTick, in bool entered, ref int entStateCount) + private void AddToSendSet(in EntityUid uid, MetaDataComponent metaDataComponent, Dictionary toSend, GameTick fromTick, in bool entered, ref int entStateCount) { if (metaDataComponent.EntityLifeStage >= EntityLifeStage.Terminating) { @@ -984,7 +984,7 @@ internal sealed partial class PVSSystem : EntitySystem if (entered) { - toSend.Add(uid, PVSEntityVisiblity.Entered); + toSend.Add(uid, PvsEntityVisibility.Entered); entStateCount++; return; } @@ -992,12 +992,12 @@ internal sealed partial class PVSSystem : EntitySystem if (metaDataComponent.EntityLastModifiedTick <= fromTick) { //entity has been sent before and hasnt been updated since - toSend.Add(uid, PVSEntityVisiblity.StayedUnchanged); + toSend.Add(uid, PvsEntityVisibility.StayedUnchanged); return; } //add us - toSend.Add(uid, PVSEntityVisiblity.StayedChanged); + toSend.Add(uid, PvsEntityVisibility.StayedChanged); entStateCount++; } @@ -1249,12 +1249,12 @@ internal sealed partial class PVSSystem : EntitySystem /// /// All s that this session saw during the last ticks. /// - public readonly OverflowDictionary> SentEntities = new(DirtyBufferSize); + public readonly OverflowDictionary> SentEntities = new(DirtyBufferSize); /// /// The most recently acked entities /// - public (GameTick Tick, Dictionary Data)? LastAcked; + public (GameTick Tick, Dictionary Data)? LastAcked; /// /// Stores the last tick at which a given entity was acked by a player. Used to avoid re-sending the whole entity @@ -1265,7 +1265,7 @@ internal sealed partial class PVSSystem : EntitySystem /// /// overflow in case a player's last ack is more than ticks behind the current tick. /// - public (GameTick Tick, Dictionary SentEnts)? Overflow; + public (GameTick Tick, Dictionary SentEnts)? Overflow; /// /// If true, the client has explicitly requested a full state. Unlike the first state, we will send them diff --git a/Robust.Server/GameStates/ServerGameStateManager.cs b/Robust.Server/GameStates/ServerGameStateManager.cs index 85cebdf970..475afae0ff 100644 --- a/Robust.Server/GameStates/ServerGameStateManager.cs +++ b/Robust.Server/GameStates/ServerGameStateManager.cs @@ -35,7 +35,7 @@ namespace Robust.Server.GameStates // Mapping of net UID of clients -> last known acked state. private GameTick _lastOldestAck = GameTick.Zero; - private PVSSystem _pvs = default!; + private PvsSystem _pvs = default!; [Dependency] private readonly IServerEntityManager _entityManager = default!; [Dependency] private readonly IGameTiming _gameTiming = default!; @@ -66,7 +66,7 @@ namespace Robust.Server.GameStates public void PostInject() { - _logger = Logger.GetSawmill("PVS"); + _logger = Logger.GetSawmill("gamestate"); } /// @@ -77,7 +77,7 @@ namespace Robust.Server.GameStates _networkManager.RegisterNetMessage(HandleStateAck); _networkManager.RegisterNetMessage(HandleFullStateRequest); - _pvs = _entityManager.System(); + _pvs = _entityManager.System(); _parallelMgr.AddAndInvokeParallelCountChanged(ResetParallelism); diff --git a/Robust.Server/Replays/ReplayRecordingManager.cs b/Robust.Server/Replays/ReplayRecordingManager.cs index 180ccbf36c..4431480340 100644 --- a/Robust.Server/Replays/ReplayRecordingManager.cs +++ b/Robust.Server/Replays/ReplayRecordingManager.cs @@ -40,7 +40,7 @@ internal sealed class ReplayRecordingManager : IInternalReplayRecordingManager [Dependency] private readonly INetConfigurationManager _netConf = default!; private ISawmill _sawmill = default!; - private PVSSystem _pvs = default!; + private PvsSystem _pvs = default!; private List _queuedMessages = new(); private int _maxCompressedSize; @@ -62,7 +62,7 @@ internal sealed class ReplayRecordingManager : IInternalReplayRecordingManager public void Initialize() { _sawmill = Logger.GetSawmill("replay"); - _pvs = _sysMan.GetEntitySystem(); + _pvs = _sysMan.GetEntitySystem(); _netConf.OnValueChanged(CVars.ReplayEnabled, SetReplayEnabled, true); _netConf.OnValueChanged(CVars.ReplayMaxCompressedSize, (v) => _maxCompressedSize = v * 1024, true); diff --git a/Robust.UnitTesting/RobustUnitTest.cs b/Robust.UnitTesting/RobustUnitTest.cs index b14b7c21ae..582726e724 100644 --- a/Robust.UnitTesting/RobustUnitTest.cs +++ b/Robust.UnitTesting/RobustUnitTest.cs @@ -109,7 +109,7 @@ namespace Robust.UnitTesting else { systems.LoadExtraSystemType(); - systems.LoadExtraSystemType(); + systems.LoadExtraSystemType(); systems.LoadExtraSystemType(); systems.LoadExtraSystemType(); systems.LoadExtraSystemType(); diff --git a/Robust.UnitTesting/Server/RobustServerSimulation.cs b/Robust.UnitTesting/Server/RobustServerSimulation.cs index 0acfcf0ec8..6c053c38f2 100644 --- a/Robust.UnitTesting/Server/RobustServerSimulation.cs +++ b/Robust.UnitTesting/Server/RobustServerSimulation.cs @@ -306,7 +306,7 @@ namespace Robust.UnitTesting.Server entitySystemMan.LoadExtraSystemType(); entitySystemMan.LoadExtraSystemType(); entitySystemMan.LoadExtraSystemType(); - entitySystemMan.LoadExtraSystemType(); + entitySystemMan.LoadExtraSystemType(); _systemDelegate?.Invoke(entitySystemMan);