remove "what"s

This commit is contained in:
JohnCorby 2022-10-06 14:45:40 -07:00
parent d721630e43
commit 03e864e0ee
5 changed files with 7 additions and 27 deletions

View File

@ -1,8 +1,6 @@
using Cysharp.Threading.Tasks;
using QSB.EchoesOfTheEye.RaftSync.WorldObjects;
using QSB.Utility;
using QSB.WorldSync;
using System.Linq;
using System.Threading;
namespace QSB.EchoesOfTheEye.RaftSync;
@ -14,10 +12,7 @@ public class RaftManager : WorldObjectManager
public override async UniTask BuildWorldObjects(OWScene scene, CancellationToken ct)
{
// NH sometimes makes the body (but not the raft) null. what
QSBWorldSync.Init<QSBRaft, RaftController>(QSBWorldSync.GetUnityObjects<RaftController>()
.Where(x => x.GetAttachedOWRigidbody())
.SortDeterministic());
QSBWorldSync.Init<QSBRaft, RaftController>();
QSBWorldSync.Init<QSBRaftDock, RaftDock>();
}
}

View File

@ -55,7 +55,8 @@ public class QSBItem<T> : WorldObject<T>, IQSBItem
}
// NH can make item not have parent. what
var socket = _lastParent?.GetComponent<OWItemSocket>();
// BUG: this happens because qsb finds nh prefabs. we need to make it not do this
var socket = _lastParent.GetComponent<OWItemSocket>();
if (socket != null)
{
_lastSocket = socket.GetWorldObject<QSBItemSocket>();

View File

@ -1,8 +1,6 @@
using Cysharp.Threading.Tasks;
using QSB.OrbSync.WorldObjects;
using QSB.Utility;
using QSB.WorldSync;
using System.Linq;
using System.Threading;
namespace QSB.OrbSync;
@ -12,8 +10,5 @@ public class OrbManager : WorldObjectManager
public override WorldObjectScene WorldObjectScene => WorldObjectScene.Both;
public override async UniTask BuildWorldObjects(OWScene scene, CancellationToken ct) =>
// NH sometimes makes the body (but not the orb) null. what
QSBWorldSync.Init<QSBOrb, NomaiInterfaceOrb>(QSBWorldSync.GetUnityObjects<NomaiInterfaceOrb>()
.Where(x => x.GetAttachedOWRigidbody())
.SortDeterministic());
QSBWorldSync.Init<QSBOrb, NomaiInterfaceOrb>();
}

View File

@ -17,11 +17,7 @@ internal class OccasionalManager : WorldObjectManager
{
var gdBody = Locator._giantsDeep.GetOWRigidbody();
var cannon = Locator._orbitalProbeCannon.GetRequiredComponent<OrbitalProbeLaunchController>();
// NH sometimes makes the body (but not the cannon) null. what
if (cannon.GetAttachedOWRigidbody())
{
SpawnOccasional(cannon.GetAttachedOWRigidbody(), gdBody);
}
SpawnOccasional(cannon.GetAttachedOWRigidbody(), gdBody);
foreach (var proxy in cannon._realDebrisSectorProxies)
{

View File

@ -49,14 +49,6 @@ public static class QSBWorldSync
await UniTask.WaitUntil(() => PlayerTransformSync.LocalInstance, cancellationToken: _cts.Token);
}
// let NH do things first :)
// yes it has to be this long for things to be the most stable with addons
if (QSBCore.Helper.Interaction.ModExists("xen.NewHorizons"))
{
// TODO: convince NH to use a boolean for Star System Loaded event instead of having to track it manually myself
await UniTask.DelayFrame(1000, cancellationToken: _cts.Token);
}
GameInit();
foreach (var manager in Managers)
@ -196,7 +188,8 @@ public static class QSBWorldSync
{
// So objects have time to be deleted, made, whatever
// i.e. wait until Start has been called
Delay.RunNextFrame(() => BuildWorldObjects(loadScene).Forget());
// TODO: see if this number of frames actually works. TWEAK!
Delay.RunFramesLater(10, () => BuildWorldObjects(loadScene).Forget());
}
};