Merge branch '1.4' of https://github.com/CalamityTeam/CalamityMod into 1.4
This commit is contained in:
commit
a62621cd57
4 files changed
+13
-2
No files matched your search
@@ -133,6 +133,7 @@ namespace CalamityMod
|
||||
tag["downed"] = downed;
|
||||
tag["abyssChasmBottom"] = Abyss.AbyssChasmBottom;
|
||||
tag["SulphSeaYStart"] = SulphurousSea.YStart;
|
||||
tag["AstralYStart"] = AstralBiome.YStart;
|
||||
tag["acidRainPoints"] = AcidRainEvent.AccumulatedKillPoints;
|
||||
tag["Reforges"] = Reforges;
|
||||
tag["MoneyStolenByBandit"] = MoneyStolenByBandit;
|
||||
@@ -181,6 +182,7 @@ namespace CalamityMod
|
||||
|
||||
Abyss.AbyssChasmBottom = tag.GetInt("abyssChasmBottom");
|
||||
SulphurousSea.YStart = tag.GetInt("SulphSeaYStart");
|
||||
AstralBiome.YStart = tag.GetInt("AstralYStart");
|
||||
AcidRainEvent.AccumulatedKillPoints = tag.GetInt("acidRainPoints");
|
||||
Reforges = tag.GetInt("Reforges");
|
||||
MoneyStolenByBandit = tag.GetInt("MoneyStolenByBandit");
|
||||
|
||||
@@ -148,6 +148,7 @@ namespace CalamityMod.Systems
|
||||
|
||||
writer.Write(Abyss.AbyssChasmBottom);
|
||||
writer.Write(SulphurousSea.YStart);
|
||||
writer.Write(AstralBiome.YStart);
|
||||
writer.Write(AcidRainEvent.AccumulatedKillPoints);
|
||||
writer.Write(Reforges);
|
||||
writer.Write(MoneyStolenByBandit);
|
||||
@@ -287,6 +288,7 @@ namespace CalamityMod.Systems
|
||||
|
||||
Abyss.AbyssChasmBottom = reader.ReadInt32();
|
||||
SulphurousSea.YStart = reader.ReadInt32();
|
||||
AstralBiome.YStart = reader.ReadInt32();
|
||||
AcidRainEvent.AccumulatedKillPoints = reader.ReadInt32();
|
||||
Reforges = reader.ReadInt32();
|
||||
MoneyStolenByBandit = reader.ReadInt32();
|
||||
|
||||
@@ -20,6 +20,8 @@ namespace CalamityMod.World
|
||||
{
|
||||
public class AstralBiome
|
||||
{
|
||||
public static int YStart { get; set; } = (int)Main.worldSurface;
|
||||
|
||||
public static readonly SoundStyle MeteorSound = new("CalamityMod/Sounds/Custom/AstralStarFall");
|
||||
public static bool CanAstralMeteorSpawn()
|
||||
{
|
||||
@@ -404,6 +406,8 @@ namespace CalamityMod.World
|
||||
if (!Main.player[Main.myPlayer].dead && Main.player[Main.myPlayer].active)
|
||||
SoundEngine.PlaySound(MeteorSound, Main.player[Main.myPlayer].position);
|
||||
|
||||
// Immediately prior to mass-converting blocks to Astral, write down the Y position of this event.
|
||||
YStart = j;
|
||||
DoAstralConversion(new Point(i, j));
|
||||
|
||||
// Upward checks go up 180 tiles. If for whatever reason the placement Y position
|
||||
|
||||
@@ -1062,8 +1062,11 @@ namespace CalamityMod.World
|
||||
Tile down = CalamityUtils.ParanoidTileRetrieval(chestPoint.X, chestPoint.Y + digDepth);
|
||||
Tile downRight = CalamityUtils.ParanoidTileRetrieval(chestPoint.X + 1, chestPoint.Y + digDepth);
|
||||
|
||||
// Stop if far down enough and either the tile to the left or right is open water.
|
||||
if (((!down.HasTile && down.LiquidAmount >= 127) || (!downRight.HasTile && downRight.LiquidAmount >= 127)) && digDepth >= minDepth)
|
||||
// Continue digging straight down as long as you're going through standard solid tiles.
|
||||
// As soon as either tile you find is not a standard solid tile, stop immediately.
|
||||
bool downSolidAndValid = down.HasTile && down.IsTileSolid();
|
||||
bool downRightSolidAndValid = downRight.HasTile && downRight.IsTileSolid();
|
||||
if (digDepth >= minDepth && (!downSolidAndValid || !downRightSolidAndValid))
|
||||
break;
|
||||
|
||||
digDepth++;
|
||||
|
||||
Reference in new issue
Block a user