@@ -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 ;
0 commit comments