This commit formats the entire codebase according to `dotnet format` and its limited understanding of our provided `.editorconfig`.
27 lines
944 B
C#
27 lines
944 B
C#
using CalamityMod.Projectiles.Pets;
|
|
using Microsoft.Xna.Framework;
|
|
using Terraria;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Buffs.Pets
|
|
{
|
|
public class LittleLightBuff : ModBuff
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
Main.buffNoTimeDisplay[Type] = true;
|
|
Main.lightPet[Type] = true;
|
|
}
|
|
|
|
public override void Update(Player player, ref int buffIndex)
|
|
{
|
|
player.buffTime[buffIndex] = 18000;
|
|
|
|
player.Calamity().littleLightPet = true;
|
|
bool petProjectileNotSpawned = player.ownedProjectileCounts[ModContent.ProjectileType<LittleLightProj>()] <= 0;
|
|
if (petProjectileNotSpawned && player.whoAmI == Main.myPlayer)
|
|
Projectile.NewProjectile(player.GetSource_Buff(buffIndex), player.Center, -Vector2.UnitY * 10f, ModContent.ProjectileType<LittleLightProj>(), 0, 0f, player.whoAmI, 0f, 0f);
|
|
}
|
|
}
|
|
}
|