mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2024-12-29 12:21:25 +00:00
26 lines
762 B
C#
26 lines
762 B
C#
using Cysharp.Threading.Tasks;
|
|
using QSB.Utility;
|
|
using System.Linq;
|
|
using System.Threading;
|
|
|
|
namespace QSB.WorldSync;
|
|
|
|
public class MiscManager : WorldObjectManager
|
|
{
|
|
public override WorldObjectScene WorldObjectScene => WorldObjectScene.Both;
|
|
public override bool DlcOnly => false;
|
|
|
|
public override async UniTask BuildWorldObjects(OWScene scene, CancellationToken ct)
|
|
{
|
|
await UniTask.WaitUntil(() => LateInitializerManager.isDoneInitializing, cancellationToken: ct);
|
|
|
|
var listToInitFrom = QSBWorldSync.GetUnityObjects<OWRigidbody>()
|
|
.Where(x =>
|
|
x is not (PlayerBody or ShipBody or ShuttleBody) &&
|
|
!x.TryGetComponent<SurveyorProbe>(out _)
|
|
)
|
|
.SortDeterministic();
|
|
QSBWorldSync.Init<QSBOWRigidbody, OWRigidbody>(listToInitFrom);
|
|
}
|
|
}
|