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; }
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; }
/// <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; } }
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; }
/// <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; } }
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; }