mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-04 02:47:22 +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 interface IWorldObject
|
||||||
{
|
{
|
||||||
public WorldObjectType WorldObjectType { get; }
|
|
||||||
int ObjectId { get; }
|
int ObjectId { get; }
|
||||||
string Name { get; }
|
string Name { get; }
|
||||||
|
|
||||||
|
@ -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
|
||||||
};
|
};
|
||||||
|
@ -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;
|
||||||
|
@ -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, () =>
|
||||||
|
Loading…
Reference in New Issue
Block a user