Example #1
0
        public override void Generate(Map map, GenStepParams parms)
        {
            base.Generate(map, parms);
            CellRect rect = new CellRect(Rand.RangeInclusive(this.adventureRegion.minX, this.adventureRegion.maxX - 60), Rand.RangeInclusive(this.adventureRegion.minZ + 15, this.adventureRegion.maxZ - 15), 20, 20);

            rect.ClipInsideMap(map);
            ResolveParams baseResolveParams = this.baseResolveParams;

            baseResolveParams.rect = rect;
            BaseGen.symbolStack.Push("crashedShip", baseResolveParams, null);
            BaseGen.Generate();
            MapGenUtility.MakeDoors(new ResolveParams
            {
                wallStuff = ThingDefOf.Plasteel
            }, map);
            MapGenUtility.ResolveCustomGenSteps(map, parms);
        }
Example #2
0
 public override void Generate(Map map, GenStepParams parms)
 {
     if (!map.TileInfo.WaterCovered)
     {
         base.Generate(map, parms);
         CellRect rect = new CellRect(Rand.RangeInclusive(this.adventureRegion.minX, this.adventureRegion.maxX - 50), Rand.RangeInclusive(this.adventureRegion.minZ, this.adventureRegion.maxZ - 50), 50, 50);
         rect.ClipInsideMap(map);
         ResolveParams baseResolveParams = this.baseResolveParams;
         baseResolveParams.rect = rect;
         BaseGen.symbolStack.Push("abandonedLab", baseResolveParams, null);
         BaseGen.Generate();
         MapGenUtility.MakeDoors(new ResolveParams
         {
             wallStuff = ThingDefOf.Plasteel
         }, map);
         MapGenUtility.ResolveCustomGenSteps(map, parms);
     }
 }
Example #3
0
 public override void Generate(Map map, GenStepParams parms)
 {
     if (!map.TileInfo.WaterCovered)
     {
         base.Generate(map, parms);
         CellRect rect = new CellRect(Rand.RangeInclusive(this.adventureRegion.minX, this.adventureRegion.maxX - 60), Rand.RangeInclusive(this.adventureRegion.minZ, this.adventureRegion.maxZ - 60), 60, 60);
         rect.ClipInsideMap(map);
         ResolveParams baseResolveParams = this.baseResolveParams;
         baseResolveParams.rect = rect;
         BaseGen.symbolStack.Push("oldMilitaryBase", baseResolveParams, null);
         BaseGen.Generate();
         MapGenUtility.MakeDoors(new ResolveParams
         {
             wallStuff = ThingDefOf.Steel
         }, map);
         MapGenUtility.UnfogFromRandomEdge(map);
         MapGenUtility.ResolveCustomGenSteps(map, parms);
         int num = Rand.RangeInclusive(1, 2);
         MapGenUtility.ScatterWeaponsWhere(baseResolveParams.rect, num, map, (ThingDef thing) => thing.IsRangedWeapon && !thing.destroyOnDrop && thing.weaponTags != null && thing.weaponTags.Contains("Gun") && (thing.weaponTags.Contains("GunHeavy") || !thing.weaponTags.Contains("AdvancedGun")));
     }
 }
Example #4
0
 public override void Generate(Map map, GenStepParams parms)
 {
     if (!map.TileInfo.WaterCovered)
     {
         base.Generate(map, parms);
         int           num  = Rand.RangeInclusive(55, 80);
         int           num2 = Rand.RangeInclusive(55, 80);
         CellRect      rect = new CellRect(Rand.RangeInclusive(this.adventureRegion.minX, this.adventureRegion.maxX - num), Rand.RangeInclusive(this.adventureRegion.minZ, this.adventureRegion.maxZ - num2), num, num2);
         ResolveParams baseResolveParams = this.baseResolveParams;
         baseResolveParams.rect     = rect;
         BaseGen.globalSettings.map = map;
         BaseGen.symbolStack.Push("oldCastle", baseResolveParams, null);
         BaseGen.Generate();
         MapGenUtility.MakeDoors(new ResolveParams
         {
             wallStuff = ThingDefOf.WoodLog
         }, map);
         BaseGen.Generate();
         MapGenUtility.ScatterWeaponsWhere(baseResolveParams.rect, Rand.RangeInclusive(7, 11), map, (ThingDef thing) => thing.weaponTags != null && thing.equipmentType == EquipmentType.Primary && !thing.destroyOnDrop && !thing.weaponTags.Contains("Gun"));
         MapGenUtility.ResolveCustomGenSteps(map, parms);
     }
 }