import minetweaker.item.IItemStack;
import mods.thaumcraft.Research;
import mods.thaumcraft.Infusion;

val Alumite = <TConstruct:materials:15>;
val LivingWoodPlanks = <Botania:livingwood:1>;
val ThaumiumGear = <clockworkphase:gearThaumium>;
val ClockworkAssemblyTable = <clockworkphase:clockworkAssemblyTable>;
val ClockWorkTools = [<clockworkphase:clockworkAxe>,<clockworkphase:clockworkPickaxe>,<clockworkphase:clockworkSaber>,<clockworkphase:clockworkShovel>] as IItemStack[];
val ThaumiumTools = [<Thaumcraft:ItemAxeThaumium>,<Thaumcraft:ItemPickThaumium>,<Thaumcraft:ItemSwordThaumium>,<Thaumcraft:ItemShovelThaumium>] as IItemStack[];
val BrassGear = <clockworkphase:gearBrass>;
val Framework = <clockworkphase:framework>;
val BrassIngot = <clockworkphase:brassIngot>;

recipes.remove(ClockworkAssemblyTable);
recipes.addShaped(ClockworkAssemblyTable,[[Alumite,LivingWoodPlanks,Alumite],[LivingWoodPlanks,ThaumiumGear,LivingWoodPlanks],[Alumite,LivingWoodPlanks,Alumite]]);

Research.addResearch("CLOCKWORK_TOOLS", "ARTIFICE", "tempus 2, praecantatio 1, metallum 1", -6, 2, 100, ClockWorkTools[0]);
Research.addPage("CLOCKWORK_TOOLS", "CLOCKWORK_TOOLS.research_page.1");
game.setLocalization("en_US", "CLOCKWORK_TOOLS.research_page.1", "With your newfound knowledge of infusion, you can create tools infused with time magic. They seem to be able to be upgraded quite nicely, and should be better than what you were using.");
game.setLocalization("en_US", "tc.research_name.CLOCKWORK_TOOLS", "Clockwork Tools");
game.setLocalization("en_US", "tc.research_text.CLOCKWORK_TOOLS", "Brass Magic");
for i, clockworktool in ClockWorkTools {
    recipes.remove(clockworktool);
    Infusion.addRecipe("CLOCKWORK_TOOLS",ThaumiumTools[i],[BrassGear,BrassIngot,Framework,BrassIngot],"tempus 16, praecantatio 8, metallum 16",clockworktool,3);
    Research.addInfusionPage("CLOCKWORK_TOOLS", clockworktool);
}
Research.addPrereq("CLOCKWORK_TOOLS","INFUSION");
