remove type from worldobject

This commit is contained in:
JohnCorby 2021-12-20 19:40:43 -08:00
parent d9991b1c4b
commit 9cc452f22c
4 changed files with 0 additions and 7 deletions

View File

@ -4,7 +4,6 @@ namespace QSB.WorldSync
{ {
public interface IWorldObject public interface IWorldObject
{ {
public WorldObjectType WorldObjectType { get; }
int ObjectId { get; } int ObjectId { get; }
string Name { get; } string Name { get; }

View File

@ -126,7 +126,6 @@ namespace QSB.WorldSync
{ {
var obj = new TWorldObject var obj = new TWorldObject
{ {
WorldObjectType = WorldObjectManager._currentRebuildingManager.WorldObjectType,
AttachedObject = item, AttachedObject = item,
ObjectId = WorldObjects.Count ObjectId = WorldObjects.Count
}; };

View File

@ -6,7 +6,6 @@ namespace QSB.WorldSync
public abstract class WorldObject<T> : IWorldObject public abstract class WorldObject<T> : IWorldObject
where T : MonoBehaviour where T : MonoBehaviour
{ {
public WorldObjectType WorldObjectType { get; init; }
public int ObjectId { get; init; } public int ObjectId { get; init; }
public T AttachedObject { get; init; } public T AttachedObject { get; init; }
public string Name => AttachedObject == null ? "<NullObject!>" : AttachedObject.name; public string Name => AttachedObject == null ? "<NullObject!>" : AttachedObject.name;

View File

@ -76,8 +76,6 @@ namespace QSB.WorldSync
DoRebuild(scene); DoRebuild(scene);
} }
internal static WorldObjectManager _currentRebuildingManager;
private static void DoRebuild(OWScene scene) private static void DoRebuild(OWScene scene)
{ {
QSBWorldSync.RemoveWorldObjects(); QSBWorldSync.RemoveWorldObjects();
@ -95,7 +93,6 @@ namespace QSB.WorldSync
continue; continue;
} }
_currentRebuildingManager = manager;
try try
{ {
DebugLog.DebugWrite($"Rebuilding {manager.GetType().Name}", MessageType.Info); DebugLog.DebugWrite($"Rebuilding {manager.GetType().Name}", MessageType.Info);
@ -105,7 +102,6 @@ namespace QSB.WorldSync
{ {
DebugLog.ToConsole($"Exception - Exception when trying to rebuild WorldObjects of manager {manager.GetType().Name} : {ex.Message} Stacktrace :\r\n{ex.StackTrace}", MessageType.Error); DebugLog.ToConsole($"Exception - Exception when trying to rebuild WorldObjects of manager {manager.GetType().Name} : {ex.Message} Stacktrace :\r\n{ex.StackTrace}", MessageType.Error);
} }
_currentRebuildingManager = null;
} }
QSBCore.UnityEvents.RunWhen(() => _numManagersReadying == 0, () => QSBCore.UnityEvents.RunWhen(() => _numManagersReadying == 0, () =>