Skip to content

Commit

Permalink
Merge branch 'feature/element'
Browse files Browse the repository at this point in the history
# Conflicts:
#	OniExtract/OniExtract.csproj
  • Loading branch information
cnctemaR committed May 1, 2024
2 parents 2cabf65 + 9c9f7fb commit b9bb8bb
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
17 changes: 17 additions & 0 deletions OniExtract/ExportElement.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using OniExtract2;
using System;
using System.IO;
using System.Collections.Generic;
using UnityEngine;
using static EdiblesManager;

public class ExportElement : BaseExport
{
public override string ExportFileName { get; set; } = "elements";
public Dictionary<int, Element> elementTable;

public ExportElement()
{
this.elementTable = ElementLoader.elementTable;
}
}
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="ExportElement.cs" />
<Compile Include="ExportEquipment.cs" />
<Compile Include="ExportGeyser.cs" />
<Compile Include="ExportBuilding.cs" />
Expand Down
11 changes: 11 additions & 0 deletions OniExtract/Patches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -512,5 +512,16 @@ private static void Postfix(IEquipmentConfig config)
exportElement.ExportJsonFile();
}
}

[HarmonyPatch(typeof(LegacyModMain), "Load")]
internal class OniExtract_Game_LegacyModMain
{
private static void Postfix()
{
Debug.Log("OniExtract: " + "Export Elements");
ExportElement exportElement = new ExportElement();
exportElement.ExportJsonFile();
}
}
}
}

0 comments on commit b9bb8bb

Please sign in to comment.