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

Commit 18f7f42

Browse files
committed
remove unnecessary code, fix space pirate conceal check
1 parent 5777c16 commit 18f7f42

File tree

3 files changed

+17
-24
lines changed

3 files changed

+17
-24
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
//194
1+
//195
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.13.6.194")]
10-
[assembly: AssemblyVersion("1.13.6.194")]
9+
[assembly: AssemblyFileVersion("1.13.6.195")]
10+
[assembly: AssemblyVersion("1.13.6.195")]

EssentialsPlugin/EntityManagers/EntityManagement.cs

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,6 @@ public static void CheckAndConcealEntities( )
7272
_checkConceal = true;
7373
try
7474
{
75-
DateTime start = DateTime.Now;
76-
double distCheck = 0d;
77-
double blockRules = 0d;
78-
double getGrids = 0d;
79-
double co = 0f;
80-
8175
List<MyPlayer> players;
8276
HashSet<MyEntity> entities;
8377
HashSet<MyEntity> entitiesFiltered = new HashSet<MyEntity>( );
@@ -119,7 +113,7 @@ public static void CheckAndConcealEntities( )
119113
{
120114
if(PluginSettings.Instance.DynamicConcealPirates)
121115
{
122-
if ( group.Parent.BigOwners.Count < 2 && MySession.Static.Players.GetNPCIdentities().Contains( group.Parent.BigOwners[0] ) )
116+
if ( group.Parent.GetOwner() == "Space Pirates" )
123117
{
124118
if (PluginSettings.Instance.DynamicShowMessages)
125119
Essentials.Log.Info( $"Not concealing pirate owned grid {group.Parent.EntityId} -> {group.Parent.DisplayName}.");
@@ -258,7 +252,7 @@ private static void ConcealEntity( MyEntity entity )
258252
long ownerId = ((MyCubeGrid)entity).BigOwners.First();
259253
string ownerName = PlayerMap.Instance.GetPlayerNameFromPlayerId( ownerId );
260254

261-
if ( !PluginSettings.Instance.DynamicConcealPirates )
255+
if ( PluginSettings.Instance.DynamicShowMessages )
262256
Essentials.Log.Info($"{entity.EntityId} {ownerId} {ownerName}" );
263257

264258
pos = 2;
@@ -268,21 +262,21 @@ private static void ConcealEntity( MyEntity entity )
268262
entity.Physics.AngularVelocity = Vector3.Zero;
269263
}
270264

271-
pos = 3;
272-
if ( UnregisteredEntities.Contains( entity ) )
273-
{
274-
Essentials.Log.Info( $"Concealing - Id: {entity.EntityId} DUPE FOUND - Display: {entity.DisplayName} OwnerId: {ownerId} OwnerName: {ownerName}");
275-
Wrapper.GameAction( entity.Close );
265+
//pos = 3;
266+
//if ( UnregisteredEntities.Contains( entity ) )
267+
//{
268+
// Essentials.Log.Info( $"Concealing - Id: {entity.EntityId} DUPE FOUND - Display: {entity.DisplayName} OwnerId: {ownerId} OwnerName: {ownerName}");
269+
// Wrapper.GameAction( entity.Close );
270+
//}
276271
pos = 4;
277-
}
278-
else
279-
{
272+
//else
273+
//{
280274
UnregisteredEntities.Add( entity );
281275
Wrapper.GameAction( () => UnregisterHierarchy( entity ) );
282276
if ( PluginSettings.Instance.DynamicShowMessages )
283277
Essentials.Log.Info( $"Concealed - Id: {entity.EntityId} -> Display: {entity.DisplayName} OwnerId: {ownerId} OwnerName: {ownerName}" );
284278

285-
}
279+
//}
286280
}
287281
catch ( Exception ex )
288282
{
@@ -400,7 +394,7 @@ public static void CheckAndRevealEntities( )
400394

401395
if ( found )
402396
{
403-
ReregisterHierarchy( entity );
397+
Wrapper.GameAction( () => ReregisterHierarchy( entity ) );
404398

405399
if (PluginSettings.Instance.DynamicShowMessages)
406400
Essentials.Log.Info("Revealed - Id: {0} -> Display: {1} OwnerId: {2} OwnerName: {3} Reason: {4}",
@@ -650,7 +644,6 @@ static public void RevealAll( )
650644

651645
foreach ( var entity in UnregisteredEntities )
652646
{
653-
654647
if (PluginSettings.Instance.DynamicShowMessages)
655648
Essentials.Log.Info("Revealed - Id: {0} -> Display: {1} OwnerId: {2} OwnerName: {3} Reason: {4}",
656649
entity.EntityId,
@@ -659,7 +652,7 @@ static public void RevealAll( )
659652
PlayerMap.Instance.GetPlayerNameFromPlayerId(((MyCubeGrid)entity).BigOwners.FirstOrDefault()),
660653
"Force reveal");
661654

662-
ReregisterHierarchy( entity );
655+
Wrapper.GameAction( () => ReregisterHierarchy( entity ) );
663656
}
664657

665658
_checkReveal = false;

EssentialsPlugin/Essentials.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@ public bool DynamicConcealIncludeLargeGrids
672672
}
673673

674674
[Category("Dynamic Entity Management")]
675-
[DisplayName("Include Large Grids")]
675+
[DisplayName("Include Stations")]
676676
[Description("Enable / Disable management of stations, independent of other large block grids.")]
677677
[Browsable(true)]
678678
[ReadOnly(false)]

0 commit comments

Comments
 (0)