2022-02-25 08:21:21 +00:00
|
|
|
|
using Cysharp.Threading.Tasks;
|
|
|
|
|
using QSB.EchoesOfTheEye.RaftSync.WorldObjects;
|
|
|
|
|
using QSB.Utility;
|
|
|
|
|
using QSB.WorldSync;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Threading;
|
|
|
|
|
|
2022-02-27 12:40:44 +00:00
|
|
|
|
namespace QSB.EchoesOfTheEye.RaftSync
|
2022-02-25 08:21:21 +00:00
|
|
|
|
{
|
2022-02-27 12:40:44 +00:00
|
|
|
|
public class RaftManager : WorldObjectManager
|
|
|
|
|
{
|
|
|
|
|
public override WorldObjectScene WorldObjectScene => WorldObjectScene.SolarSystem;
|
2022-02-25 08:21:21 +00:00
|
|
|
|
|
2022-02-27 12:40:44 +00:00
|
|
|
|
public static readonly List<RaftController> Rafts = new();
|
2022-02-25 08:21:21 +00:00
|
|
|
|
|
2022-02-27 12:40:44 +00:00
|
|
|
|
public override async UniTask BuildWorldObjects(OWScene scene, CancellationToken ct)
|
|
|
|
|
{
|
|
|
|
|
Rafts.Clear();
|
|
|
|
|
Rafts.AddRange(QSBWorldSync.GetUnityObjects<RaftController>().SortDeterministic());
|
|
|
|
|
QSBWorldSync.Init<QSBRaft, RaftController>(Rafts);
|
2022-02-27 21:04:32 +00:00
|
|
|
|
|
|
|
|
|
QSBWorldSync.Init<QSBRaftDock, RaftDock>();
|
|
|
|
|
QSBWorldSync.Init<QSBDamRaftLift, DamRaftLift>();
|
2022-02-27 12:40:44 +00:00
|
|
|
|
}
|
2022-02-25 08:21:21 +00:00
|
|
|
|
}
|
|
|
|
|
}
|