Skip to content
This repository was archived by the owner on Jun 23, 2023. It is now read-only.

Commit b535e6e

Browse files
committed
A little less noise in the logs when there aren't any NPC ships to remove.
1 parent 80eb76c commit b535e6e

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
//45
1+
//46
22
//
33
// This code was generated by a tool. Any changes made manually will be lost
44
// the next time this code is regenerated.
55
//
66

77
using System.Reflection;
88

9-
[assembly: AssemblyFileVersion("1.0.0.45")]
10-
[assembly: AssemblyVersion("1.0.0.45")]
9+
[assembly: AssemblyFileVersion("1.0.0.46")]
10+
[assembly: AssemblyVersion("1.0.0.46")]

GetOutOfMySandbox/GetOutOfMySandbox.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ void Instance_WorldSaved( )
7575
if ( PluginSettings.Instance.DeleteNpcShips )
7676
{
7777
IEnumerable<string> npcIds = sandboxSbc.XPathSelectElements( "/MyObjectBuilder_Checkpoint/Identities/MyObjectBuilder_Identity[DisplayName='Neutral NPC']" ).Select( n => n.Element( XName.Get( "IdentityId" ) ).Value );
78-
Log.Info( "Deleting NPC ships for NPC IDs: {0}", string.Join( ", ", npcIds ) );
78+
if ( npcIds.Any( ) )
79+
Log.Info( "Deleting NPC ships for NPC IDs: {0}", string.Join( ", ", npcIds ) );
7980
foreach ( string id in npcIds )
8081
{
8182
sectorFile.XPathSelectElements( string.Format( "/MyObjectBuilder_Sector/SectorObjects/MyObjectBuilder_EntityBase[CubeBlocks/MyObjectBuilder_CubeBlock/Owner='{0}']", id ) ).Remove( );

0 commit comments

Comments
 (0)