you blinked

This commit is contained in:
GinYuH committed 2026-06-03 22:41:04 -07:00
1 parent 234bc89337
commit b2a835ee43
4 files changed
+32 -11

No files matched your search

@@ -108,12 +108,12 @@ HermitsBoxofOneHundredMedicines: {
IronBall: {
DisplayName: Iron Ball
Tooltip:
'''
Summons a living iron ball
<left> the pet to pet it
<right> the pet to have it sit on your shoulder
'''
Tooltip:
'''
Summons a living iron ball
<left> the pet to pet it
<right> the pet to have it sit on your shoulder
'''
}
JoyfulHeart: {
+23 -2
View File
@@ -17,7 +17,7 @@ namespace CalamityMod.Projectiles.Pets
public override void SetStaticDefaults()
{
Main.projPet[Type] = true;
Main.projFrames[Type] = 4;
ProjectileID.Sets.CharacterPreviewAnimations[Type] = ProjectileID.Sets.SimpleLoop(0, 0, 1)
.WithOffset(-8f, -20f).WithSpriteDirection(-1).WhenNotSelected(0, 0);
}
@@ -121,6 +121,27 @@ namespace CalamityMod.Projectiles.Pets
Projectile.rotation = 0;
Projectile.spriteDirection = -player.direction;
}
if (Main.rand.NextBool(600) && Projectile.ai[2] == 0)
{
Projectile.ai[2] = 1;
}
if (Projectile.ai[2] == 1)
{
Projectile.frameCounter++;
if (Projectile.frameCounter > 3)
{
Projectile.frameCounter = 0;
Projectile.frame++;
}
if (Projectile.frame > 3)
{
Projectile.frame = 0;
Projectile.ai[2] = 0;
}
}
}
public void PlayerPetting()
@@ -145,7 +166,7 @@ namespace CalamityMod.Projectiles.Pets
SpriteEffects fx = Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None;
if (Main.player[Projectile.owner].gravDir == -1)
fx |= SpriteEffects.FlipVertically;
Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition + Vector2.UnitY * MathF.Cos(Projectile.ai[0] * 0.05f) * (Projectile.ai[1] == 0 ? 10 : 2), null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2, Projectile.scale, fx);
Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition + Vector2.UnitY * MathF.Cos(Projectile.ai[0] * 0.05f) * (Projectile.ai[1] == 0 ? 10 : 2), tex.Frame(1, 4, 0, Projectile.frame), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(tex.Width / 2, tex.Height / Main.projFrames[Type] / 2), Projectile.scale, fx);
return false;
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 731 B

After

Width:  |  Height:  |  Size: 746 B

+3 -3
View File
@@ -636,7 +636,7 @@ namespace CalamityMod.World
#endregion
#region Cavern Lab
public static void FillCavernLaboratoryChest(Chest chest, int useless)
public static void FillCavernLaboratoryChest(Chest chest)
{
int potionType = Utils.SelectRandom(WorldGen.genRand, ItemID.EndurancePotion, ItemID.GravitationPotion, ItemID.HeartreachPotion, ItemID.LifeforcePotion);
List<ChestItem> contents = new List<ChestItem>()
@@ -701,8 +701,8 @@ namespace CalamityMod.World
tries++;
else
{
bool placedBeldum = false;
PlaceSchematic(mapKey, new Point(placementPoint.X, placementPoint.Y), SchematicAnchor.TopLeft, ref placedBeldum, new Action<Chest, int>(FillCavernLaboratoryChest));
bool _ = false;
PlaceSchematic(mapKey, new Point(placementPoint.X, placementPoint.Y), SchematicAnchor.TopLeft, ref _, new Action<Chest>(FillCavernLaboratoryChest));
CalamityUtils.AddProtectedStructure(new Rectangle(placementPoint.X, placementPoint.Y, (int)schematicSize.X, (int)schematicSize.Y), 20);
CalamityWorld.CavernLabCenter = placementPoint.ToWorldCoordinates() + new Vector2(TileMaps[mapKey].GetLength(0), TileMaps[mapKey].GetLength(1)) * 8f;
break;