IMPORTANT NOTE - In order to use a projectile that extends BaseCustomUseStyleProjectile, you have to make the item that shoots it extend CustomUseProjItem.
24 lines
505 B
C#
24 lines
505 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Terraria;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.BaseItems
|
|
{
|
|
public abstract class CustomUseProjItem : ModItem
|
|
{
|
|
public override void SetDefaults()
|
|
{
|
|
Item.channel = true;
|
|
}
|
|
|
|
public override bool CanShoot(Player player)
|
|
{
|
|
return player.ownedProjectileCounts[Item.shoot] < 1;
|
|
}
|
|
}
|
|
}
|