This repository was archived by the owner on Dec 8, 2025. It is now read-only.
forked from AqlaSolutions/MagicStorage
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathMagicStorageExtra.RecipeGroups.cs
More file actions
101 lines (85 loc) · 4.78 KB
/
MagicStorageExtra.RecipeGroups.cs
File metadata and controls
101 lines (85 loc) · 4.78 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
using MagicStorageExtra.Items;
using Terraria;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
namespace MagicStorageExtra
{
public partial class MagicStorageExtra
{
public override void AddRecipeGroups()
{
RecipeGroup group = new RecipeGroup(() => Language.GetText("LegacyMisc.37") + " Chest", ItemID.Chest, ItemID.GoldChest, ItemID.ShadowChest,
ItemID.EbonwoodChest, ItemID.RichMahoganyChest, ItemID.PearlwoodChest, ItemID.IvyChest, ItemID.IceChest, ItemID.LivingWoodChest,
ItemID.SkywareChest, ItemID.ShadewoodChest, ItemID.WebCoveredChest, ItemID.LihzahrdChest, ItemID.WaterChest, ItemID.JungleChest,
ItemID.CorruptionChest, ItemID.CrimsonChest, ItemID.HallowedChest, ItemID.FrozenChest, ItemID.DynastyChest, ItemID.HoneyChest,
ItemID.SteampunkChest, ItemID.PalmWoodChest, ItemID.MushroomChest, ItemID.BorealWoodChest, ItemID.SlimeChest, ItemID.GreenDungeonChest,
ItemID.PinkDungeonChest, ItemID.BlueDungeonChest, ItemID.BoneChest, ItemID.CactusChest, ItemID.FleshChest, ItemID.ObsidianChest,
ItemID.PumpkinChest, ItemID.SpookyChest, ItemID.GlassChest, ItemID.MartianChest, ItemID.GraniteChest, ItemID.MeteoriteChest,
ItemID.MarbleChest);
RecipeGroup.RegisterGroup("MagicStorageExtra:AnyChest", group);
group = new RecipeGroup(() => Language.GetText("LegacyMisc.37").Value + " " + Language.GetTextValue("Mods.MagicStorageExtra.SnowBiomeBlock"),
ItemID.SnowBlock, ItemID.IceBlock, ItemID.PurpleIceBlock, ItemID.PinkIceBlock);
if (bluemagicMod != null)
group.ValidItems.Add(bluemagicMod.ItemType("DarkBlueIce"));
RecipeGroup.RegisterGroup("MagicStorageExtra:AnySnowBiomeBlock", group);
group = new RecipeGroup(() => Language.GetText("LegacyMisc.37").Value + " " + Lang.GetItemNameValue(ItemID.Diamond), ItemID.Diamond,
ItemType("ShadowDiamond"));
if (legendMod != null)
{
group.ValidItems.Add(legendMod.ItemType("GemChrysoberyl"));
group.ValidItems.Add(legendMod.ItemType("GemAlexandrite"));
}
RecipeGroup.RegisterGroup("MagicStorageExtra:AnyDiamond", group);
if (legendMod != null)
{
group = new RecipeGroup(() => Language.GetText("LegacyMisc.37").Value + " " + Lang.GetItemNameValue(ItemID.Amethyst), ItemID.Amethyst,
legendMod.ItemType("GemOnyx"), legendMod.ItemType("GemSpinel"));
RecipeGroup.RegisterGroup("MagicStorageExtra:AnyAmethyst", group);
group = new RecipeGroup(() => Language.GetText("LegacyMisc.37").Value + " " + Lang.GetItemNameValue(ItemID.Topaz), ItemID.Topaz,
legendMod.ItemType("GemGarnet"));
RecipeGroup.RegisterGroup("MagicStorageExtra:AnyTopaz", group);
group = new RecipeGroup(() => Language.GetText("LegacyMisc.37").Value + " " + Lang.GetItemNameValue(ItemID.Sapphire), ItemID.Sapphire,
legendMod.ItemType("GemCharoite"));
RecipeGroup.RegisterGroup("MagicStorageExtra:AnySapphire", group);
group = new RecipeGroup(() => Language.GetText("LegacyMisc.37").Value + " " + Lang.GetItemNameValue(ItemID.Emerald),
legendMod.ItemType("GemPeridot"));
RecipeGroup.RegisterGroup("MagicStorageExtra:AnyEmerald", group);
group = new RecipeGroup(() => Language.GetText("LegacyMisc.37").Value + " " + Lang.GetItemNameValue(ItemID.Ruby), ItemID.Ruby,
legendMod.ItemType("GemOpal"));
RecipeGroup.RegisterGroup("MagicStorageExtra:AnyRuby", group);
}
AddCompatibilityRecipeGroups();
}
private static void AddCompatibilityRecipeGroups()
{
AddCompatibilityRecipeGroup<StorageComponent>();
AddCompatibilityRecipeGroup<LocatorDisk>();
AddCompatibilityRecipeGroup<RadiantJewel>();
AddCompatibilityRecipeGroup<StorageUnit>();
AddCompatibilityRecipeGroup<StorageUnitTiny>();
AddCompatibilityRecipeGroup<StorageUnitBlueChlorophyte>();
AddCompatibilityRecipeGroup<StorageUnitCrimtane>();
AddCompatibilityRecipeGroup<StorageUnitDemonite>();
AddCompatibilityRecipeGroup<StorageUnitHallowed>();
AddCompatibilityRecipeGroup<StorageUnitHellstone>();
AddCompatibilityRecipeGroup<StorageUnitLuminite>();
AddCompatibilityRecipeGroup<StorageUnitTerra>();
AddCompatibilityRecipeGroup<UpgradeBlueChlorophyte>();
AddCompatibilityRecipeGroup<UpgradeCrimtane>();
AddCompatibilityRecipeGroup<UpgradeDemonite>();
AddCompatibilityRecipeGroup<UpgradeHallowed>();
AddCompatibilityRecipeGroup<UpgradeHellstone>();
AddCompatibilityRecipeGroup<UpgradeLuminite>();
AddCompatibilityRecipeGroup<UpgradeTerra>();
}
private static void AddCompatibilityRecipeGroup<TModItem>() where TModItem : ModItem
{
ModItem item = ModContent.GetInstance<TModItem>();
RecipeGroup group = new RecipeGroup(() => item.DisplayName.GetTranslation(Language.ActiveCulture), item.item.type);
if (MagicStorage != null)
group.ValidItems.Add(MagicStorage.ItemType(item.Name));
RecipeGroup.RegisterGroup($"MagicStorageExtra:Any{item.Name}", group);
}
}
}