Skip to content

Commit

Permalink
Add empty constructor for BspFile
Browse files Browse the repository at this point in the history
  • Loading branch information
LogicAndTrick committed Jun 4, 2022
1 parent a24a9b0 commit 44338e3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
13 changes: 13 additions & 0 deletions Sledge.Formats.Bsp/BspFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,19 @@ public class BspFile
public List<ILump> Lumps { get; set; }
public BspFileOptions Options { get; set; }

/// <summary>
/// Create an empty BSP file
/// </summary>
/// <param name="version">The version of the file</param>
/// <param name="options">Options for the file</param>
public BspFile(Version version, BspFileOptions options = null)
{
Version = version;
Blobs = new List<Blob>();
Lumps = new List<ILump>();
Options = options ?? new BspFileOptions();
}

public BspFile(Stream stream, BspFileOptions options = null)
{
Options = (options ?? BspFileOptions.Default).Copy();
Expand Down
4 changes: 2 additions & 2 deletions Sledge.Formats.Bsp/Sledge.Formats.Bsp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<RepositoryUrl>https://github.com/LogicAndTrick/sledge-formats</RepositoryUrl>
<RepositoryType>Git</RepositoryType>
<PackageTags>half-life quake valve bsp</PackageTags>
<PackageReleaseNotes>Fix bug in blue shift format detection</PackageReleaseNotes>
<Version>1.0.4</Version>
<PackageReleaseNotes>Add empty constructor for BspFile</PackageReleaseNotes>
<Version>1.0.5</Version>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
Expand Down

0 comments on commit 44338e3

Please sign in to comment.