mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
28 lines
905 B
C#
28 lines
905 B
C#
using NewHorizons.Builder.General;
|
|
using NewHorizons.External.Configs;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using UnityEngine;
|
|
|
|
namespace NewHorizons.Components
|
|
{
|
|
public class MapSatelliteOrbitFix : MonoBehaviour
|
|
{
|
|
public void Awake()
|
|
{
|
|
// TODO: eventually all bodies should have configs
|
|
var config = new PlanetConfig(null);
|
|
config.Base.SurfaceSize = 10f;
|
|
|
|
var detector = base.transform.GetComponentInChildren<DynamicForceDetector>();
|
|
var ao = base.GetComponent<AstroObject>();
|
|
var newDetector = DetectorBuilder.Make(base.gameObject, ao.GetAttachedOWRigidbody(), ao.GetPrimaryBody(), ao, config);
|
|
newDetector.transform.parent = detector.transform.parent;
|
|
GameObject.Destroy(detector);
|
|
}
|
|
}
|
|
}
|