Apply IVisibleThroughWater to all existing walls that it was applied to on the branch.
This commit is contained in:
1 parent
195eb51b2d
commit
def3fe933b
4 files changed
+13
-7
No files matched your search
@@ -22,7 +22,7 @@ namespace CalamityMod.Walls
|
||||
public const float WaterTransparency = 0.5f;
|
||||
public static readonly Color WaterColor = new Color(9, 61, 191);
|
||||
|
||||
public static void AddEntries(this IVisibleThroughWater visibleThroughWater, Color baseColor, LocalizedText text = null)
|
||||
public static void AddMapEntryWithWaterVisibility(this IVisibleThroughWater visibleThroughWater, Color baseColor, LocalizedText text = null)
|
||||
{
|
||||
AssertIsWall(visibleThroughWater, out var wall);
|
||||
wall.AddMapEntry(baseColor, text);
|
||||
|
||||
@@ -2,12 +2,14 @@
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Walls
|
||||
{
|
||||
public class NavystoneWall : ModWall
|
||||
public class NavystoneWall : ModWall, IVisibleThroughWater
|
||||
{
|
||||
int IVisibleThroughWater.WaterMapEntry { get; set; }
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DustType = 96;
|
||||
AddMapEntry(new Color(16, 45, 48));
|
||||
this.AddMapEntryWithWaterVisibility(new Color(16, 45, 48));
|
||||
}
|
||||
|
||||
public override void NumDust(int i, int j, bool fail, ref int num) => num = fail ? 1 : 3;
|
||||
|
||||
@@ -4,13 +4,15 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Walls
|
||||
{
|
||||
public class NavystoneWallSafe : ModWall
|
||||
public class NavystoneWallSafe : ModWall, IVisibleThroughWater
|
||||
{
|
||||
int IVisibleThroughWater.WaterMapEntry { get; set; }
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.wallHouse[Type] = true;
|
||||
DustType = 96;
|
||||
AddMapEntry(new Color(0, 50, 50));
|
||||
this.AddMapEntryWithWaterVisibility(new Color(0, 50, 50));
|
||||
}
|
||||
|
||||
public override void NumDust(int i, int j, bool fail, ref int num) => num = fail ? 1 : 3;
|
||||
|
||||
@@ -5,13 +5,15 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Walls
|
||||
{
|
||||
public class SmoothNavystoneWall : ModWall
|
||||
public class SmoothNavystoneWall : ModWall, IVisibleThroughWater
|
||||
{
|
||||
int IVisibleThroughWater.WaterMapEntry { get; set; }
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.wallHouse[Type] = true;
|
||||
|
||||
AddMapEntry(new Color(27, 35, 36));
|
||||
this.AddMapEntryWithWaterVisibility(new Color(27, 35, 36));
|
||||
}
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
|
||||
Reference in new issue
Block a user