0.2.0 commit
This commit is contained in:
19
Tweaks/Potion/NoPotionDelay.cs
Normal file
19
Tweaks/Potion/NoPotionDelay.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user