diff --git a/LibBSP/Source/Structs/Common/Lumps/Entities.cs b/LibBSP/Source/Structs/Common/Lumps/Entities.cs index 859b2f3..cb2818b 100644 --- a/LibBSP/Source/Structs/Common/Lumps/Entities.cs +++ b/LibBSP/Source/Structs/Common/Lumps/Entities.cs @@ -1,4 +1,5 @@ using System; +using System.IO; using System.Collections.Generic; namespace LibBSP { @@ -24,10 +25,18 @@ namespace LibBSP { /// public Entities() : base() { } + /// + /// Initializes a new object, parsing all the bytes in the passed . + /// + /// The file to read. + /// The of the source map. + public Entities(FileInfo file, MapType type) : this(File.ReadAllBytes(file.FullName), type) { } + /// /// Initializes a new object, and parses the passed byte array into the List. /// /// Bytes read from a file. + /// The of the source map. public Entities(byte[] data, MapType type) : base() { // Keep track of whether or not we're currently in a set of quotation marks. // I came across a map where the idiot map maker used { and } within a value. This broke the code before.