1.2.0 - Added the Vanilla Material(s) & Quantity to config

This commit is contained in:
mikx 2025-02-17 16:39:08 -05:00
parent 24d23a47e8
commit 243549733b
6 changed files with 45 additions and 6 deletions

View File

@ -38,8 +38,11 @@ namespace tTP.Content.Items.Placeable
}
} else
{
recipe.AddIngredient(ItemID.IronBar, 10);
recipe.AddIngredient(ItemID.FallenStar, 1);
int mlc = config.VanillaMatsList.Count;
for (int vm = 0; vm < mlc; vm++)
{
recipe.AddIngredient(config.VanillaMatsList[vm], config.VanillaMatsListQty[vm]);
}
}
recipe.AddTile(TileID.WorkBenches);
recipe.Register();

View File

@ -16,5 +16,25 @@ Configs: {
Headers.Craft: Craft Header
DisplayName: tTP Configs
collapsedList: {
Label: Vanilla Materials
Tooltip: Use tMX 4 Tablets to craft a Personal Teleporter. If false, will use a recipe with vanilla materials.
}
UseVanillaMats: {
Label: Use Vanilla Materials
Tooltip: If set to true, will use vanilla material(s) in the recipe.
}
VanillaMatsList: {
Label: Vanilla Materials
Tooltip: Add the ItemID (a number) of each material you want in the recipe.
}
VanillaMatsListQty: {
Label: Material(s) Quantity
Tooltip: Add the quantity for each ItemID you entered in the material list.
}
}
}

View File

@ -1,11 +1,18 @@
## tTP
![tTP](https://mxcloud.ovh/s/jwZKKGnEgMSqj9D/download/tTP.png)
**Author** mikx\
**Dependencies** tMx\
tTP is a teleporter mod for tModLoader.\
You need to collect 1 of each Tablets from tMx to craft it.\
There is a config in-game to use vanilla materials instead.\
Addind a **Personal Teleporter** to the world add an icon on your map.\
Hover over one of the **Personal Teleporter** icon on your map while holding "Shift" to teleport to it!\
\
![Personal Teleporter in the Crimson.](https://mxcloud.ovh/s/5XAxagRyidYNQmK/download/tTP-g001.png)
![Personal Teleporter in the Jungle.](https://mxcloud.ovh/s/4EenLTKi6XyY9XT/download/tTP-g002.png)
![Personal Teleporter in the world.](https://mxcloud.ovh/s/AmzkNjWnqE2a4LF/download/tTP-g003.png)
![Personal Teleporter in the world.](https://mxcloud.ovh/s/AmzkNjWnqE2a4LF/download/tTP-g003.png)
## CHANGELOG
**1.2.0**
- Added the vanilla material(s) list to the config.
- Added the material(s) quantity list to the config.
- YOU NEED TO FORCE RELOAD AFTER EVERY CHANGE.

View File

@ -1,6 +1,6 @@
displayName = tTP
author = mikx
version = 1.1.1
version = 1.2.0
sortAfter = tMx
modReferences = tMx
dllReferences = Newtonsoft.Json

2
tTP.cs
View File

@ -20,7 +20,7 @@ namespace tTP
public override void Load()
{
}
public override void Unload()

View File

@ -4,6 +4,7 @@ using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Terraria.ID;
using Terraria.ModLoader.Config;
namespace tTP
@ -17,6 +18,14 @@ namespace tTP
[DefaultValue(true)]
public bool UsetMxTablets;
[Label("Vanilla Material(s)")]
[Tooltip("Add the ItemID (a number) of each material you want in the recipe.")]
public List<int> VanillaMatsList = new List<int>() { 22, 75 };
[Label("Material(s) Quantity")]
[Tooltip("Add the quantity for each ItemID you entered in the material list.")]
public List<int> VanillaMatsListQty = new List<int>() { 10, 1 };
public override ConfigScope Mode => (ConfigScope)0;
}
}