public static TrySpawnResourceStock ( IntVec3 rotatedOrigin, Rot4 rotation, ThingDef resourceDef, int stockWidth, int stockHeight, float spawnStockChance, int minQuantity, int maxQuantity ) : void | ||
rotatedOrigin | IntVec3 | |
rotation | Rot4 | |
resourceDef | ThingDef | |
stockWidth | int | |
stockHeight | int | |
spawnStockChance | float | |
minQuantity | int | |
maxQuantity | int | |
return | void |
public static void GenerateMediumRoomWarehouse(IntVec3 areaSouthWestOrigin, int zoneAbs, int zoneOrd, Rot4 rotation, ref OG_OutpostData outpostData) { const int stockWidth = 3; const int stockHeight = 3; IntVec3 origin = Zone.GetZoneOrigin(areaSouthWestOrigin, zoneAbs, zoneOrd); IntVec3 rotatedOrigin = Zone.GetZoneRotatedOrigin(areaSouthWestOrigin, zoneAbs, zoneOrd, rotation); OG_Common.GenerateEmptyRoomAt(rotatedOrigin + new IntVec3(1, 0, 1).RotatedBy(rotation), 9, 9, rotation, TerrainDefOf.Concrete, null, ref outpostData); // Spawn metal stock and lamp. OG_Common.TrySpawnResourceStock(rotatedOrigin + new IntVec3(2, 0, 2).RotatedBy(rotation), rotation, ThingDefOf.Steel, stockWidth, stockHeight, 0.6f, 10, 55); OG_Common.TrySpawnLampAt(rotatedOrigin + new IntVec3(2, 0, 2).RotatedBy(rotation), Color.white, ref outpostData); // Spawn wood stock and lamp. OG_Common.TrySpawnResourceStock(rotatedOrigin + new IntVec3(6, 0, 2).RotatedBy(rotation), rotation, ThingDefOf.WoodLog, stockWidth, stockHeight, 0.8f, 20, 75); OG_Common.TrySpawnLampAt(rotatedOrigin + new IntVec3(8, 0, 2).RotatedBy(rotation), Color.white, ref outpostData); // Spawn gold stock and lamp. OG_Common.TrySpawnResourceStock(rotatedOrigin + new IntVec3(2, 0, 6).RotatedBy(rotation), rotation, ThingDefOf.Gold, stockWidth, stockHeight, 0.3f, 2, 25); OG_Common.TrySpawnLampAt(rotatedOrigin + new IntVec3(2, 0, 8).RotatedBy(rotation), Color.white, ref outpostData); // Spawn plasteel stock and lamp. OG_Common.TrySpawnResourceStock(rotatedOrigin + new IntVec3(6, 0, 6).RotatedBy(rotation), rotation, ThingDefOf.Plasteel, stockWidth, stockHeight, 0.5f, 5, 35); OG_Common.TrySpawnLampAt(rotatedOrigin + new IntVec3(8, 0, 8).RotatedBy(rotation), Color.white, ref outpostData); // Spawn vertical and horizontal alley and doors. for (int xOffset = 2; xOffset <= 8; xOffset++) { Find.TerrainGrid.SetTerrain(rotatedOrigin + new IntVec3(xOffset, 0, 5).RotatedBy(rotation), TerrainDef.Named("PavedTile")); } for (int zOffset = 0; zOffset <= 10; zOffset++) { Find.TerrainGrid.SetTerrain(rotatedOrigin + new IntVec3(5, 0, zOffset).RotatedBy(rotation), TerrainDef.Named("PavedTile")); } OG_Common.SpawnDoorAt(rotatedOrigin + new IntVec3(5, 0, 1).RotatedBy(rotation), ref outpostData); OG_Common.SpawnDoorAt(rotatedOrigin + new IntVec3(5, 0, 9).RotatedBy(rotation), ref outpostData); }
public static void GenerateBigRoomWarehouse(IntVec3 areaSouthWestOrigin, int zoneAbs, int zoneOrd, Rot4 rotation, ref OG_OutpostData outpostData) { const int stockWidth = 4; const int stockHeight = 4; IntVec3 origin = Zone.GetZoneOrigin(areaSouthWestOrigin, zoneAbs, zoneOrd); IntVec3 rotatedOrigin = Zone.GetZoneRotatedOrigin(areaSouthWestOrigin, zoneAbs, zoneOrd, rotation); OG_Common.GenerateEmptyRoomAt(rotatedOrigin, Genstep_GenerateOutpost.zoneSideSize, Genstep_GenerateOutpost.zoneSideSize, rotation, TerrainDefOf.Concrete, null, ref outpostData); // Spawn metal stock and lamp. OG_Common.TrySpawnResourceStock(rotatedOrigin + new IntVec3(1, 0, 1).RotatedBy(rotation), rotation, ThingDefOf.Steel, stockWidth, stockHeight, 0.6f, 10, 55); OG_Common.TrySpawnLampAt(rotatedOrigin + new IntVec3(1, 0, 1).RotatedBy(rotation), Color.white, ref outpostData); // Spawn wood stock and lamp. OG_Common.TrySpawnResourceStock(rotatedOrigin + new IntVec3(6, 0, 1).RotatedBy(rotation), rotation, ThingDefOf.WoodLog, stockWidth, stockHeight, 0.8f, 20, 75); OG_Common.TrySpawnLampAt(rotatedOrigin + new IntVec3(9, 0, 1).RotatedBy(rotation), Color.white, ref outpostData); // Spawn gold stock and lamp. OG_Common.TrySpawnResourceStock(rotatedOrigin + new IntVec3(1, 0, 6).RotatedBy(rotation), rotation, ThingDefOf.Gold, stockWidth, stockHeight, 0.3f, 2, 25); OG_Common.TrySpawnLampAt(rotatedOrigin + new IntVec3(1, 0, 9).RotatedBy(rotation), Color.white, ref outpostData); // Spawn plasteel stock and lamp. OG_Common.TrySpawnResourceStock(rotatedOrigin + new IntVec3(6, 0, 6).RotatedBy(rotation), rotation, ThingDefOf.Plasteel, stockWidth, stockHeight, 0.5f, 5, 35); OG_Common.TrySpawnLampAt(rotatedOrigin + new IntVec3(9, 0, 9).RotatedBy(rotation), Color.white, ref outpostData); OG_Common.GenerateHorizontalAndVerticalPavedAlleys(origin); }