NeedsDebuffIconDisplayList.
This commit is contained in:
1 parent
de3cb6c052
commit
6665cd5465
3 files changed
+30
-10
No files matched your search
@@ -77,7 +77,6 @@ namespace CalamityMod
|
||||
{
|
||||
public sealed class CalamityLists : ModSystem
|
||||
{
|
||||
public static List<int> needsDebuffIconDisplayList;
|
||||
public static List<int> scopedWeaponList;
|
||||
public static List<int> highTestFishList;
|
||||
public static List<int> forceItemList;
|
||||
@@ -144,13 +143,6 @@ namespace CalamityMod
|
||||
|
||||
public override void OnModLoad()
|
||||
{
|
||||
needsDebuffIconDisplayList = new List<int>()
|
||||
{
|
||||
NPCID.TargetDummy,
|
||||
NPCID.WallofFleshEye,
|
||||
NPCType<SuperDummyNPC>()
|
||||
};
|
||||
|
||||
// TODO -- override HoldItem => Player.accFishingLine = true; on these items, just like the scope fix...
|
||||
highTestFishList = new List<int>()
|
||||
{
|
||||
@@ -1397,7 +1389,6 @@ namespace CalamityMod
|
||||
|
||||
public override void Unload()
|
||||
{
|
||||
needsDebuffIconDisplayList = null;
|
||||
scopedWeaponList = null;
|
||||
highTestFishList = null;
|
||||
forceItemList = null;
|
||||
|
||||
@@ -7277,7 +7277,7 @@ namespace CalamityMod.NPCs
|
||||
}
|
||||
if (npc.type != NPCID.BrainofCthulhu && (npc.type != NPCID.DukeFishron || npc.ai[0] <= 9f) && npc.active)
|
||||
{
|
||||
if (CalamityClientConfig.Instance.DebuffDisplay && (npc.boss || BossHealthBarManager.MinibossHPBarList.Contains(npc.type) || BossHealthBarManager.OneToMany.ContainsKey(npc.type) || CalamityLists.needsDebuffIconDisplayList.Contains(npc.type)))
|
||||
if (CalamityClientConfig.Instance.DebuffDisplay && (npc.boss || BossHealthBarManager.MinibossHPBarList.Contains(npc.type) || BossHealthBarManager.OneToMany.ContainsKey(npc.type) || NeedsDebuffIconDisplayList.IsNPCNeedDebuffIconDisplay(npc)))
|
||||
{
|
||||
List<Texture2D> currentDebuffs = new List<Texture2D>() { };
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
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 NeedsDebuffIconDisplayList : ModSystem
|
||||
{
|
||||
public static IList<int> List { get; private set; }
|
||||
|
||||
public override void OnModLoad()
|
||||
{
|
||||
List =
|
||||
[
|
||||
NPCID.TargetDummy,
|
||||
NPCID.WallofFleshEye,
|
||||
NPCType<SuperDummyNPC>()
|
||||
];
|
||||
}
|
||||
|
||||
public override void Unload() => List = null;
|
||||
|
||||
public static bool IsNPCNeedDebuffIconDisplay(NPC npc) => List.Contains(npc.type);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user