Unsafe Walls and the retirement of "safe" walls.

Also using return false on Drop for Walls doesn't seem to stop the unsafe wall from dropping
This commit is contained in:
Heart-Plus-Up committed 2025-09-21 19:55:08 -07:00
1 parent 6d9afd6d79
commit 674b60cffd
60 files changed
+241 -330

No files matched your search

+3 -2
View File
@@ -33,6 +33,7 @@ using CalamityMod.Projectiles.Typeless;
using CalamityMod.Systems;
using CalamityMod.Tiles;
using CalamityMod.Walls;
using CalamityMod.Walls.UnsafeWalls;
using CalamityMod.Waterfalls;
using CalamityMod.World;
using Microsoft.Xna.Framework;
@@ -1865,7 +1866,7 @@ namespace CalamityMod.ILEditing
if (Style == 2)
{
// Check if it's an Abyss wall
if (t.WallType == ModContent.WallType<SulphurousShaleWall>() || t.WallType == ModContent.WallType<AbyssGravelWall>() || t.WallType == ModContent.WallType<PyreMantleWall>() || t.WallType == ModContent.WallType<VoidstoneWallUnsafe>() || t.WallType == ModContent.WallType<HardenedSulphurousSandstoneWall>() || t.WallType == ModContent.WallType<SulphurousSandstoneWall>())
if (t.WallType == ModContent.WallType<UnsafeSulphurousShaleWall>() || t.WallType == ModContent.WallType<UnsafeAbyssGravelWall>() || t.WallType == ModContent.WallType<PyreMantleWall>() || t.WallType == ModContent.WallType<UnsafeVoidstoneWall>() || t.WallType == ModContent.WallType<HardenedSulphurousSandstoneWall>() || t.WallType == ModContent.WallType<UnsafeSulphurousSandstoneWall>())
{
// If an Abyss wall is detected, try to find another teleportation location
bool canSpawn = false;
@@ -1894,7 +1895,7 @@ namespace CalamityMod.ILEditing
// Potion of Return triggers Jared if used in the Abyss
if (Style == 8)
{
if (t.WallType == ModContent.WallType<SulphurousShaleWall>() || t.WallType == ModContent.WallType<AbyssGravelWall>() || t.WallType == ModContent.WallType<PyreMantleWall>() || t.WallType == ModContent.WallType<VoidstoneWallUnsafe>() || t.WallType == ModContent.WallType<HardenedSulphurousSandstoneWall>() || t.WallType == ModContent.WallType<SulphurousSandstoneWall>())
if (t.WallType == ModContent.WallType<UnsafeSulphurousShaleWall>() || t.WallType == ModContent.WallType<UnsafeAbyssGravelWall>() || t.WallType == ModContent.WallType<PyreMantleWall>() || t.WallType == ModContent.WallType<UnsafeVoidstoneWall>() || t.WallType == ModContent.WallType<HardenedSulphurousSandstoneWall>() || t.WallType == ModContent.WallType<UnsafeSulphurousSandstoneWall>())
self.AddBuff(BuffID.ChaosState, 2);
}
}
@@ -24,14 +24,5 @@ namespace CalamityMod.Items.Placeables.SunkenSea
Item.ammo = AmmoID.Sand;
Item.notAmmo = true;
}
public override void AddRecipes()
{
CreateRecipe().
AddIngredient<EutrophicSandWallSafe>(4).
AddTile(TileID.WorkBenches).
DisableDecraft().
Register();
}
}
}
+1 -1
View File
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Placeables.SunkenSea
public override void AddRecipes()
{
CreateRecipe().
AddIngredient<NavystoneWallSafe>(4).
AddIngredient<NavystoneWall>(4).
AddTile(TileID.WorkBenches).
DisableDecraft().
Register();
@@ -13,7 +13,7 @@ namespace CalamityMod.Items.Placeables.Walls
Item.ResearchUnlockCount = 400;
}
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.AbyssGravelWallSafe>());
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.AbyssGravelWall>());
public override void AddRecipes()
{
+1 -1
View File
@@ -13,7 +13,7 @@ namespace CalamityMod.Items.Placeables.Walls
Item.ResearchUnlockCount = 400;
}
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.AstralDirtWallSafe>());
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.AstralDirtWall>());
public override void AddRecipes()
{
+1 -1
View File
@@ -12,6 +12,6 @@ namespace CalamityMod.Items.Placeables.Walls
Item.ResearchUnlockCount = 400;
}
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.AstralGrassWallSafe>());
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.AstralGrassWall>());
}
}
+1 -1
View File
@@ -13,7 +13,7 @@ namespace CalamityMod.Items.Placeables.Walls
Item.ResearchUnlockCount = 400;
}
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.AstralIceWallSafe>());
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.AstralIceWall>());
public override void AddRecipes()
{
@@ -13,7 +13,7 @@ namespace CalamityMod.Items.Placeables.Walls
Item.ResearchUnlockCount = 400;
}
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.AstralSandstoneWallSafe>());
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.AstralSandstoneWall>());
public override void AddRecipes()
{
+1 -1
View File
@@ -13,7 +13,7 @@ namespace CalamityMod.Items.Placeables.Walls
Item.ResearchUnlockCount = 400;
}
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.AstralSnowWallSafe>());
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.AstralSnowWall>());
public override void AddRecipes()
{
+1 -1
View File
@@ -13,7 +13,7 @@ namespace CalamityMod.Items.Placeables.Walls
Item.ResearchUnlockCount = 400;
}
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.AstralStoneWallSafe>());
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.AstralStoneWall>());
public override void AddRecipes()
{
Binary file not shown.

Before

Width:  |  Height:  |  Size: 291 B

@@ -1,27 +0,0 @@
using CalamityMod.Items.Placeables.SunkenSea;
using Terraria.ID;
using Terraria.ModLoader;
using WallTiles = CalamityMod.Walls;
namespace CalamityMod.Items.Placeables.Walls
{
public class EutrophicSandWallSafe : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Placeables";
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 400;
ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType<EutrophicSandWall>();
}
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.EutrophicSandWallSafe>());
public override void AddRecipes()
{
CreateRecipe(4).
AddIngredient<EutrophicSand>().
AddTile(TileID.WorkBenches).
Register();
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 291 B

@@ -12,7 +12,7 @@ namespace CalamityMod.Items.Placeables.Walls
Item.ResearchUnlockCount = 400;
}
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.HardenedAstralSandWallSafe>());
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.HardenedAstralSandWall>());
public override void AddRecipes()
{
+13 -3
View File
@@ -1,18 +1,28 @@
using Terraria.ID;
using CalamityMod.Items.Placeables.SunkenSea;
using Terraria.ID;
using Terraria.ModLoader;
using WallTiles = CalamityMod.Walls;
using CalamityMod.Walls.UnsafeWalls;
namespace CalamityMod.Items.Placeables.Walls
{
[LegacyName("NavystoneWallSafe")]
public class NavystoneWall : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Placeables";
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 400;
ItemID.Sets.DrawUnsafeIndicator[Type] = true;
ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType<NavystoneWallSafe>();
ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType<UnsafeNavystoneWall>();
}
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.NavystoneWall>());
public override void AddRecipes()
{
CreateRecipe(4).
AddIngredient<Navystone>().
AddTile(TileID.WorkBenches).
Register();
}
}
}
@@ -1,26 +0,0 @@
using CalamityMod.Items.Placeables.SunkenSea;
using Terraria.ID;
using Terraria.ModLoader;
using WallTiles = CalamityMod.Walls;
namespace CalamityMod.Items.Placeables.Walls
{
public class NavystoneWallSafe : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Placeables";
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 400;
ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType<NavystoneWall>();
}
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.NavystoneWallSafe>());
public override void AddRecipes()
{
CreateRecipe(4).
AddIngredient<Navystone>().
AddTile(TileID.WorkBenches).
Register();
}
}
}
+1 -1
View File
@@ -12,7 +12,7 @@ namespace CalamityMod.Items.Placeables.Walls
Item.ResearchUnlockCount = 400;
}
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.SulphurousSandWallSafe>());
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.SulphurousSandWall>());
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.SulphurousSandstoneWallSafe>());
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.SulphurousSandstoneWall>());
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.SulphurousShaleWallSafe>());
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.SulphurousShaleWall>());
public override void AddRecipes()
{
@@ -1,19 +1,19 @@
using Terraria.ID;
using Terraria.ModLoader;
using WallTiles = CalamityMod.Walls;
using WallTiles = CalamityMod.Walls.UnsafeWalls;
using CalamityMod.Items.Placeables.Walls;
namespace CalamityMod.Items.Placeables.Walls
{
public class EutrophicSandWall : ModItem, ILocalizedModType
public class UnsafeNavystoneWall : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Placeables";
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 400;
ItemID.Sets.DrawUnsafeIndicator[Type] = true;
ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType<EutrophicSandWallSafe>();
ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType<Items.Placeables.Walls.NavystoneWall>();
}
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.EutrophicSandWall>());
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.UnsafeNavystoneWall>());
}
}
File renamed without changes.

Before

Width:  |  Height:  |  Size: 302 B

After

Width:  |  Height:  |  Size: 302 B

@@ -4653,3 +4653,8 @@ BasaltSlab: {
DisplayName: Basalt Slab
Tooltip: ""
}
UnsafeNavystoneWall: {
DisplayName: Unsafe Navystone Wall
Tooltip: ""
}
+3 -16
View File
@@ -1,32 +1,19 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Walls
{
[LegacyName("AbyssGravelWallSafe")]
public class AbyssGravelWall : ModWall
{
public override void SetStaticDefaults()
{
DustType = 33;
Main.wallHouse[Type] = true;
AddMapEntry(new Color(6, 10, 54));
DustType = 33;
}
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.dedServ)
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;
-21
View File
@@ -1,21 +0,0 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Walls
{
public class AbyssGravelWallSafe : ModWall
{
public override string Texture => "CalamityMod/Walls/AbyssGravelWall";
public override void SetStaticDefaults()
{
Main.wallHouse[Type] = true;
AddMapEntry(new Color(6, 10, 54));
DustType = 33;
}
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;
}
}
+3 -5
View File
@@ -1,21 +1,19 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Walls
{
[LegacyName("AstralDirtWallSafe")]
public class AstralDirtWall : ModWall
{
/*public override bool Autoload(ref string name, ref string texture)
{
mod.AddWall("AstralDirtWallUnsafe",this, "CalamityMod/Walls/AstralD" );
return true;
}*/
public override void SetStaticDefaults()
{
// TODO -- Change this dust to be one more befitting Astral Dirt.
DustType = DustID.Shadowflame;
Main.wallHouse[Type] = true;
WallID.Sets.Conversion.Dirt[Type] = true;
AddMapEntry(new Color(26, 22, 32));
}
+4 -6
View File
@@ -8,16 +8,12 @@ using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Walls
{
[LegacyName("AstralGrassWallSafe")]
public class AstralGrassWall : ModWall
{
public static Asset<Texture2D> leafTexture = null;
public static Vector2 TileAdj => (Lighting.Mode == Terraria.Graphics.Light.LightMode.Retro || Lighting.Mode == Terraria.Graphics.Light.LightMode.Trippy) ? Vector2.Zero : Vector2.One * 12;
/*public override bool Autoload(ref string name, ref string texture)
{
mod.AddWall("AstralGrassWallUnsafe", this, texture);
return base.Autoload(ref name, ref texture);
}*/
public override void SetStaticDefaults()
{
@@ -26,6 +22,8 @@ namespace CalamityMod.Walls
WallID.Sets.Conversion.Grass[Type] = true;
Main.wallHouse[Type] = true;
AddMapEntry(new Color(60, 48, 64));
if (!Main.dedServ)
@@ -37,7 +35,7 @@ namespace CalamityMod.Walls
{
if (i > Main.screenPosition.X / 16 && i < Main.screenPosition.X / 16 + Main.screenWidth / 16 && j > Main.screenPosition.Y / 16 && j < Main.screenPosition.Y / 16 + Main.screenHeight / 16)
{
Texture2D tex = leafTexture.Value;
Texture2D tex = AstralGrassWall.leafTexture.Value;
var rand = new Random(i + (j * 100000));
float offset = i * j % 6.28f + (float)rand.NextDouble() / 8f;
+4 -7
View File
@@ -1,20 +1,17 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Walls
{
[LegacyName("AstralIceWallSafe")]
public class AstralIceWall : ModWall
{
/*public override bool Autoload(ref string name, ref string texture)
{
mod.AddWall("AstralIceWallUnsafe", this, texture);
return base.Autoload(ref name, ref texture);
}*/
public override void SetStaticDefaults()
{
// TODO -- Change this dust to be one more befitting Astral Ice.
Main.wallHouse[Type] = true;
DustType = DustID.Shadowflame;
WallID.Sets.Conversion.Ice[Type] = true;
AddMapEntry(new Color(83, 76, 92));
+4 -7
View File
@@ -1,21 +1,18 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Walls
{
[LegacyName("AstralSandstoneWallSafe")]
public class AstralSandstoneWall : ModWall
{
/*public override bool Autoload(ref string name, ref string texture)
{
mod.AddWall("AstralSandstoneWallUnsafe", this, texture);
return base.Autoload(ref name, ref texture);
}*/
public override void SetStaticDefaults()
{
// TODO -- Change this dust to be one more befitting Astral Sandstone.
DustType = DustID.Shadowflame;
Main.wallHouse[Type] = true;
WallID.Sets.Conversion.Sandstone[Type] = true;
+5 -2
View File
@@ -1,14 +1,17 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Walls
{
[LegacyName("AstralSnowWallSafe")]
public class AstralSnowWall : ModWall
{
public override void SetStaticDefaults()
{
DustType = ModContent.DustType<Dusts.AstralBasic>();
Main.wallHouse[Type] = true;
WallID.Sets.Conversion.Snow[Type] = true;
AddMapEntry(new Color(135, 145, 149));
}
+4 -7
View File
@@ -1,21 +1,18 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Walls
{
[LegacyName("AstralStoneWallSafe")]
public class AstralStoneWall : ModWall
{
/*public override bool Autoload(ref string name, ref string texture)
{
mod.AddWall("AstralStoneWallUnsafe", this, texture);
return base.Autoload(ref name, ref texture);
}*/
public override void SetStaticDefaults()
{
// TODO -- Change this dust to be one more befitting Astral Stone.
DustType = DustID.Shadowflame;
Main.wallHouse[Type] = true;
WallID.Sets.Conversion.Stone[Type] = true;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

-19
View File
@@ -1,19 +0,0 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Walls
{
public class EutrophicSandWallSafe : ModWall
{
public override string Texture => "CalamityMod/Walls/EutrophicSandWall";
public override void SetStaticDefaults()
{
Main.wallHouse[Type] = true;
DustType = 108;
AddMapEntry(new Color(11, 56, 81));
}
public override void NumDust(int i, int j, bool fail, ref int num) => num = fail ? 1 : 3;
}
}
+5 -7
View File
@@ -1,21 +1,19 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Walls
{
[LegacyName("HardenedAstralSandWallSafe")]
public class HardenedAstralSandWall : ModWall
{
/*public override bool Autoload(ref string name, ref string texture)
{
mod.AddWall("HardenedAstralSandWallUnsafe", this, texture);
return base.Autoload(ref name, ref texture);
}*/
public override string Texture => "CalamityMod/Walls/HardenedAstralSandWall";
public override void SetStaticDefaults()
{
// TODO -- Change this dust to be one more befitting Hardened Astral Sand.
DustType = DustID.Shadowflame;
Main.wallHouse[Type] = true;
WallID.Sets.Conversion.HardenedSand[Type] = true;
+1
View File
@@ -6,6 +6,7 @@ using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Walls
{
[LegacyName("EutrophicSandWall")]
public class NavyslateWall : ModWall, IVisibleThroughWater
{
int IVisibleThroughWater.WaterMapEntry { get; set; }
+8 -8
View File
@@ -1,22 +1,22 @@
using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria.GameContent;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Walls
{
[LegacyName("NavystoneWallSafe")]
public class NavystoneWall : ModWall, IVisibleThroughWater
{
internal static FramedMaskTexture GlowMask;
public override string Texture => "CalamityMod/Walls/NavystoneWall";
int IVisibleThroughWater.WaterMapEntry { get; set; }
public override void SetStaticDefaults()
{
Main.wallHouse[Type] = true;
DustType = 96;
this.AddMapEntryWithWaterVisibility(new Color(16, 45, 48));
this.AddMapEntryWithWaterVisibility(new Color(0, 50, 50));
}
public override void NumDust(int i, int j, bool fail, ref int num) => num = fail ? 1 : 3;
}
}
-21
View File
@@ -1,21 +0,0 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Walls
{
public class NavystoneWallSafe : ModWall, IVisibleThroughWater
{
public override string Texture => "CalamityMod/Walls/NavystoneWall";
int IVisibleThroughWater.WaterMapEntry { get; set; }
public override void SetStaticDefaults()
{
Main.wallHouse[Type] = true;
DustType = 96;
this.AddMapEntryWithWaterVisibility(new Color(0, 50, 50));
}
public override void NumDust(int i, int j, bool fail, ref int num) => num = fail ? 1 : 3;
}
}
+3 -1
View File
@@ -1,14 +1,16 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Walls
{
[LegacyName("SulphurousSandWallSafe")]
public class SulphurousSandWall : ModWall
{
public override string Texture => "CalamityMod/Walls/SulphurousSandWall";
public override void SetStaticDefaults()
{
Main.wallHouse[Type] = true;
DustType = 32;
AddMapEntry(new Color(84, 71, 46));
}
+3 -1
View File
@@ -1,14 +1,16 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Walls
{
[LegacyName("SulphurousSandstoneWallSafe")]
public class SulphurousSandstoneWall : ModWall
{
public override string Texture => "CalamityMod/Walls/SulphurousSandstoneWall";
public override void SetStaticDefaults()
{
Main.wallHouse[Type] = true;
DustType = 32;
AddMapEntry(new Color(57, 45, 38));
}
+3 -1
View File
@@ -1,14 +1,16 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Walls
{
[LegacyName("SulphurousShaleWallSafe")]
public class SulphurousShaleWall : ModWall
{
public override string Texture => "CalamityMod/Walls/SulphurousShaleWall";
public override void SetStaticDefaults()
{
Main.wallHouse[Type] = true;
DustType = 32;
AddMapEntry(new Color(59, 40, 63));
}
@@ -3,14 +3,15 @@ using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Walls
namespace CalamityMod.Walls.UnsafeWalls
{
public class EutrophicSandWall : ModWall
public class UnsafeAbyssGravelWall : ModWall
{
public override string Texture => "CalamityMod/Walls/AbyssGravelWall";
public override void SetStaticDefaults()
{
DustType = 108;
AddMapEntry(new Color(11, 56, 81));
DustType = 33;
AddMapEntry(new Color(6, 10, 54));
}
public override void RandomUpdate(int i, int j)
@@ -25,6 +26,10 @@ namespace CalamityMod.Walls
}
}
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;
}
}
@@ -1,11 +1,10 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Walls
namespace CalamityMod.Walls.UnsafeWalls
{
public class AstralDirtWallSafe : ModWall
public class UnsafeAstralDirtWall : ModWall
{
public override string Texture => "CalamityMod/Walls/AstralDirtWall";
@@ -13,7 +12,6 @@ namespace CalamityMod.Walls
{
// TODO -- Change this dust to be one more befitting Astral Dirt.
DustType = DustID.Shadowflame;
Main.wallHouse[Type] = true;
WallID.Sets.Conversion.Dirt[Type] = true;
AddMapEntry(new Color(26, 22, 32));
}
@@ -2,16 +2,23 @@
using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using ReLogic.Content;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Walls
namespace CalamityMod.Walls.UnsafeWalls
{
public class AstralGrassWallSafe : ModWall
public class UnsafeAstralGrassWall : ModWall
{
public override string Texture => "CalamityMod/Walls/AstralGrassWall";
public static Asset<Texture2D> leafTexture = null;
public static Vector2 TileAdj => (Lighting.Mode == Terraria.Graphics.Light.LightMode.Retro || Lighting.Mode == Terraria.Graphics.Light.LightMode.Trippy) ? Vector2.Zero : Vector2.One * 12;
/*public override bool Autoload(ref string name, ref string texture)
{
mod.AddWall("AstralGrassWallUnsafe", this, texture);
return base.Autoload(ref name, ref texture);
}*/
public override void SetStaticDefaults()
{
@@ -20,15 +27,18 @@ namespace CalamityMod.Walls
WallID.Sets.Conversion.Grass[Type] = true;
Main.wallHouse[Type] = true;
AddMapEntry(new Color(60, 48, 64));
if (!Main.dedServ)
{
leafTexture = ModContent.Request<Texture2D>("CalamityMod/Walls/AstralGrassWallLeaves");
}
}
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
{
if (i > Main.screenPosition.X / 16 && i < Main.screenPosition.X / 16 + Main.screenWidth / 16 && j > Main.screenPosition.Y / 16 && j < Main.screenPosition.Y / 16 + Main.screenHeight / 16)
{
Texture2D tex = AstralGrassWall.leafTexture.Value;
Texture2D tex = leafTexture.Value;
var rand = new Random(i + (j * 100000));
float offset = i * j % 6.28f + (float)rand.NextDouble() / 8f;
@@ -1,17 +1,15 @@
using Microsoft.Xna.Framework;
using Terraria;
using Microsoft.Xna.Framework;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Walls
namespace CalamityMod.Walls.UnsafeWalls
{
public class AstralIceWallSafe : ModWall
public class UnsafeAstralIceWall : ModWall
{
public override string Texture => "CalamityMod/Walls/AstralIceWall";
public override void SetStaticDefaults()
{
// TODO -- Change this dust to be one more befitting Astral Ice.
Main.wallHouse[Type] = true;
DustType = DustID.Shadowflame;
WallID.Sets.Conversion.Ice[Type] = true;
AddMapEntry(new Color(83, 76, 92));
@@ -1,18 +1,16 @@
using Microsoft.Xna.Framework;
using Terraria;
using Microsoft.Xna.Framework;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Walls
namespace CalamityMod.Walls.UnsafeWalls
{
public class AstralSandstoneWallSafe : ModWall
public class UnsafeAstralSandstoneWall : ModWall
{
public override string Texture => "CalamityMod/Walls/AstralSandstoneWall";
public override void SetStaticDefaults()
{
// TODO -- Change this dust to be one more befitting Astral Sandstone.
DustType = DustID.Shadowflame;
Main.wallHouse[Type] = true;
WallID.Sets.Conversion.Sandstone[Type] = true;
@@ -1,17 +1,15 @@
using Microsoft.Xna.Framework;
using Terraria;
using Microsoft.Xna.Framework;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Walls
namespace CalamityMod.Walls.UnsafeWalls
{
public class AstralSnowWallSafe : ModWall
public class UnsafeAstralSnowWall : ModWall
{
public override string Texture => "CalamityMod/Walls/AstralSnowWall";
public override void SetStaticDefaults()
{
DustType = ModContent.DustType<Dusts.AstralBasic>();
Main.wallHouse[Type] = true;
WallID.Sets.Conversion.Snow[Type] = true;
AddMapEntry(new Color(135, 145, 149));
}
@@ -1,18 +1,16 @@
using Microsoft.Xna.Framework;
using Terraria;
using Microsoft.Xna.Framework;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Walls
namespace CalamityMod.Walls.UnsafeWalls
{
public class AstralStoneWallSafe : ModWall
public class UnsafeAstralStoneWall : ModWall
{
public override string Texture => "CalamityMod/Walls/AstralStoneWall";
public override void SetStaticDefaults()
{
// TODO -- Change this dust to be one more befitting Astral Stone.
DustType = DustID.Shadowflame;
Main.wallHouse[Type] = true;
WallID.Sets.Conversion.Stone[Type] = true;
@@ -1,10 +1,12 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Walls
namespace CalamityMod.Walls.UnsafeWalls
{
public class BrimstoneSlagWallUnsafe : MultiVariantModWall
[LegacyName("BrimstoneSlagWallUnsafe")]
public class UnsafeBrimstoneSlagWall : MultiVariantModWall
{
public override string Texture => "CalamityMod/Walls/BrimstoneSlagWall";
public override void SetStaticDefaults()
@@ -1,18 +1,16 @@
using Microsoft.Xna.Framework;
using Terraria;
using Microsoft.Xna.Framework;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Walls
namespace CalamityMod.Walls.UnsafeWalls
{
public class HardenedAstralSandWallSafe : ModWall
public class UnsafeHardenedAstralSandWall : ModWall
{
public override string Texture => "CalamityMod/Walls/HardenedAstralSandWall";
public override void SetStaticDefaults()
{
// TODO -- Change this dust to be one more befitting Hardened Astral Sand.
DustType = DustID.Shadowflame;
Main.wallHouse[Type] = true;
WallID.Sets.Conversion.HardenedSand[Type] = true;
+27
View File
@@ -0,0 +1,27 @@
using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria.GameContent;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Walls.UnsafeWalls
{
public class UnsafeNavystoneWall : ModWall, IVisibleThroughWater
{
public override string Texture => "CalamityMod/Walls/NavystoneWall";
int IVisibleThroughWater.WaterMapEntry { get; set; }
public override void SetStaticDefaults()
{
DustType = 96;
this.AddMapEntryWithWaterVisibility(new Color(16, 45, 48));
}
public override void NumDust(int i, int j, bool fail, ref int num) => num = fail ? 1 : 3;
public override bool Drop(int i, int j, ref int type)
{
return false;
}
}
}
@@ -1,15 +1,15 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Walls
namespace CalamityMod.Walls.UnsafeWalls
{
public class SulphurousSandWallSafe : ModWall
public class UnsafeSulphurousSandWall : ModWall
{
public override string Texture => "CalamityMod/Walls/SulphurousSandWall";
public override void SetStaticDefaults()
{
Main.wallHouse[Type] = true;
DustType = 32;
AddMapEntry(new Color(84, 71, 46));
}
@@ -1,15 +1,15 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Walls
namespace CalamityMod.Walls.UnsafeWalls
{
public class SulphurousSandstoneWallSafe : ModWall
public class UnsafeSulphurousSandstoneWall : ModWall
{
public override string Texture => "CalamityMod/Walls/SulphurousSandstoneWall";
public override void SetStaticDefaults()
{
Main.wallHouse[Type] = true;
DustType = 32;
AddMapEntry(new Color(57, 45, 38));
}
@@ -1,15 +1,15 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Walls
namespace CalamityMod.Walls.UnsafeWalls
{
public class SulphurousShaleWallSafe : ModWall
public class UnsafeSulphurousShaleWall : ModWall
{
public override string Texture => "CalamityMod/Walls/SulphurousShaleWall";
public override void SetStaticDefaults()
{
Main.wallHouse[Type] = true;
DustType = 32;
AddMapEntry(new Color(59, 40, 63));
}
@@ -7,9 +7,9 @@ using Terraria.GameContent;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Walls
namespace CalamityMod.Walls.UnsafeWalls
{
public class VoidstoneWallUnsafe : ModWall
public class UnsafeVoidstoneWall : ModWall
{
internal static FramedMaskTexture GlowMask;
public override string Texture => "CalamityMod/Walls/VoidstoneWall";
+23 -22
View File
@@ -18,6 +18,7 @@ using CalamityMod.Tiles.Abyss.AbyssAmbient;
using CalamityMod.Tiles.FurnitureVoid;
using CalamityMod.Tiles.Ores;
using CalamityMod.Walls;
using CalamityMod.Walls.UnsafeWalls;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -91,13 +92,13 @@ namespace CalamityMod.World
if (Y <= rockLayer - (int)((y - 200) * 0.6f))
{
tile.TileType = (ushort)ModContent.TileType<Voidstone>();
tile.WallType = (ushort)ModContent.WallType<VoidstoneWallUnsafe>();
tile.WallType = (ushort)ModContent.WallType<UnsafeVoidstoneWall>();
}
//layer 3-4 dithering transition
else if (Y <= rockLayer - (int)((y - 200) * 0.59f) && WorldGen.genRand.NextBool(2))
{
tile.TileType = (ushort)ModContent.TileType<Voidstone>();
tile.WallType = (ushort)ModContent.WallType<VoidstoneWallUnsafe>();
tile.WallType = (ushort)ModContent.WallType<UnsafeVoidstoneWall>();
}
//layer 3
else if (Y <= rockLayer - (int)((y - 200) * 0.4f))
@@ -115,7 +116,7 @@ namespace CalamityMod.World
else if (Y <= rockLayer - (int)((y - 200) * 0.2f))
{
tile.TileType = (ushort)ModContent.TileType<AbyssGravel>();
tile.WallType = (ushort)ModContent.WallType<AbyssGravelWall>();
tile.WallType = (ushort)ModContent.WallType<UnsafeAbyssGravelWall>();
}
//layer 1-2 dithering transition
else if (Y <= rockLayer - (int)((y - 200) * 0.19f))
@@ -123,19 +124,19 @@ namespace CalamityMod.World
if (WorldGen.genRand.NextBool(2))
{
tile.TileType = (ushort)ModContent.TileType<AbyssGravel>();
tile.WallType = (ushort)ModContent.WallType<AbyssGravelWall>();
tile.WallType = (ushort)ModContent.WallType<UnsafeAbyssGravelWall>();
}
else
{
tile.TileType = (ushort)ModContent.TileType<SulphurousShale>();
tile.WallType = (ushort)ModContent.WallType<SulphurousShaleWall>();
tile.WallType = (ushort)ModContent.WallType<UnsafeSulphurousShaleWall>();
}
}
//layer 1
else
{
tile.TileType = (ushort)ModContent.TileType<SulphurousShale>();
tile.WallType = (ushort)ModContent.WallType<SulphurousShaleWall>();
tile.WallType = (ushort)ModContent.WallType<UnsafeSulphurousShaleWall>();
}
}
//basically places smaller clusters everywhere else?
@@ -147,13 +148,13 @@ namespace CalamityMod.World
if (Y <= rockLayer - (int)((y - 200) * 0.6f))
{
tile.TileType = (ushort)ModContent.TileType<Voidstone>();
tile.WallType = (ushort)ModContent.WallType<VoidstoneWallUnsafe>();
tile.WallType = (ushort)ModContent.WallType<UnsafeVoidstoneWall>();
}
//layer 3-4 dithering transition
else if (Y <= rockLayer - (int)((y - 200) * 0.59f) && WorldGen.genRand.NextBool(2))
{
tile.TileType = (ushort)ModContent.TileType<Voidstone>();
tile.WallType = (ushort)ModContent.WallType<VoidstoneWallUnsafe>();
tile.WallType = (ushort)ModContent.WallType<UnsafeVoidstoneWall>();
}
//layer 3
else if (Y <= rockLayer - (int)((y - 200) * 0.4f))
@@ -171,7 +172,7 @@ namespace CalamityMod.World
else if (Y <= rockLayer - (int)((y - 200) * 0.2f))
{
tile.TileType = (ushort)ModContent.TileType<AbyssGravel>();
tile.WallType = (ushort)ModContent.WallType<AbyssGravelWall>();
tile.WallType = (ushort)ModContent.WallType<UnsafeAbyssGravelWall>();
}
//layer 1-2 dithering transition
else if (Y <= rockLayer - (int)((y - 200) * 0.19f))
@@ -179,19 +180,19 @@ namespace CalamityMod.World
if (WorldGen.genRand.NextBool(2))
{
tile.TileType = (ushort)ModContent.TileType<AbyssGravel>();
tile.WallType = (ushort)ModContent.WallType<AbyssGravelWall>();
tile.WallType = (ushort)ModContent.WallType<UnsafeAbyssGravelWall>();
}
else
{
tile.TileType = (ushort)ModContent.TileType<SulphurousShale>();
tile.WallType = (ushort)ModContent.WallType<SulphurousShaleWall>();
tile.WallType = (ushort)ModContent.WallType<UnsafeSulphurousShaleWall>();
}
}
//layer 1
else
{
tile.TileType = (ushort)ModContent.TileType<SulphurousShale>();
tile.WallType = (ushort)ModContent.WallType<SulphurousShaleWall>();
tile.WallType = (ushort)ModContent.WallType<UnsafeSulphurousShaleWall>();
}
}
}
@@ -207,13 +208,13 @@ namespace CalamityMod.World
if (Y > (rockLayer + y * 0.270))
{
tile.TileType = (ushort)ModContent.TileType<Voidstone>();
tile.WallType = (ushort)ModContent.WallType<VoidstoneWallUnsafe>();
tile.WallType = (ushort)ModContent.WallType<UnsafeVoidstoneWall>();
}
//layer 3-4 dithering transition
else if (Y > (rockLayer + y * 0.268) && WorldGen.genRand.NextBool(2))
{
tile.TileType = (ushort)ModContent.TileType<Voidstone>();
tile.WallType = (ushort)ModContent.WallType<VoidstoneWallUnsafe>();
tile.WallType = (ushort)ModContent.WallType<UnsafeVoidstoneWall>();
}
//layer 3
else if (Y > (rockLayer + y * 0.145))
@@ -233,19 +234,19 @@ namespace CalamityMod.World
if (WorldGen.genRand.NextBool(2))
{
tile.TileType = (ushort)ModContent.TileType<AbyssGravel>();
tile.WallType = (ushort)ModContent.WallType<AbyssGravelWall>();
tile.WallType = (ushort)ModContent.WallType<UnsafeAbyssGravelWall>();
}
else
{
tile.TileType = (ushort)ModContent.TileType<SulphurousShale>();
tile.WallType = (ushort)ModContent.WallType<SulphurousShaleWall>();
tile.WallType = (ushort)ModContent.WallType<UnsafeSulphurousShaleWall>();
}
}
//layer 1
else if (Y <= rockLayer - 10)
{
tile.TileType = (ushort)ModContent.TileType<SulphurousShale>();
tile.WallType = (ushort)ModContent.WallType<SulphurousShaleWall>();
tile.WallType = (ushort)ModContent.WallType<UnsafeSulphurousShaleWall>();
}
//layer 2 (default block for the abyss)
else
@@ -263,13 +264,13 @@ namespace CalamityMod.World
if (Y > (rockLayer + y * 0.270))
{
tile.TileType = (ushort)ModContent.TileType<Voidstone>();
tile.WallType = (ushort)ModContent.WallType<VoidstoneWallUnsafe>();
tile.WallType = (ushort)ModContent.WallType<UnsafeVoidstoneWall>();
}
//layer 3-4 dithering transition
else if (Y > (rockLayer + y * 0.268) && WorldGen.genRand.NextBool(2))
{
tile.TileType = (ushort)ModContent.TileType<Voidstone>();
tile.WallType = (ushort)ModContent.WallType<VoidstoneWallUnsafe>();
tile.WallType = (ushort)ModContent.WallType<UnsafeVoidstoneWall>();
}
//layer 3
else if (Y > (rockLayer + y * 0.145))
@@ -289,19 +290,19 @@ namespace CalamityMod.World
if (WorldGen.genRand.NextBool(2))
{
tile.TileType = (ushort)ModContent.TileType<AbyssGravel>();
tile.WallType = (ushort)ModContent.WallType<AbyssGravelWall>();
tile.WallType = (ushort)ModContent.WallType<UnsafeAbyssGravelWall>();
}
else
{
tile.TileType = (ushort)ModContent.TileType<SulphurousShale>();
tile.WallType = (ushort)ModContent.WallType<SulphurousShaleWall>();
tile.WallType = (ushort)ModContent.WallType<UnsafeSulphurousShaleWall>();
}
}
//layer 1
else if (Y <= rockLayer - 10)
{
tile.TileType = (ushort)ModContent.TileType<SulphurousShale>();
tile.WallType = (ushort)ModContent.WallType<SulphurousShaleWall>();
tile.WallType = (ushort)ModContent.WallType<UnsafeSulphurousShaleWall>();
}
//layer 2 (default block for the abyss)
else
+18 -17
View File
@@ -10,6 +10,7 @@ using CalamityMod.Tiles.AstralDesert;
using CalamityMod.Tiles.AstralSnow;
using CalamityMod.Tiles.Ores;
using CalamityMod.Walls;
using CalamityMod.Walls.UnsafeWalls;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Audio;
@@ -775,33 +776,33 @@ namespace CalamityMod.World
if (Main.tile[x, y] != null)
{
if (wallType != WallID.None && wallType != ModContent.WallType<AstralGrassWall>() && wallType != ModContent.WallType<HardenedAstralSandWall>() &&
wallType != ModContent.WallType<AstralSandstoneWall>() && wallType != ModContent.WallType<AstralStoneWall>() &&
wallType != ModContent.WallType<AstralDirtWall>() && wallType != ModContent.WallType<AstralSnowWall>() &&
wallType != ModContent.WallType<CelestialRemainsWall>() && wallType != ModContent.WallType<AstralIceWall>() &&
if (wallType != WallID.None && wallType != ModContent.WallType<UnsafeAstralGrassWall>() && wallType != ModContent.WallType<UnsafeHardenedAstralSandWall>() &&
wallType != ModContent.WallType<UnsafeAstralSandstoneWall>() && wallType != ModContent.WallType<UnsafeAstralStoneWall>() &&
wallType != ModContent.WallType<UnsafeAstralDirtWall>() && wallType != ModContent.WallType<UnsafeAstralSnowWall>() &&
wallType != ModContent.WallType<CelestialRemainsWall>() && wallType != ModContent.WallType<UnsafeAstralIceWall>() &&
wallType != ModContent.WallType<AstralMonolithWall>())
{
if (WallID.Sets.Conversion.Grass[wallType])
{
Main.tile[x, y].WallType = (ushort)ModContent.WallType<AstralGrassWall>();
Main.tile[x, y].WallType = (ushort)ModContent.WallType<UnsafeAstralGrassWall>();
WorldGen.SquareWallFrame(x, y, true);
NetMessage.SendTileSquare(-1, x, y, 1);
}
else if (WallID.Sets.Conversion.HardenedSand[wallType])
{
Main.tile[x, y].WallType = (ushort)ModContent.WallType<HardenedAstralSandWall>();
Main.tile[x, y].WallType = (ushort)ModContent.WallType<UnsafeHardenedAstralSandWall>();
WorldGen.SquareWallFrame(x, y, true);
NetMessage.SendTileSquare(-1, x, y, 1);
}
else if (WallID.Sets.Conversion.Sandstone[wallType])
{
Main.tile[x, y].WallType = (ushort)ModContent.WallType<AstralSandstoneWall>();
Main.tile[x, y].WallType = (ushort)ModContent.WallType<UnsafeAstralSandstoneWall>();
WorldGen.SquareWallFrame(x, y, true);
NetMessage.SendTileSquare(-1, x, y, 1);
}
else if (WallID.Sets.Conversion.Stone[wallType])
{
Main.tile[x, y].WallType = (ushort)ModContent.WallType<AstralStoneWall>();
Main.tile[x, y].WallType = (ushort)ModContent.WallType<UnsafeAstralStoneWall>();
WorldGen.SquareWallFrame(x, y, true);
NetMessage.SendTileSquare(-1, x, y, 1);
}
@@ -816,12 +817,12 @@ namespace CalamityMod.World
case WallID.DirtUnsafe4:
case WallID.Cave6Unsafe:
case WallID.Dirt:
Main.tile[x, y].WallType = (ushort)ModContent.WallType<AstralDirtWall>();
Main.tile[x, y].WallType = (ushort)ModContent.WallType<UnsafeAstralDirtWall>();
WorldGen.SquareWallFrame(x, y, true);
NetMessage.SendTileSquare(-1, x, y, 1);
break;
case WallID.SnowWallUnsafe:
Main.tile[x, y].WallType = (ushort)ModContent.WallType<AstralSnowWall>();
Main.tile[x, y].WallType = (ushort)ModContent.WallType<UnsafeAstralSnowWall>();
WorldGen.SquareWallFrame(x, y, true);
NetMessage.SendTileSquare(-1, x, y, 1);
break;
@@ -831,7 +832,7 @@ namespace CalamityMod.World
NetMessage.SendTileSquare(-1, x, y, 1);
break;
case WallID.IceUnsafe:
Main.tile[x, y].WallType = (ushort)ModContent.WallType<AstralIceWall>();
Main.tile[x, y].WallType = (ushort)ModContent.WallType<UnsafeAstralIceWall>();
WorldGen.SquareWallFrame(x, y, true);
NetMessage.SendTileSquare(-1, x, y, 1);
break;
@@ -1174,11 +1175,11 @@ namespace CalamityMod.World
#region WALL
if (Main.tile[x, y] != null)
{
if (wallType == ModContent.WallType<AstralDirtWall>())
if (wallType == ModContent.WallType<UnsafeAstralDirtWall>())
{
Main.tile[x, y].WallType = WallID.DirtUnsafe;
}
else if (wallType == ModContent.WallType<AstralSnowWall>() || wallType == ModContent.WallType<AstralSnowWallSafe>())
else if (wallType == ModContent.WallType<AstralSnowWall>() || wallType == ModContent.WallType<UnsafeAstralSnowWall>())
{
Main.tile[x, y].WallType = WallID.SnowWallUnsafe;
}
@@ -1186,7 +1187,7 @@ namespace CalamityMod.World
{
Main.tile[x, y].WallType = WallID.DesertFossil;
}
else if (wallType == ModContent.WallType<AstralGrassWall>())
else if (wallType == ModContent.WallType<UnsafeAstralGrassWall>())
{
switch (convert)
{
@@ -1204,15 +1205,15 @@ namespace CalamityMod.World
break;
}
}
else if (wallType == ModContent.WallType<AstralIceWall>())
else if (wallType == ModContent.WallType<UnsafeAstralIceWall>())
{
Main.tile[x, y].WallType = WallID.IceUnsafe;
}
else if (wallType == ModContent.WallType<AstralMonolithWall>())
{
Main.tile[x, y].WallType = WallID.LivingWood;
Main.tile[x, y].WallType = WallID.LivingWoodUnsafe;
}
else if (wallType == ModContent.WallType<AstralStoneWall>())
else if (wallType == ModContent.WallType<UnsafeAstralStoneWall>())
{
switch (convert)
{
+3 -2
View File
@@ -8,6 +8,7 @@ using CalamityMod.Tiles.Crags.Spike;
using CalamityMod.Tiles.Crags.Tree;
using CalamityMod.Tiles.Ores;
using CalamityMod.Walls;
using CalamityMod.Walls.UnsafeWalls;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -59,7 +60,7 @@ namespace CalamityMod.World
Tile tile = Main.tile[x, y];
tile.TileType = (ushort)ModContent.TileType<BrimstoneSlag>();
tile.HasTile = true;
tile.WallType = (ushort)ModContent.WallType<BrimstoneSlagWallUnsafe>();
tile.WallType = (ushort)ModContent.WallType<UnsafeBrimstoneSlagWall>();
}
}
@@ -146,7 +147,7 @@ namespace CalamityMod.World
//place more walls behind slag so theres not just a box of walls from the initial rectangle
if (tile.HasTile && tileDown.HasTile && tileDown2.HasTile && Main.tile[x, y + 5].HasTile)
{
Main.tile[x, y + 5].WallType = (ushort)ModContent.WallType<BrimstoneSlagWallUnsafe>();
Main.tile[x, y + 5].WallType = (ushort)ModContent.WallType<UnsafeBrimstoneSlagWall>();
}
if (tile.LiquidType == LiquidID.Water && tile.LiquidAmount > 0)
+1 -1
View File
@@ -51,7 +51,7 @@ namespace CalamityMod.World
tile.TileType == ModContent.TileType<Limestone>() || tile.TileType == ModContent.TileType<PolypSand>() || tile.TileType == ModContent.TileType<ScarletSeaGrassTile>() || tile.TileType == ModContent.TileType<LimestoneCobble>() ||
tile.TileType == ModContent.TileType<Runestone>() || tile.TileType == ModContent.TileType<Dunesand>() ||
tile.WallType == ModContent.WallType<NavystoneWall>() || // hardened eutrophic sand doesnt have a wall lol
tile.WallType == ModContent.WallType<ShellstoneWall>() || tile.WallType == ModContent.WallType<EutrophicSandWall>() ||
tile.WallType == ModContent.WallType<ShellstoneWall>() ||
tile.WallType == ModContent.WallType<LimestoneWall>() || // nor polyp sand
tile.WallType == ModContent.WallType<RunestoneWall>()) // ... nor dunesand
{
+11 -10
View File
@@ -10,6 +10,7 @@ using CalamityMod.Tiles.Abyss;
using CalamityMod.Tiles.Abyss.AbyssAmbient;
using CalamityMod.Tiles.Abyss.Stalactite;
using CalamityMod.Walls;
using CalamityMod.Walls.UnsafeWalls;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.GameContent.RGB;
@@ -244,7 +245,7 @@ namespace CalamityMod.World
int width = BiomeWidth + 1;
int maxDepth = BlockDepth;
ushort blockTileType = (ushort)ModContent.TileType<SulphurousSand>();
ushort wallID = (ushort)ModContent.WallType<SulphurousSandWall>();
ushort wallID = (ushort)ModContent.WallType<UnsafeSulphurousSandWall>();
for (int i = 1; i < width; i++)
{
@@ -326,7 +327,7 @@ namespace CalamityMod.World
for (int y = top; y < bottom; y++)
{
if (y >= top + DepthForWater)
Main.tile[x, y + WorldGen.genRand.Next(22, 25)].WallType = (ushort)ModContent.WallType<SulphurousSandWall>();
Main.tile[x, y + WorldGen.genRand.Next(22, 25)].WallType = (ushort)ModContent.WallType<UnsafeSulphurousSandWall>();
Main.tile[x, y].LiquidAmount = byte.MaxValue;
Main.tile[x, y].Get<TileWallWireStateData>().HasTile = false;
}
@@ -343,7 +344,7 @@ namespace CalamityMod.World
int right = (int)(BiomeWidth * IslandWidthPercentage);
int maxDepth = MaxTopWaterDepth;
ushort blockTileType = (ushort)ModContent.TileType<SulphurousSand>();
ushort wallID = (ushort)ModContent.WallType<SulphurousSandWall>();
ushort wallID = (ushort)ModContent.WallType<UnsafeSulphurousSandWall>();
for (int i = left; i < right; i++)
{
@@ -384,7 +385,7 @@ namespace CalamityMod.World
if (maxCaveWidth > 15)
maxCaveWidth = 15;
ushort wallID = (ushort)ModContent.WallType<SulphurousSandWall>();
ushort wallID = (ushort)ModContent.WallType<UnsafeSulphurousSandWall>();
for (int i = 2; i < shallowWaterCaveCount; i++)
{
@@ -441,7 +442,7 @@ namespace CalamityMod.World
{
int width = BiomeWidth;
int depth = (int)(BlockDepth * 0.96f);
ushort wallID = (ushort)ModContent.WallType<SulphurousSandWall>();
ushort wallID = (ushort)ModContent.WallType<UnsafeSulphurousSandWall>();
for (int c = 0; c < SpaghettiCaveCarveOutThresholds.Length; c++)
{
@@ -485,7 +486,7 @@ namespace CalamityMod.World
{
int width = BiomeWidth;
int depth = (int)(BlockDepth * 0.96f);
ushort wallID = (ushort)ModContent.WallType<SulphurousSandWall>();
ushort wallID = (ushort)ModContent.WallType<UnsafeSulphurousSandWall>();
for (int c = 0; c < CheeseCaveCarveOutThresholds.Length; c++)
{
@@ -818,7 +819,7 @@ namespace CalamityMod.World
int beachWidth = WorldGen.genRand.Next(150, 190 + 1);
var searchCondition = Searches.Chain(new Searches.Down(3000), new Conditions.IsSolid());
ushort sandID = (ushort)ModContent.TileType<SulphurousSand>();
ushort wallID = (ushort)ModContent.WallType<SulphurousSandWall>();
ushort wallID = (ushort)ModContent.WallType<UnsafeSulphurousSandWall>();
// Stop immediately if for some strange reason a valid tile could not be located for the beach starting point.
if (!WorldUtils.Find(new Point(BiomeWidth + 4, Main.remixWorld ? YStart : (int)GenVars.worldSurfaceLow - 20), searchCondition, out Point determinedPoint))
@@ -1052,7 +1053,7 @@ namespace CalamityMod.World
{
int sandstoneSeed = WorldGen.genRand.Next();
ushort sandstoneID = (ushort)ModContent.TileType<SulphurousSandstone>();
ushort sandstoneWallID = (ushort)ModContent.WallType<SulphurousSandstoneWall>();
ushort sandstoneWallID = (ushort)ModContent.WallType<UnsafeSulphurousSandstoneWall>();
// Edge score evaluation function that determines the propensity a tile has to become sandstone.
// This is based on how much nearby empty areas there are, allowing for "edges" to appear.
@@ -1256,7 +1257,7 @@ namespace CalamityMod.World
for (int dy = 0; dy < 2; dy++)
{
Main.tile[chestPoint.X + dx, chestPoint.Y - dy].LiquidAmount = 0;
Main.tile[chestPoint.X + dx, chestPoint.Y - dy].WallType = (ushort)ModContent.WallType<SulphurousSandWallSafe>();
Main.tile[chestPoint.X + dx, chestPoint.Y - dy].WallType = (ushort)ModContent.WallType<UnsafeSulphurousSandWall>();
Main.tile[chestPoint.X + dx, chestPoint.Y - dy].Get<TileWallWireStateData>().HasTile = false;
}
}
@@ -1578,7 +1579,7 @@ namespace CalamityMod.World
int depth = BlockDepth;
ushort columnID = (ushort)ModContent.TileType<SulphurousColumn>();
ushort hardenedSandstoneWallID = (ushort)ModContent.WallType<HardenedSulphurousSandstoneWall>();
ushort sandWallID = (ushort)ModContent.WallType<SulphurousSandWall>();
ushort sandWallID = (ushort)ModContent.WallType<UnsafeSulphurousSandWall>();
short variantFrameOffset = (short)(WorldGen.genRand.Next(3) * 36);
for (int x = left; x < left + 2; x++)
+8 -7
View File
@@ -7,6 +7,7 @@ using CalamityMod.Tiles.SunkenSea;
using CalamityMod.Tiles.SunkenSea.Ambient;
using CalamityMod.Utilities;
using CalamityMod.Walls;
using CalamityMod.Walls.UnsafeWalls;
using Microsoft.VisualBasic;
using Microsoft.Xna.Framework;
using ReLogic.Threading;
@@ -916,7 +917,7 @@ namespace CalamityMod.World
Vector2 bottomFoci = center + fociOffset;
ushort Navystone = (ushort)ModContent.TileType<Navystone>();
ushort NavystoneWall = (ushort)ModContent.WallType<NavystoneWall>();
ushort NavystoneWall = (ushort)ModContent.WallType<UnsafeNavystoneWall>();
@@ -989,7 +990,7 @@ namespace CalamityMod.World
Vector2 bottomFoci = center + fociOffset;
ushort Navystone = (ushort)ModContent.TileType<Navystone>();
ushort NavystoneWall = (ushort)ModContent.WallType<NavystoneWall>();
ushort NavystoneWall = (ushort)ModContent.WallType<UnsafeNavystoneWall>();
int XStart = origin.X - biomeSize - 3;
int XEnd = origin.X + biomeSize + 3;
@@ -1064,7 +1065,7 @@ namespace CalamityMod.World
{
//place smaller navystone clumps infront of the basalt so the basalt isnt actually inside of the biome itself
WorldGen.TileRunner(X, Y, WorldGen.genRand.Next(8, 12), WorldGen.genRand.Next(8, 12), ModContent.TileType<Navystone>(), true, 0f, 0f, true, true);
t.WallType = (ushort)ModContent.WallType<NavystoneWall>();
t.WallType = (ushort)ModContent.WallType<UnsafeNavystoneWall>();
}
//place clean transition between the burrows and the other biomes
@@ -1079,7 +1080,7 @@ namespace CalamityMod.World
WorldUtils.Gen(new Point(X, Y), new ModShapes.All(circle), Actions.Chain(new GenAction[]
{
new Actions.ClearTile(), new Actions.PlaceTile((ushort)ModContent.TileType<Navystone>()), new Actions.PlaceWall((ushort)ModContent.WallType<NavystoneWall>())
new Actions.ClearTile(), new Actions.PlaceTile((ushort)ModContent.TileType<Navystone>()), new Actions.PlaceWall((ushort)ModContent.WallType<UnsafeNavystoneWall>())
}));
}
}
@@ -1143,8 +1144,8 @@ namespace CalamityMod.World
}
//Tunnels
MiscWorldgenRoutines.ClearTunnel(startX - 200, startY + 40, newTunnelXLeft, newTunnelYLeft, 3, (ushort)ModContent.WallType<NavystoneWall>(), 2, false, false);
MiscWorldgenRoutines.ClearTunnel(startX + 200, startY + 40, newTunnelXRight, newTunnelYRight, 3, (ushort)ModContent.WallType<NavystoneWall>(), 2, false, false);
MiscWorldgenRoutines.ClearTunnel(startX - 200, startY + 40, newTunnelXLeft, newTunnelYLeft, 3, (ushort)ModContent.WallType<UnsafeNavystoneWall>(), 2, false, false);
MiscWorldgenRoutines.ClearTunnel(startX + 200, startY + 40, newTunnelXRight, newTunnelYRight, 3, (ushort)ModContent.WallType<UnsafeNavystoneWall>(), 2, false, false);
//cleanup the perlin caves
for (int X = origin.X - biomeSize - 3; X < origin.X + biomeSize + 3; X += 1)
@@ -1269,7 +1270,7 @@ namespace CalamityMod.World
if (caveNoiseMapWalls * caveNoiseMapWalls > caveCreationThresholdWalls)
{
t.WallType = (ushort)ModContent.WallType<NavystoneWall>();
t.WallType = (ushort)ModContent.WallType<UnsafeNavystoneWall>();
}
Main.tile[X, Y].Get<LiquidData>().LiquidType = LiquidID.Water;
+1 -2
View File
@@ -47,8 +47,7 @@ namespace CalamityMod.World
}
if (tile.TileType == TileType<Tiles.SunkenSea.Navystone>() ||
tile.TileType == TileType<Tiles.SunkenSea.EutrophicSand>() ||
tile.WallType == WallType<NavystoneWall>() ||
tile.WallType == WallType<EutrophicSandWall>())
tile.WallType == WallType<NavystoneWall>())
{
return true;
}