diff --git a/Data/Scripts/AssemblyScripts/AssemblyComponents/AssemblyPartManager.cs b/Data/Scripts/AssemblyScripts/AssemblyComponents/AssemblyPartManager.cs index d8dcbb7..ea4e237 100644 --- a/Data/Scripts/AssemblyScripts/AssemblyComponents/AssemblyPartManager.cs +++ b/Data/Scripts/AssemblyScripts/AssemblyComponents/AssemblyPartManager.cs @@ -74,14 +74,6 @@ public void UpdateAfterSimulation() ProcessQueuedConnectionChecks(); foreach (var assembly in AllPhysicalAssemblies.Values) assembly.Update(); - - if (AssembliesSessionInit.DebugMode) - { - MyAPIGateway.Utilities.ShowNotification( - $"Assemblies: {AllPhysicalAssemblies.Count}", 1000 / 60); - MyAPIGateway.Utilities.ShowNotification($"Definitions: {DefinitionHandler.I.ModularDefinitions.Count}", - 1000 / 60); - } } private void ProcessQueuedConnectionChecks() diff --git a/Data/Scripts/AssemblyScripts/Definitions/ApiDefinitions.cs b/Data/Scripts/AssemblyScripts/Definitions/ApiDefinitions.cs index 22086d0..4566241 100644 --- a/Data/Scripts/AssemblyScripts/Definitions/ApiDefinitions.cs +++ b/Data/Scripts/AssemblyScripts/Definitions/ApiDefinitions.cs @@ -235,7 +235,7 @@ private int GetContainingAssembly(IMyCubeBlock block, string definitionName) if (!gridLogic.AllAssemblyParts[definition].TryGetValue(block.SlimBlock, out part)) return -1; - return part.MemberAssembly.AssemblyId; + return part?.MemberAssembly?.AssemblyId ?? -1; } private void RecreateConnections(IMyCubeBlock block, string definitionName)