Update content to remove redundant Robust math types (#38930)

Vector3, Vector4, Matrix4, and Quaternion are now gone. This switches us over to System.Numerics where applicable.
This commit is contained in:
Pieter-Jan Briers
2025-07-22 12:29:17 +02:00
committed by GitHub
parent 9a7cb00d4e
commit af4ff4e9de
11 changed files with 13 additions and 7 deletions

View File

@@ -1,4 +1,5 @@
using Robust.Client.Graphics; using System.Numerics;
using Robust.Client.Graphics;
using Robust.Client.UserInterface; using Robust.Client.UserInterface;
using Robust.Shared.Prototypes; using Robust.Shared.Prototypes;
using Robust.Shared.Timing; using Robust.Shared.Timing;
@@ -36,7 +37,7 @@ namespace Content.Client.Cooldown
if (Progress >= 0f) if (Progress >= 0f)
{ {
var hue = (5f / 18f) * lerp; var hue = (5f / 18f) * lerp;
color = Color.FromHsv((hue, 0.75f, 0.75f, 0.50f)); color = Color.FromHsv(new Vector4(hue, 0.75f, 0.75f, 0.50f));
} }
else else
{ {

View File

@@ -1,4 +1,5 @@
using Content.Shared.Disposal; using System.Numerics;
using Content.Shared.Disposal;
using Content.Shared.Disposal.Unit; using Content.Shared.Disposal.Unit;
using Robust.Client.Graphics; using Robust.Client.Graphics;
using Robust.Client.UserInterface.Controls; using Robust.Client.UserInterface.Controls;

View File

@@ -5,6 +5,7 @@ using Robust.Client.Graphics;
using Robust.Shared.Prototypes; using Robust.Shared.Prototypes;
using Robust.Shared.Timing; using Robust.Shared.Timing;
using System.Linq; using System.Linq;
using System.Numerics;
using DrawDepth = Content.Shared.DrawDepth.DrawDepth; using DrawDepth = Content.Shared.DrawDepth.DrawDepth;
namespace Content.Client.Holopad; namespace Content.Client.Holopad;

View File

@@ -1,4 +1,5 @@
using System.Linq; using System.Linq;
using System.Numerics;
using Content.Client.Items.Systems; using Content.Client.Items.Systems;
using Content.Shared.Clothing; using Content.Shared.Clothing;
using Content.Shared.Hands; using Content.Shared.Hands;

View File

@@ -3,6 +3,7 @@ using Robust.Client.UserInterface.XAML;
using Robust.Client.GameObjects; using Robust.Client.GameObjects;
using Robust.Shared.IoC; using Robust.Shared.IoC;
using System; using System;
using System.Numerics;
using Content.Client.Stylesheets; using Content.Client.Stylesheets;
using Content.Shared.APC; using Content.Shared.APC;
using Robust.Client.Graphics; using Robust.Client.Graphics;

View File

@@ -6,7 +6,6 @@ using Robust.Shared.Utility;
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
using System.Linq; using System.Linq;
using System.Numerics; using System.Numerics;
using Vector4 = Robust.Shared.Maths.Vector4;
namespace Content.Client.Power; namespace Content.Client.Power;

View File

@@ -10,7 +10,6 @@ using Robust.Shared.Physics;
using Robust.Shared.Threading; using Robust.Shared.Threading;
using Robust.Shared.Timing; using Robust.Shared.Timing;
using Robust.Shared.Utility; using Robust.Shared.Utility;
using Vector2 = System.Numerics.Vector2;
namespace Content.Client.Shuttles.UI; namespace Content.Client.Shuttles.UI;

View File

@@ -1,3 +1,4 @@
using System.Numerics;
using Content.Shared.Mobs; using Content.Shared.Mobs;
using Robust.Client.Graphics; using Robust.Client.Graphics;
using Robust.Client.Player; using Robust.Client.Player;

View File

@@ -1,3 +1,4 @@
using System.Numerics;
using Content.Shared.CCVar; using Content.Shared.CCVar;
using Robust.Shared.Configuration; using Robust.Shared.Configuration;
@@ -43,7 +44,7 @@ public sealed class ProgressColorSystem : EntitySystem
// lerp // lerp
var hue = 5f / 18f * progress; var hue = 5f / 18f * progress;
return Color.FromHsv((hue, 1f, 0.75f, 1f)); return Color.FromHsv(new Vector4(hue, 1f, 0.75f, 1f));
} }
return InterpolateColorGaussian(Plasma, progress); return InterpolateColorGaussian(Plasma, progress);

View File

@@ -621,7 +621,7 @@ public sealed class StorageWindow : BaseWindow
{ {
marked.Add(cell); marked.Add(cell);
cell.ModulateSelfOverride = spotFree cell.ModulateSelfOverride = spotFree
? Color.FromHsv((0.18f, 1 / spot, 0.5f / spot + 0.5f, 1f)) ? Color.FromHsv(new Vector4(0.18f, 1 / spot, 0.5f / spot + 0.5f, 1f))
: Color.FromHex("#2222CC"); : Color.FromHex("#2222CC");
} }
} }

View File

@@ -1,3 +1,4 @@
using System.Numerics;
using System.Security.Cryptography; using System.Security.Cryptography;
using Microsoft.VisualBasic.CompilerServices; using Microsoft.VisualBasic.CompilerServices;