mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-18 04:10:36 +00:00
25 lines
719 B
C#
25 lines
719 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 WorldObjectType WorldObjectType => WorldObjectType.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()
|
|
});
|
|
}
|
|
}
|
|
}
|
|
} |