From da373e47c49b60333993fb7531dda75e843f07ce Mon Sep 17 00:00:00 2001 From: fryzahh Date: Sun, 5 Apr 2026 13:24:03 -0400 Subject: [PATCH] New Piggy Sprites (not animated) * Added the new, proper Piggy and Gold Piggy sprites. Note that these aren't currently animated. --- NPCs/NormalNPCs/Piggy.cs | 60 +++++++++++++++++----------------- NPCs/NormalNPCs/Piggy.png | Bin 646 -> 373 bytes NPCs/NormalNPCs/PiggyGold.png | Bin 646 -> 373 bytes 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/NPCs/NormalNPCs/Piggy.cs b/NPCs/NormalNPCs/Piggy.cs index 98223f13c2..b8cd0625be 100644 --- a/NPCs/NormalNPCs/Piggy.cs +++ b/NPCs/NormalNPCs/Piggy.cs @@ -39,7 +39,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetStaticDefaults() { - Main.npcFrameCount[Type] = 5; + Main.npcFrameCount[Type] = 1; Main.npcCatchable[Type] = true; NPCID.Sets.CountsAsCritter[Type] = true; NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() @@ -274,34 +274,34 @@ namespace CalamityMod.NPCs.NormalNPCs public override void FindFrame(int frameHeight) { - if (NPC.velocity.Y == 0f) - { - if (!NPC.IsABestiaryIconDummy) - { - if (NPC.velocity.X == 0f) - { - NPC.frame.Y = 0; - NPC.frameCounter = 0.0; - return; - } - } - NPC.frameCounter += NPC.IsABestiaryIconDummy ? 0.6f : Math.Abs(NPC.velocity.X) * 0.25f; - NPC.frameCounter += 1.0; - if (NPC.frameCounter > 12.0) - { - NPC.frame.Y = NPC.frame.Y + frameHeight; - NPC.frameCounter = 0.0; - } - if (NPC.frame.Y / frameHeight >= Main.npcFrameCount[Type] - 1) - { - NPC.frame.Y = frameHeight; - } - } - else - { - NPC.frameCounter = 0.0; - NPC.frame.Y = frameHeight * 2; - } + //if (NPC.velocity.Y == 0f) + //{ + // if (!NPC.IsABestiaryIconDummy) + // { + // if (NPC.velocity.X == 0f) + // { + // NPC.frame.Y = 0; + // NPC.frameCounter = 0.0; + // return; + // } + // } + // NPC.frameCounter += NPC.IsABestiaryIconDummy ? 0.6f : Math.Abs(NPC.velocity.X) * 0.25f; + // NPC.frameCounter += 1.0; + // if (NPC.frameCounter > 12.0) + // { + // NPC.frame.Y = NPC.frame.Y + frameHeight; + // NPC.frameCounter = 0.0; + // } + // if (NPC.frame.Y / frameHeight >= Main.npcFrameCount[Type] - 1) + // { + // NPC.frame.Y = frameHeight; + // } + //} + //else + //{ + // NPC.frameCounter = 0.0; + // NPC.frame.Y = frameHeight * 2; + //} } public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) @@ -312,7 +312,7 @@ namespace CalamityMod.NPCs.NormalNPCs Texture2D baseTexture = TextureAssets.Npc[Type].Value; Vector2 scale = SquashVector * NPC.scale; SpriteEffects spriteEffects = NPC.spriteDirection < 0 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; - spriteBatch.Draw(baseTexture, NPC.Center - screenPos + Vector2.UnitY * (NPC.gfxOffY + 4f), NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, NPC.frame.Size() * 0.5f, scale, spriteEffects, 0f); + spriteBatch.Draw(baseTexture, NPC.Center - screenPos + Vector2.UnitY * NPC.gfxOffY, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, NPC.frame.Size() * 0.5f, scale, spriteEffects, 0f); return false; } } diff --git a/NPCs/NormalNPCs/Piggy.png b/NPCs/NormalNPCs/Piggy.png index af2b0b2d0bec15f4da0226d3cfc0476b4b29ed39..47f2d4067f0a5a98c68c39b9279e5fb5ab908a38 100644 GIT binary patch delta 352 zcmZo;{mP`+8Q|y6%O%Cdz`(%k>ERLtq_u!phJzVMD%jn96OORFL1Ha-sYmuh6|Q_ zeo{J1V3tL4BGNC delta 627 zcmV-(0*w9j0)_=4iBL{Q4GJ0x0000DNk~Le0000a0001j2m=5B02!N_S&<VGd00HMoL_t(oN9~ud@hf?}$f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d{#8%;@kW=`Q zL9OB<#FQqc3*RZV0eN9<^c&PpF{t?^rv$A-hXgq#NRU&4BsnDrN!(b@|Np@e!oip< z79z^2Lu?hhsg1YCLxY#lwaC=p9$T_q$guX~7smS#F%vS5_n~=6&<8cqKFv(5x8?u< N002ovPDHLkV1f