ZombieList.

This commit is contained in:
Flowaria authored and Cameron Ewell committed 2024-11-13 16:18:35 -05:00
1 parent 9dc2a3a3bb
commit dc594e2e7e
2 files changed
+60 -42

No files matched your search

-42
View File
@@ -56,8 +56,6 @@ namespace CalamityMod
{
public sealed class CalamityLists : ModSystem
{
// Some of these lists of enemies are unused, but were difficult to create. Many of these common enemy types have a ton of variants.
public static List<int> zombieList;
public static List<int> demonEyeList;
public static List<int> skeletonList;
public static List<int> angryBonesList;
@@ -113,45 +111,6 @@ namespace CalamityMod
public override void OnModLoad()
{
zombieList = new List<int>()
{
NPCID.Zombie,
NPCID.ArmedZombie,
NPCID.BaldZombie,
NPCID.PincushionZombie,
NPCID.ArmedZombiePincussion, // what is this spelling
NPCID.SlimedZombie,
NPCID.ArmedZombieSlimed,
NPCID.SwampZombie,
NPCID.ArmedZombieSwamp,
NPCID.TwiggyZombie,
NPCID.ArmedZombieTwiggy,
NPCID.FemaleZombie,
NPCID.ArmedZombieCenx,
NPCID.ZombieRaincoat,
NPCID.ZombieEskimo,
NPCID.ArmedZombieEskimo,
NPCID.BigRainZombie,
NPCID.SmallRainZombie,
NPCID.BigFemaleZombie,
NPCID.SmallFemaleZombie,
NPCID.BigTwiggyZombie,
NPCID.SmallTwiggyZombie,
NPCID.BigSwampZombie,
NPCID.SmallSwampZombie,
NPCID.BigSlimedZombie,
NPCID.SmallSlimedZombie,
NPCID.BigPincushionZombie,
NPCID.SmallPincushionZombie,
NPCID.BigBaldZombie,
NPCID.SmallBaldZombie,
NPCID.BigZombie,
NPCID.SmallZombie,
NPCID.MaggotZombie,
NPCType<BucketZombie>()
// halloween zombies not included because they don't drop shackles or zombie arms
};
demonEyeList = new List<int>()
{
NPCID.DemonEye,
@@ -1099,7 +1058,6 @@ namespace CalamityMod
public override void Unload()
{
zombieList = null;
demonEyeList = null;
skeletonList = null;
angryBonesList = null;
+60
View File
@@ -0,0 +1,60 @@
using System.Collections.Generic;
using CalamityMod.NPCs.NormalNPCs;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using static Terraria.ModLoader.ModContent;
namespace CalamityMod.Systems.Collections
{
public sealed class ZombieList : ModSystem
{
public static IList<int> List { get; private set; }
public override void OnModLoad()
{
List =
[
NPCID.Zombie,
NPCID.ArmedZombie,
NPCID.BaldZombie,
NPCID.PincushionZombie,
NPCID.ArmedZombiePincussion, // what is this spelling
NPCID.SlimedZombie,
NPCID.ArmedZombieSlimed,
NPCID.SwampZombie,
NPCID.ArmedZombieSwamp,
NPCID.TwiggyZombie,
NPCID.ArmedZombieTwiggy,
NPCID.FemaleZombie,
NPCID.ArmedZombieCenx,
NPCID.ZombieRaincoat,
NPCID.ZombieEskimo,
NPCID.ArmedZombieEskimo,
NPCID.BigRainZombie,
NPCID.SmallRainZombie,
NPCID.BigFemaleZombie,
NPCID.SmallFemaleZombie,
NPCID.BigTwiggyZombie,
NPCID.SmallTwiggyZombie,
NPCID.BigSwampZombie,
NPCID.SmallSwampZombie,
NPCID.BigSlimedZombie,
NPCID.SmallSlimedZombie,
NPCID.BigPincushionZombie,
NPCID.SmallPincushionZombie,
NPCID.BigBaldZombie,
NPCID.SmallBaldZombie,
NPCID.BigZombie,
NPCID.SmallZombie,
NPCID.MaggotZombie,
NPCType<BucketZombie>()
// halloween zombies not included because they don't drop shackles or zombie arms
];
}
public override void Unload() => List = null;
public static bool IsZombie(NPC npc) => List.Contains(npc.type);
}
}