Bestiary tweaks
This commit is contained in:
1 parent
dec4b92a79
commit
77c6450496
4 files changed
+19
-3
No files matched your search
@@ -20,6 +20,7 @@ namespace CalamityMod.NPCs.DraedonLabThings
|
||||
Main.npcFrameCount[NPC.type] = 22;
|
||||
NPCID.Sets.CountsAsCritter[NPC.type] = true;
|
||||
Main.npcCatchable[NPC.type] = true;
|
||||
NPCID.Sets.NormalGoldCritterBestiaryPriority.Add(Type);
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -136,6 +137,19 @@ namespace CalamityMod.NPCs.DraedonLabThings
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
for (int i = 0; i < Main.maxPlayers; i++)
|
||||
{
|
||||
Player player = Main.player[i];
|
||||
if (player is null || !player.active)
|
||||
continue;
|
||||
|
||||
if (NPC.Hitbox.Intersects(player.HitboxForBestiaryNearbyCheck))
|
||||
{
|
||||
Main.BestiaryTracker.Kills.RegisterKill(NPC);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void ChangeAI(int phase)
|
||||
|
||||
@@ -133,7 +133,7 @@ namespace CalamityMod.NPCs.DraedonLabThings
|
||||
|
||||
if (NPC.Hitbox.Intersects(player.HitboxForBestiaryNearbyCheck))
|
||||
{
|
||||
Main.BestiaryTracker.Sights.RegisterWasNearby(NPC);
|
||||
Main.BestiaryTracker.Kills.RegisterKill(NPC);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,7 +56,9 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
|
||||
if (NPC.Hitbox.Intersects(player.HitboxForBestiaryNearbyCheck))
|
||||
{
|
||||
Main.BestiaryTracker.Sights.RegisterWasNearby(NPC);
|
||||
NPC nPC = new NPC();
|
||||
nPC.SetDefaults(ModContent.NPCType<Piggy>());
|
||||
Main.BestiaryTracker.Kills.RegisterKill(nPC);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ namespace CalamityMod.NPCs.TownNPCs
|
||||
|
||||
if (NPC.Hitbox.Intersects(player.HitboxForBestiaryNearbyCheck))
|
||||
{
|
||||
Main.BestiaryTracker.Sights.RegisterWasNearby(NPC);
|
||||
Main.BestiaryTracker.Chats.RegisterChatStartWith(NPC);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user