Mister_Nebula 6ed3d46659 stuff
2021-04-16 11:40:13 +01:00

22 lines
575 B
C#

using QSB.ShipSync.WorldObjects;
using QSB.TransformSync;
using QSB.Utility;
using QSB.WorldSync;
using System.Linq;
namespace QSB.ShipSync.TransformSync
{
public class ShipTransformSync : WorldObjectTransformSync
{
public override SyncType SyncType => SyncType.Ship;
protected override IWorldObject GetWorldObject()
{
SectorSync.SetSectorDetector(Locator.GetShipDetector().GetComponent<SectorDetector>());
return QSBWorldSync.GetWorldFromId<QSBShip>(0);
}
public override bool IsReady
=> QSBWorldSync.GetWorldObjects<QSBShip>().Count() != 0;
}
}