Exemple #1
0
        private void RestoreColour(SeenHolo sh)
        {
            Log.DebugLog("restoring original colour: " + sh.Seen.Entity.getBestName());
            MyCubeGrid realGrid = (MyCubeGrid)sh.Seen.Entity;
            MyCubeGrid holo     = (MyCubeGrid)sh.Holo;

            foreach (IMySlimBlock block in realGrid.CubeBlocks)
            {
                holo.ColorBlocks(block.Position, block.Position, block.GetColorMask(), false);
            }
            sh.ColouredByIntegrity = false;
        }
Exemple #2
0
        private void ColourByIntegrity(SeenHolo sh)
        {
            Log.DebugLog("colouring by integriy: " + sh.Seen.Entity.getBestName());
            MyCubeGrid  realGrid = (MyCubeGrid)sh.Seen.Entity;
            IMyCubeGrid holoGrid = (IMyCubeGrid)sh.Holo;

            foreach (IMySlimBlock block in realGrid.CubeBlocks)
            {
                ColourBlock(block, holoGrid);
            }
            sh.ColouredByIntegrity = true;
        }
Exemple #3
0
        /// <summary>
        /// Actions that must be performed when removing an entry from m_holoEntities
        /// </summary>
        private void OnRemove(SeenHolo sh)
        {
            MyEntities.Remove(sh.Holo);
            MyCubeGrid grid = sh.Seen.Entity as MyCubeGrid;

            if (grid != null)
            {
                grid.OnBlockAdded            -= Actual_OnBlockAdded;
                grid.OnBlockRemoved          -= Actual_OnBlockRemoved;
                grid.OnBlockIntegrityChanged -= OnBlockIntegrityChanged;
            }
        }
Exemple #4
0
 private void RestoreColour(SeenHolo sh)
 {
     m_logger.debugLog("restoring original colour: " + sh.Seen.Entity.getBestName());
     MyCubeGrid realGrid = (MyCubeGrid)sh.Seen.Entity;
     MyCubeGrid holo = (MyCubeGrid)sh.Holo;
     foreach (IMySlimBlock block in realGrid.CubeBlocks)
         holo.ColorBlocks(block.Position, block.Position, block.GetColorMask(), false);
     sh.ColouredByIntegrity = false;
 }
Exemple #5
0
 /// <summary>
 /// Actions that must be performed when removing an entry from m_holoEntities
 /// </summary>
 private void OnRemove(SeenHolo sh)
 {
     MyEntities.Remove(sh.Holo);
     MyCubeGrid grid = sh.Seen.Entity as MyCubeGrid;
     if (grid != null)
     {
         grid.OnBlockAdded -= Actual_OnBlockAdded;
         grid.OnBlockRemoved -= Actual_OnBlockRemoved;
         grid.OnBlockIntegrityChanged -= OnBlockIntegrityChanged;
     }
 }
Exemple #6
0
 private void ColourByIntegrity(SeenHolo sh)
 {
     m_logger.debugLog("colouring by integriy: " + sh.Seen.Entity.getBestName());
     MyCubeGrid realGrid = (MyCubeGrid)sh.Seen.Entity;
     IMyCubeGrid holoGrid = (IMyCubeGrid)sh.Holo;
     foreach (IMySlimBlock block in realGrid.CubeBlocks)
         ColourBlock(block, holoGrid);
     sh.ColouredByIntegrity = true;
 }