Skip to content

Commit 5e0a3b9

Browse files
committed
Fixed stream not closed error
1 parent 5cc73d8 commit 5e0a3b9

File tree

10 files changed

+9
-3
lines changed

10 files changed

+9
-3
lines changed
0 Bytes
Binary file not shown.
161 Bytes
Binary file not shown.

.vs/StructureHelper/v17/.suo

18.5 KB
Binary file not shown.

Generator.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,13 @@ internal static bool LoadFile(string path, Mod mod, bool fullPath = false)
255255
{
256256
TagCompound tag;
257257

258-
if (!fullPath) tag = TagIO.FromStream(mod.GetFileStream(path));
258+
if (!fullPath)
259+
{
260+
var stream = mod.GetFileStream(path);
261+
tag = TagIO.FromStream(stream);
262+
stream.Close();
263+
}
264+
259265
else tag = TagIO.FromFile(path);
260266

261267
if (tag is null)
0 Bytes
Binary file not shown.
8 Bytes
Binary file not shown.

build.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
displayName = Structure Helper
22
author = ScalarVector
3-
version = 2.0.0
3+
version = 2.0.2
44
homepage = https://forums.terraria.org/index.php?threads/scalars-structurizer-a-worldgen-helper-library.87189/

description.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
NOTE: StructureHelper 2.0.0 is incompatible with structure files from 1.X.X versions of the mod! You will have to manually port your structrues over to use them!
1+
NOTE: StructureHelper 2.0.0+ is incompatible with structure files from 1.X.X versions of the mod! You will have to manually port your structrues over to use them!
22

33
StructureHelper is a simple tool which allows mod creators to build world generation structures in-game and save them to external files, as opposed to manually encoding them into their source code, usually to the detriment of readability and organization. The nature of structures being saved to external files also allows for better organization, sharing, and editing/replacement of structures. The mod can also be used as a sort of world-editor allowing you to easily copy/paste sections of your world around.
44

0 Bytes
Binary file not shown.
8 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)