32 lines
1.2 KiB
C#
32 lines
1.2 KiB
C#
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
using Continuity.Content.Items.Materials;
|
|
|
|
namespace Continuity.Content.Systems
|
|
{
|
|
public class CoalRecipeOverrides : ModSystem
|
|
{
|
|
public override void AddRecipes() {
|
|
for (int i = 0; i < Recipe.numRecipes; i++) {
|
|
Recipe recipe = Main.recipe[i];
|
|
|
|
if (recipe.TryGetResult(ItemID.Torch, out Item _)) {
|
|
recipe.AddIngredient(ModContent.ItemType<Coal>(), 1);
|
|
}
|
|
else if (recipe.TryGetResult(ItemID.FlamingMace, out Item _)) {
|
|
recipe.RemoveIngredient(ItemID.Torch);
|
|
recipe.AddIngredient(ModContent.ItemType<Coal>(), 18);
|
|
}
|
|
else if (recipe.TryGetResult(ItemID.Furnace, out Item _)) {
|
|
recipe.RemoveIngredient(ItemID.Torch);
|
|
recipe.AddIngredient(ModContent.ItemType<Coal>(), 16);
|
|
}
|
|
else if (recipe.TryGetResult(ItemID.Fireplace, out Item _)) {
|
|
recipe.RemoveIngredient(ItemID.Torch);
|
|
recipe.AddIngredient(ModContent.ItemType<Coal>(), 12);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|