Beispiel #1
0
        public override bool HandleCommand(ulong userId, string[] words)
        {
            HashSet <IMyEntity> entitiesFound = CubeGrids.ScanCleanup(userId, words);

            foreach (IMyEntity entity in entitiesFound)
            {
                CubeGridEntity removeEntity = new CubeGridEntity((MyObjectBuilder_CubeGrid)entity.GetObjectBuilder(), entity);
                removeEntity.Dispose();

                IMyCubeGrid grid      = (IMyCubeGrid)entity;
                long        ownerId   = 0;
                string      ownerName = "";
                if (grid.BigOwners.Count > 0)
                {
                    ownerId   = grid.BigOwners.First();
                    ownerName = PlayerMap.Instance.GetPlayerItemFromPlayerId(ownerId).Name;
                }

                Log.Info("Cleanup", string.Format("Cleanup Removed Grid - Id: {0} Display: {1} OwnerId: {2} OwnerName: {3}", entity.EntityId, entity.DisplayName, ownerId, ownerName));
            }
            return(true);
        }
Beispiel #2
0
 // admin nobeacon scan
 public override bool HandleCommand(ulong userId, string[] words)
 {
     CubeGrids.ScanCleanup(userId, words);
     return(true);
 }
Beispiel #3
0
 // admin nobeacon scan
 public override bool HandleCommand(ulong userId, string command)
 {
     string[] words = command.Split(' ');
     CubeGrids.ScanCleanup(userId, words);
     return(true);
 }