1.1.0 - Added a config option to use tMx or Vanilla Materials
This commit is contained in:
parent
ff68fc53f5
commit
89b4deb0f0
@ -15,25 +15,36 @@ namespace tTP.Content.Items.Placeable
|
|||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
Recipe recipe = CreateRecipe();
|
tTPConfigs config = ModContent.GetInstance<tTPConfigs>();
|
||||||
if (ModLoader.TryGetMod("tMx", out Mod tMxft) && tMxft.TryFind<ModItem>("FrozenTablet", out ModItem FrozenTablet))
|
if (config.UsetMxTablets)
|
||||||
{
|
{
|
||||||
recipe.AddIngredient(FrozenTablet.Type, 1);
|
Recipe recipe = CreateRecipe();
|
||||||
}
|
if (ModLoader.TryGetMod("tMx", out Mod tMxft) && tMxft.TryFind<ModItem>("FrozenTablet", out ModItem FrozenTablet))
|
||||||
if (ModLoader.TryGetMod("tMx", out Mod tMxst) && tMxst.TryFind<ModItem>("SandTablet", out ModItem SandTablet))
|
{
|
||||||
|
recipe.AddIngredient(FrozenTablet.Type, 1);
|
||||||
|
}
|
||||||
|
if (ModLoader.TryGetMod("tMx", out Mod tMxst) && tMxst.TryFind<ModItem>("SandTablet", out ModItem SandTablet))
|
||||||
|
{
|
||||||
|
recipe.AddIngredient(SandTablet.Type, 1);
|
||||||
|
}
|
||||||
|
if (ModLoader.TryGetMod("tMx", out Mod tMxtt) && tMxtt.TryFind<ModItem>("ToxicTablet", out ModItem ToxicTablet))
|
||||||
|
{
|
||||||
|
recipe.AddIngredient(ToxicTablet.Type, 1);
|
||||||
|
}
|
||||||
|
if (ModLoader.TryGetMod("tMx", out Mod tMxmt) && tMxmt.TryFind<ModItem>("MoltenTablet", out ModItem MoltenTablet))
|
||||||
|
{
|
||||||
|
recipe.AddIngredient(MoltenTablet.Type, 1);
|
||||||
|
}
|
||||||
|
recipe.AddTile(TileID.WorkBenches);
|
||||||
|
recipe.Register();
|
||||||
|
} else
|
||||||
{
|
{
|
||||||
recipe.AddIngredient(SandTablet.Type, 1);
|
Recipe recipe = CreateRecipe();
|
||||||
|
recipe.AddIngredient(ItemID.IronBar, 10);
|
||||||
|
recipe.AddIngredient(ItemID.FallenStar, 1);
|
||||||
|
recipe.AddTile(TileID.WorkBenches);
|
||||||
|
recipe.Register();
|
||||||
}
|
}
|
||||||
if (ModLoader.TryGetMod("tMx", out Mod tMxtt) && tMxtt.TryFind<ModItem>("ToxicTablet", out ModItem ToxicTablet))
|
|
||||||
{
|
|
||||||
recipe.AddIngredient(ToxicTablet.Type, 1);
|
|
||||||
}
|
|
||||||
if (ModLoader.TryGetMod("tMx", out Mod tMxmt) && tMxmt.TryFind<ModItem>("MoltenTablet", out ModItem MoltenTablet))
|
|
||||||
{
|
|
||||||
recipe.AddIngredient(MoltenTablet.Type, 1);
|
|
||||||
}
|
|
||||||
recipe.AddTile(TileID.WorkBenches);
|
|
||||||
recipe.Register();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,5 +1,5 @@
|
|||||||
displayName = tTP
|
displayName = tTP
|
||||||
author = mikx
|
author = mikx
|
||||||
version = 1.0.0
|
version = 1.1.0
|
||||||
modReferences = tMx
|
modReferences = tMx
|
||||||
dllReferences = Newtonsoft.Json
|
dllReferences = Newtonsoft.Json
|
22
tTPConfigs.cs
Normal file
22
tTPConfigs.cs
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Terraria.ModLoader.Config;
|
||||||
|
|
||||||
|
namespace tTP
|
||||||
|
{
|
||||||
|
public class tTPConfigs : ModConfig
|
||||||
|
{
|
||||||
|
[Header("Craft")]
|
||||||
|
|
||||||
|
[Label("Use tMx Tablets")]
|
||||||
|
[Tooltip("Use tMX 4 Tablets to craft a Personal Teleporter. If false, will use a recipe with vanilla materials.")]
|
||||||
|
[DefaultValue(true)]
|
||||||
|
public bool UsetMxTablets;
|
||||||
|
|
||||||
|
public override ConfigScope Mode => (ConfigScope)0;
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user