Example #1
0
 public ComponentStrongholdLibrary(int par1, Random par2Random, StructureBoundingBox par3StructureBoundingBox, int par4)
     : base(par1)
 {
     CoordBaseMode = par4;
     DoorType      = GetRandomDoor(par2Random);
     BoundingBox   = par3StructureBoundingBox;
     IsLargeRoom   = par3StructureBoundingBox.GetYSize() > 6;
 }
        /// <summary>
        /// 'offsets the structure Bounding Boxes up to a certain height, typically 63 - 10'
        /// </summary>
        protected virtual void MarkAvailableHeight(World par1World, Random par2Random, int par3)
        {
            int i = 63 - par3;
            int j = BoundingBox.GetYSize() + 1;

            if (j < i)
            {
                j += par2Random.Next(i - j);
            }

            int k = j - BoundingBox.MaxY;

            BoundingBox.Offset(0, k, 0);

            foreach (StructureComponent structurecomponent in Components)
            {
                structurecomponent.GetBoundingBox().Offset(0, k, 0);
            }
        }
Example #3
0
 public ComponentMineshaftCross(int par1, Random par2Random, StructureBoundingBox par3StructureBoundingBox, int par4) : base(par1)
 {
     CorridorDirection = par4;
     BoundingBox       = par3StructureBoundingBox;
     IsMultipleFloors  = par3StructureBoundingBox.GetYSize() > 3;
 }