quantum-space-buddies/QSB/Tools/ProbeLauncherTool/ProbeLauncherManager.cs
2022-03-02 19:46:33 -08:00

24 lines
705 B
C#

using Cysharp.Threading.Tasks;
using QSB.Tools.ProbeLauncherTool.WorldObjects;
using QSB.WorldSync;
using System.Linq;
using System.Threading;
namespace QSB.Tools.ProbeLauncherTool;
internal class ProbeLauncherManager : WorldObjectManager
{
public override WorldObjectScene WorldObjectScene => WorldObjectScene.Both;
public override async UniTask BuildWorldObjects(OWScene scene, CancellationToken ct)
{
QSBWorldSync.Init<QSBProbeLauncher, ProbeLauncher>(typeof(PlayerProbeLauncher));
if (scene == OWScene.SolarSystem)
{
QSBWorldSync.Init<QSBProbeLauncher, ProbeLauncher>(new[]
{
QSBWorldSync.GetUnityObjects<ShipCockpitController>().First().GetShipProbeLauncher()
});
}
}
}