Update content vectors to numerics (#17759)

This commit is contained in:
metalgearsloth
2023-07-08 14:08:32 +10:00
committed by GitHub
parent 15772478c9
commit 68480af109
383 changed files with 978 additions and 575 deletions

View File

@@ -1,4 +1,5 @@
using System.Linq;
using System.Numerics;
using Content.Shared.Administration;
using Content.Shared.Explosion;
using Robust.Shared.Map;
@@ -272,7 +273,7 @@ public sealed partial class ExplosionSystem : EntitySystem
// First attempt to find a grid that is relatively close to the explosion's center. Instead of looking in a
// diameter x diameter sized box, use a smaller box with radius sized sides:
var box = Box2.CenteredAround(epicenter.Position, (radius, radius));
var box = Box2.CenteredAround(epicenter.Position, new Vector2(radius, radius));
foreach (var grid in _mapManager.FindGridsIntersecting(epicenter.MapId, box))
{
@@ -293,7 +294,7 @@ public sealed partial class ExplosionSystem : EntitySystem
// and using that for the grid look-up, we will just arbitrarily fudge the lookup size to be twice the diameter.
radius *= 4;
box = Box2.CenteredAround(epicenter.Position, (radius, radius));
box = Box2.CenteredAround(epicenter.Position, new Vector2(radius, radius));
var mapGrids = _mapManager.FindGridsIntersecting(epicenter.MapId, box).ToList();
var grids = mapGrids.Select(x => x.Owner).ToList();