Skip to content

Commit

Permalink
fix bug where recipes were missing
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Nov 27, 2021
1 parent a9f2b98 commit c94d3ed
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 36 deletions.
34 changes: 0 additions & 34 deletions AmuletOfManyMinions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,40 +127,6 @@ public override void AddRecipeGroups()
RecipeGroup.RegisterGroup("AmuletOfManyMinions:StardustDragons", stardustDragonGroup);
}

public override void AddRecipes()
{
// make vanilla minion items craftable from AoMM version and vice versa
// there is probably a more elegant approach to this
(int, int)[] pairs = new (int, int)[]
{
(ItemID.SlimeStaff, ModContent.ItemType<BabySlimeMinionItem>()),
(ItemID.HornetStaff, ModContent.ItemType<HornetMinionItem>()),
(ItemID.ImpStaff, ModContent.ItemType<ImpMinionItem>()),
(ItemID.SpiderStaff, ModContent.ItemType<SpiderMinionItem>()),
(ItemID.PirateStaff, ModContent.ItemType<PirateMinionItem>()),
(ItemID.OpticStaff, ModContent.ItemType<TwinsMinionItem>()),
(ItemID.PygmyStaff, ModContent.ItemType<PygmyMinionItem>()),
(ItemID.RavenStaff, ModContent.ItemType<RavenMinionItem>()),
(ItemID.DeadlySphereStaff, ModContent.ItemType<DeadlySphereMinionItem>()),
(ItemID.TempestStaff, ModContent.ItemType<SharknadoMinionItem>()),
(ItemID.XenoStaff, ModContent.ItemType<UFOMinionItem>()),
(ItemID.StardustDragonStaff, ModContent.ItemType<StardustDragonMinionItem>()),
(ItemID.StardustCellStaff, ModContent.ItemType<StardustCellMinionItem>()),
};
foreach((int,int) itemPair in pairs) {
for(int i = 0; i < 2; i++)
{
int src = i == 0 ? itemPair.Item1 : itemPair.Item2;
int dst = i == 0 ? itemPair.Item2 : itemPair.Item1;
ModRecipe recipe = new ModRecipe(this);
recipe.AddIngredient(src, 1);
recipe.AddTile(TileID.DemonAltar);
recipe.SetResult(dst);
recipe.AddRecipe();
}
}
}

public override void PostAddRecipes()
{
CrossMod.PopulateSummonersAssociationBuffSet(this);
Expand Down
19 changes: 18 additions & 1 deletion Projectiles/Minions/VanillaClones/VanillaCloneMinionItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using System.Text;
using System.Threading.Tasks;
using Terraria;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
using static Terraria.ModLoader.ModContent;
Expand Down Expand Up @@ -38,5 +39,21 @@ public override void SetDefaults()
item.CloneDefaults(VanillaItemID);
base.SetDefaults();
}
}

public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(item.type, 1);
recipe.AddTile(TileID.DemonAltar);
recipe.SetResult(VanillaItemID);
recipe.AddRecipe();

ModRecipe reciprocal = new ModRecipe(mod);
reciprocal.AddIngredient(VanillaItemID, 1);
reciprocal.AddTile(TileID.DemonAltar);
reciprocal.SetResult(this);
reciprocal.AddRecipe();
}

}
}
2 changes: 1 addition & 1 deletion build.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
displayName = The Amulet Of Many Minions
author = billybobmcbo, SkyanUltra, direwolf420, Metallumere, SPATULA LEMMY
version = 0.13.0.1
version = 0.13.0.2
homepage = https://forums.terraria.org/index.php?threads/the-amulet-of-many-minions.97188/
3 changes: 3 additions & 0 deletions description.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ over 30 new minions, and several armor sets and accessories for both Squires and


=== Version History ==
v0.13.0.2 - Bugfixes
- Multiplayer loading fix
- Add missing recipes
v0.13.0 - Combat Pets!
- Available for every vanilla pet, crafted from vanilla pet items at a demon altar
- Cost 1 minion slot per pet
Expand Down

0 comments on commit c94d3ed

Please sign in to comment.