Skip to content

Commit

Permalink
chore: renamed MaxPieceCategory to VanillaMaxPieceCategory
Browse files Browse the repository at this point in the history
  • Loading branch information
MSchmoecker committed Apr 23, 2024
1 parent 72d054a commit 77473e5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion JotunnLib/Configs/PieceTableConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public string[] GetCategories()

if (UseCategories)
{
for (int i = 0; i < PieceUtils.MaxPieceCategory; i++)
for (int i = 0; i < PieceUtils.VanillaMaxPieceCategory; i++)
{
categories.Add(Enum.GetName(typeof(Piece.PieceCategory), i));
}
Expand Down
2 changes: 1 addition & 1 deletion JotunnLib/Entities/CustomPieceTable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public CustomPieceTable(GameObject pieceTablePrefab) : base(Assembly.GetCallingA
if (PieceTable != null && PieceTable.m_useCategories)
{
List<string> categories = new List<string>();
for (int i = 0; i < PieceUtils.MaxPieceCategory; i++)
for (int i = 0; i < PieceUtils.VanillaMaxPieceCategory; i++)
{
categories.Add(Enum.GetName(typeof(Piece.PieceCategory), i));
}
Expand Down
2 changes: 1 addition & 1 deletion JotunnLib/Managers/PieceManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ private void ReloadKnownRecipes(Player self)

private static IEnumerable<CodeInstruction> TranspileMaxCategory(IEnumerable<CodeInstruction> instructions, int maxOffset)
{
int number = PieceUtils.MaxPieceCategory + maxOffset;
int number = PieceUtils.VanillaMaxPieceCategory + maxOffset;

foreach (CodeInstruction instruction in instructions)
{
Expand Down
2 changes: 1 addition & 1 deletion JotunnLib/Utils/PieceUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Jotunn.Utils
{
internal static class PieceUtils
{
public static int MaxPieceCategory { get; } = GetMaxPieceCategory();
public static int VanillaMaxPieceCategory { get; } = GetMaxPieceCategory();

private static int GetMaxPieceCategory()
{
Expand Down

0 comments on commit 77473e5

Please sign in to comment.