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 WorldObjectType WorldObjectType { get; }
int ObjectId { get; }
string Name { get; }

View File

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

View File

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

View File

@ -76,8 +76,6 @@ namespace QSB.WorldSync
DoRebuild(scene);
}
internal static WorldObjectManager _currentRebuildingManager;
private static void DoRebuild(OWScene scene)
{
QSBWorldSync.RemoveWorldObjects();
@ -95,7 +93,6 @@ namespace QSB.WorldSync
continue;
}
_currentRebuildingManager = manager;
try
{
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);
}
_currentRebuildingManager = null;
}
QSBCore.UnityEvents.RunWhen(() => _numManagersReadying == 0, () =>