abyss fixes

fixed broken old abysses due to renames of tiles.
abyss tiles refill water when broken if in the abyss. this prevents a bunch of water updates from water falling, and also prevents sulphur sea from sinking slowly
This commit is contained in:
doze-zoze authored and Cameron Ewell committed 2026-02-02 17:43:38 -05:00
1 parent 020f3f859e
commit 837b3691df
15 files changed
+93 -8

No files matched your search

@@ -13,7 +13,7 @@ namespace CalamityMod.Items.Placeables.Walls
Item.ResearchUnlockCount = 400;
}
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.AbyssGravelWall>());
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.SafeAbyssGravelWall>());
public override void AddRecipes()
{
@@ -12,7 +12,7 @@ namespace CalamityMod.Items.Placeables.Walls
Item.ResearchUnlockCount = 400;
}
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.SulphurousSandstoneWall>());
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.SafeSulphurousSandstoneWall>());
public override void AddRecipes()
{
+11
View File
@@ -1,5 +1,6 @@
using CalamityMod.Systems;
using CalamityMod.Tiles.Abyss.AbyssAmbient;
using CalamityMod.Walls.UnsafeWalls;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Audio;
@@ -42,6 +43,16 @@ namespace CalamityMod.Tiles.Abyss
num = fail ? 1 : 3;
}
public override void KillTile(int i, int j, ref bool fail, ref bool effectOnly, ref bool noItem)
{
var tile = Main.tile[i, j];
if (tile.WallType == ModContent.WallType<UnsafeAbyssGravelWall>() || tile.WallType == ModContent.WallType<UnsafeVoidstoneWall>() || tile.WallType == ModContent.WallType<Walls.PyreMantleWall>() || tile.WallType == ModContent.WallType<UnsafeSulphurousShaleWall>() || tile.WallType == ModContent.WallType<UnsafeVoidstoneWall>() || tile.WallType == ModContent.WallType<Walls.PyreMantleWall>() || tile.WallType == ModContent.WallType<UnsafeSulphurousSandstoneWall>())
{
tile.LiquidAmount = 255;
tile.LiquidType = LiquidID.Water;
}
}
public override void RandomUpdate(int i, int j)
{
Tile tile = Main.tile[i, j];
+11 -1
View File
@@ -1,6 +1,7 @@
using CalamityMod.Systems;
using CalamityMod.Tiles.Abyss.AbyssAmbient;
using CalamityMod.Walls;
using CalamityMod.Walls.UnsafeWalls;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Audio;
@@ -46,6 +47,15 @@ namespace CalamityMod.Tiles.Abyss
{
num = fail ? 1 : 3;
}
public override void KillTile(int i, int j, ref bool fail, ref bool effectOnly, ref bool noItem)
{
var tile = Main.tile[i, j];
if (tile.WallType == ModContent.WallType<UnsafeAbyssGravelWall>() || tile.WallType == ModContent.WallType<UnsafeVoidstoneWall>() || tile.WallType == ModContent.WallType<Walls.PyreMantleWall>() || tile.WallType == ModContent.WallType<UnsafeSulphurousShaleWall>() || tile.WallType == ModContent.WallType<UnsafeVoidstoneWall>() || tile.WallType == ModContent.WallType<Walls.PyreMantleWall>() || tile.WallType == ModContent.WallType<UnsafeSulphurousSandstoneWall>())
{
tile.LiquidAmount = 255;
tile.LiquidType = LiquidID.Water;
}
}
public override void AnimateIndividualTile(int type, int i, int j, ref int frameXOffset, ref int frameYOffset)
{
@@ -80,7 +90,7 @@ namespace CalamityMod.Tiles.Abyss
if (!down.HasTile && down.TileType != (ushort)ModContent.TileType<ViperVines>())
{
if (down.LiquidAmount == 255 &&
down.WallType == (ushort)ModContent.WallType<AbyssGravelWall>() &&
down.WallType == (ushort)ModContent.WallType<SafeAbyssGravelWall>() &&
down.LiquidType != LiquidID.Lava)
{
bool canGrowVine = false;
+11
View File
@@ -1,5 +1,6 @@
using CalamityMod.Sounds;
using CalamityMod.Tiles.Abyss.AbyssAmbient;
using CalamityMod.Walls.UnsafeWalls;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
@@ -29,6 +30,16 @@ namespace CalamityMod.Tiles.Abyss
this.RegisterBlendMergeWith(ModContent.TileType<AbyssGravel>());
}
public override void KillTile(int i, int j, ref bool fail, ref bool effectOnly, ref bool noItem)
{
var tile = Main.tile[i, j];
if (tile.WallType == ModContent.WallType<UnsafeAbyssGravelWall>() || tile.WallType == ModContent.WallType<UnsafeVoidstoneWall>() || tile.WallType == ModContent.WallType<Walls.PyreMantleWall>() || tile.WallType == ModContent.WallType<UnsafeSulphurousShaleWall>() || tile.WallType == ModContent.WallType<UnsafeVoidstoneWall>() || tile.WallType == ModContent.WallType<Walls.PyreMantleWall>() || tile.WallType == ModContent.WallType<UnsafeSulphurousSandstoneWall>())
{
tile.LiquidAmount = 255;
tile.LiquidType = LiquidID.Water;
}
}
public override bool CreateDust(int i, int j, ref int type)
{
Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.HeatRay, 0f, 0f, 1, new Color(128, 128, 128), 1f);
+10
View File
@@ -1,6 +1,7 @@
using System;
using CalamityMod.Sounds;
using CalamityMod.Tiles.Abyss.AbyssAmbient;
using CalamityMod.Walls.UnsafeWalls;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -46,6 +47,15 @@ namespace CalamityMod.Tiles.Abyss
return false;
}
public override void KillTile(int i, int j, ref bool fail, ref bool effectOnly, ref bool noItem)
{
var tile = Main.tile[i, j];
if (tile.WallType == ModContent.WallType<UnsafeAbyssGravelWall>() || tile.WallType == ModContent.WallType<UnsafeVoidstoneWall>() || tile.WallType == ModContent.WallType<Walls.PyreMantleWall>() || tile.WallType == ModContent.WallType<UnsafeSulphurousShaleWall>() || tile.WallType == ModContent.WallType<UnsafeVoidstoneWall>() || tile.WallType == ModContent.WallType<Walls.PyreMantleWall>() || tile.WallType == ModContent.WallType<UnsafeSulphurousSandstoneWall>())
{
tile.LiquidAmount = 255;
tile.LiquidType = LiquidID.Water;
}
}
public override void RandomUpdate(int i, int j)
{
Tile tile = Main.tile[i, j];
+9 -1
View File
@@ -1,4 +1,5 @@
using CalamityMod.World;
using CalamityMod.Walls.UnsafeWalls;
using CalamityMod.World;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
@@ -37,6 +38,13 @@ namespace CalamityMod.Tiles.Abyss
{
WorldGen.KillTile(i, j + 1);
}
var tile = Main.tile[i, j];
if (tile.WallType == ModContent.WallType<UnsafeAbyssGravelWall>() || tile.WallType == ModContent.WallType<UnsafeVoidstoneWall>() || tile.WallType == ModContent.WallType<Walls.PyreMantleWall>() || tile.WallType == ModContent.WallType<UnsafeSulphurousShaleWall>() || tile.WallType == ModContent.WallType<UnsafeVoidstoneWall>() || tile.WallType == ModContent.WallType<Walls.PyreMantleWall>() || tile.WallType == ModContent.WallType<UnsafeSulphurousSandstoneWall>())
{
tile.LiquidAmount = 255;
tile.LiquidType = LiquidID.Water;
}
}
public override void RandomUpdate(int i, int j)
+10
View File
@@ -1,5 +1,6 @@
using CalamityMod.Systems;
using CalamityMod.Tiles.Abyss.AbyssAmbient;
using CalamityMod.Walls.UnsafeWalls;
using CalamityMod.Waters;
using CalamityMod.World;
using Microsoft.Xna.Framework;
@@ -34,6 +35,15 @@ namespace CalamityMod.Tiles.Abyss
this.RegisterBlendMergeWith(TileID.Stone);
this.RegisterBlendMergeWith(ModContent.TileType<AbyssGravel>());
}
public override void KillTile(int i, int j, ref bool fail, ref bool effectOnly, ref bool noItem)
{
var tile = Main.tile[i, j];
if (tile.WallType == ModContent.WallType<UnsafeAbyssGravelWall>() || tile.WallType == ModContent.WallType<UnsafeVoidstoneWall>() || tile.WallType == ModContent.WallType<Walls.PyreMantleWall>() || tile.WallType == ModContent.WallType<UnsafeSulphurousShaleWall>() || tile.WallType == ModContent.WallType<UnsafeVoidstoneWall>() || tile.WallType == ModContent.WallType<Walls.PyreMantleWall>() || tile.WallType == ModContent.WallType<UnsafeSulphurousSandstoneWall>())
{
tile.LiquidAmount = 255;
tile.LiquidType = LiquidID.Water;
}
}
public override void NearbyEffects(int i, int j, bool closer)
{
+10
View File
@@ -2,6 +2,7 @@
using CalamityMod.Sounds;
using CalamityMod.Systems;
using CalamityMod.Tiles.Abyss.AbyssAmbient;
using CalamityMod.Walls.UnsafeWalls;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -41,6 +42,15 @@ namespace CalamityMod.Tiles.Abyss
Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.DungeonSpirit, 0f, 0f, 1, new Color(128, 128, 128), 1f);
return false;
}
public override void KillTile(int i, int j, ref bool fail, ref bool effectOnly, ref bool noItem)
{
var tile = Main.tile[i, j];
if (tile.WallType == ModContent.WallType<UnsafeAbyssGravelWall>() || tile.WallType == ModContent.WallType<UnsafeVoidstoneWall>() || tile.WallType == ModContent.WallType<Walls.PyreMantleWall>() || tile.WallType == ModContent.WallType<UnsafeSulphurousShaleWall>() || tile.WallType == ModContent.WallType<UnsafeVoidstoneWall>() || tile.WallType == ModContent.WallType<Walls.PyreMantleWall>() || tile.WallType == ModContent.WallType<UnsafeSulphurousSandstoneWall>())
{
tile.LiquidAmount = 255;
tile.LiquidType = LiquidID.Water;
}
}
public override bool CanExplode(int i, int j)
{
+11
View File
@@ -1,5 +1,7 @@
using CalamityMod.Projectiles.Environment;
using CalamityMod.Tiles.Abyss;
using CalamityMod.Walls;
using CalamityMod.Walls.UnsafeWalls;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -67,6 +69,15 @@ namespace CalamityMod.Tiles.Ores
}
}
public override void KillTile(int i, int j, ref bool fail, ref bool effectOnly, ref bool noItem)
{
var tile = Main.tile[i, j];
if (tile.WallType == ModContent.WallType<UnsafeAbyssGravelWall>() || tile.WallType == ModContent.WallType<UnsafeVoidstoneWall>() || tile.WallType == ModContent.WallType<Walls.PyreMantleWall>() || tile.WallType == ModContent.WallType<UnsafeSulphurousShaleWall>() || tile.WallType == ModContent.WallType<UnsafeVoidstoneWall>() || tile.WallType == ModContent.WallType<Walls.PyreMantleWall>() || tile.WallType == ModContent.WallType<UnsafeSulphurousSandstoneWall>())
{
tile.LiquidAmount = 255;
tile.LiquidType = LiquidID.Water;
}
}
public override bool CanExplode(int i, int j)
{
return false;
+2 -1
View File
@@ -6,7 +6,7 @@ using Terraria.ModLoader;
namespace CalamityMod.Walls
{
[LegacyName("AbyssGravelWallSafe")]
public class AbyssGravelWall : ModWall
public class SafeAbyssGravelWall : ModWall
{
public override void SetStaticDefaults()
{
@@ -14,6 +14,7 @@ namespace CalamityMod.Walls
AddMapEntry(new Color(6, 10, 54));
DustType = DustID.Water;
}
public override string Texture => "CalamityMod/Walls/AbyssGravelWall";
public override bool CanExplode(int i, int j) => false;
+1 -1
View File
@@ -6,7 +6,7 @@ using Terraria.ModLoader;
namespace CalamityMod.Walls
{
[LegacyName("SulphurousSandstoneWallSafe")]
public class SulphurousSandstoneWall : ModWall
public class SafeSulphurousSandstoneWall : ModWall
{
public override string Texture => "CalamityMod/Walls/SulphurousSandstoneWall";
public override void SetStaticDefaults()
@@ -5,6 +5,8 @@ using Terraria.ModLoader;
namespace CalamityMod.Walls.UnsafeWalls
{
[LegacyName("AbyssGravelWall")]
public class UnsafeAbyssGravelWall : ModWall
{
public override string Texture => "CalamityMod/Walls/AbyssGravelWall";
@@ -4,6 +4,7 @@ using Terraria.ModLoader;
namespace CalamityMod.Walls.UnsafeWalls
{
[LegacyName("SulphurousSandstoneWall")]
public class UnsafeSulphurousSandstoneWall : ModWall
{
public override string Texture => "CalamityMod/Walls/SulphurousSandstoneWall";
+2 -2
View File
@@ -245,7 +245,7 @@ namespace CalamityMod.World
else
{
tile.TileType = (ushort)ModContent.TileType<AbyssGravel>();
tile.WallType = (ushort)ModContent.WallType<AbyssGravelWall>();
tile.WallType = (ushort)ModContent.WallType<SafeAbyssGravelWall>();
}
}
//basically places smaller clusters everywhere else?
@@ -301,7 +301,7 @@ namespace CalamityMod.World
else
{
tile.TileType = (ushort)ModContent.TileType<AbyssGravel>();
tile.WallType = (ushort)ModContent.WallType<AbyssGravelWall>();
tile.WallType = (ushort)ModContent.WallType<SafeAbyssGravelWall>();
}
}
}