From 674b60cffd6467fee0f0491bf968874fc40c6c8c Mon Sep 17 00:00:00 2001 From: Heart-Plus-Up <85328817+Heart-Plus-Up@users.noreply.github.com> Date: Sun, 21 Sep 2025 19:55:08 -0700 Subject: [PATCH] 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 --- ILEditing/MechanicILChanges.cs | 5 +- Items/Placeables/SunkenSea/EutrophicSand.cs | 9 ---- Items/Placeables/SunkenSea/Navystone.cs | 2 +- Items/Placeables/Walls/AbyssGravelWallItem.cs | 2 +- Items/Placeables/Walls/AstralDirtWall.cs | 2 +- Items/Placeables/Walls/AstralGrassWall.cs | 2 +- Items/Placeables/Walls/AstralIceWall.cs | 2 +- Items/Placeables/Walls/AstralSandstoneWall.cs | 2 +- Items/Placeables/Walls/AstralSnowWall.cs | 2 +- Items/Placeables/Walls/AstralStoneWall.cs | 2 +- Items/Placeables/Walls/EutrophicSandWall.png | Bin 291 -> 0 bytes .../Placeables/Walls/EutrophicSandWallSafe.cs | 27 ----------- .../Walls/EutrophicSandWallSafe.png | Bin 291 -> 0 bytes .../Walls/HardenedAstralSandWall.cs | 2 +- Items/Placeables/Walls/NavystoneWall.cs | 16 +++++-- Items/Placeables/Walls/NavystoneWallSafe.cs | 26 ---------- Items/Placeables/Walls/SulphurousSandWall.cs | 2 +- .../Walls/SulphurousSandstoneWall.cs | 2 +- Items/Placeables/Walls/SulphurousShaleWall.cs | 2 +- ...phicSandWall.cs => UnsafeNavystoneWall.cs} | 10 ++-- ...neWallSafe.png => UnsafeNavystoneWall.png} | Bin .../Mods.CalamityMod.Items.Placeables.hjson | 5 ++ Walls/AbyssGravelWall.cs | 19 ++------ Walls/AbyssGravelWallSafe.cs | 21 -------- Walls/AstralDirtWall.cs | 8 ++-- Walls/AstralGrassWall.cs | 10 ++-- Walls/AstralIceWall.cs | 11 ++--- Walls/AstralSandstoneWall.cs | 11 ++--- Walls/AstralSnowWall.cs | 7 ++- Walls/AstralStoneWall.cs | 11 ++--- Walls/EutrophicSandWall.png | Bin 6952 -> 0 bytes Walls/EutrophicSandWallSafe.cs | 19 -------- Walls/HardenedAstralSandWall.cs | 12 ++--- Walls/NavyslateWall.cs | 1 + Walls/NavystoneWall.cs | 16 +++---- Walls/NavystoneWallSafe.cs | 21 -------- Walls/SulphurousSandWall.cs | 4 +- Walls/SulphurousSandstoneWall.cs | 4 +- Walls/SulphurousShaleWall.cs | 4 +- .../UnsafeAbyssGravelWall.cs} | 13 +++-- .../UnsafeAstralDirtWall.cs} | 6 +-- .../UnsafeAstralGrassWall.cs} | 20 ++++++-- .../UnsafeAstralIceWall.cs} | 10 ++-- .../UnsafeAstralSandstoneWall.cs} | 10 ++-- .../UnsafeAstralSnowWall.cs} | 10 ++-- .../UnsafeAstralStoneWall.cs} | 10 ++-- .../UnsafeBrimstoneSlagWall.cs} | 6 ++- .../UnsafeHardenedAstralSandWall.cs} | 10 ++-- Walls/UnsafeWalls/UnsafeNavystoneWall.cs | 27 +++++++++++ .../UnsafeSulphurousSandWall.cs} | 6 +-- .../UnsafeSulphurousSandstoneWall.cs} | 6 +-- .../UnsafeSulphurousShaleWall.cs} | 6 +-- .../UnsafeVoidstoneWall.cs} | 4 +- World/Abyss.cs | 45 +++++++++--------- World/AstralBiome.cs | 35 +++++++------- World/BrimstoneCrag.cs | 5 +- World/DraedonStructures.cs | 2 +- World/SulphurousSea.cs | 21 ++++---- World/SunkenSea.cs | 15 +++--- World/UndergroundShrines.cs | 3 +- 60 files changed, 241 insertions(+), 330 deletions(-) delete mode 100644 Items/Placeables/Walls/EutrophicSandWall.png delete mode 100644 Items/Placeables/Walls/EutrophicSandWallSafe.cs delete mode 100644 Items/Placeables/Walls/EutrophicSandWallSafe.png delete mode 100644 Items/Placeables/Walls/NavystoneWallSafe.cs rename Items/Placeables/Walls/{EutrophicSandWall.cs => UnsafeNavystoneWall.cs} (63%) rename Items/Placeables/Walls/{NavystoneWallSafe.png => UnsafeNavystoneWall.png} (100%) delete mode 100644 Walls/AbyssGravelWallSafe.cs delete mode 100644 Walls/EutrophicSandWall.png delete mode 100644 Walls/EutrophicSandWallSafe.cs delete mode 100644 Walls/NavystoneWallSafe.cs rename Walls/{EutrophicSandWall.cs => UnsafeWalls/UnsafeAbyssGravelWall.cs} (65%) rename Walls/{AstralDirtWallSafe.cs => UnsafeWalls/UnsafeAstralDirtWall.cs} (81%) rename Walls/{AstralGrassWallSafe.cs => UnsafeWalls/UnsafeAstralGrassWall.cs} (73%) rename Walls/{AstralIceWallSafe.cs => UnsafeWalls/UnsafeAstralIceWall.cs} (76%) rename Walls/{AstralSandstoneWallSafe.cs => UnsafeWalls/UnsafeAstralSandstoneWall.cs} (76%) rename Walls/{AstralSnowWallSafe.cs => UnsafeWalls/UnsafeAstralSnowWall.cs} (74%) rename Walls/{AstralStoneWallSafe.cs => UnsafeWalls/UnsafeAstralStoneWall.cs} (76%) rename Walls/{BrimstoneSlagWallUnsafe.cs => UnsafeWalls/UnsafeBrimstoneSlagWall.cs} (84%) rename Walls/{HardenedAstralSandWallSafe.cs => UnsafeWalls/UnsafeHardenedAstralSandWall.cs} (76%) create mode 100644 Walls/UnsafeWalls/UnsafeNavystoneWall.cs rename Walls/{SulphurousSandWallSafe.cs => UnsafeWalls/UnsafeSulphurousSandWall.cs} (77%) rename Walls/{SulphurousSandstoneWallSafe.cs => UnsafeWalls/UnsafeSulphurousSandstoneWall.cs} (77%) rename Walls/{SulphurousShaleWallSafe.cs => UnsafeWalls/UnsafeSulphurousShaleWall.cs} (77%) rename Walls/{VoidstoneWallUnsafe.cs => UnsafeWalls/UnsafeVoidstoneWall.cs} (97%) diff --git a/ILEditing/MechanicILChanges.cs b/ILEditing/MechanicILChanges.cs index 23a8521e64..c37d030846 100644 --- a/ILEditing/MechanicILChanges.cs +++ b/ILEditing/MechanicILChanges.cs @@ -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() || t.WallType == ModContent.WallType() || t.WallType == ModContent.WallType() || t.WallType == ModContent.WallType() || t.WallType == ModContent.WallType() || t.WallType == ModContent.WallType()) + if (t.WallType == ModContent.WallType() || t.WallType == ModContent.WallType() || t.WallType == ModContent.WallType() || t.WallType == ModContent.WallType() || t.WallType == ModContent.WallType() || t.WallType == ModContent.WallType()) { // 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() || t.WallType == ModContent.WallType() || t.WallType == ModContent.WallType() || t.WallType == ModContent.WallType() || t.WallType == ModContent.WallType() || t.WallType == ModContent.WallType()) + if (t.WallType == ModContent.WallType() || t.WallType == ModContent.WallType() || t.WallType == ModContent.WallType() || t.WallType == ModContent.WallType() || t.WallType == ModContent.WallType() || t.WallType == ModContent.WallType()) self.AddBuff(BuffID.ChaosState, 2); } } diff --git a/Items/Placeables/SunkenSea/EutrophicSand.cs b/Items/Placeables/SunkenSea/EutrophicSand.cs index 903c1b2618..4ee6775d12 100644 --- a/Items/Placeables/SunkenSea/EutrophicSand.cs +++ b/Items/Placeables/SunkenSea/EutrophicSand.cs @@ -24,14 +24,5 @@ namespace CalamityMod.Items.Placeables.SunkenSea Item.ammo = AmmoID.Sand; Item.notAmmo = true; } - - public override void AddRecipes() - { - CreateRecipe(). - AddIngredient(4). - AddTile(TileID.WorkBenches). - DisableDecraft(). - Register(); - } } } diff --git a/Items/Placeables/SunkenSea/Navystone.cs b/Items/Placeables/SunkenSea/Navystone.cs index c38fb7d2e3..42b3e5b407 100644 --- a/Items/Placeables/SunkenSea/Navystone.cs +++ b/Items/Placeables/SunkenSea/Navystone.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Placeables.SunkenSea public override void AddRecipes() { CreateRecipe(). - AddIngredient(4). + AddIngredient(4). AddTile(TileID.WorkBenches). DisableDecraft(). Register(); diff --git a/Items/Placeables/Walls/AbyssGravelWallItem.cs b/Items/Placeables/Walls/AbyssGravelWallItem.cs index 943045e744..ab1cb9705c 100644 --- a/Items/Placeables/Walls/AbyssGravelWallItem.cs +++ b/Items/Placeables/Walls/AbyssGravelWallItem.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Placeables.Walls Item.ResearchUnlockCount = 400; } - public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType()); + public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType()); public override void AddRecipes() { diff --git a/Items/Placeables/Walls/AstralDirtWall.cs b/Items/Placeables/Walls/AstralDirtWall.cs index 92f04ca230..70ec1c3246 100644 --- a/Items/Placeables/Walls/AstralDirtWall.cs +++ b/Items/Placeables/Walls/AstralDirtWall.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Placeables.Walls Item.ResearchUnlockCount = 400; } - public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType()); + public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType()); public override void AddRecipes() { diff --git a/Items/Placeables/Walls/AstralGrassWall.cs b/Items/Placeables/Walls/AstralGrassWall.cs index 4b733618b7..abb874af44 100644 --- a/Items/Placeables/Walls/AstralGrassWall.cs +++ b/Items/Placeables/Walls/AstralGrassWall.cs @@ -12,6 +12,6 @@ namespace CalamityMod.Items.Placeables.Walls Item.ResearchUnlockCount = 400; } - public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType()); + public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType()); } } diff --git a/Items/Placeables/Walls/AstralIceWall.cs b/Items/Placeables/Walls/AstralIceWall.cs index c97435081c..10f38bc8d5 100644 --- a/Items/Placeables/Walls/AstralIceWall.cs +++ b/Items/Placeables/Walls/AstralIceWall.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Placeables.Walls Item.ResearchUnlockCount = 400; } - public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType()); + public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType()); public override void AddRecipes() { diff --git a/Items/Placeables/Walls/AstralSandstoneWall.cs b/Items/Placeables/Walls/AstralSandstoneWall.cs index aba828d058..43a2277c27 100644 --- a/Items/Placeables/Walls/AstralSandstoneWall.cs +++ b/Items/Placeables/Walls/AstralSandstoneWall.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Placeables.Walls Item.ResearchUnlockCount = 400; } - public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType()); + public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType()); public override void AddRecipes() { diff --git a/Items/Placeables/Walls/AstralSnowWall.cs b/Items/Placeables/Walls/AstralSnowWall.cs index ad137271ff..8771a360bf 100644 --- a/Items/Placeables/Walls/AstralSnowWall.cs +++ b/Items/Placeables/Walls/AstralSnowWall.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Placeables.Walls Item.ResearchUnlockCount = 400; } - public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType()); + public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType()); public override void AddRecipes() { diff --git a/Items/Placeables/Walls/AstralStoneWall.cs b/Items/Placeables/Walls/AstralStoneWall.cs index 25f2ec002e..07b8f957dd 100644 --- a/Items/Placeables/Walls/AstralStoneWall.cs +++ b/Items/Placeables/Walls/AstralStoneWall.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Placeables.Walls Item.ResearchUnlockCount = 400; } - public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType()); + public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType()); public override void AddRecipes() { diff --git a/Items/Placeables/Walls/EutrophicSandWall.png b/Items/Placeables/Walls/EutrophicSandWall.png deleted file mode 100644 index 04e425d8b53d9e480c4a72014703e1e31982eef7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 291 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjoCO|{#S9GGLLkg|>2BR0px{+c z7srr_TYIP4b00DgaR0p2<%lbbtjI14jgrY+eL)3nC~fQOeKVi#(bP$sJ>}-Q+f4r@(;elO6ficvvlIEYJiD=}!16v<&*lYk z!t2$4d^yj=tl1F|xbRu9dE5itM)gfCUs-b4l(ZAqOt6x9U%@Eu#H#hFPqT2^vm5-H z!ul7w(^R7>#MjMp5SCm2UH+ch?Bgae4|3myEZp|HqR~zxIr`v>GFiO~>VERGR-WzU mye|A "Items.Placeables"; - public override void SetStaticDefaults() - { - Item.ResearchUnlockCount = 400; - ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType(); - } - - public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType()); - - public override void AddRecipes() - { - CreateRecipe(4). - AddIngredient(). - AddTile(TileID.WorkBenches). - Register(); - } - } -} diff --git a/Items/Placeables/Walls/EutrophicSandWallSafe.png b/Items/Placeables/Walls/EutrophicSandWallSafe.png deleted file mode 100644 index 04e425d8b53d9e480c4a72014703e1e31982eef7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 291 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjoCO|{#S9GGLLkg|>2BR0px{+c z7srr_TYIP4b00DgaR0p2<%lbbtjI14jgrY+eL)3nC~fQOeKVi#(bP$sJ>}-Q+f4r@(;elO6ficvvlIEYJiD=}!16v<&*lYk z!t2$4d^yj=tl1F|xbRu9dE5itM)gfCUs-b4l(ZAqOt6x9U%@Eu#H#hFPqT2^vm5-H z!ul7w(^R7>#MjMp5SCm2UH+ch?Bgae4|3myEZp|HqR~zxIr`v>GFiO~>VERGR-WzU mye|A Item.DefaultToPlaceableWall(ModContent.WallType()); + public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType()); public override void AddRecipes() { diff --git a/Items/Placeables/Walls/NavystoneWall.cs b/Items/Placeables/Walls/NavystoneWall.cs index 86d37219d1..b486ddeba7 100644 --- a/Items/Placeables/Walls/NavystoneWall.cs +++ b/Items/Placeables/Walls/NavystoneWall.cs @@ -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(); + ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType(); } public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType()); + + public override void AddRecipes() + { + CreateRecipe(4). + AddIngredient(). + AddTile(TileID.WorkBenches). + Register(); + } } } diff --git a/Items/Placeables/Walls/NavystoneWallSafe.cs b/Items/Placeables/Walls/NavystoneWallSafe.cs deleted file mode 100644 index 7dd6ce6ca0..0000000000 --- a/Items/Placeables/Walls/NavystoneWallSafe.cs +++ /dev/null @@ -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(); - } - - public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType()); - - public override void AddRecipes() - { - CreateRecipe(4). - AddIngredient(). - AddTile(TileID.WorkBenches). - Register(); - } - } -} diff --git a/Items/Placeables/Walls/SulphurousSandWall.cs b/Items/Placeables/Walls/SulphurousSandWall.cs index a975584667..526057ed0c 100644 --- a/Items/Placeables/Walls/SulphurousSandWall.cs +++ b/Items/Placeables/Walls/SulphurousSandWall.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Placeables.Walls Item.ResearchUnlockCount = 400; } - public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType()); + public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType()); public override void AddRecipes() { diff --git a/Items/Placeables/Walls/SulphurousSandstoneWall.cs b/Items/Placeables/Walls/SulphurousSandstoneWall.cs index 994455af66..fdcf4a4b3a 100644 --- a/Items/Placeables/Walls/SulphurousSandstoneWall.cs +++ b/Items/Placeables/Walls/SulphurousSandstoneWall.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Placeables.Walls Item.ResearchUnlockCount = 400; } - public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType()); + public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType()); public override void AddRecipes() { diff --git a/Items/Placeables/Walls/SulphurousShaleWall.cs b/Items/Placeables/Walls/SulphurousShaleWall.cs index 2801be9e26..d245987b63 100644 --- a/Items/Placeables/Walls/SulphurousShaleWall.cs +++ b/Items/Placeables/Walls/SulphurousShaleWall.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Placeables.Walls Item.ResearchUnlockCount = 400; } - public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType()); + public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType()); public override void AddRecipes() { diff --git a/Items/Placeables/Walls/EutrophicSandWall.cs b/Items/Placeables/Walls/UnsafeNavystoneWall.cs similarity index 63% rename from Items/Placeables/Walls/EutrophicSandWall.cs rename to Items/Placeables/Walls/UnsafeNavystoneWall.cs index f7e9ef7d62..484b95edda 100644 --- a/Items/Placeables/Walls/EutrophicSandWall.cs +++ b/Items/Placeables/Walls/UnsafeNavystoneWall.cs @@ -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(); + ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType(); } - public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType()); + public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType()); } } diff --git a/Items/Placeables/Walls/NavystoneWallSafe.png b/Items/Placeables/Walls/UnsafeNavystoneWall.png similarity index 100% rename from Items/Placeables/Walls/NavystoneWallSafe.png rename to Items/Placeables/Walls/UnsafeNavystoneWall.png diff --git a/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson b/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson index c3a3783cdf..7801811519 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson @@ -4653,3 +4653,8 @@ BasaltSlab: { DisplayName: Basalt Slab Tooltip: "" } + +UnsafeNavystoneWall: { + DisplayName: Unsafe Navystone Wall + Tooltip: "" +} diff --git a/Walls/AbyssGravelWall.cs b/Walls/AbyssGravelWall.cs index 44e781e3a0..81c87aa517 100644 --- a/Walls/AbyssGravelWall.cs +++ b/Walls/AbyssGravelWall.cs @@ -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().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; diff --git a/Walls/AbyssGravelWallSafe.cs b/Walls/AbyssGravelWallSafe.cs deleted file mode 100644 index 47910b7661..0000000000 --- a/Walls/AbyssGravelWallSafe.cs +++ /dev/null @@ -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; - } -} diff --git a/Walls/AstralDirtWall.cs b/Walls/AstralDirtWall.cs index ae80a7a4dd..3484205805 100644 --- a/Walls/AstralDirtWall.cs +++ b/Walls/AstralDirtWall.cs @@ -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)); } diff --git a/Walls/AstralGrassWall.cs b/Walls/AstralGrassWall.cs index 95ff468205..8c8b7c5d25 100644 --- a/Walls/AstralGrassWall.cs +++ b/Walls/AstralGrassWall.cs @@ -8,16 +8,12 @@ using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Walls { + [LegacyName("AstralGrassWallSafe")] public class AstralGrassWall : ModWall { public static Asset 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; diff --git a/Walls/AstralIceWall.cs b/Walls/AstralIceWall.cs index 4c0802f5a5..8e3431c427 100644 --- a/Walls/AstralIceWall.cs +++ b/Walls/AstralIceWall.cs @@ -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)); diff --git a/Walls/AstralSandstoneWall.cs b/Walls/AstralSandstoneWall.cs index 7d24446445..ad9bcab1c8 100644 --- a/Walls/AstralSandstoneWall.cs +++ b/Walls/AstralSandstoneWall.cs @@ -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; diff --git a/Walls/AstralSnowWall.cs b/Walls/AstralSnowWall.cs index 586060389a..87e48f1d0d 100644 --- a/Walls/AstralSnowWall.cs +++ b/Walls/AstralSnowWall.cs @@ -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(); + Main.wallHouse[Type] = true; WallID.Sets.Conversion.Snow[Type] = true; AddMapEntry(new Color(135, 145, 149)); } diff --git a/Walls/AstralStoneWall.cs b/Walls/AstralStoneWall.cs index 0de91add8b..1ba76b2331 100644 --- a/Walls/AstralStoneWall.cs +++ b/Walls/AstralStoneWall.cs @@ -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; diff --git a/Walls/EutrophicSandWall.png b/Walls/EutrophicSandWall.png deleted file mode 100644 index 1e65f4f49eb66b2195dde3eb8283a29706e762f3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6952 zcmZ9Rdpy(q`^RTdHx`l-BgfjD4{0=vZGNB0{jJ~k53`5I=X1TU_w{~X&+BzvZaJQ_-YTsu4FZ9- z+MKa+0)a%jf$z^H#eq+QyrJvBFR93zbSH?_fs&1(*>UwL+|YM1^FuZ5V4 zSN)Q3S4;!$a8vtX<=6~?&72pRoib9ZLU^z!xB7hPm|TKla_>v7n4^fUg%}Z}m<#S+ z19g*~r3r4)6O;Ei3Sw}yQPAnK-(NUdC-#1p%4{iT8BNvfeJ4{>CVK^)V^P{z6 zhvcrqRkkEuF6PgEKG~bC<}jBWcMe#&(n5QEcpzJ%ouhL!$BxfdgOYg(ah_}Li{6xR zrOhQ>@Y0SV(?hbi?RlwO_27p*-bWS`FrV?u=rV4R8-pdx1j~RZ4t?JMAdOx_L09g`#pCO+pA)lhr+XL#KdiCPW zJw=Pn8bJSU)CG@(5alf@zU_ku22x>z6?fKG3Eohz2086@23f(xBt~HtE3iL6maWi! z<1oVC_GbFT)IK)ZMWXV9cfQn=zhJGj+R3a=t#a5YbF@TM)7vopZf(=aAfA8fi?kC* zGiQU$ClOaokK~Y+7C(>^%uEEjS?O6MHWUa`omg2Gi~=(Gg_zHt9fFZY30>T=#{~C9 z`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@04v$&_id280*;O7c(6(uVPfQA1tqJ&~1xKp_2Dt z&4E|`4b@S79C%T}jQJN*HvthTZ}ceS`2P~A8hlP=?p`rmaf zwMIr+;9yzl0PrBlzyP1>8PZPP@lX4K%stmIkAQWksfpg<#|0=Pd*nT+waPNScL_Jh zYgnP^|E0ETzB_K0GHikB*FanXGXB<4qaYXD`FU%mMx;s|6Ij%VMZf!WH;x7xKZ-&v p{=7qAzIX~?)lVPFp6hZ{vw)8Qb;Zwse|>>$PM@`A<{{Sp2dzk "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; - } -} diff --git a/Walls/HardenedAstralSandWall.cs b/Walls/HardenedAstralSandWall.cs index 4766efcb6e..567269b30b 100644 --- a/Walls/HardenedAstralSandWall.cs +++ b/Walls/HardenedAstralSandWall.cs @@ -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; diff --git a/Walls/NavyslateWall.cs b/Walls/NavyslateWall.cs index 4024292c23..5272d6d750 100644 --- a/Walls/NavyslateWall.cs +++ b/Walls/NavyslateWall.cs @@ -6,6 +6,7 @@ using Terraria; using Terraria.ModLoader; namespace CalamityMod.Walls { + [LegacyName("EutrophicSandWall")] public class NavyslateWall : ModWall, IVisibleThroughWater { int IVisibleThroughWater.WaterMapEntry { get; set; } diff --git a/Walls/NavystoneWall.cs b/Walls/NavystoneWall.cs index feedbf7e15..1c5f327811 100644 --- a/Walls/NavystoneWall.cs +++ b/Walls/NavystoneWall.cs @@ -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; } } diff --git a/Walls/NavystoneWallSafe.cs b/Walls/NavystoneWallSafe.cs deleted file mode 100644 index b2dd4387ad..0000000000 --- a/Walls/NavystoneWallSafe.cs +++ /dev/null @@ -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; - } -} diff --git a/Walls/SulphurousSandWall.cs b/Walls/SulphurousSandWall.cs index 4ea9b6bf5e..f5e33c2e17 100644 --- a/Walls/SulphurousSandWall.cs +++ b/Walls/SulphurousSandWall.cs @@ -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)); } diff --git a/Walls/SulphurousSandstoneWall.cs b/Walls/SulphurousSandstoneWall.cs index 24b9f1da62..a8eb0523bf 100644 --- a/Walls/SulphurousSandstoneWall.cs +++ b/Walls/SulphurousSandstoneWall.cs @@ -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)); } diff --git a/Walls/SulphurousShaleWall.cs b/Walls/SulphurousShaleWall.cs index a7a9c9e46d..4cfa1e731d 100644 --- a/Walls/SulphurousShaleWall.cs +++ b/Walls/SulphurousShaleWall.cs @@ -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)); } diff --git a/Walls/EutrophicSandWall.cs b/Walls/UnsafeWalls/UnsafeAbyssGravelWall.cs similarity index 65% rename from Walls/EutrophicSandWall.cs rename to Walls/UnsafeWalls/UnsafeAbyssGravelWall.cs index d6b6bb71c2..f202f68ad7 100644 --- a/Walls/EutrophicSandWall.cs +++ b/Walls/UnsafeWalls/UnsafeAbyssGravelWall.cs @@ -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; } } diff --git a/Walls/AstralDirtWallSafe.cs b/Walls/UnsafeWalls/UnsafeAstralDirtWall.cs similarity index 81% rename from Walls/AstralDirtWallSafe.cs rename to Walls/UnsafeWalls/UnsafeAstralDirtWall.cs index 8305333479..3e8494b5f9 100644 --- a/Walls/AstralDirtWallSafe.cs +++ b/Walls/UnsafeWalls/UnsafeAstralDirtWall.cs @@ -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)); } diff --git a/Walls/AstralGrassWallSafe.cs b/Walls/UnsafeWalls/UnsafeAstralGrassWall.cs similarity index 73% rename from Walls/AstralGrassWallSafe.cs rename to Walls/UnsafeWalls/UnsafeAstralGrassWall.cs index b7f0877466..1a115e39ff 100644 --- a/Walls/AstralGrassWallSafe.cs +++ b/Walls/UnsafeWalls/UnsafeAstralGrassWall.cs @@ -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 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("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; diff --git a/Walls/AstralIceWallSafe.cs b/Walls/UnsafeWalls/UnsafeAstralIceWall.cs similarity index 76% rename from Walls/AstralIceWallSafe.cs rename to Walls/UnsafeWalls/UnsafeAstralIceWall.cs index 0b93d98546..cef160b93f 100644 --- a/Walls/AstralIceWallSafe.cs +++ b/Walls/UnsafeWalls/UnsafeAstralIceWall.cs @@ -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)); diff --git a/Walls/AstralSandstoneWallSafe.cs b/Walls/UnsafeWalls/UnsafeAstralSandstoneWall.cs similarity index 76% rename from Walls/AstralSandstoneWallSafe.cs rename to Walls/UnsafeWalls/UnsafeAstralSandstoneWall.cs index af458c22e4..eaa00bad12 100644 --- a/Walls/AstralSandstoneWallSafe.cs +++ b/Walls/UnsafeWalls/UnsafeAstralSandstoneWall.cs @@ -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; diff --git a/Walls/AstralSnowWallSafe.cs b/Walls/UnsafeWalls/UnsafeAstralSnowWall.cs similarity index 74% rename from Walls/AstralSnowWallSafe.cs rename to Walls/UnsafeWalls/UnsafeAstralSnowWall.cs index fe7d6b8b19..56771bbc1e 100644 --- a/Walls/AstralSnowWallSafe.cs +++ b/Walls/UnsafeWalls/UnsafeAstralSnowWall.cs @@ -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(); - Main.wallHouse[Type] = true; WallID.Sets.Conversion.Snow[Type] = true; AddMapEntry(new Color(135, 145, 149)); } diff --git a/Walls/AstralStoneWallSafe.cs b/Walls/UnsafeWalls/UnsafeAstralStoneWall.cs similarity index 76% rename from Walls/AstralStoneWallSafe.cs rename to Walls/UnsafeWalls/UnsafeAstralStoneWall.cs index 80b21ac42d..3b707574ee 100644 --- a/Walls/AstralStoneWallSafe.cs +++ b/Walls/UnsafeWalls/UnsafeAstralStoneWall.cs @@ -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; diff --git a/Walls/BrimstoneSlagWallUnsafe.cs b/Walls/UnsafeWalls/UnsafeBrimstoneSlagWall.cs similarity index 84% rename from Walls/BrimstoneSlagWallUnsafe.cs rename to Walls/UnsafeWalls/UnsafeBrimstoneSlagWall.cs index 4485858ca2..a05946e17c 100644 --- a/Walls/BrimstoneSlagWallUnsafe.cs +++ b/Walls/UnsafeWalls/UnsafeBrimstoneSlagWall.cs @@ -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() diff --git a/Walls/HardenedAstralSandWallSafe.cs b/Walls/UnsafeWalls/UnsafeHardenedAstralSandWall.cs similarity index 76% rename from Walls/HardenedAstralSandWallSafe.cs rename to Walls/UnsafeWalls/UnsafeHardenedAstralSandWall.cs index f95658aff1..ebf7d57c2b 100644 --- a/Walls/HardenedAstralSandWallSafe.cs +++ b/Walls/UnsafeWalls/UnsafeHardenedAstralSandWall.cs @@ -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; diff --git a/Walls/UnsafeWalls/UnsafeNavystoneWall.cs b/Walls/UnsafeWalls/UnsafeNavystoneWall.cs new file mode 100644 index 0000000000..4253d42fa2 --- /dev/null +++ b/Walls/UnsafeWalls/UnsafeNavystoneWall.cs @@ -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; + } + } +} diff --git a/Walls/SulphurousSandWallSafe.cs b/Walls/UnsafeWalls/UnsafeSulphurousSandWall.cs similarity index 77% rename from Walls/SulphurousSandWallSafe.cs rename to Walls/UnsafeWalls/UnsafeSulphurousSandWall.cs index e757dc2851..8f8caa9554 100644 --- a/Walls/SulphurousSandWallSafe.cs +++ b/Walls/UnsafeWalls/UnsafeSulphurousSandWall.cs @@ -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)); } diff --git a/Walls/SulphurousSandstoneWallSafe.cs b/Walls/UnsafeWalls/UnsafeSulphurousSandstoneWall.cs similarity index 77% rename from Walls/SulphurousSandstoneWallSafe.cs rename to Walls/UnsafeWalls/UnsafeSulphurousSandstoneWall.cs index 8a7091113c..a39c9f24fc 100644 --- a/Walls/SulphurousSandstoneWallSafe.cs +++ b/Walls/UnsafeWalls/UnsafeSulphurousSandstoneWall.cs @@ -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)); } diff --git a/Walls/SulphurousShaleWallSafe.cs b/Walls/UnsafeWalls/UnsafeSulphurousShaleWall.cs similarity index 77% rename from Walls/SulphurousShaleWallSafe.cs rename to Walls/UnsafeWalls/UnsafeSulphurousShaleWall.cs index d0e37e5a12..cbd6f77b3a 100644 --- a/Walls/SulphurousShaleWallSafe.cs +++ b/Walls/UnsafeWalls/UnsafeSulphurousShaleWall.cs @@ -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)); } diff --git a/Walls/VoidstoneWallUnsafe.cs b/Walls/UnsafeWalls/UnsafeVoidstoneWall.cs similarity index 97% rename from Walls/VoidstoneWallUnsafe.cs rename to Walls/UnsafeWalls/UnsafeVoidstoneWall.cs index 2f8aa9fc12..54954c556a 100644 --- a/Walls/VoidstoneWallUnsafe.cs +++ b/Walls/UnsafeWalls/UnsafeVoidstoneWall.cs @@ -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"; diff --git a/World/Abyss.cs b/World/Abyss.cs index 9a563fdc90..676ad09e8c 100644 --- a/World/Abyss.cs +++ b/World/Abyss.cs @@ -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(); - tile.WallType = (ushort)ModContent.WallType(); + tile.WallType = (ushort)ModContent.WallType(); } //layer 3-4 dithering transition else if (Y <= rockLayer - (int)((y - 200) * 0.59f) && WorldGen.genRand.NextBool(2)) { tile.TileType = (ushort)ModContent.TileType(); - tile.WallType = (ushort)ModContent.WallType(); + tile.WallType = (ushort)ModContent.WallType(); } //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(); - tile.WallType = (ushort)ModContent.WallType(); + tile.WallType = (ushort)ModContent.WallType(); } //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(); - tile.WallType = (ushort)ModContent.WallType(); + tile.WallType = (ushort)ModContent.WallType(); } else { tile.TileType = (ushort)ModContent.TileType(); - tile.WallType = (ushort)ModContent.WallType(); + tile.WallType = (ushort)ModContent.WallType(); } } //layer 1 else { tile.TileType = (ushort)ModContent.TileType(); - tile.WallType = (ushort)ModContent.WallType(); + tile.WallType = (ushort)ModContent.WallType(); } } //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(); - tile.WallType = (ushort)ModContent.WallType(); + tile.WallType = (ushort)ModContent.WallType(); } //layer 3-4 dithering transition else if (Y <= rockLayer - (int)((y - 200) * 0.59f) && WorldGen.genRand.NextBool(2)) { tile.TileType = (ushort)ModContent.TileType(); - tile.WallType = (ushort)ModContent.WallType(); + tile.WallType = (ushort)ModContent.WallType(); } //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(); - tile.WallType = (ushort)ModContent.WallType(); + tile.WallType = (ushort)ModContent.WallType(); } //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(); - tile.WallType = (ushort)ModContent.WallType(); + tile.WallType = (ushort)ModContent.WallType(); } else { tile.TileType = (ushort)ModContent.TileType(); - tile.WallType = (ushort)ModContent.WallType(); + tile.WallType = (ushort)ModContent.WallType(); } } //layer 1 else { tile.TileType = (ushort)ModContent.TileType(); - tile.WallType = (ushort)ModContent.WallType(); + tile.WallType = (ushort)ModContent.WallType(); } } } @@ -207,13 +208,13 @@ namespace CalamityMod.World if (Y > (rockLayer + y * 0.270)) { tile.TileType = (ushort)ModContent.TileType(); - tile.WallType = (ushort)ModContent.WallType(); + tile.WallType = (ushort)ModContent.WallType(); } //layer 3-4 dithering transition else if (Y > (rockLayer + y * 0.268) && WorldGen.genRand.NextBool(2)) { tile.TileType = (ushort)ModContent.TileType(); - tile.WallType = (ushort)ModContent.WallType(); + tile.WallType = (ushort)ModContent.WallType(); } //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(); - tile.WallType = (ushort)ModContent.WallType(); + tile.WallType = (ushort)ModContent.WallType(); } else { tile.TileType = (ushort)ModContent.TileType(); - tile.WallType = (ushort)ModContent.WallType(); + tile.WallType = (ushort)ModContent.WallType(); } } //layer 1 else if (Y <= rockLayer - 10) { tile.TileType = (ushort)ModContent.TileType(); - tile.WallType = (ushort)ModContent.WallType(); + tile.WallType = (ushort)ModContent.WallType(); } //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(); - tile.WallType = (ushort)ModContent.WallType(); + tile.WallType = (ushort)ModContent.WallType(); } //layer 3-4 dithering transition else if (Y > (rockLayer + y * 0.268) && WorldGen.genRand.NextBool(2)) { tile.TileType = (ushort)ModContent.TileType(); - tile.WallType = (ushort)ModContent.WallType(); + tile.WallType = (ushort)ModContent.WallType(); } //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(); - tile.WallType = (ushort)ModContent.WallType(); + tile.WallType = (ushort)ModContent.WallType(); } else { tile.TileType = (ushort)ModContent.TileType(); - tile.WallType = (ushort)ModContent.WallType(); + tile.WallType = (ushort)ModContent.WallType(); } } //layer 1 else if (Y <= rockLayer - 10) { tile.TileType = (ushort)ModContent.TileType(); - tile.WallType = (ushort)ModContent.WallType(); + tile.WallType = (ushort)ModContent.WallType(); } //layer 2 (default block for the abyss) else diff --git a/World/AstralBiome.cs b/World/AstralBiome.cs index 40f0d73511..ddfd043bb4 100644 --- a/World/AstralBiome.cs +++ b/World/AstralBiome.cs @@ -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() && wallType != ModContent.WallType() && - wallType != ModContent.WallType() && wallType != ModContent.WallType() && - wallType != ModContent.WallType() && wallType != ModContent.WallType() && - wallType != ModContent.WallType() && wallType != ModContent.WallType() && + if (wallType != WallID.None && wallType != ModContent.WallType() && wallType != ModContent.WallType() && + wallType != ModContent.WallType() && wallType != ModContent.WallType() && + wallType != ModContent.WallType() && wallType != ModContent.WallType() && + wallType != ModContent.WallType() && wallType != ModContent.WallType() && wallType != ModContent.WallType()) { if (WallID.Sets.Conversion.Grass[wallType]) { - Main.tile[x, y].WallType = (ushort)ModContent.WallType(); + Main.tile[x, y].WallType = (ushort)ModContent.WallType(); 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(); + Main.tile[x, y].WallType = (ushort)ModContent.WallType(); 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(); + Main.tile[x, y].WallType = (ushort)ModContent.WallType(); 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(); + Main.tile[x, y].WallType = (ushort)ModContent.WallType(); 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(); + Main.tile[x, y].WallType = (ushort)ModContent.WallType(); WorldGen.SquareWallFrame(x, y, true); NetMessage.SendTileSquare(-1, x, y, 1); break; case WallID.SnowWallUnsafe: - Main.tile[x, y].WallType = (ushort)ModContent.WallType(); + Main.tile[x, y].WallType = (ushort)ModContent.WallType(); 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(); + Main.tile[x, y].WallType = (ushort)ModContent.WallType(); 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()) + if (wallType == ModContent.WallType()) { Main.tile[x, y].WallType = WallID.DirtUnsafe; } - else if (wallType == ModContent.WallType() || wallType == ModContent.WallType()) + else if (wallType == ModContent.WallType() || wallType == ModContent.WallType()) { 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()) + else if (wallType == ModContent.WallType()) { switch (convert) { @@ -1204,15 +1205,15 @@ namespace CalamityMod.World break; } } - else if (wallType == ModContent.WallType()) + else if (wallType == ModContent.WallType()) { Main.tile[x, y].WallType = WallID.IceUnsafe; } else if (wallType == ModContent.WallType()) { - Main.tile[x, y].WallType = WallID.LivingWood; + Main.tile[x, y].WallType = WallID.LivingWoodUnsafe; } - else if (wallType == ModContent.WallType()) + else if (wallType == ModContent.WallType()) { switch (convert) { diff --git a/World/BrimstoneCrag.cs b/World/BrimstoneCrag.cs index 68bd573d06..d984d756f6 100644 --- a/World/BrimstoneCrag.cs +++ b/World/BrimstoneCrag.cs @@ -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(); tile.HasTile = true; - tile.WallType = (ushort)ModContent.WallType(); + tile.WallType = (ushort)ModContent.WallType(); } } @@ -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(); + Main.tile[x, y + 5].WallType = (ushort)ModContent.WallType(); } if (tile.LiquidType == LiquidID.Water && tile.LiquidAmount > 0) diff --git a/World/DraedonStructures.cs b/World/DraedonStructures.cs index 9b34b7222f..d4f69609b4 100644 --- a/World/DraedonStructures.cs +++ b/World/DraedonStructures.cs @@ -51,7 +51,7 @@ namespace CalamityMod.World tile.TileType == ModContent.TileType() || tile.TileType == ModContent.TileType() || tile.TileType == ModContent.TileType() || tile.TileType == ModContent.TileType() || tile.TileType == ModContent.TileType() || tile.TileType == ModContent.TileType() || tile.WallType == ModContent.WallType() || // hardened eutrophic sand doesnt have a wall lol - tile.WallType == ModContent.WallType() || tile.WallType == ModContent.WallType() || + tile.WallType == ModContent.WallType() || tile.WallType == ModContent.WallType() || // nor polyp sand tile.WallType == ModContent.WallType()) // ... nor dunesand { diff --git a/World/SulphurousSea.cs b/World/SulphurousSea.cs index 7d8174109c..34ec893c17 100644 --- a/World/SulphurousSea.cs +++ b/World/SulphurousSea.cs @@ -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(); - ushort wallID = (ushort)ModContent.WallType(); + ushort wallID = (ushort)ModContent.WallType(); 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(); + Main.tile[x, y + WorldGen.genRand.Next(22, 25)].WallType = (ushort)ModContent.WallType(); Main.tile[x, y].LiquidAmount = byte.MaxValue; Main.tile[x, y].Get().HasTile = false; } @@ -343,7 +344,7 @@ namespace CalamityMod.World int right = (int)(BiomeWidth * IslandWidthPercentage); int maxDepth = MaxTopWaterDepth; ushort blockTileType = (ushort)ModContent.TileType(); - ushort wallID = (ushort)ModContent.WallType(); + ushort wallID = (ushort)ModContent.WallType(); for (int i = left; i < right; i++) { @@ -384,7 +385,7 @@ namespace CalamityMod.World if (maxCaveWidth > 15) maxCaveWidth = 15; - ushort wallID = (ushort)ModContent.WallType(); + ushort wallID = (ushort)ModContent.WallType(); 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(); + ushort wallID = (ushort)ModContent.WallType(); 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(); + ushort wallID = (ushort)ModContent.WallType(); 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(); - ushort wallID = (ushort)ModContent.WallType(); + ushort wallID = (ushort)ModContent.WallType(); // 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(); - ushort sandstoneWallID = (ushort)ModContent.WallType(); + ushort sandstoneWallID = (ushort)ModContent.WallType(); // 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(); + Main.tile[chestPoint.X + dx, chestPoint.Y - dy].WallType = (ushort)ModContent.WallType(); Main.tile[chestPoint.X + dx, chestPoint.Y - dy].Get().HasTile = false; } } @@ -1578,7 +1579,7 @@ namespace CalamityMod.World int depth = BlockDepth; ushort columnID = (ushort)ModContent.TileType(); ushort hardenedSandstoneWallID = (ushort)ModContent.WallType(); - ushort sandWallID = (ushort)ModContent.WallType(); + ushort sandWallID = (ushort)ModContent.WallType(); short variantFrameOffset = (short)(WorldGen.genRand.Next(3) * 36); for (int x = left; x < left + 2; x++) diff --git a/World/SunkenSea.cs b/World/SunkenSea.cs index a0c5c0eb08..260ba2ab06 100644 --- a/World/SunkenSea.cs +++ b/World/SunkenSea.cs @@ -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(); - ushort NavystoneWall = (ushort)ModContent.WallType(); + ushort NavystoneWall = (ushort)ModContent.WallType(); @@ -989,7 +990,7 @@ namespace CalamityMod.World Vector2 bottomFoci = center + fociOffset; ushort Navystone = (ushort)ModContent.TileType(); - ushort NavystoneWall = (ushort)ModContent.WallType(); + ushort NavystoneWall = (ushort)ModContent.WallType(); 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(), true, 0f, 0f, true, true); - t.WallType = (ushort)ModContent.WallType(); + t.WallType = (ushort)ModContent.WallType(); } //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()), new Actions.PlaceWall((ushort)ModContent.WallType()) + new Actions.ClearTile(), new Actions.PlaceTile((ushort)ModContent.TileType()), new Actions.PlaceWall((ushort)ModContent.WallType()) })); } } @@ -1143,8 +1144,8 @@ namespace CalamityMod.World } //Tunnels - MiscWorldgenRoutines.ClearTunnel(startX - 200, startY + 40, newTunnelXLeft, newTunnelYLeft, 3, (ushort)ModContent.WallType(), 2, false, false); - MiscWorldgenRoutines.ClearTunnel(startX + 200, startY + 40, newTunnelXRight, newTunnelYRight, 3, (ushort)ModContent.WallType(), 2, false, false); + MiscWorldgenRoutines.ClearTunnel(startX - 200, startY + 40, newTunnelXLeft, newTunnelYLeft, 3, (ushort)ModContent.WallType(), 2, false, false); + MiscWorldgenRoutines.ClearTunnel(startX + 200, startY + 40, newTunnelXRight, newTunnelYRight, 3, (ushort)ModContent.WallType(), 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(); + t.WallType = (ushort)ModContent.WallType(); } Main.tile[X, Y].Get().LiquidType = LiquidID.Water; diff --git a/World/UndergroundShrines.cs b/World/UndergroundShrines.cs index 199fd4b84a..b5b3f95e9d 100644 --- a/World/UndergroundShrines.cs +++ b/World/UndergroundShrines.cs @@ -47,8 +47,7 @@ namespace CalamityMod.World } if (tile.TileType == TileType() || tile.TileType == TileType() || - tile.WallType == WallType() || - tile.WallType == WallType()) + tile.WallType == WallType()) { return true; }