Nick_Kick_Butt
Terrarian
NicksMod\Npcs\FlyingDesertBug.cs(32,85) : error CS0117: 'Terraria.Main' does not contain a definition for 'ZoneDesert'
can someone help me because im really confused about this terraria main zone desert thing
help would be appreciated code is below
can someone help me because im really confused about this terraria main zone desert thing
help would be appreciated code is below
Code:
using Terraria.ID;
using Terraria.ModLoader;
//By Al0n37
namespace NicksMod.Npcs
{
public class FlyingDesertBug : ModNPC
{
public override void SetDefaults()
{
npc.name = "Flying Desert Bug";
npc.displayName = "Flying Desert Bug";
npc.width = 50;
npc.height = 50;
npc.damage = 40;
npc.defense = 4;
npc.lifeMax = 80;
npc.HitSound = SoundID.NPCHit1;
npc.DeathSound = SoundID.NPCDeath1;
npc.value = 60f;
npc.knockBackResist = 0.5f;
npc.aiStyle = 44;
Main.npcFrameCount[npc.type] = 1;
aiType = NPCID.FlyingFish; //npc behavior
animationType = NPCID.FlyingFish;
}
public override float CanSpawn(NPCSpawnInfo spawnInfo)
{
return spawnInfo.spawnTileY < Main.worldSurface && Main.dayTime && Main.ZoneDesert ? 0.5f : 0.5f; //spawn at day
}
public override void FindFrame(int frameHeight)
{
npc.frameCounter -= 0.5F; // Determines the animation speed. Higher value = faster animation.
npc.frameCounter %= Main.npcFrameCount[npc.type];
int frame = (int)npc.frameCounter;
npc.frame.Y = frame * frameHeight;
npc.spriteDirection = npc.direction;
}
public override void NPCLoot() //Npc drop
{
{
Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("DesertChitin"), 4); //Item spawn
}
}
}
}