From 243549733b76f30ea03d1292d1fd2254b73a127f Mon Sep 17 00:00:00 2001 From: mikx Date: Mon, 17 Feb 2025 16:39:08 -0500 Subject: [PATCH] 1.2.0 - Added the Vanilla Material(s) & Quantity to config --- Content/Items/Placeable/PersonalTeleporter.cs | 7 +++++-- Localization/en-US_Mods.tTP.hjson | 20 +++++++++++++++++++ README.md | 11 ++++++++-- build.txt | 2 +- tTP.cs | 2 +- tTPConfigs.cs | 9 +++++++++ 6 files changed, 45 insertions(+), 6 deletions(-) diff --git a/Content/Items/Placeable/PersonalTeleporter.cs b/Content/Items/Placeable/PersonalTeleporter.cs index 70ae0d3..d5f5779 100644 --- a/Content/Items/Placeable/PersonalTeleporter.cs +++ b/Content/Items/Placeable/PersonalTeleporter.cs @@ -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(); diff --git a/Localization/en-US_Mods.tTP.hjson b/Localization/en-US_Mods.tTP.hjson index 3e5bac2..7519630 100644 --- a/Localization/en-US_Mods.tTP.hjson +++ b/Localization/en-US_Mods.tTP.hjson @@ -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. + } } } diff --git a/README.md b/README.md index 6316afa..a683469 100644 --- a/README.md +++ b/README.md @@ -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) \ No newline at end of file +![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. \ No newline at end of file diff --git a/build.txt b/build.txt index 69b2144..048033f 100644 --- a/build.txt +++ b/build.txt @@ -1,6 +1,6 @@ displayName = tTP author = mikx -version = 1.1.1 +version = 1.2.0 sortAfter = tMx modReferences = tMx dllReferences = Newtonsoft.Json \ No newline at end of file diff --git a/tTP.cs b/tTP.cs index b00196e..d7190ae 100644 --- a/tTP.cs +++ b/tTP.cs @@ -20,7 +20,7 @@ namespace tTP public override void Load() { - + } public override void Unload() diff --git a/tTPConfigs.cs b/tTPConfigs.cs index e2473ea..dee959d 100644 --- a/tTPConfigs.cs +++ b/tTPConfigs.cs @@ -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 VanillaMatsList = new List() { 22, 75 }; + + [Label("Material(s) Quantity")] + [Tooltip("Add the quantity for each ItemID you entered in the material list.")] + public List VanillaMatsListQty = new List() { 10, 1 }; + public override ConfigScope Mode => (ConfigScope)0; } }