2022-01-28 20:49:07 -08:00
|
|
|
|
using Cysharp.Threading.Tasks;
|
|
|
|
|
using QSB.Tools.ProbeLauncherTool.WorldObjects;
|
2021-07-24 21:25:29 +01:00
|
|
|
|
using QSB.WorldSync;
|
2022-01-20 13:22:58 -08:00
|
|
|
|
using System.Linq;
|
2022-01-28 20:49:07 -08:00
|
|
|
|
using System.Threading;
|
2021-07-24 21:25:29 +01:00
|
|
|
|
|
2022-03-02 19:46:33 -08:00
|
|
|
|
namespace QSB.Tools.ProbeLauncherTool;
|
|
|
|
|
|
|
|
|
|
internal class ProbeLauncherManager : WorldObjectManager
|
2021-07-24 21:25:29 +01:00
|
|
|
|
{
|
2022-03-02 19:46:33 -08:00
|
|
|
|
public override WorldObjectScene WorldObjectScene => WorldObjectScene.Both;
|
2022-02-27 04:40:44 -08:00
|
|
|
|
|
2022-03-02 19:46:33 -08:00
|
|
|
|
public override async UniTask BuildWorldObjects(OWScene scene, CancellationToken ct)
|
|
|
|
|
{
|
|
|
|
|
QSBWorldSync.Init<QSBProbeLauncher, ProbeLauncher>(typeof(PlayerProbeLauncher));
|
|
|
|
|
if (scene == OWScene.SolarSystem)
|
2022-01-20 13:22:58 -08:00
|
|
|
|
{
|
2022-03-02 19:46:33 -08:00
|
|
|
|
QSBWorldSync.Init<QSBProbeLauncher, ProbeLauncher>(new[]
|
2022-01-20 13:22:58 -08:00
|
|
|
|
{
|
2022-03-02 19:46:33 -08:00
|
|
|
|
QSBWorldSync.GetUnityObjects<ShipCockpitController>().First().GetShipProbeLauncher()
|
|
|
|
|
});
|
2022-01-20 13:22:58 -08:00
|
|
|
|
}
|
2021-07-24 21:25:29 +01:00
|
|
|
|
}
|
|
|
|
|
}
|