36 lines
753 B
C#
36 lines
753 B
C#
using Decimation.Lib.Items;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace Decimation.Content.Debug
|
|
{
|
|
public class DebugAIItem : DecimationItem
|
|
{
|
|
public override string Texture => "Terraria/Item_" + ItemID.Star;
|
|
protected override string ItemName => "Debug AI";
|
|
|
|
protected override void Init()
|
|
{
|
|
}
|
|
|
|
public override bool UseItem(Player player)
|
|
{
|
|
DebugAI.debugging = !DebugAI.debugging;
|
|
|
|
return true;
|
|
}
|
|
}
|
|
|
|
class DebugAI : GlobalNPC
|
|
{
|
|
public static bool debugging;
|
|
|
|
public override bool PreAI(NPC npc)
|
|
{
|
|
if (debugging) return false;
|
|
|
|
return base.PreAI(npc);
|
|
}
|
|
}
|
|
} |