Skip to content

Commit 7cab398

Browse files
committed
Fixed structure folder not automatically generating
1 parent 942e9a2 commit 7cab398

File tree

8 files changed

+4
-1
lines changed

8 files changed

+4
-1
lines changed
50 Bytes
Binary file not shown.

.vs/StructureHelper/v17/.suo

1.5 KB
Binary file not shown.

GUI/ManualGeneratorMenu.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ public static void LoadStructures()
3838
selected = null;
3939

4040
var folderPath = ModLoader.ModPath.Replace("Mods", "SavedStructures");
41+
Directory.CreateDirectory(folderPath);
42+
4143
var filePaths = Directory.GetFiles(folderPath);
4244

4345
foreach(string path in filePaths)

StructureHelper.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
using Terraria.UI;
1515
using StructureHelper.GUI;
1616
using StructureHelper.ChestHelper.GUI;
17+
using System.IO;
1718

1819
namespace StructureHelper
1920
{
@@ -23,7 +24,7 @@ public class StructureHelper : Mod
2324

2425
public static StructureHelper Instance { get; set; }
2526

26-
public override void Unload()
27+
public override void Unload()
2728
{
2829
Generator.StructureDataCache.Clear();
2930
}
0 Bytes
Binary file not shown.
8 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
8 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)