Skip to content

Commit

Permalink
Simplify FQNs for ExtremeGearModel
Browse files Browse the repository at this point in the history
  • Loading branch information
Zazsona committed Aug 15, 2024
1 parent dfdfbbc commit f37aece
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -212,19 +212,19 @@ private void LoadUnlockedGearsFromSave()
return;

// Reference to the vanilla location for storing gear unlock state
RefFixedArrayPtr<bool> vanillaUnlockedGearModels = new RefFixedArrayPtr<bool>((ulong)0x017BE4E8, (int)Sewer56.SonicRiders.Structures.Enums.ExtremeGearModel.Cannonball + 1);
RefFixedArrayPtr<bool> vanillaUnlockedGearModels = new RefFixedArrayPtr<bool>((ulong)0x017BE4E8, (int)ExtremeGearModel.Cannonball + 1);
for (var x = 0; x < vanillaUnlockedGearModels.Count; x++)
{
bool isUnlocked = vanillaUnlockedGearModels[x];
State.UnlockedGearModels[x] = isUnlocked;
}

// Unlock any remaining custom gears
int firstFreeGearModelSlot = (int)Sewer56.SonicRiders.Structures.Enums.ExtremeGearModel.Berserker + 1;
int firstFreeGearModelSlot = (int)ExtremeGearModel.Berserker + 1;
for (var x = firstFreeGearModelSlot; x < State.UnlockedGearModels.Count; x++)
{
// If it's defined in the Enum, it's a Vanilla gear, thus managed by the save.
if (Enum.IsDefined(typeof(Sewer56.SonicRiders.Structures.Enums.ExtremeGearModel), (byte) x))
if (Enum.IsDefined(typeof(ExtremeGearModel), (byte) x))
continue;

State.UnlockedGearModels[x] = true;
Expand Down

0 comments on commit f37aece

Please sign in to comment.