/
AmuletOfManyMinions.cs
162 lines (145 loc) · 5.94 KB
/
AmuletOfManyMinions.cs
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
using AmuletOfManyMinions.Core.Minions.Pathfinding;
using AmuletOfManyMinions.Core.Minions.Tactics;
using AmuletOfManyMinions.Core.Netcode;
using AmuletOfManyMinions.Items.Accessories;
using AmuletOfManyMinions.NPCs;
using AmuletOfManyMinions.Projectiles.Minions;
using AmuletOfManyMinions.Projectiles.Minions.VanillaClones;
using AmuletOfManyMinions.Projectiles.Minions.VanillaClones.Pirate;
using AmuletOfManyMinions.Projectiles.Minions.NullHatchet;
using AmuletOfManyMinions.Projectiles.Minions.VoidKnife;
using AmuletOfManyMinions.Projectiles.Squires;
using AmuletOfManyMinions.UI;
using Microsoft.Xna.Framework;
using System.Collections.Generic;
using System.IO;
using Terraria;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
using Terraria.UI;
using Microsoft.Xna.Framework.Graphics;
using AmuletOfManyMinions.Projectiles.Minions.TerrarianEnt;
using AmuletOfManyMinions.Projectiles.Minions.MinonBaseClasses;
using AmuletOfManyMinions.Core.Minions.Effects;
using System;
using AmuletOfManyMinions.Projectiles.Minions.CombatPets;
using AmuletOfManyMinions.Projectiles.Minions.CombatPets.VanillaClonePets;
using AmuletOfManyMinions.Core.Minions.CombatPetsQuiz;
using AmuletOfManyMinions.Items.Accessories.CombatPetAccessories;
namespace AmuletOfManyMinions
{
public class AmuletOfManyMinions : Mod
{
internal static ModHotKey CycleTacticHotKey;
internal static ModHotKey CycleTacticsGroupHotKey;
internal static ModHotKey QuickDefendHotKey;
public override void Load()
{
NetHandler.Load();
NPCSets.Load();
SquireMinionTypes.Load();
NecromancerAccessory.Load();
SquireGlobalProjectile.Load();
IdleLocationSets.Load();
TargetSelectionTacticHandler.Load();
UserInterfaces.Load();
MinionTacticsGroupMapper.Load();
LandChunkConfigs.Load();
SpriteCompositionManager.Load();
CritterConfigs.Load();
AmuletOfManyMinionsWorld.Load();
CombatPetLevelTable.Load();
CombatPetBuff.Load();
DefaultPetsQuizData.Load();
CycleTacticHotKey = RegisterHotKey("Cycle Minion Tactic", "K");
CycleTacticsGroupHotKey = RegisterHotKey("Cycle Tactics Group", "L");
QuickDefendHotKey = RegisterHotKey("Minion Quick Defend", "V");
if (!Main.dedServ)
{
AddEquipTexture(null, EquipType.Legs, "RoyalGown_Legs", "AmuletOfManyMinions/Items/Armor/RoyalArmor/RoyalGown_Legs");
}
}
public override void PostSetupContent()
{
NPCSets.Populate();
PartyHatSystem.SetStaticDefaults();
CombatPetsQuizModPlayer.SetStaticDefaults();
// could do a finer partitioning of features, but for now just require the latest version
CrossMod.AddSummonersAssociationMetadata();
}
public override void Unload()
{
NetHandler.Unload();
NPCSets.Unload();
SquireMinionTypes.Unload();
NecromancerAccessory.Unload();
SquireGlobalProjectile.Unload();
IdleLocationSets.Unload();
TargetSelectionTacticHandler.Unload();
UserInterfaces.Unload();
MinionTacticsGroupMapper.Unload();
LandChunkConfigs.Unload();
SpriteCompositionManager.Unload();
CritterConfigs.Unload();
AmuletOfManyMinionsWorld.Unload();
PartyHatSystem.Unload();
CombatPetLevelTable.Unload();
CombatPetBuff.Unload();
BlackCatMinion.Unload();
QuizResult.Unload();
DefaultPetsQuizData.Unload();
CycleTacticHotKey = null;
CycleTacticsGroupHotKey = null;
QuickDefendHotKey = null;
}
public override void AddRecipeGroups()
{
RecipeGroup silverGroup = new RecipeGroup(
() => Language.GetTextValue("LegacyMisc.37") + " " + Language.GetTextValue("ItemName.SilverBar"),
new int[] { ItemID.SilverBar, ItemID.TungstenBar });
RecipeGroup.RegisterGroup("AmuletOfManyMinions:Silvers", silverGroup);
RecipeGroup goldGroup = new RecipeGroup(
() => Language.GetTextValue("LegacyMisc.37") + " " + Language.GetTextValue("ItemName.GoldBar"),
new int[] { ItemID.GoldBar, ItemID.PlatinumBar});
RecipeGroup.RegisterGroup("AmuletOfManyMinions:Golds", goldGroup);
RecipeGroup evilBarGroup = new RecipeGroup(
() => Language.GetTextValue("ItemName.DemoniteBar") + "/" + Language.GetTextValue("ItemName.CrimtaneBar") ,
new int[] { ItemID.DemoniteBar, ItemID.CrimtaneBar});
RecipeGroup.RegisterGroup("AmuletOfManyMinions:EvilBars", evilBarGroup);
RecipeGroup evilWoodSwordGroup = new RecipeGroup(
() => Language.GetTextValue("ItemName.EbonwoodSword") + "/" + Language.GetTextValue("ItemName.ShadewoodSword") ,
new int[] { ItemID.EbonwoodSword, ItemID.ShadewoodSword});
RecipeGroup.RegisterGroup("AmuletOfManyMinions:EvilWoodSwords", evilWoodSwordGroup);
RecipeGroup voidDaggerGroup = new RecipeGroup(
() => "Void Dagger/Null Hatchet",
new int[] { ModContent.ItemType<VoidKnifeMinionItem>(), ModContent.ItemType<NullHatchetMinionItem>()});
RecipeGroup.RegisterGroup("AmuletOfManyMinions:VoidDaggers", voidDaggerGroup);
RecipeGroup stardustDragonGroup = new RecipeGroup(
() => Language.GetTextValue("LegacyMisc.37") + " " + Language.GetTextValue("ItemName.StardustDragonStaff"),
new int[] { ItemID.StardustDragonStaff, ModContent.ItemType<StardustDragonMinionItem>()});
RecipeGroup.RegisterGroup("AmuletOfManyMinions:StardustDragons", stardustDragonGroup);
RecipeGroup combatPetChewToyGroup = new RecipeGroup(
() => Language.GetTextValue("LegacyMisc.37") + " " + "Chaotic Chew Toy",
new int[] { ModContent.ItemType<CombatPetChaoticChewToy>(), ModContent.ItemType<CombatPetCrimsonChewToy>() });
RecipeGroup.RegisterGroup("AmuletOfManyMinions:CombatPetChewToys", combatPetChewToyGroup);
}
public override void PostAddRecipes()
{
CrossMod.PopulateSummonersAssociationBuffSet(this);
}
public override void UpdateUI(GameTime gameTime)
{
UserInterfaces.UpdateUI(gameTime);
}
public override void ModifyInterfaceLayers(List<GameInterfaceLayer> layers)
{
UserInterfaces.ModifyInterfaceLayers(layers);
}
public override void HandlePacket(BinaryReader reader, int whoAmI)
{
//This should be the only thing in here
NetHandler.HandlePackets(reader, whoAmI);
}
}
}