fix stuff

This commit is contained in:
Mister_Nebula 2022-01-30 09:43:20 +00:00
parent eaddda8bc1
commit f9ee46f469
2 changed files with 14 additions and 12 deletions

View File

@ -1,5 +1,7 @@
using QSB.EchoesOfTheEye.SlideProjectors.WorldObjects; using Cysharp.Threading.Tasks;
using QSB.EchoesOfTheEye.SlideProjectors.WorldObjects;
using QSB.WorldSync; using QSB.WorldSync;
using System.Threading;
namespace QSB.EchoesOfTheEye.SlideProjectors namespace QSB.EchoesOfTheEye.SlideProjectors
{ {
@ -7,6 +9,6 @@ namespace QSB.EchoesOfTheEye.SlideProjectors
{ {
public override WorldObjectType WorldObjectType => WorldObjectType.SolarSystem; public override WorldObjectType WorldObjectType => WorldObjectType.SolarSystem;
public override void BuildWorldObjects(OWScene scene) => QSBWorldSync.Init<QSBSlideProjector, SlideProjector>(); public override async UniTask BuildWorldObjects(OWScene scene, CancellationToken ct) => QSBWorldSync.Init<QSBSlideProjector, SlideProjector>();
} }
} }

View File

@ -1,27 +1,27 @@
using QSB.Player; using Cysharp.Threading.Tasks;
using QSB.Utility; using QSB.Utility;
using QSB.WorldSync; using QSB.WorldSync;
using System; using System.Threading;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace QSB.EchoesOfTheEye.SlideProjectors.WorldObjects namespace QSB.EchoesOfTheEye.SlideProjectors.WorldObjects
{ {
public class QSBSlideProjector : WorldObject<SlideProjector> public class QSBSlideProjector : WorldObject<SlideProjector>
{ {
public override void Init() public override async UniTask Init(CancellationToken ct)
{ {
base.Init(); DebugLog.DebugWrite($"Init {this}");
DebugLog.DebugWrite($"Init {LogName}");
} }
public uint ControllingPlayer; public uint ControllingPlayer;
public void OnChangeAuthority(uint newOwner) public void OnChangeAuthority(uint newOwner)
{ {
DebugLog.DebugWrite($"{LogName} change ControllingPlayer to {newOwner}"); DebugLog.DebugWrite($"{this} change ControllingPlayer to {newOwner}");
}
public override void SendInitialState(uint to)
{
// todo SendInitialState
} }
} }
} }