Example #1
0
        public IChunkColumn GenerateColumn(Stream stream, IDefinitionManager definitionManager, int planetId, Index2 index)
        {
            IChunkColumn column = new ChunkColumn();

            column.Deserialize(stream, definitionManager, planetId, index);
            return(column);
        }
        public IChunkColumn GenerateColumn(Stream stream, IDefinitionManager definitionManager, int planetId, Index2 index)
        {
            IChunkColumn column = new ChunkColumn();

            using (var reader = new BinaryReader(stream))
                column.Deserialize(reader, definitionManager);
            return(column);
        }
Example #3
0
        public IChunkColumn GenerateColumn(Stream stream, IPlanet planet, Index2 index)
        {
            IChunkColumn column = new ChunkColumn(planet);

            using (var reader = new BinaryReader(stream))
                column.Deserialize(reader);
            return(column);
        }
Example #4
0
        public static byte[] SaveColumn(CommandParameter parameter)
        {
            var chunkColumn = new ChunkColumn(null);

            using (var memoryStream = new MemoryStream(parameter.Data))
                using (var reader = new BinaryReader(memoryStream))
                {
                    chunkColumn.Deserialize(reader);
                }

            TypeContainer.Get <SimulationManager>().Simulation.ResourceManager.SaveChunkColumn(chunkColumn);

            return(null);
        }
Example #5
0
        public static byte[] SaveColumn(CommandParameter parameter)
        {
            var chunkColumn = new ChunkColumn();

            using (var memoryStream = new MemoryStream(parameter.Data))
                using (var reader = new BinaryReader(memoryStream))
                {
                    chunkColumn.Deserialize(reader, Program.ServerHandler.SimulationManager.DefinitionManager);
                }

            Program.ServerHandler.SimulationManager.Simulation.ResourceManager.SaveChunkColumn(chunkColumn);

            return(null);
        }
 public IChunkColumn GenerateColumn(Stream stream, IDefinitionManager definitionManager, int planetId, Index2 index)
 {
     IChunkColumn column = new ChunkColumn();
     column.Deserialize(stream, definitionManager, planetId, index);
     return column;
 }