Example #1
0
            private void AssertCheckPosition()
            {
                Vector3I voxelStartCoord;

                m_storage.ComputeCellCoord(m_cellIndex, out voxelStartCoord);
                MyCellStorage.ComputeVoxelCoordOfCell(ref voxelStartCoord, out voxelStartCoord);
                Vector3I voxelEndCoord = voxelStartCoord + MyVoxelConstants.DATA_CELL_SIZE_IN_VOXELS - 1;

                Debug.Assert(m_storage.IsInside(ref voxelStartCoord), "Incorrect position of deposit cell.");
                Debug.Assert(m_storage.IsInside(ref voxelEndCoord), "Incorrect position of deposit cell.");
            }
Example #2
0
            public DepositCell(MyCellStorage storage)
            {
                Debug.Assert(storage != null);
                m_storage = storage;
                AssertCheckPosition();
                m_positionIsDirty = true;
                m_totalOreContent = 0;

                m_oreWithContent = new List <MyVoxelMaterialDefinition>(MyDefinitionManager.Static.VoxelMaterialRareCount);

                m_allMaterialsContent          = new Dictionary <int, int>();
                m_allMaterialsPositions        = new Dictionary <int, Vector3?>();
                m_helpersMaxContentForMaterial = new Dictionary <int, byte>();
            }
            public DepositCell(MyCellStorage storage)
            {
                Debug.Assert(storage != null);
                m_storage = storage;
                AssertCheckPosition();
                m_positionIsDirty = true;
                m_totalOreContent = 0;

                m_oreWithContent = new List<MyVoxelMaterialDefinition>(MyDefinitionManager.Static.VoxelMaterialRareCount);

                m_allMaterialsContent = new Dictionary<int, int>();
                m_allMaterialsPositions = new Dictionary<int, Vector3?>();
                m_helpersMaxContentForMaterial = new Dictionary<int, byte>();
            }