Files
CalamityModPublic/Utilities/GeneralExtensionUtils.cs
T
Xyk 5cce27d9b4 Applying Ozz Feedback
- Added a Util for checking if an enemy can be moved and put it where applicable
- Removed old Grand Guardian projectiles that were unused
- Renamed NPC.FallDamage functions
- Re-added mm2wood reference to the Grand Dad tooltip, since the tooltip now explains right click.
- Adjusted Majectic Guard usetime
2024-06-17 23:51:01 +02:00

20 lines
1.0 KiB
C#

using CalamityMod.CalPlayer;
using CalamityMod.Items;
using CalamityMod.NPCs;
using CalamityMod.Projectiles;
using Terraria;
namespace CalamityMod
{
public static partial class CalamityUtils
{
public static CalamityPlayer Calamity(this Player player) => player.GetModPlayer<CalamityPlayer>();
public static CalamityGlobalNPC Calamity(this NPC npc) => npc.GetGlobalNPC<CalamityGlobalNPC>();
public static CalamityTileCollisionHarmNPC FlungNPC(this NPC npc) => npc.GetGlobalNPC<CalamityTileCollisionHarmNPC>();
public static CalamityPolarityNPC PolarityNPC(this NPC npc) => npc.GetGlobalNPC<CalamityPolarityNPC>();
public static CalamityGlobalItem Calamity(this Item item) => item.GetGlobalItem<CalamityGlobalItem>();
public static CalamityGlobalProjectile Calamity(this Projectile proj) => proj.GetGlobalProjectile<CalamityGlobalProjectile>();
public static Item ActiveItem(this Player player) => Main.mouseItem.IsAir ? player.HeldItem : Main.mouseItem;
}
}