Skip to content

Commit

Permalink
renamed enums
Browse files Browse the repository at this point in the history
  • Loading branch information
tolik518 committed Feb 20, 2024
1 parent b54abf5 commit 46e329e
Show file tree
Hide file tree
Showing 20 changed files with 129 additions and 129 deletions.
36 changes: 18 additions & 18 deletions SoG_SGreader.Test/DataReaderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,63 +97,63 @@ private static IEnumerable<object[]> FirstItem()
{
yield return new object[] {
new Item {
ItemID = SogItems.Usable_CardAlbum,
ItemID = SogItem.Usable_CardAlbum,
ItemCount = 1,
ItemPos = 189755
}, GetSaveGame(0).Inventory };

yield return new object[] {
new Item{
ItemID = SogItems.KeyItem_DivaMirror,
ItemID = SogItem.KeyItem_DivaMirror,
ItemCount = 0,
ItemPos = 158319
}, GetSaveGame(1).Inventory };

yield return new object[] {
new Item{
ItemID = SogItems.Usable_CardAlbum,
ItemID = SogItem.Usable_CardAlbum,
ItemCount = 1,
ItemPos = 46623
}, GetSaveGame(2).Inventory };

yield return new object[] {
new Item{
ItemID = SogItems.Usable_CardAlbum,
ItemID = SogItem.Usable_CardAlbum,
ItemCount = 1,
ItemPos = 16756
}, GetSaveGame(3).Inventory };

yield return new object[] {
new Item{
ItemID = SogItems.Usable_CardAlbum,
ItemID = SogItem.Usable_CardAlbum,
ItemCount = 1,
ItemPos = 25026
}, GetSaveGame(4).Inventory };

yield return new object[] {
new Item{
ItemID = SogItems.Usable_CardAlbum,
ItemID = SogItem.Usable_CardAlbum,
ItemCount = 1,
ItemPos = 18895
}, GetSaveGame(5).Inventory };

yield return new object[] {
new Item{
ItemID = SogItems.Usable_CardAlbum,
ItemID = SogItem.Usable_CardAlbum,
ItemCount = 1,
ItemPos = 16634
}, GetSaveGame(6).Inventory };

yield return new object[] {
new Item{
ItemID = SogItems.Usable_CardAlbum,
ItemID = SogItem.Usable_CardAlbum,
ItemCount = 1,
ItemPos = 14455
}, GetSaveGame(7).Inventory };

yield return new object[] {
new Item{
ItemID = SogItems.Usable_CardAlbum,
ItemID = SogItem.Usable_CardAlbum,
ItemCount = 1,
ItemPos = 96617
}, GetSaveGame(8).Inventory };
Expand All @@ -170,63 +170,63 @@ private static IEnumerable<object[]> LastItem()
{
yield return new object[] {
new Item {
ItemID = SogItems.Furniture_Decoration_ArcadeChallengeTrophyF08,
ItemID = SogItem.Furniture_Decoration_ArcadeChallengeTrophyF08,
ItemCount = 1,
ItemPos = 189760
}, GetSaveGame(0).Inventory };

yield return new object[] {
new Item {
ItemID = SogItems.KeyItem_CatalystOfPower,
ItemID = SogItem.KeyItem_CatalystOfPower,
ItemCount = 1,
ItemPos = 159243
}, GetSaveGame(1).Inventory };

yield return new object[] {
new Item {
ItemID = SogItems.KeyItem_CatalystOfPower,
ItemID = SogItem.KeyItem_CatalystOfPower,
ItemCount = 1,
ItemPos = 46457
}, GetSaveGame(2).Inventory };

yield return new object[] {
new Item {
ItemID = SogItems.Shoes_MushroomSlippers,
ItemID = SogItem.Shoes_MushroomSlippers,
ItemCount = 1,
ItemPos = 16738},
GetSaveGame(3).Inventory };

yield return new object[] {
new Item {
ItemID = SogItems.TwoHanded_BugNet,
ItemID = SogItem.TwoHanded_BugNet,
ItemCount = 0,
ItemPos = 25025
}, GetSaveGame(4).Inventory };

yield return new object[] {
new Item {
ItemID = SogItems.TwoHanded_BugNet,
ItemID = SogItem.TwoHanded_BugNet,
ItemCount = 0,
ItemPos = 18894},
GetSaveGame(5).Inventory };

yield return new object[] {
new Item {
ItemID = SogItems.Furniture_Carpet_MasterHQRed,
ItemID = SogItem.Furniture_Carpet_MasterHQRed,
ItemCount = 0,
ItemPos = 16614},
GetSaveGame(6).Inventory };

yield return new object[] {
new Item {
ItemID = SogItems.TwoHanded_BugNet,
ItemID = SogItem.TwoHanded_BugNet,
ItemCount = 0,
ItemPos =14454},
GetSaveGame(7).Inventory };

yield return new object[] {
new Item {
ItemID = SogItems.OneHanded_UgrasScroll,
ItemID = SogItem.OneHanded_UgrasScroll,
ItemCount = 1,
ItemPos =96375
}, GetSaveGame(8).Inventory };
Expand Down
20 changes: 10 additions & 10 deletions SoG_SGreader/DataReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ public static Player ReadFromFile(string fileName, ITextBoxWrapper txtConsole)
switch (quickSlotType)
{
case 1:
playerObject.Quickslots.Add((SogItems)readBinary.ReadInt32());
playerObject.Quickslots.Add((SogItem)readBinary.ReadInt32());
break;
case 2:
playerObject.Quickslots.Add((SogSkills)readBinary.ReadUInt16());
playerObject.Quickslots.Add((SogSkill)readBinary.ReadUInt16());
break;
default:
playerObject.Quickslots.Add(0);
Expand Down Expand Up @@ -82,7 +82,7 @@ public static Player ReadFromFile(string fileName, ITextBoxWrapper txtConsole)
{
playerObject.Inventory.Add(new Item
{
ItemID = (SogItems)readBinary.ReadInt32(),
ItemID = (SogItem)readBinary.ReadInt32(),
ItemCount = readBinary.ReadInt32(),
ItemPos = readBinary.ReadUInt32()
});
Expand All @@ -100,7 +100,7 @@ public static Player ReadFromFile(string fileName, ITextBoxWrapper txtConsole)
{
playerObject.MerchantItems.Add(new MerchantItem
{
ItemID = (SogItems)readBinary.ReadInt32(),
ItemID = (SogItem)readBinary.ReadInt32(),
ItemCount = readBinary.ReadInt32()
});
}
Expand All @@ -115,7 +115,7 @@ public static Player ReadFromFile(string fileName, ITextBoxWrapper txtConsole)
{
playerObject.Cards.Add(new Card
{
CardID = (SogEnemies)readBinary.ReadInt32()
CardID = (SogEnemy)readBinary.ReadInt32()
});
}

Expand Down Expand Up @@ -152,7 +152,7 @@ public static Player ReadFromFile(string fileName, ITextBoxWrapper txtConsole)
{
playerObject.Skills.Add(new Skill
{
SkillID = (SogSkills)readBinary.ReadInt16(),
SkillID = (SogSkill)readBinary.ReadInt16(),
SkillLevel = readBinary.ReadByte()
});
}
Expand Down Expand Up @@ -238,7 +238,7 @@ public static Player ReadFromFile(string fileName, ITextBoxWrapper txtConsole)
{
playerObject.Quests.Add(new Quest
{
QuestID = (SogQuests) readBinary.ReadUInt16()
QuestID = (SogQuest) readBinary.ReadUInt16()
});
}
txtConsole.AppendText("\r\n" + "QuestsCount: " + playerObject.QuestsCount);
Expand Down Expand Up @@ -296,7 +296,7 @@ public static Player ReadFromFile(string fileName, ITextBoxWrapper txtConsole)
{
playerObject.ItemsMet.Add(new ItemsSeen
{
ItemID = (SogItems)readBinary.ReadInt32()
ItemID = (SogItem)readBinary.ReadInt32()
});
}

Expand All @@ -309,7 +309,7 @@ public static Player ReadFromFile(string fileName, ITextBoxWrapper txtConsole)
{
playerObject.ItemsCrafted.Add(new ItemCrafted
{
ItemID = (SogItems)readBinary.ReadInt32()
ItemID = (SogItem)readBinary.ReadInt32()
});
}

Expand All @@ -322,7 +322,7 @@ public static Player ReadFromFile(string fileName, ITextBoxWrapper txtConsole)
{
playerObject.FishiesCaught.Add(new FishCaught
{
FishID = (SogItems)readBinary.ReadInt32()
FishID = (SogItem)readBinary.ReadInt32()
});
}

Expand Down
4 changes: 2 additions & 2 deletions SoG_SGreader/DataWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ public void WriteToFile(string fileName)

foreach (var quickslot in playerObject.Quickslots)
{
if (quickslot.GetType() == typeof(SogItems))
if (quickslot.GetType() == typeof(SogItem))
{
writeBinary.Write((byte) 1);
writeBinary.Write((int) quickslot);
}
else if (quickslot.GetType() == typeof(SogSkills))
else if (quickslot.GetType() == typeof(SogSkill))
{
writeBinary.Write((byte) 2);
writeBinary.Write((ushort) quickslot);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace SoG_SGreader
{
public enum SogColors : ushort
public enum SogColor : ushort
{
_2C1D1D,
_2E2226,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace SoG_SGreader
{
public enum SogEnemies: int
public enum SogEnemy: int
{
Null = -1,
GreenSlime = 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
// Source: Secrets of Grindea: SoG.ItemCodex
// Game Version: 0.99g
public enum SogItems: int
public enum SogItem: int
{
Null = -1,
Apple = 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
// Source: Secrets of Grindea: SoG.NPCCodex
// Game Version: 0.99c
public enum SogPets: int
public enum SogPet: int
{
Rabby = 0x2710,
Slimy = 0x2711,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
// Source: Secrets of Grindea: SoG.QuestCodex
// Game Version: 0.99g
public enum SogQuests: ushort
public enum SogQuest: ushort
{
MainQuest_FirstVillage_FindApples = 0,
MainQuest_FirstVillage_GearUp = 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
// Source: Secrets of Grindea: SoG.SpellCodex
// Game Version: 0.99g
public enum SogSkills: ushort
public enum SogSkill: ushort
{
NULL = 0,
Basic_HealthBoost = 1,
Expand Down
Loading

0 comments on commit 46e329e

Please sign in to comment.