Remnants compatibility for the old Sunken Sea. It will now be centered properly.

This commit is contained in:
Ozzatron committed 2024-11-04 15:57:27 -05:00
1 parent 425dceae9a
commit b68469ace9
2 files changed
+9 -4

No files matched your search

+2 -4
View File
@@ -124,10 +124,8 @@ namespace CalamityMod.Systems
{
progress.Message = Language.GetOrRegister("Mods.CalamityMod.UI.SunkenSea").Value;
int sunkenSeaX = GenVars.UndergroundDesertLocation.Left;
int sunkenSeaY = Main.maxTilesY - 400;
SunkenSea.Place(new Point(sunkenSeaX, sunkenSeaY));
Point ssBottomLeft = new Point(GenVars.UndergroundDesertLocation.Left, Main.maxTilesY - 400);
SunkenSea.Place(ssBottomLeft);
}));
}
+7
View File
@@ -739,6 +739,13 @@ namespace CalamityMod.World
// As far as I can tell, this just scales up the entire Sunken Sea to be 4x wider and 2x taller than what is listed above
Vector2 arbitrary42GodVector = new Vector2(4f, 2f);
// 04NOV2024: Ozzatron: Remnants mutilates the Underground Desert beyond recognition.
// The above code assumes the size of the underground desert with arbitrary hardcoded values instead of checking it.
// To ensure the Sunken Sea is centered on an Underground Desert of any size, some adjustments are made.
// This would have been easy, but the arbitrary 4-2 God vector makes the math unnecessarily complicated.
int sunkenSeaRealWidth = (int)(sunkenSeaAreaX * arbitrary42GodVector.X);
origin.X = GenVars.UndergroundDesertLocation.Center.X - sunkenSeaRealWidth / 2;
// Place the majority of the terrain as clusters
ClusterGroup clusterGroup = new ClusterGroup();
clusterGroup.Generate(sunkenSeaAreaX, sunkenSeaAreaY);