Remove default grids (content) (#2241)
* Default grids go poof * Address review * Update submodule * Fix DoAfterSystem for entities without grid. * Fix SubFloorHideSystem for entities without grid. * Fix ExplosionHelper for coordinates that aren't in a grid * Fix TurfHelpers' GetWorldTileBox crash in the case of invalid grid * Fix tile prying component crash when trying to pry space. * Spill fixes when passing coordinates without grids. * Are you static'in, son? * Change SaveLoadSaveTest grid Id hardcoded value It's still hardcoded, but at least now it's correct! * Only send debug AI thing if grid is not invalid * Update submodule. Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
This commit is contained in:
committed by
GitHub
parent
78507ac9a2
commit
48841a274d
@@ -621,7 +621,7 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding.Accessible
|
||||
/// <param name="chunk"></param>
|
||||
private void GenerateRegions(PathfindingChunk chunk)
|
||||
{
|
||||
// Grid deleted while update queued.
|
||||
// Grid deleted while update queued, or invalid grid.
|
||||
if (!_mapManager.TryGetGrid(chunk.GridId, out _))
|
||||
{
|
||||
return;
|
||||
@@ -688,7 +688,8 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding.Accessible
|
||||
private void SendDebugMessage(PlayerAttachSystemMessage message)
|
||||
{
|
||||
var playerGrid = message.Entity.Transform.GridID;
|
||||
SendRegionsDebugMessage(playerGrid);
|
||||
if(playerGrid.IsValid())
|
||||
SendRegionsDebugMessage(playerGrid);
|
||||
}
|
||||
|
||||
private void SendRegionsDebugMessage(GridId gridId)
|
||||
|
||||
@@ -6,24 +6,20 @@ using System.Threading.Tasks;
|
||||
using Content.Server.GameObjects.Components;
|
||||
using Content.Shared.GameObjects.Components.Damage;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Server.Interfaces.Timing;
|
||||
using Robust.Shared.GameObjects.Systems;
|
||||
using Robust.Shared.IoC;
|
||||
|
||||
namespace Content.Server.GameObjects.EntitySystems.DoAfter
|
||||
{
|
||||
[UsedImplicitly]
|
||||
public sealed class DoAfterSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly IPauseManager _pauseManager = default!;
|
||||
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
base.Update(frameTime);
|
||||
|
||||
foreach (var comp in ComponentManager.EntityQuery<DoAfterComponent>())
|
||||
{
|
||||
if (_pauseManager.IsGridPaused(comp.Owner.Transform.GridID)) continue;
|
||||
if (comp.Owner.Paused) continue;
|
||||
|
||||
var cancelled = new List<DoAfter>(0);
|
||||
var finished = new List<DoAfter>(0);
|
||||
|
||||
Reference in New Issue
Block a user