Skip to content
This repository has been archived by the owner on Oct 12, 2024. It is now read-only.

Commit

Permalink
Fix off by one error with Progressive Blueprints
Browse files Browse the repository at this point in the history
  • Loading branch information
ThePhar committed Oct 24, 2023
1 parent d70a90a commit b4b3907
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
19 changes: 10 additions & 9 deletions Randomizer/Util.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
// RogueLegacyRandomizer - Util.cs
// Last Modified 2023-10-24 5:08 PM
//
// Last Modified 2023-10-24 6:29 PM
//
// This project is based on the modified disassembly of Rogue Legacy's engine, with permission to do so by its
// original creators. Therefore, the former creators' copyright notice applies to the original disassembly.
//
//
// Original Source - © 2011-2018, Cellar Door Games Inc.
// Rogue Legacy™ is a trademark or registered trademark of Cellar Door Games Inc. All Rights Reserved.

using System;
using Newtonsoft.Json.Linq;

namespace Randomizer;

Expand All @@ -25,12 +26,12 @@ public static void PrintProperties(object obj, int indentation = 1)
return;
}

// var indentString = new string('\t', indentation);
// var json = JObject.FromObject(obj);
// foreach (var property in json.Properties())
// {
// Console.WriteLine($"{property.Name}: {property.Value}");
// }
var indentString = new string('\t', indentation);
var json = JObject.FromObject(obj);
foreach (var property in json.Properties())
{
Console.WriteLine($"{property.Name}: {property.Value}");
}

// var objectType = obj.GetType();
// var properties = objectType.GetProperties();
Expand Down
6 changes: 2 additions & 4 deletions RogueLegacy/Screens/GetItemScreen.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RogueLegacyRandomizer - GetItemScreen.cs
// Last Modified 2023-10-24 4:18 PM
// Last Modified 2023-10-24 6:29 PM
//
// This project is based on the modified disassembly of Rogue Legacy's engine, with permission to do so by its
// original creators. Therefore, the former creators' copyright notice applies to the original disassembly.
Expand Down Expand Up @@ -421,9 +421,7 @@ private string GetBlueprintName(long item)
index++;
}

return Program.Game.ArchipelagoManager.GetItemName(ItemCode.EQUIPMENT_SQUIRE +
progressiveArmorOrder[
index - 1]); // Go back to the last one.
return Program.Game.ArchipelagoManager.GetItemName(ItemCode.EQUIPMENT_SQUIRE + progressiveArmorOrder[index]);
}

public static string GetSkillPlateIcon(long item, out string itemName)
Expand Down

0 comments on commit b4b3907

Please sign in to comment.