Skip to content

Commit

Permalink
Remove debug assembly and definition counter
Browse files Browse the repository at this point in the history
  • Loading branch information
ari-steas committed Nov 22, 2024
1 parent 3758811 commit 4928b02
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion Data/Scripts/AssemblyScripts/Definitions/ApiDefinitions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4928b02

Please sign in to comment.