Improve test stability (#10913)
This commit is contained in:
@@ -445,10 +445,11 @@ namespace Content.Server.AI.Pathfinding.Accessible
|
||||
var parentChunk = node.ParentChunk;
|
||||
|
||||
// No guarantee the node even has a region yet (if we're doing neighbor lookups)
|
||||
if (!_regions[parentChunk.GridId].TryGetValue(parentChunk, out var regions))
|
||||
{
|
||||
if (!_regions.TryGetValue(parentChunk.GridId, out var chunk))
|
||||
return null;
|
||||
|
||||
if (!chunk.TryGetValue(parentChunk, out var regions))
|
||||
return null;
|
||||
}
|
||||
|
||||
foreach (var region in regions)
|
||||
{
|
||||
|
||||
@@ -19,6 +19,8 @@ public sealed partial class TriggerSystem
|
||||
//Ensures the entity trigger will have an active component
|
||||
EnsureComp<ActiveTriggerOnTimedCollideComponent>(uid);
|
||||
var otherUID = args.OtherFixture.Body.Owner;
|
||||
if (component.Colliding.ContainsKey(otherUID))
|
||||
return;
|
||||
component.Colliding.Add(otherUID, 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -119,7 +119,8 @@ public sealed class StationSystem : EntitySystem
|
||||
private void OnStationDeleted(EntityUid uid, StationDataComponent component, ComponentShutdown args)
|
||||
{
|
||||
if (_stations.Contains(uid) && // Was not deleted via DeleteStation()
|
||||
_gameTicker.RunLevel == GameRunLevel.InRound) // And not due to a round restart
|
||||
_gameTicker.RunLevel == GameRunLevel.InRound && // And not due to a round restart
|
||||
_gameTicker.LobbyEnabled) // If there isn't a lobby, this is probably sandbox, single player, or a test
|
||||
{
|
||||
// printing a stack trace, rather than throwing an exception so that entity deletion continues as normal.
|
||||
Logger.Error($"Station entity {ToPrettyString(uid)} is getting deleted mid-round. Trace: {Environment.StackTrace}");
|
||||
|
||||
Reference in New Issue
Block a user