mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-08 09:41:07 +00:00
24 lines
705 B
C#
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()
|
|
});
|
|
}
|
|
}
|
|
} |