-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathRecipeGroups.cs
More file actions
233 lines (228 loc) · 16 KB
/
Copy pathRecipeGroups.cs
File metadata and controls
233 lines (228 loc) · 16 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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
using Terraria;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
using TheDepths.Items.Accessories;
using TheDepths.Items.Placeable;
using TheDepths.Items.Weapons;
namespace TheDepths
{
internal class RecipeGroups : ModSystem
{
public static RecipeGroup HellstoneBarRecipeGroup;
public static RecipeGroup HellstoneRecipeGroup;
public static RecipeGroup ObsidianRecipeGroup;
public static RecipeGroup AnkhShieldRecipeGroup;
public static RecipeGroup FireGauntletRecipeGroup;
public static RecipeGroup AshBlockRecipeGroup;
public static RecipeGroup AshwoodRecipeGroup;
public static RecipeGroup FireblossomRecipeGroup;
public static RecipeGroup ObsidifishRecipeGroup;
public static RecipeGroup FlarefinKoiRecipeGroup;
public static RecipeGroup PwnhammerRecipeGroup;
public static RecipeGroup FireblossomSeedsRecipeGroup;
public static RecipeGroup HellforgeRecipeGroup;
public static RecipeGroup LivingFireBlockRecipeGroup;
public static RecipeGroup CobaltShieldRecipeGroup;
public static RecipeGroup CascadeRecipeGroup;
public static RecipeGroup TreasureMagnetGroup;
public static RecipeGroup LavaBucketGroup;
public static RecipeGroup BottomlessLavaBucketGroup;
public static RecipeGroup LavaSpongeGroup;
public static RecipeGroup LavaFishingHookGroup;
public static RecipeGroup ImpStaffHookGroup;
public override void Unload()
{
HellstoneBarRecipeGroup = null;
HellstoneRecipeGroup = null;
ObsidianRecipeGroup = null;
AnkhShieldRecipeGroup = null;
FireGauntletRecipeGroup = null;
AshBlockRecipeGroup = null;
AshwoodRecipeGroup = null;
FireblossomRecipeGroup = null;
ObsidifishRecipeGroup = null;
FlarefinKoiRecipeGroup = null;
PwnhammerRecipeGroup = null;
FireblossomSeedsRecipeGroup = null;
HellforgeRecipeGroup = null;
LivingFireBlockRecipeGroup = null;
CobaltShieldRecipeGroup = null;
CascadeRecipeGroup = null;
TreasureMagnetGroup = null;
LavaBucketGroup = null;
BottomlessLavaBucketGroup = null;
LavaSpongeGroup = null;
LavaFishingHookGroup = null;
ImpStaffHookGroup = null;
}
public override void AddRecipeGroups()
{
RecipeGroup.recipeGroups[RecipeGroupID.Wood].ValidItems.Add(ModContent.ItemType<NightWood>());
RecipeGroup.recipeGroups[RecipeGroupID.Wood].ValidItems.Add(ModContent.ItemType<PetrifiedWood>());
RecipeGroup.recipeGroups[RecipeGroupID.Fruit].ValidItems.Add(ModContent.ItemType<Items.Ciamito>());
RecipeGroup.recipeGroups[RecipeGroupID.Fruit].ValidItems.Add(ModContent.ItemType<Items.BlackOlive>());
HellstoneBarRecipeGroup = new RecipeGroup(() => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.HellstoneBar)}", ItemID.HellstoneBar, ModContent.ItemType<Items.Placeable.ArqueriteBar>());
RecipeGroup.RegisterGroup("HellstoneBar", HellstoneBarRecipeGroup);
HellstoneRecipeGroup = new RecipeGroup(() => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.Hellstone)}", ItemID.Hellstone, ModContent.ItemType<Items.Placeable.ArqueriteOre>());
RecipeGroup.RegisterGroup("Hellstone", HellstoneRecipeGroup);
ObsidianRecipeGroup = new RecipeGroup(() => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.Obsidian)}", ItemID.Obsidian, ModContent.ItemType<Items.Placeable.Quartz>());
RecipeGroup.RegisterGroup("Obsidian", ObsidianRecipeGroup);
AnkhShieldRecipeGroup = new RecipeGroup(() => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.AnkhShield)}", ItemID.AnkhShield, ModContent.ItemType<Items.Accessories.SanctusShield>());
RecipeGroup.RegisterGroup("AnkhShield", AnkhShieldRecipeGroup);
FireGauntletRecipeGroup = new RecipeGroup(() => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.FireGauntlet)}", ItemID.FireGauntlet, ModContent.ItemType<Items.Accessories.AquaGlove>());
RecipeGroup.RegisterGroup("FireGauntlet", FireGauntletRecipeGroup);
AshBlockRecipeGroup = new RecipeGroup(() => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.AshBlock)}", ItemID.AshBlock, ModContent.ItemType<Items.Placeable.ShaleBlock>(), ModContent.ItemType<Items.Placeable.Shalestone>());
RecipeGroup.RegisterGroup("AshBlock", AshBlockRecipeGroup);
AshwoodRecipeGroup = new RecipeGroup(() => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.AshWood)}", ItemID.AshWood, ModContent.ItemType<Items.Placeable.NightWood>());
RecipeGroup.RegisterGroup("AshWood", AshwoodRecipeGroup);
FireblossomRecipeGroup = new RecipeGroup(() => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.Fireblossom)}", ItemID.Fireblossom, ModContent.ItemType<Items.ShadowShrub>());
RecipeGroup.RegisterGroup("Fireblossom", FireblossomRecipeGroup);
ObsidifishRecipeGroup = new RecipeGroup(() => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.Obsidifish)}", ItemID.Obsidifish, ModContent.ItemType<Items.QuartzFeeder>());
RecipeGroup.RegisterGroup("Obsidifish", ObsidifishRecipeGroup);
FlarefinKoiRecipeGroup = new RecipeGroup(() => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.FlarefinKoi)}", ItemID.FlarefinKoi, ModContent.ItemType<Items.ShadowFightingFish>());
RecipeGroup.RegisterGroup("FlarefinKoi", FlarefinKoiRecipeGroup);
PwnhammerRecipeGroup = new RecipeGroup(() => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.Pwnhammer)}", ItemID.Pwnhammer, ModContent.ItemType<Items.Weapons.POWHammer>());
RecipeGroup.RegisterGroup("Pwnhammer", PwnhammerRecipeGroup);
FireblossomSeedsRecipeGroup = new RecipeGroup(() => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.FireblossomSeeds)}", ItemID.FireblossomSeeds, ModContent.ItemType<Items.Placeable.ShadowShrubSeeds>());
RecipeGroup.RegisterGroup("FireblossomSeeds", FireblossomSeedsRecipeGroup);
HellforgeRecipeGroup = new RecipeGroup(() => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.Hellforge)}", ItemID.Hellforge, ModContent.ItemType<Items.Placeable.Gemforge>());
RecipeGroup.RegisterGroup("Hellforge", HellforgeRecipeGroup);
LivingFireBlockRecipeGroup = new RecipeGroup(() => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.LivingFireBlock)}", ItemID.LivingFireBlock, ModContent.ItemType<Items.Placeable.LivingFog>());
RecipeGroup.RegisterGroup("LivingFireBlock", LivingFireBlockRecipeGroup);
CobaltShieldRecipeGroup = new RecipeGroup(() => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.CobaltShield)}", ItemID.CobaltShield, ModContent.ItemType<PalladiumShield>());
RecipeGroup.RegisterGroup("CobaltShield", CobaltShieldRecipeGroup);
CascadeRecipeGroup = new RecipeGroup(() => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.Cascade)}", ItemID.Cascade, ModContent.ItemType<Skyfall>());
RecipeGroup.RegisterGroup("Cascade", CascadeRecipeGroup);
TreasureMagnetGroup = new RecipeGroup(() => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.TreasureMagnet)}", ItemID.TreasureMagnet, ModContent.ItemType<LodeStone>());
RecipeGroup.RegisterGroup("TreasureMagnet", TreasureMagnetGroup);
LavaBucketGroup = new RecipeGroup(() => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.LavaBucket)}", ItemID.LavaBucket, ModContent.ItemType<QuicksilverBucket>());
RecipeGroup.RegisterGroup("LavaBucket", LavaBucketGroup);
BottomlessLavaBucketGroup = new RecipeGroup(() => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.BottomlessLavaBucket)}", ItemID.BottomlessLavaBucket, ModContent.ItemType<BottomlessQuicksilverBucket>());
RecipeGroup.RegisterGroup("BottomlessLavaBucket", BottomlessLavaBucketGroup);
LavaSpongeGroup = new RecipeGroup(() => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.LavaAbsorbantSponge)}", ItemID.LavaAbsorbantSponge, ModContent.ItemType<QuicksilverAbsorbantSponge>());
RecipeGroup.RegisterGroup("LavaAbsorbantSponge", LavaSpongeGroup);
LavaFishingHookGroup = new RecipeGroup(() => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.LavaFishingHook)}", ItemID.LavaFishingHook, ModContent.ItemType<QuicksilverproofFishingHook>());
RecipeGroup.RegisterGroup("LavaFishingHook", LavaFishingHookGroup);
ImpStaffHookGroup = new RecipeGroup(() => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.ImpStaff)}", ItemID.ImpStaff, ModContent.ItemType<LivingShadowStaff>());
RecipeGroup.RegisterGroup($"{Lang.GetItemNameValue(ItemID.ImpStaff)}", ImpStaffHookGroup);
}
public override void PostAddRecipes()
{
for (int i = 0; i < Recipe.numRecipes; i++)
{
Recipe recipe = Main.recipe[i];
if (recipe.TryGetIngredient(ItemID.HellstoneBar, out var HB) && !TheDepthsIDs.Sets.RecipeBlacklist.HellstoneBarOnlyItem[recipe.createItem.type])
{
recipe.AddRecipeGroup("HellstoneBar", HB.stack);
recipe.RemoveIngredient(HB);
}
if (recipe.TryGetIngredient(ItemID.Hellstone, out var Hellstone) && !TheDepthsIDs.Sets.RecipeBlacklist.HellstoneOnlyItem[recipe.createItem.type])
{
recipe.AddRecipeGroup("Hellstone", Hellstone.stack);
recipe.RemoveIngredient(Hellstone);
}
if (recipe.TryGetIngredient(ItemID.Obsidian, out var Obsidian) && !TheDepthsIDs.Sets.RecipeBlacklist.ObsidianOnlyItem[recipe.createItem.type])
{
recipe.AddRecipeGroup("Obsidian", Obsidian.stack);
recipe.RemoveIngredient(Obsidian);
}
if (recipe.TryGetIngredient(ItemID.AnkhShield, out var AS) && !TheDepthsIDs.Sets.RecipeBlacklist.AnkhShieldOnlyItem[recipe.createItem.type])
{
recipe.AddRecipeGroup("AnkhShield", AS.stack);
recipe.RemoveIngredient(AS);
}
if (recipe.TryGetIngredient(ItemID.FireGauntlet, out var FG) && !TheDepthsIDs.Sets.RecipeBlacklist.FireGauntletOnlyItem[recipe.createItem.type])
{
recipe.AddRecipeGroup("FireGauntlet", FG.stack);
recipe.RemoveIngredient(FG);
}
if (recipe.TryGetIngredient(ItemID.AshBlock, out var AB) && !TheDepthsIDs.Sets.RecipeBlacklist.AshBlockOnlyItem[recipe.createItem.type])
{
recipe.AddRecipeGroup("AshBlock", AB.stack);
recipe.RemoveIngredient(AB);
}
if (recipe.TryGetIngredient(ItemID.AshWood, out var AW) && !TheDepthsIDs.Sets.RecipeBlacklist.AshWoodOnlyItem[recipe.createItem.type])
{
recipe.AddRecipeGroup("AshWood", AW.stack);
recipe.RemoveIngredient(AW);
}
if (recipe.TryGetIngredient(ItemID.Fireblossom, out var Fireblossom) && !TheDepthsIDs.Sets.RecipeBlacklist.FireblossomOnlyItem[recipe.createItem.type])
{
recipe.AddRecipeGroup("Fireblossom", Fireblossom.stack);
recipe.RemoveIngredient(Fireblossom);
}
if (recipe.TryGetIngredient(ItemID.Obsidifish, out var Obsidifish) && !TheDepthsIDs.Sets.RecipeBlacklist.ObsidifishOnlyItem[recipe.createItem.type])
{
recipe.AddRecipeGroup("Obsidifish", Obsidifish.stack);
recipe.RemoveIngredient(Obsidifish);
}
if (recipe.TryGetIngredient(ItemID.FlarefinKoi, out var FK) && !TheDepthsIDs.Sets.RecipeBlacklist.FlarefinKoiOnlyItem[recipe.createItem.type])
{
recipe.AddRecipeGroup("FlarefinKoi", FK.stack);
recipe.RemoveIngredient(FK);
}
if (recipe.TryGetIngredient(ItemID.Pwnhammer, out var pwnhammer) && !TheDepthsIDs.Sets.RecipeBlacklist.PwnhammerOnlyItem[recipe.createItem.type])
{
recipe.AddRecipeGroup("Pwnhammer", pwnhammer.stack);
recipe.RemoveIngredient(pwnhammer);
}
if (recipe.TryGetIngredient(ItemID.FireblossomSeeds, out var FS) && !TheDepthsIDs.Sets.RecipeBlacklist.FireblossomSeedsOnlyItem[recipe.createItem.type])
{
recipe.AddRecipeGroup("FireblossomSeeds", FS.stack);
recipe.RemoveIngredient(FS);
}
if (recipe.TryGetIngredient(ItemID.Hellforge, out var Hellforge) && !TheDepthsIDs.Sets.RecipeBlacklist.HellforgeOnlyItem[recipe.createItem.type])
{
recipe.AddRecipeGroup("Hellforge", Hellforge.stack);
recipe.RemoveIngredient(Hellforge);
}
if (recipe.TryGetIngredient(ItemID.LivingFireBlock, out var LFB) && !TheDepthsIDs.Sets.RecipeBlacklist.LivingFireBlockOnlyItem[recipe.createItem.type])
{
recipe.AddRecipeGroup("LivingFireBlock", LFB.stack);
recipe.RemoveIngredient(LFB);
}
if (recipe.TryGetIngredient(ItemID.CobaltShield, out var CS) && !TheDepthsIDs.Sets.RecipeBlacklist.CobaltShieldOnlyItem[recipe.createItem.type])
{
recipe.AddRecipeGroup("CobaltShield", CS.stack);
recipe.RemoveIngredient(CS);
}
if (recipe.TryGetIngredient(ItemID.Cascade, out var Cascade) && !TheDepthsIDs.Sets.RecipeBlacklist.CascadeOnlyItem[recipe.createItem.type])
{
recipe.AddRecipeGroup("Cascade", Cascade.stack);
recipe.RemoveIngredient(Cascade);
}
if (recipe.TryGetIngredient(ItemID.TreasureMagnet, out var TM) && !TheDepthsIDs.Sets.RecipeBlacklist.TreasureMagnetOnlyItem[recipe.createItem.type])
{
recipe.AddRecipeGroup("TreasureMagnet", TM.stack);
recipe.RemoveIngredient(TM);
}
if (recipe.TryGetIngredient(ItemID.LavaBucket, out var LB) && !TheDepthsIDs.Sets.RecipeBlacklist.LavaBucketOnlyItem[recipe.createItem.type])
{
recipe.AddRecipeGroup("LavaBucket", LB.stack);
recipe.RemoveIngredient(LB);
}
if (recipe.TryGetIngredient(ItemID.BottomlessLavaBucket, out var BLB) && !TheDepthsIDs.Sets.RecipeBlacklist.BottomlessLavaBucketOnlyItem[recipe.createItem.type])
{
recipe.AddRecipeGroup("BottomlessLavaBucket", BLB.stack);
recipe.RemoveIngredient(BLB);
}
if (recipe.TryGetIngredient(ItemID.LavaAbsorbantSponge, out var LS) && !TheDepthsIDs.Sets.RecipeBlacklist.LavaSpongeOnlyItem[recipe.createItem.type])
{
recipe.AddRecipeGroup("LavaAbsorbantSponge", LS.stack);
recipe.RemoveIngredient(LS);
}
if (recipe.TryGetIngredient(ItemID.LavaFishingHook, out var LPFH) && !TheDepthsIDs.Sets.RecipeBlacklist.LavaFishingHookOnlyItem[recipe.createItem.type])
{
recipe.AddRecipeGroup("LavaFishingHook", LPFH.stack);
recipe.RemoveIngredient(LPFH);
}
if (recipe.TryGetIngredient(ItemID.ImpStaff, out var IS) && !TheDepthsIDs.Sets.RecipeBlacklist.ImpStaffOnlyItem[recipe.createItem.type])
{
recipe.AddRecipeGroup($"{Lang.GetItemNameValue(ItemID.ImpStaff)}", IS.stack);
recipe.RemoveIngredient(IS);
}
}
}
}
}