mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
use cool pattern matching
This commit is contained in:
parent
958b4c862f
commit
839eff6212
@ -612,7 +612,7 @@ namespace NewHorizons.Handlers
|
||||
var orbitLine = go.GetComponentInChildren<OrbitLine>()?.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<ConstantForceDetector>());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user