Beispiel #1
0
 private void PickLab(int s, int structX, int structY, bool mirrored)
 {
     if (s == 0)
     {
         WastelandLab.StructureGen(structX, structY, mirrored);          // create the structure first
         WastelandLabPlatforms.StructureGen(structX, structY, mirrored); // then create the platforms (on top of the walls)
         WastelandLabFurniture.StructureGen(structX, structY, mirrored); // then the furniture
     }
     else if (s == 12)
     {
         AncientsLab.Generate(structX, structY, mirrored);
     }
     else
     {
         Lab.StructureGen(structX, structY, mirrored);                 // create the structure first
         LabPlatforms.StructureGen(structX, structY, mirrored);        // create the structure first
         LabFurniture.StructureGen(structX, structY, mirrored, s - 1); // then the furniture. s - 1 so the drives start at 0 again
     }
 }
Beispiel #2
0
        private void LootStructures(int xO, int yO, Player player)
        {
            int structX = xO - 225 * sizeMult + Main.rand.Next(225 * sizeMult * 2);
            int structY = yO - 275 * sizeMult + Main.rand.Next(275 * sizeMult / 2);

            Point16 newStructurePosition = new Point16(structX, structY);

            newStructurePosition = new Point16((int)player.position.X / 16, (int)player.position.Y / 16);
            structX = newStructurePosition.X;
            structY = newStructurePosition.Y;

            if (TileCheckSafe(structX, structY))
            {
                bool mirrored = false;
                if (Main.rand.Next(2) == 0)
                {
                    mirrored = true;
                }
                AncientsLab.Generate(structX, structY, mirrored);
            }
        }