Exemplo n.º 1
0
        public MainWindow()
        {
            DataContext = this;

            foreach (var line in File.ReadAllLines("blocks.txt"))
            {
                var split = line.Split(' ');
                Blocks.Add(new Block {
                    Id = split[1], Name = split[0]
                });
            }

            foreach (var line in File.ReadAllLines("biomes.txt"))
            {
                var split = line.Split(' ');
                Biomes.Add(new Biome {
                    Id = split[1], Name = split[0]
                });
            }
            Builder = new ConfigBuilder();

            InitializeComponent();

            SelectedBlocks = new ReorderableList <Block>(selectedBlockList, "TString");
            UpdateString();
        }
Exemplo n.º 2
0
        public Biome CreateNewBiome()
        {
            Biome newBiome = new Biome(Config)
            {
                Name             = "Default",
                SurfaceCube      = UtopiaProcessorParams.CubeId.Grass,
                UnderSurfaceCube = UtopiaProcessorParams.CubeId.Dirt,
                GroundCube       = UtopiaProcessorParams.CubeId.Stone,
                CubeVeins        = new List <CubeVein>()
                {
                    new CubeVein()
                    {
                        Name = "Sand Vein", Cube = UtopiaProcessorParams.CubeId.Sand, VeinSize = 12, VeinPerChunk = 8, SpawningHeight = new RangeB(40, 128)
                    },
                    new CubeVein()
                    {
                        Name = "Rock Vein", Cube = UtopiaProcessorParams.CubeId.Rock, VeinSize = 8, VeinPerChunk = 8, SpawningHeight = new RangeB(1, 50)
                    },
                    new CubeVein()
                    {
                        Name = "Dirt Vein", Cube = UtopiaProcessorParams.CubeId.Dirt, VeinSize = 12, VeinPerChunk = 16, SpawningHeight = new RangeB(1, 128)
                    },
                    new CubeVein()
                    {
                        Name = "Gravel Vein", Cube = UtopiaProcessorParams.CubeId.Gravel, VeinSize = 16, VeinPerChunk = 5, SpawningHeight = new RangeB(40, 128)
                    },
                    new CubeVein()
                    {
                        Name = "GoldOre Vein", Cube = UtopiaProcessorParams.CubeId.GoldOre, VeinSize = 8, VeinPerChunk = 5, SpawningHeight = new RangeB(1, 40)
                    },
                    new CubeVein()
                    {
                        Name = "CoalOre Vein", Cube = UtopiaProcessorParams.CubeId.CoalOre, VeinSize = 16, VeinPerChunk = 16, SpawningHeight = new RangeB(1, 80)
                    },
                    new CubeVein()
                    {
                        Name = "MoonStone Vein", Cube = UtopiaProcessorParams.CubeId.MoonStone, VeinSize = 4, VeinPerChunk = 3, SpawningHeight = new RangeB(1, 20)
                    },
                    new CubeVein()
                    {
                        Name = "DynamicWater", Cube = UtopiaProcessorParams.CubeId.WaterFlow, VeinSize = 5, VeinPerChunk = 20, SpawningHeight = new RangeB(60, 120)
                    },
                    new CubeVein()
                    {
                        Name = "DynamicLava", Cube = UtopiaProcessorParams.CubeId.LavaFlow, VeinSize = 5, VeinPerChunk = 40, SpawningHeight = new RangeB(2, 60)
                    }
                }
            };

            Biomes.Add(newBiome);
            return(newBiome);
        }
Exemplo n.º 3
0
 public virtual void AddBiome(Biome biome)
 {
     Biomes.Add(biome);
     Biomes.Sort((a, b) => a.Priority.CompareTo(b.Priority));
 }
Exemplo n.º 4
0
 public void AddBiome(Biome b)
 {
     Biomes.Add(b);
 }