1.1.1 - Recipe Fix + Table Columns clean at Save

This commit is contained in:
mikx
2025-02-17 15:27:52 -05:00
parent 89b4deb0f0
commit fdb6d9e223
8 changed files with 42 additions and 45 deletions

View File

@@ -41,6 +41,8 @@ namespace tTP.Common.Systems
tTP.table.Columns.Add("y", typeof(Int64));
} else
{
int tpc = jar.Count;
Main.NewText($"[tTP] You have {tpc} Personal Teleporter in this world.", Color.Aqua);
DataSet ds = JsonConvert.DeserializeObject<DataSet>(File.ReadAllText($"tTP/{tTP.worldName}.json"));
tTP.table = ds.Tables["tp"];
}

View File

@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Terraria.ModLoader;
namespace tTP.Common.Systems
{
internal class ModSystemPreSaveAndQuit : ModSystem
{
public override void PreSaveAndQuit()
{
tTP.table.Columns.Clear();
}
}
}