Skip to content

Commit

Permalink
add SimHashes export
Browse files Browse the repository at this point in the history
  • Loading branch information
cnctemaR committed Apr 26, 2024
1 parent 0659e03 commit 7265bcd
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
17 changes: 17 additions & 0 deletions OniExtract/ExportTag.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using OniExtract2;
using System;
using System.Collections.Generic;

public class ExportTag : BaseExport
{
public override string ExportFileName { get; set; } = "tags";
public Dictionary<string, int> SimHashes = new Dictionary<string, int>();

public ExportTag()
{
foreach (var name in Enum.GetNames(typeof(SimHashes)))
{
this.SimHashes[name] = (int)Enum.Parse(typeof(SimHashes), name);
}
}
}
1 change: 1 addition & 0 deletions OniExtract/OniExtract.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="BBuildingFinal.cs" />
<Compile Include="ExportTag.cs" />
<Compile Include="BaseExport.cs" />
<Compile Include="model\BColor.cs" />
<Compile Include="model\BElement.cs" />
Expand Down
4 changes: 3 additions & 1 deletion OniExtract/Patches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,9 @@ internal class OniExtract_Game_Entities
{
private static void Postfix()
{
Debug.Log("OniExtract: " + "Export Entities");
Debug.Log("OniExtract: " + "Export Tags");
ExportTag exportTag = new ExportTag();
exportTag.ExportJsonFile();
}
}
}
Expand Down

0 comments on commit 7265bcd

Please sign in to comment.