diff --git a/Gores/AngryDog/AngryDog.png b/Gores/AngryDog/AngryDog.png new file mode 100644 index 0000000000..46feec27ff Binary files /dev/null and b/Gores/AngryDog/AngryDog.png differ diff --git a/Gores/AngryDog/AngryDog2.png b/Gores/AngryDog/AngryDog2.png new file mode 100644 index 0000000000..870191ca8d Binary files /dev/null and b/Gores/AngryDog/AngryDog2.png differ diff --git a/Gores/AngryDog/AngryDog3.png b/Gores/AngryDog/AngryDog3.png new file mode 100644 index 0000000000..4624401a88 Binary files /dev/null and b/Gores/AngryDog/AngryDog3.png differ diff --git a/Gores/AngryDog/AngryDog4.png b/Gores/AngryDog/AngryDog4.png new file mode 100644 index 0000000000..7f94e64011 Binary files /dev/null and b/Gores/AngryDog/AngryDog4.png differ diff --git a/Gores/ArmoredDigger/ArmoredDiggerBody.png b/Gores/ArmoredDigger/ArmoredDiggerBody.png new file mode 100644 index 0000000000..082eb57526 Binary files /dev/null and b/Gores/ArmoredDigger/ArmoredDiggerBody.png differ diff --git a/Gores/ArmoredDigger/ArmoredDiggerBody2.png b/Gores/ArmoredDigger/ArmoredDiggerBody2.png new file mode 100644 index 0000000000..a7a22f0697 Binary files /dev/null and b/Gores/ArmoredDigger/ArmoredDiggerBody2.png differ diff --git a/Gores/ArmoredDigger/ArmoredDiggerHead.png b/Gores/ArmoredDigger/ArmoredDiggerHead.png new file mode 100644 index 0000000000..7debb48e29 Binary files /dev/null and b/Gores/ArmoredDigger/ArmoredDiggerHead.png differ diff --git a/Gores/ArmoredDigger/ArmoredDiggerHead2.png b/Gores/ArmoredDigger/ArmoredDiggerHead2.png new file mode 100644 index 0000000000..c1fe479da5 Binary files /dev/null and b/Gores/ArmoredDigger/ArmoredDiggerHead2.png differ diff --git a/Gores/ArmoredDigger/ArmoredDiggerTail.png b/Gores/ArmoredDigger/ArmoredDiggerTail.png new file mode 100644 index 0000000000..6a30219a5b Binary files /dev/null and b/Gores/ArmoredDigger/ArmoredDiggerTail.png differ diff --git a/Gores/ArmoredDigger/ArmoredDiggerTail2.png b/Gores/ArmoredDigger/ArmoredDiggerTail2.png new file mode 100644 index 0000000000..616e848530 Binary files /dev/null and b/Gores/ArmoredDigger/ArmoredDiggerTail2.png differ diff --git a/Gores/Bloatfish/Bloatfish.png b/Gores/Bloatfish/Bloatfish.png new file mode 100644 index 0000000000..0ac9d6cf4e Binary files /dev/null and b/Gores/Bloatfish/Bloatfish.png differ diff --git a/Gores/Bloatfish/Bloatfish2.png b/Gores/Bloatfish/Bloatfish2.png new file mode 100644 index 0000000000..4cbb6541d2 Binary files /dev/null and b/Gores/Bloatfish/Bloatfish2.png differ diff --git a/Gores/Bloatfish/Bloatfish3.png b/Gores/Bloatfish/Bloatfish3.png new file mode 100644 index 0000000000..821a92fa37 Binary files /dev/null and b/Gores/Bloatfish/Bloatfish3.png differ diff --git a/Gores/Bohldohr/Bohldohr.png b/Gores/Bohldohr/Bohldohr.png new file mode 100644 index 0000000000..924ce1bbac Binary files /dev/null and b/Gores/Bohldohr/Bohldohr.png differ diff --git a/Gores/Bohldohr/Bohldohr2.png b/Gores/Bohldohr/Bohldohr2.png new file mode 100644 index 0000000000..148db3d79e Binary files /dev/null and b/Gores/Bohldohr/Bohldohr2.png differ diff --git a/Gores/Bohldohr/Bohldohr3.png b/Gores/Bohldohr/Bohldohr3.png new file mode 100644 index 0000000000..62ca6d4adb Binary files /dev/null and b/Gores/Bohldohr/Bohldohr3.png differ diff --git a/Gores/CalamityEye/CalamityEye.png b/Gores/CalamityEye/CalamityEye.png new file mode 100644 index 0000000000..29f8ba31f3 Binary files /dev/null and b/Gores/CalamityEye/CalamityEye.png differ diff --git a/Gores/CalamityEye/CalamityEye2.png b/Gores/CalamityEye/CalamityEye2.png new file mode 100644 index 0000000000..06b4bb0396 Binary files /dev/null and b/Gores/CalamityEye/CalamityEye2.png differ diff --git a/Gores/Catfish/Catfish.png b/Gores/Catfish/Catfish.png new file mode 100644 index 0000000000..8e7e9d1fde Binary files /dev/null and b/Gores/Catfish/Catfish.png differ diff --git a/Gores/Catfish/Catfish2.png b/Gores/Catfish/Catfish2.png new file mode 100644 index 0000000000..f53edbf909 Binary files /dev/null and b/Gores/Catfish/Catfish2.png differ diff --git a/Items/Placeables/AstralBar.cs b/Items/Placeables/AstralBar.cs index 84c3802272..f2f71c90a0 100644 --- a/Items/Placeables/AstralBar.cs +++ b/Items/Placeables/AstralBar.cs @@ -1,6 +1,7 @@ - -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Ores; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -9,6 +10,8 @@ namespace CalamityMod.Items.Placeables { public class AstralBar : ModItem { + public int frameCounter = 0; + public int frame = 0; public override void SetStaticDefaults() { SacrificeTotal = 25; @@ -25,13 +28,27 @@ namespace CalamityMod.Items.Placeables Item.useTime = 10; Item.autoReuse = true; Item.consumable = true; - Item.width = 16; - Item.height = 16; + Item.width = 32; + Item.height = 26; Item.maxStack = 99; Item.rare = ItemRarityID.Cyan; Item.value = Item.sellPrice(gold: 1, silver: 20); } + public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale) + { + Texture2D texture = ModContent.Request("CalamityMod/Items/Placeables/AstralBar_Animated").Value; + spriteBatch.Draw(texture, position, Item.GetCurrentFrame(ref frame, ref frameCounter, 5, 12), Color.White, 0f, origin, scale, SpriteEffects.None, 0); + return false; + } + + public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI) + { + Texture2D texture = ModContent.Request("CalamityMod/Items/Placeables/AstralBar_Animated").Value; + spriteBatch.Draw(texture, Item.position - Main.screenPosition, Item.GetCurrentFrame(ref frame, ref frameCounter, 5, 12), lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + return false; + } + public override void AddRecipes() { CreateRecipe(). diff --git a/Items/Placeables/AstralBar.png b/Items/Placeables/AstralBar.png index 02fc188d90..c2612646b3 100644 Binary files a/Items/Placeables/AstralBar.png and b/Items/Placeables/AstralBar.png differ diff --git a/Items/Placeables/AstralBar_Animated.png b/Items/Placeables/AstralBar_Animated.png new file mode 100644 index 0000000000..8e3f94d023 Binary files /dev/null and b/Items/Placeables/AstralBar_Animated.png differ diff --git a/Items/Placeables/Ores/AstralOre.cs b/Items/Placeables/Ores/AstralOre.cs index b275f533e8..02067398d3 100644 --- a/Items/Placeables/Ores/AstralOre.cs +++ b/Items/Placeables/Ores/AstralOre.cs @@ -22,8 +22,8 @@ namespace CalamityMod.Items.Placeables.Ores Item.useTime = 10; Item.autoReuse = true; Item.consumable = true; - Item.width = 20; - Item.height = 20; + Item.width = 22; + Item.height = 22; Item.maxStack = 999; Item.value = Item.sellPrice(silver: 36); Item.rare = ItemRarityID.Cyan; diff --git a/Items/Placeables/Ores/AstralOre.png b/Items/Placeables/Ores/AstralOre.png index 04505d6b67..f9696766e8 100644 Binary files a/Items/Placeables/Ores/AstralOre.png and b/Items/Placeables/Ores/AstralOre.png differ diff --git a/Items/Placeables/SulphurousSand.png b/Items/Placeables/SulphurousSand.png index a82d997ffc..3f107b1beb 100644 Binary files a/Items/Placeables/SulphurousSand.png and b/Items/Placeables/SulphurousSand.png differ diff --git a/Items/Placeables/SulphurousSandstone.png b/Items/Placeables/SulphurousSandstone.png index 26581b34dc..4c0d67f7be 100644 Binary files a/Items/Placeables/SulphurousSandstone.png and b/Items/Placeables/SulphurousSandstone.png differ diff --git a/Items/Placeables/Walls/SulphurousSandWall.png b/Items/Placeables/Walls/SulphurousSandWall.png index b601fb2d9b..222fbcab01 100644 Binary files a/Items/Placeables/Walls/SulphurousSandWall.png and b/Items/Placeables/Walls/SulphurousSandWall.png differ diff --git a/NPCs/Abyss/Bloatfish.cs b/NPCs/Abyss/Bloatfish.cs index d2438fb90d..dfafd241b9 100644 --- a/NPCs/Abyss/Bloatfish.cs +++ b/NPCs/Abyss/Bloatfish.cs @@ -209,6 +209,12 @@ namespace CalamityMod.NPCs.Abyss { Dust.NewDust(NPC.position, NPC.width, NPC.height, 5, hitDirection, -1f, 0, default, 1f); } + if (Main.netMode != NetmodeID.Server) + { + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("Bloatfish").Type, NPC.scale); + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("Bloatfish2").Type, NPC.scale); + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("Bloatfish3").Type, NPC.scale); + } } if (NPC.scale < 2f) { diff --git a/NPCs/Crags/CalamityEye.cs b/NPCs/Crags/CalamityEye.cs index ec599fd0f9..cb5982e2b1 100644 --- a/NPCs/Crags/CalamityEye.cs +++ b/NPCs/Crags/CalamityEye.cs @@ -120,6 +120,11 @@ namespace CalamityMod.NPCs.Crags { Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f); } + if (Main.netMode != NetmodeID.Server) + { + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("CalamityEye").Type, 1f); + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("CalamityEye2").Type, 1f); + } } } diff --git a/NPCs/NormalNPCs/ArmoredDiggerBody.cs b/NPCs/NormalNPCs/ArmoredDiggerBody.cs index a54dabc885..aa6e781dbc 100644 --- a/NPCs/NormalNPCs/ArmoredDiggerBody.cs +++ b/NPCs/NormalNPCs/ArmoredDiggerBody.cs @@ -140,6 +140,11 @@ namespace CalamityMod.NPCs.NormalNPCs { Dust.NewDust(NPC.position, NPC.width, NPC.height, 6, hitDirection, -1f, 0, default, 1f); } + if (Main.netMode != NetmodeID.Server) + { + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("ArmoredDiggerBody").Type, 1f); + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("ArmoredDiggerBody2").Type, 1f); + } } } diff --git a/NPCs/NormalNPCs/ArmoredDiggerHead.cs b/NPCs/NormalNPCs/ArmoredDiggerHead.cs index 35b0ee17f4..c48b8a4fba 100644 --- a/NPCs/NormalNPCs/ArmoredDiggerHead.cs +++ b/NPCs/NormalNPCs/ArmoredDiggerHead.cs @@ -421,6 +421,11 @@ namespace CalamityMod.NPCs.NormalNPCs { Dust.NewDust(NPC.position, NPC.width, NPC.height, 6, hitDirection, -1f, 0, default, 1f); } + if (Main.netMode != NetmodeID.Server) + { + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("ArmoredDiggerHead").Type, 1f); + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("ArmoredDiggerHead2").Type, 1f); + } } } diff --git a/NPCs/NormalNPCs/ArmoredDiggerTail.cs b/NPCs/NormalNPCs/ArmoredDiggerTail.cs index eda4a8aadb..ba6bd9c703 100644 --- a/NPCs/NormalNPCs/ArmoredDiggerTail.cs +++ b/NPCs/NormalNPCs/ArmoredDiggerTail.cs @@ -118,6 +118,11 @@ namespace CalamityMod.NPCs.NormalNPCs { Dust.NewDust(NPC.position, NPC.width, NPC.height, 6, hitDirection, -1f, 0, default, 1f); } + if (Main.netMode != NetmodeID.Server) + { + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("ArmoredDiggerTail").Type, 1f); + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("ArmoredDiggerTail2").Type, 1f); + } } } } diff --git a/NPCs/NormalNPCs/Bohldohr.cs b/NPCs/NormalNPCs/Bohldohr.cs index bc16d7c0ef..7fb5e4b8ba 100644 --- a/NPCs/NormalNPCs/Bohldohr.cs +++ b/NPCs/NormalNPCs/Bohldohr.cs @@ -71,6 +71,12 @@ namespace CalamityMod.NPCs.NormalNPCs { Dust.NewDust(NPC.position, NPC.width, NPC.height, 155, hitDirection, -1f, 0, default, 1f); } + if (Main.netMode != NetmodeID.Server) + { + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("Bohldohr").Type, 1f); + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("Bohldohr2").Type, 1f); + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("Bohldohr3").Type, 1f); + } } } diff --git a/NPCs/NormalNPCs/Rimehound.cs b/NPCs/NormalNPCs/Rimehound.cs index f95bc35d53..6a80ccb969 100644 --- a/NPCs/NormalNPCs/Rimehound.cs +++ b/NPCs/NormalNPCs/Rimehound.cs @@ -167,6 +167,13 @@ namespace CalamityMod.NPCs.NormalNPCs { Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f); } + if (Main.netMode != NetmodeID.Server) + { + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("AngryDog").Type, 1f); + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("AngryDog2").Type, 1f); + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("AngryDog3").Type, 1f); + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("AngryDog4").Type, 1f); + } } } diff --git a/NPCs/SulphurousSea/Catfish.cs b/NPCs/SulphurousSea/Catfish.cs index 0e63e5102f..d99dd79d73 100644 --- a/NPCs/SulphurousSea/Catfish.cs +++ b/NPCs/SulphurousSea/Catfish.cs @@ -123,6 +123,11 @@ namespace CalamityMod.NPCs.SulphurousSea { Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f); } + if (Main.netMode != NetmodeID.Server) + { + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("Catfish").Type, 1f); + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("Catfish2").Type, 1f); + } } } } diff --git a/Tiles/Abyss/SulphurousSand.png b/Tiles/Abyss/SulphurousSand.png index 180882767c..7a579b87f5 100644 Binary files a/Tiles/Abyss/SulphurousSand.png and b/Tiles/Abyss/SulphurousSand.png differ diff --git a/Tiles/Abyss/SulphurousSandstone.png b/Tiles/Abyss/SulphurousSandstone.png index 65eb36a150..61b5c56d80 100644 Binary files a/Tiles/Abyss/SulphurousSandstone.png and b/Tiles/Abyss/SulphurousSandstone.png differ diff --git a/Tiles/AstralBar.png b/Tiles/AstralBar.png index 0f33be340e..5d35fadbfd 100644 Binary files a/Tiles/AstralBar.png and b/Tiles/AstralBar.png differ diff --git a/Tiles/Ores/AstralOre.cs b/Tiles/Ores/AstralOre.cs index 3237365afd..39d7dc4764 100644 --- a/Tiles/Ores/AstralOre.cs +++ b/Tiles/Ores/AstralOre.cs @@ -1,6 +1,9 @@ using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Tiles.Astral; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -9,8 +12,13 @@ namespace CalamityMod.Tiles.Ores { public class AstralOre : ModTile { + internal static Texture2D GlowTexture; public override void SetStaticDefaults() { + if (!Main.dedServ) + { + GlowTexture = ModContent.Request("CalamityMod/Tiles/Ores/AstralOreGlow", AssetRequestMode.ImmediateLoad).Value; + } Main.tileLighted[Type] = true; Main.tileSolid[Type] = true; Main.tileBlockLight[Type] = true; @@ -79,5 +87,28 @@ namespace CalamityMod.Tiles.Ores TileFraming.CustomMergeFrame(i, j, Type, ModContent.TileType(), false, false, false, false, resetFrame); return false; } + + public override void PostDraw(int i, int j, SpriteBatch spriteBatch) + { + // If the cached textures don't exist for some reason, don't bother using them. + if (GlowTexture is null) + return; + + Tile tile = CalamityUtils.ParanoidTileRetrieval(i, j); + int xPos = tile.TileFrameX; + int frameOffset = (i + j) % 2 * AnimationFrameHeight; + int yPos = tile.TileFrameY + frameOffset; + Vector2 drawOffset = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange); + Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffset; + + if (!tile.IsHalfBlock && tile.Slope == 0) + { + spriteBatch.Draw(GlowTexture, drawPosition, new Rectangle?(new Rectangle(xPos, yPos, 18, 18)), Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f); + } + else if (tile.IsHalfBlock) + { + spriteBatch.Draw(GlowTexture, drawPosition + new Vector2(0f, 8f), new Rectangle?(new Rectangle(xPos, yPos, 18, 8)), Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f); + } + } } } diff --git a/Tiles/Ores/AstralOre.png b/Tiles/Ores/AstralOre.png index 0aca9d80b6..79bbef0832 100644 Binary files a/Tiles/Ores/AstralOre.png and b/Tiles/Ores/AstralOre.png differ diff --git a/Tiles/Ores/AstralOreGlow.png b/Tiles/Ores/AstralOreGlow.png new file mode 100644 index 0000000000..a312e8f668 Binary files /dev/null and b/Tiles/Ores/AstralOreGlow.png differ diff --git a/Walls/SulphurousSandWall.png b/Walls/SulphurousSandWall.png index 026db27ffb..71024bb5f2 100644 Binary files a/Walls/SulphurousSandWall.png and b/Walls/SulphurousSandWall.png differ diff --git a/Walls/SulphurousSandWallSafe.png b/Walls/SulphurousSandWallSafe.png index 026db27ffb..71024bb5f2 100644 Binary files a/Walls/SulphurousSandWallSafe.png and b/Walls/SulphurousSandWallSafe.png differ