Removes some linq from power (#2875)

* PowerProviderComponent Linq removal

* AdjacentNode Linq removal

* PipeNode Linq removal

* Replaces HasFlag usage in PipeNode

Co-authored-by: py01 <pyronetics01@gmail.com>
This commit is contained in:
py01
2021-01-01 19:04:10 -06:00
committed by GitHub
parent 836e2d185a
commit a87dda47e9
4 changed files with 62 additions and 27 deletions

View File

@@ -1,6 +1,6 @@
using System;
using Robust.Shared.Maths;
using Robust.Shared.Serialization;
using System;
namespace Content.Shared.GameObjects.Components.Atmos
{
@@ -76,6 +76,11 @@ namespace Content.Shared.GameObjects.Components.Atmos
{
public const int PipeDirections = 4;
public static bool HasDirection(this PipeDirection pipeDirection, PipeDirection other)
{
return (pipeDirection & other) == other;
}
public static Angle ToAngle(this PipeDirection pipeDirection)
{
return pipeDirection switch