35 lines
1.0 KiB
C#
35 lines
1.0 KiB
C#
using Microsoft.Xna.Framework;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Walls
|
|
{
|
|
public class PyreMantleWall : ModWall
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DustType = 33;
|
|
AddMapEntry(new Color(6, 10, 54));
|
|
}
|
|
|
|
public override void RandomUpdate(int i, int j)
|
|
{
|
|
if (Main.tile[i, j].LiquidAmount == 0 && j < Main.maxTilesY - 205)
|
|
{
|
|
Main.tile[i, j].Get<LiquidData>().LiquidType = LiquidID.Water;
|
|
Main.tile[i, j].LiquidAmount = byte.MaxValue;
|
|
WorldGen.SquareTileFrame(i, j);
|
|
if (Main.netMode == NetmodeID.MultiplayerClient)
|
|
NetMessage.sendWater(i, j);
|
|
}
|
|
}
|
|
|
|
public override void KillWall(int i, int j, ref bool fail) => fail = true;
|
|
|
|
public override bool CanExplode(int i, int j) => false;
|
|
|
|
public override void NumDust(int i, int j, bool fail, ref int num) => num = fail ? 1 : 3;
|
|
}
|
|
}
|