forked from Fargo-Team/EnemyModifiers
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEnemyModifiersServerConfig.cs
More file actions
141 lines (110 loc) · 4.4 KB
/
EnemyModifiersServerConfig.cs
File metadata and controls
141 lines (110 loc) · 4.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
using FargoEnemyModifiers.Modifiers;
using System.Collections.Generic;
using System.ComponentModel;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.ModLoader.Config;
namespace FargoEnemyModifiers
{
//[Label("Enemy Modifiers Config")]
public class EnemyModifiersServerConfig : ModConfig
{
public override ConfigScope Mode => ConfigScope.ServerSide;
public static EnemyModifiersServerConfig Instance { get; private set; }
public override void OnLoaded()
{
Instance = this;
}
[Header("ModifierConfiguration")]
[DefaultValue(false)]
public bool BossModifiers;
[Increment(1)]
[Range(0, 100)]
[DefaultValue(50)]
[Slider]
public int ChanceForModifier;
[Range(1, 10)]
[DefaultValue(3)]
[Slider]
public int ModifierAmount;
[Increment(1)]
[Range(0, 100)]
[DefaultValue(50)]
[Slider]
public int ChanceForExtraModifier;
[DefaultValue(false)]
public bool ForceModifier;
[DefaultValue(0)]
[DrawTicks]
public ConfigModifierID ModifierEnum;
//[Header("Blacklists")]
[Header("Blacklists")]
public List<NPCDefinition> NPCBlacklist = getDefaultNPCBlacklist();
public List<ModifierPicker> ModifierBlacklist;
[BackgroundColor(0, 255, 255)]
public class ModifierPicker
{
[DefaultValue(0)]
public ConfigModifierID ModifierEnum;
}
private static List<NPCDefinition> getDefaultNPCBlacklist()
{
List<NPCDefinition> NPCBlacklist = new List<NPCDefinition>
{
new NPCDefinition(NPCID.WallCreeper),
new NPCDefinition(NPCID.WallCreeperWall),
new NPCDefinition(NPCID.BlackRecluse),
new NPCDefinition(NPCID.BlackRecluseWall),
new NPCDefinition(NPCID.JungleCreeper),
new NPCDefinition(NPCID.JungleCreeperWall),
new NPCDefinition(NPCID.BloodCrawler),
new NPCDefinition(NPCID.BloodCrawlerWall),
new NPCDefinition(NPCID.DesertScorpionWall),
new NPCDefinition(NPCID.DesertScorpionWall),
new NPCDefinition(NPCID.BurningSphere),
new NPCDefinition(NPCID.ChaosBall),
new NPCDefinition(NPCID.WaterSphere),
new NPCDefinition(NPCID.VileSpit),
new NPCDefinition(NPCID.VileSpitEaterOfWorlds),
new NPCDefinition(NPCID.DetonatingBubble),
new NPCDefinition(NPCID.SolarFlare),
new NPCDefinition(NPCID.SolarGoop),
new NPCDefinition(NPCID.AncientLight),
new NPCDefinition(NPCID.AncientDoom),
new NPCDefinition(NPCID.CultistBossClone),
new NPCDefinition(NPCID.SpikeBall),
new NPCDefinition(NPCID.DD2EterniaCrystal),
new NPCDefinition(NPCID.DD2LanePortal),
new NPCDefinition(NPCID.EaterofWorldsHead),
new NPCDefinition(NPCID.EaterofWorldsBody),
new NPCDefinition(NPCID.EaterofWorldsTail),
new NPCDefinition(NPCID.DD2LanePortal),
new NPCDefinition(NPCID.DD2EterniaCrystal),
new NPCDefinition(NPCID.LunarTowerNebula),
new NPCDefinition(NPCID.LunarTowerSolar),
new NPCDefinition(NPCID.LunarTowerStardust),
new NPCDefinition(NPCID.LunarTowerVortex),
};
try
{
if (ModLoader.TryGetMod("Fargowiltas", out Mod fargoMod))
{
NPCBlacklist.Add(new NPCDefinition(ModContent.Find<ModNPC>("Fargowiltas", "SuperDummy").Type));
}
if (ModLoader.TryGetMod("FargowiltasSouls", out Mod fargoMod2))
{
NPCBlacklist.Add(new NPCDefinition(ModContent.Find<ModNPC>("FargowiltasSouls", "ShadowOrbNPC").Type));
NPCBlacklist.Add(new NPCDefinition(ModContent.Find<ModNPC>("FargowiltasSouls", "CrystalLeaf").Type));
}
if (ModLoader.TryGetMod("CalamityMod", out Mod calamityMod))
{
//EnemyModifiersConfig.Instance.NPCBlacklist.Add(new NPCDefinition(calamityMod.GetContent("")));
}
}
catch
{
}
return NPCBlacklist;
}
}
}