mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-01 03:32:38 +00:00
remove type from worldobject
This commit is contained in:
parent
d9991b1c4b
commit
9cc452f22c
@ -4,7 +4,6 @@ namespace QSB.WorldSync
|
||||
{
|
||||
public interface IWorldObject
|
||||
{
|
||||
public WorldObjectType WorldObjectType { get; }
|
||||
int ObjectId { get; }
|
||||
string Name { get; }
|
||||
|
||||
|
@ -126,7 +126,6 @@ namespace QSB.WorldSync
|
||||
{
|
||||
var obj = new TWorldObject
|
||||
{
|
||||
WorldObjectType = WorldObjectManager._currentRebuildingManager.WorldObjectType,
|
||||
AttachedObject = item,
|
||||
ObjectId = WorldObjects.Count
|
||||
};
|
||||
|
@ -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;
|
||||
|
@ -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, () =>
|
||||
|
Loading…
Reference in New Issue
Block a user