fixed sunken sea lab not genning (hopefully)
also hopefully fixed mechanic shed
This commit is contained in:
1 parent
36f298b74c
commit
cfd105a591
2 files changed
+7
-7
No files matched your search
@@ -349,17 +349,17 @@ namespace CalamityMod.World
|
||||
int sunkenSeaY = 0;
|
||||
|
||||
//copied the desert position code from the sunken sea's generation so the lab always generates within the sunken sea properly
|
||||
for (int y = Main.maxTilesY - 200; y >= (Main.maxTilesY / 2) - 45; y--)
|
||||
for (int y = Main.maxTilesY - 200; y >= Main.worldSurface; y--)
|
||||
{
|
||||
if (Main.tile[placementPositionX, y].TileType == ModContent.TileType<Navystone>() ||
|
||||
Main.tile[placementPositionX, y].TileType == ModContent.TileType<EutrophicSand>())
|
||||
if (Main.tile[placementPositionX, y].WallType == ModContent.WallType<NavystoneWall>() ||
|
||||
Main.tile[placementPositionX, y].WallType == ModContent.WallType<EutrophicSandWall>())
|
||||
{
|
||||
sunkenSeaY = y - 90; //offset so it generates nicely
|
||||
sunkenSeaY = y - 80; //offset so it generates nicely
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int placementPositionY = (int)(sunkenSeaY) - labHeight;
|
||||
int placementPositionY = sunkenSeaY - labHeight;
|
||||
|
||||
placementPoint = new Point(placementPositionX, placementPositionY);
|
||||
Vector2 schematicSize = new Vector2(schematic.GetLength(0), schematic.GetLength(1));
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace CalamityMod.World
|
||||
string mapKey = MechanicShedKey;
|
||||
var schematic = TileMaps[mapKey];
|
||||
|
||||
int placementPositionX = WorldGen.genRand.Next(WorldGen.snowOriginLeft + 100, WorldGen.snowOriginRight - 100);
|
||||
int placementPositionX = WorldGen.genRand.Next(WorldGen.snowOriginLeft + 200, WorldGen.snowOriginRight - 200);
|
||||
int placementPositionY = (int)Main.worldSurface - (Main.maxTilesY / 8);
|
||||
|
||||
bool foundValidGround = false;
|
||||
@@ -35,7 +35,7 @@ namespace CalamityMod.World
|
||||
}
|
||||
}
|
||||
|
||||
Point placementPoint = new Point(placementPositionX, placementPositionY + 3);
|
||||
Point placementPoint = new Point(placementPositionX, placementPositionY + 6);
|
||||
|
||||
Vector2 schematicSize = new Vector2(schematic.GetLength(0), schematic.GetLength(1));
|
||||
SchematicAnchor anchorType = SchematicAnchor.BottomCenter;
|
||||
|
||||
Reference in new issue
Block a user