20 lines
496 B
C#
20 lines
496 B
C#
using Terraria;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace tMx.Tweaks.Potion
|
|
{
|
|
public class NoPotionDelay : GlobalItem
|
|
{
|
|
public override void OnConsumeItem(Item item, Player player)
|
|
{
|
|
tMxConfigs config = ModContent.GetInstance<tMxConfigs>();
|
|
if (item.potion && config.NoPotionDelay)
|
|
{
|
|
player.ClearBuff(21);
|
|
player.potionDelay = 0;
|
|
player.potionDelayTime = 0;
|
|
}
|
|
}
|
|
}
|
|
}
|