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,3 +1,5 @@
using System.Numerics;
namespace Content.Server.Shuttles.Components
{
[RegisterComponent]

View File

@@ -1,3 +1,4 @@
using System.Numerics;
using Content.Shared.Shuttles.Components;
namespace Content.Server.Shuttles.Components

View File

@@ -1,3 +1,4 @@
using System.Numerics;
using Content.Server.Shuttles.Systems;
using Content.Shared.Construction.Prototypes;
using Content.Shared.Damage;

View File

@@ -62,7 +62,7 @@ public sealed partial class DockingSystem
var worldPos = _transform.GetWorldPosition(xform, xformQuery);
var otherWorldPos = _transform.GetWorldPosition(otherXform, xformQuery);
if ((worldPos - otherWorldPos).Length < comp.Radius)
if ((worldPos - otherWorldPos).Length() < comp.Radius)
continue;
_sawmill.Debug($"Removed RecentlyDocked from {ToPrettyString(uid)} and {ToPrettyString(comp.LastDocked)}");

View File

@@ -1,5 +1,6 @@
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Numerics;
using Content.Server.Shuttles.Components;
using Robust.Shared.Map;
using Robust.Shared.Map.Components;

View File

@@ -1,3 +1,4 @@
using System.Numerics;
using Content.Server.Doors.Systems;
using Content.Server.NPC.Pathfinding;
using Content.Server.Shuttles.Components;

View File

@@ -1,3 +1,4 @@
using System.Numerics;
using System.Threading;
using Content.Server.Access.Systems;
using Content.Server.Administration.Logs;

View File

@@ -1,3 +1,4 @@
using System.Numerics;
using Content.Server.UserInterface;
using Content.Shared.Shuttles.BUIStates;
using Content.Shared.Shuttles.Components;

View File

@@ -9,6 +9,7 @@ using Robust.Shared.Map;
using Robust.Shared.Player;
using Robust.Shared.Utility;
using System.Diagnostics.CodeAnalysis;
using System.Numerics;
using Content.Server.Shuttles.Events;
using Content.Shared.Body.Components;
using Content.Shared.Buckle.Components;
@@ -541,7 +542,7 @@ public sealed partial class ShuttleSystem
}
var targetAABB = _transform.GetWorldMatrix(targetXform, xformQuery)
.TransformBox(targetLocalAABB).Enlarged(shuttleAABB.Size.Length);
.TransformBox(targetLocalAABB).Enlarged(shuttleAABB.Size.Length());
var nearbyGrids = new HashSet<EntityUid>();
var iteration = 0;
var lastCount = nearbyGrids.Count;
@@ -564,7 +565,7 @@ public sealed partial class ShuttleSystem
break;
}
targetAABB = targetAABB.Enlarged(shuttleAABB.Size.Length / 2f);
targetAABB = targetAABB.Enlarged(shuttleAABB.Size.Length() / 2f);
iteration++;
lastCount = nearbyGrids.Count;

View File

@@ -42,7 +42,7 @@ public sealed partial class ShuttleSystem
var ourVelocity = _physics.GetLinearVelocity(uid, ourPoint, ourBody, ourXform);
var otherVelocity = _physics.GetLinearVelocity(args.OtherEntity, otherPoint, otherBody, otherXform);
var jungleDiff = (ourVelocity - otherVelocity).Length;
var jungleDiff = (ourVelocity - otherVelocity).Length();
if (jungleDiff < MinimumImpactVelocity)
{

View File

@@ -1,4 +1,5 @@
using System.Linq;
using System.Numerics;
using Content.Server.Audio;
using Content.Server.Construction;
using Content.Server.Power.Components;