mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-04 02:47:22 +00:00
do DeterministicManager things on world objects added instead of ready
This commit is contained in:
parent
9e0dbe55bb
commit
2dbc57bb14
@ -31,7 +31,7 @@ public static class DeterministicManager
|
||||
}
|
||||
};
|
||||
|
||||
public static void OnWorldObjectsReady()
|
||||
public static void OnWorldObjectsAdded()
|
||||
{
|
||||
if (QSBCore.DebugSettings.DumpWorldObjects)
|
||||
{
|
||||
@ -267,7 +267,7 @@ public static class DeterministicManager
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// only call this before world objects ready
|
||||
/// only call this before world objects added
|
||||
/// </summary>
|
||||
public static string DeterministicPath(this Component component)
|
||||
{
|
||||
@ -298,7 +298,7 @@ public static class DeterministicManager
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// only call this before world objects ready
|
||||
/// only call this before world objects added
|
||||
/// </summary>
|
||||
public static IEnumerable<T> SortDeterministic<T>(this IEnumerable<T> components) where T : Component
|
||||
=> components.OrderBy(DeterministicPath);
|
||||
|
@ -83,6 +83,8 @@ public static class QSBWorldSync
|
||||
AllObjectsAdded = true;
|
||||
DebugLog.DebugWrite("World Objects added.", MessageType.Success);
|
||||
|
||||
DeterministicManager.OnWorldObjectsAdded();
|
||||
|
||||
WorldObjectsHash = WorldObjects.Select(x => x.GetType().Name).GetMD5Hash();
|
||||
DebugLog.DebugWrite($"WorldObject hash is {WorldObjectsHash}");
|
||||
|
||||
@ -101,8 +103,6 @@ public static class QSBWorldSync
|
||||
AllObjectsReady = true;
|
||||
DebugLog.DebugWrite("World Objects ready.", MessageType.Success);
|
||||
|
||||
DeterministicManager.OnWorldObjectsReady();
|
||||
|
||||
if (!QSBCore.IsHost)
|
||||
{
|
||||
new RequestInitialStatesMessage().Send();
|
||||
|
Loading…
Reference in New Issue
Block a user