diff --git a/Content.Server/Nyanotrasen/ReverseEngineering/ReverseEngineeringSystem.cs b/Content.Server/Nyanotrasen/ReverseEngineering/ReverseEngineeringSystem.cs index 33df7ffaba2..4182d7529b3 100644 --- a/Content.Server/Nyanotrasen/ReverseEngineering/ReverseEngineeringSystem.cs +++ b/Content.Server/Nyanotrasen/ReverseEngineering/ReverseEngineeringSystem.cs @@ -110,7 +110,7 @@ public sealed class ReverseEngineeringSystem : SharedReverseEngineeringSystem ReverseEngineeringTickResult.SuccessAverage => 25, ReverseEngineeringTickResult.SuccessMajor => 40, ReverseEngineeringTickResult.InstantSuccess => 100, - _ => throw new ArgumentOutOfRangeException() + _ => 0, }; rev.Progress = Math.Clamp(rev.Progress + bonus, 0, 100); diff --git a/Content.Server/_Goobstation/Singularity/RadCollectorSignalSystem.cs b/Content.Server/_Goobstation/Singularity/RadCollectorSignalSystem.cs index aa91d83b31a..7e355732b16 100644 --- a/Content.Server/_Goobstation/Singularity/RadCollectorSignalSystem.cs +++ b/Content.Server/_Goobstation/Singularity/RadCollectorSignalSystem.cs @@ -55,6 +55,6 @@ public sealed class RadCollectorSignalSystem : EntitySystem RadCollectorState.Empty => EmptyPort, RadCollectorState.Low => LowPort, RadCollectorState.Full => FullPort, - _ => throw new ArgumentOutOfRangeException(nameof(state), state, null) + _ => EmptyPort, }; } diff --git a/Content.Shared/_Goobstation/Fishing/Systems/SharedFishingSystem.cs b/Content.Shared/_Goobstation/Fishing/Systems/SharedFishingSystem.cs index 3a2c62a7fa8..9fd08c5a34a 100644 --- a/Content.Shared/_Goobstation/Fishing/Systems/SharedFishingSystem.cs +++ b/Content.Shared/_Goobstation/Fishing/Systems/SharedFishingSystem.cs @@ -33,6 +33,7 @@ public abstract class SharedFishingSystem : EntitySystem [Dependency] private readonly SharedActionsSystem _actions = default!; [Dependency] private readonly SharedPopupSystem _popup = default!; [Dependency] private readonly SharedHandsSystem _hands = default!; + [Dependency] private readonly IRobustRandom _random = default!; // Delta V - Build Errors protected EntityQuery FisherQuery; protected EntityQuery ActiveFishSpotQuery; @@ -347,10 +348,10 @@ public abstract class SharedFishingSystem : EntitySystem var attachedEnt = lureComp.AttachedEntity.Value; var targetCoords = Xform.GetMapCoordinates(Transform(attachedEnt)); var playerCoords = Xform.GetMapCoordinates(Transform(player)); - var rand = new System.Random((int) Timing.CurTick.Value); // evil random prediction hack + // var rand = new System.Random((int) Timing.CurTick.Value); // evil random prediction hack // Delta V - No idea, commenting out for now // Calculate throw direction - var direction = (playerCoords.Position - targetCoords.Position) * rand.NextFloat(0.2f, 0.85f); + var direction = (playerCoords.Position - targetCoords.Position) * _random.NextFloat(0.2f, 0.85f); // Yeet Throwing.TryThrow(attachedEnt, direction, 4f, player);