From 839eff62121aa3824a32a6e8df51508b0c5111c5 Mon Sep 17 00:00:00 2001 From: JohnCorby Date: Mon, 25 Jul 2022 20:08:49 -0700 Subject: [PATCH] use cool pattern matching --- NewHorizons/Handlers/PlanetCreationHandler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NewHorizons/Handlers/PlanetCreationHandler.cs b/NewHorizons/Handlers/PlanetCreationHandler.cs index 02630ce5..3bd6b648 100644 --- a/NewHorizons/Handlers/PlanetCreationHandler.cs +++ b/NewHorizons/Handlers/PlanetCreationHandler.cs @@ -612,7 +612,7 @@ namespace NewHorizons.Handlers var orbitLine = go.GetComponentInChildren()?.gameObject; if (orbitLine != null) GameObject.Destroy(orbitLine); - var isMoon = newAO.GetAstroObjectType() == AstroObject.Type.Moon || newAO.GetAstroObjectType() == AstroObject.Type.Satellite || newAO.GetAstroObjectType() == AstroObject.Type.SpaceStation; + var isMoon = newAO.GetAstroObjectType() is AstroObject.Type.Moon or AstroObject.Type.Satellite or AstroObject.Type.SpaceStation; if (body.Config.Orbit.showOrbitLine) OrbitlineBuilder.Make(go, newAO, isMoon, body.Config); DetectorBuilder.SetDetector(primary, newAO, go.GetComponentInChildren());