25 lines
763 B
C#
Raw Normal View History

2022-02-25 00:21:21 -08:00
using Cysharp.Threading.Tasks;
using QSB.EchoesOfTheEye.RaftSync.WorldObjects;
using QSB.Utility;
using QSB.WorldSync;
using System.Collections.Generic;
using System.Threading;
2022-03-02 19:46:33 -08:00
namespace QSB.EchoesOfTheEye.RaftSync;
public class RaftManager : WorldObjectManager
2022-02-25 00:21:21 -08:00
{
2022-03-02 19:46:33 -08:00
public override WorldObjectScene WorldObjectScene => WorldObjectScene.SolarSystem;
2022-02-25 00:21:21 -08:00
2022-03-02 19:46:33 -08:00
public static readonly List<RaftController> Rafts = new();
2022-02-25 00:21:21 -08:00
2022-03-02 19:46:33 -08: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 13:04:32 -08:00
2022-03-02 19:46:33 -08:00
QSBWorldSync.Init<QSBRaftDock, RaftDock>();
QSBWorldSync.Init<QSBDamRaftLift, DamRaftLift>();
2022-02-25 00:21:21 -08:00
}
2022-03-02 19:46:33 -08:00
}