Skip to content

Commit

Permalink
refactor: remove unnecessary partial keyword
Browse files Browse the repository at this point in the history
  • Loading branch information
azeier committed Oct 26, 2023
1 parent 9c64a42 commit c5c3c50
Show file tree
Hide file tree
Showing 29 changed files with 30 additions and 29 deletions.
1 change: 1 addition & 0 deletions HearthDb.CardIdGenerator/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ static void Main()
var decls = SyntaxBuilder.GetCollectible().Concat(SyntaxBuilder.GetNonCollectible());
var total = decls.Count();

Console.WriteLine("===== Formatting =====");
Parallel.ForEach(decls, (item) => {
var (name, decl) = item;
var cCardIds = ClassDeclaration("CardIds")
Expand Down
4 changes: 2 additions & 2 deletions HearthDb.CardIdGenerator/SyntaxBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ internal class SyntaxBuilder
var className = c == "DREAM" ? "DreamCards" : CultureInfo.InvariantCulture.TextInfo.ToTitleCase(c.ToLower());
Console.WriteLine($"> Generating NonCollectible.{className}");
var classDecl = ClassDeclaration("NonCollectible").AddModifiers(Token(PublicKeyword), Token(PartialKeyword));
var cCard = ClassDeclaration(className).AddModifiers(Token(PublicKeyword), Token(PartialKeyword));
var cCard = ClassDeclaration(className).AddModifiers(Token(PublicKeyword));
var anyCards = false;
foreach(var card in
Cards.All.OrderBy(x => x.Value.Set)
Expand Down Expand Up @@ -163,7 +163,7 @@ private static string ResolveNamingConflict(string name, Card card, Dictionary<s
var className = CultureInfo.InvariantCulture.TextInfo.ToTitleCase(c.ToLower());
Console.WriteLine($"> Generating Collectible.{className}");
var classDecl = ClassDeclaration("Collectible").AddModifiers(Token(PublicKeyword), Token(PartialKeyword));
var cCard = ClassDeclaration(className).AddModifiers(Token(PublicKeyword), Token(PartialKeyword));
var cCard = ClassDeclaration(className).AddModifiers(Token(PublicKeyword));
foreach(var card in
Cards.All.Values.Where(x => x.Collectible && x.Class.ToString().Equals(c)))
{
Expand Down
2 changes: 1 addition & 1 deletion HearthDb/CardIds.Collectible.Deathknight.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public partial class CardIds
{
public partial class Collectible
{
public partial class Deathknight
public class Deathknight
{
public const string HardcoreCultist = "ETC_209";
public const string ClimacticNecroticExplosion = "ETC_210";
Expand Down
2 changes: 1 addition & 1 deletion HearthDb/CardIds.Collectible.Demonhunter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public partial class CardIds
{
public partial class Collectible
{
public partial class Demonhunter
public class Demonhunter
{
public const string BattlewornVanguard = "AV_118";
public const string KurtrusDemonRender = "AV_204";
Expand Down
2 changes: 1 addition & 1 deletion HearthDb/CardIds.Collectible.Druid.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public partial class CardIds
{
public partial class Collectible
{
public partial class Druid
public class Druid
{
public const string LivingRoots = "AT_037";
public const string DarnassusAspirant = "AT_038";
Expand Down
2 changes: 1 addition & 1 deletion HearthDb/CardIds.Collectible.Hunter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public partial class CardIds
{
public partial class Collectible
{
public partial class Hunter
public class Hunter
{
public const string RamWrangler = "AT_010";
public const string Powershot = "AT_056";
Expand Down
2 changes: 1 addition & 1 deletion HearthDb/CardIds.Collectible.Mage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public partial class CardIds
{
public partial class Collectible
{
public partial class Mage
public class Mage
{
public const string FlameLanceTGT = "AT_001";
public const string Effigy = "AT_002";
Expand Down
2 changes: 1 addition & 1 deletion HearthDb/CardIds.Collectible.Neutral.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public partial class CardIds
{
public partial class Collectible
{
public partial class Neutral
public class Neutral
{
public const string TwilightGuardian = "AT_017";
public const string SkycapnKragg = "AT_070";
Expand Down
2 changes: 1 addition & 1 deletion HearthDb/CardIds.Collectible.Paladin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public partial class CardIds
{
public partial class Collectible
{
public partial class Paladin
public class Paladin
{
public const string CompetitiveSpirit = "AT_073";
public const string SealOfChampions = "AT_074";
Expand Down
2 changes: 1 addition & 1 deletion HearthDb/CardIds.Collectible.Priest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public partial class CardIds
{
public partial class Collectible
{
public partial class Priest
public class Priest
{
public const string HolyChampion = "AT_011";
public const string SpawnOfShadowsTGT = "AT_012";
Expand Down
2 changes: 1 addition & 1 deletion HearthDb/CardIds.Collectible.Rogue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public partial class CardIds
{
public partial class Collectible
{
public partial class Rogue
public class Rogue
{
public const string ShadoPanRiderTGT = "AT_028";
public const string Buccaneer = "AT_029";
Expand Down
2 changes: 1 addition & 1 deletion HearthDb/CardIds.Collectible.Shaman.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public partial class CardIds
{
public partial class Collectible
{
public partial class Shaman
public class Shaman
{
public const string TuskarrTotemicTGT = "AT_046";
public const string DraeneiTotemcarverTGT = "AT_047";
Expand Down
2 changes: 1 addition & 1 deletion HearthDb/CardIds.Collectible.Warlock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public partial class CardIds
{
public partial class Collectible
{
public partial class Warlock
public class Warlock
{
public const string Dreadsteed = "AT_019";
public const string FearsomeDoomguard = "AT_020";
Expand Down
2 changes: 1 addition & 1 deletion HearthDb/CardIds.Collectible.Warrior.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public partial class CardIds
{
public partial class Collectible
{
public partial class Warrior
public class Warrior
{
public const string Bash = "AT_064";
public const string KingsDefender = "AT_065";
Expand Down
2 changes: 1 addition & 1 deletion HearthDb/CardIds.NonCollectible.Deathknight.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public partial class CardIds
{
public partial class NonCollectible
{
public partial class Deathknight
public class Deathknight
{
public const string TheLichKing_GhoulCharge = "HERO_11bp";
public const string TheLichKing_GhoulFrenzy1 = "HERO_11bp2";
Expand Down
2 changes: 1 addition & 1 deletion HearthDb/CardIds.NonCollectible.Demonhunter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public partial class CardIds
{
public partial class NonCollectible
{
public partial class Demonhunter
public class Demonhunter
{
public const string ChaosStrikeBASIC = "RLK_Prologue_BT_035";
public const string ChaosStrike_ChaosStrikeEnchantment = "RLK_Prologue_BT_035e";
Expand Down
2 changes: 1 addition & 1 deletion HearthDb/CardIds.NonCollectible.DreamCards.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public partial class CardIds
{
public partial class NonCollectible
{
public partial class DreamCards
public class DreamCards
{
public const string LaughingSister = "DREAM_01";
public const string YseraAwakens = "DREAM_02";
Expand Down
2 changes: 1 addition & 1 deletion HearthDb/CardIds.NonCollectible.Druid.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public partial class CardIds
{
public partial class NonCollectible
{
public partial class Druid
public class Druid
{
public const string Wrath_SolarWrath = "EX1_154a";
public const string Wrath_NaturesWrath = "EX1_154b";
Expand Down
2 changes: 1 addition & 1 deletion HearthDb/CardIds.NonCollectible.Hunter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public partial class CardIds
{
public partial class NonCollectible
{
public partial class Hunter
public class Hunter
{
public const string MultiShot = "RLK_Prologue_DS1_183";
public const string ArcaneShotBASIC = "RLK_Prologue_DS1_185";
Expand Down
2 changes: 1 addition & 1 deletion HearthDb/CardIds.NonCollectible.Invalid.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public partial class CardIds
{
public partial class NonCollectible
{
public partial class Invalid
public class Invalid
{
public const string BombsAwayTavernBrawl2 = "FB_Juggernaut_MinionEnchant";
public const string InnkeeperHealthSet = "FB_LK_BossSetup001";
Expand Down
2 changes: 1 addition & 1 deletion HearthDb/CardIds.NonCollectible.Mage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public partial class CardIds
{
public partial class NonCollectible
{
public partial class Mage
public class Mage
{
public const string JainaProudmoore_FireblastRank2 = "HERO_08xbp2";
public const string EtherealArcanist_RawPowerEnchantment = "EX1_274e";
Expand Down
2 changes: 1 addition & 1 deletion HearthDb/CardIds.NonCollectible.Neutral.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public partial class CardIds
{
public partial class NonCollectible
{
public partial class Neutral
public class Neutral
{
public const string BoulderfistOgreBASIC = "BG_CS2_200";
public const string BoulderfistOgre_BoulderfistOgre = "BG_CS2_200_G";
Expand Down
2 changes: 1 addition & 1 deletion HearthDb/CardIds.NonCollectible.Paladin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public partial class CardIds
{
public partial class NonCollectible
{
public partial class Paladin
public class Paladin
{
public const string BlessingOfMight = "RLK_Prologue_CS2_087";
public const string BlessingofMight_BlessingOfMight = "RLK_Prologue_CS2_087_AI";
Expand Down
2 changes: 1 addition & 1 deletion HearthDb/CardIds.NonCollectible.Priest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public partial class CardIds
{
public partial class NonCollectible
{
public partial class Priest
public class Priest
{
public const string InnerFire_InnerFireEnchantment = "CS1_129e";
public const string KulTiranChaplain_AidedEnchantment = "EX1_195e";
Expand Down
2 changes: 1 addition & 1 deletion HearthDb/CardIds.NonCollectible.Rogue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public partial class CardIds
{
public partial class NonCollectible
{
public partial class Rogue
public class Rogue
{
public const string ColdBlood_ColdBloodEnchantment1 = "CS2_073e";
public const string ColdBlood_ColdBloodEnchantment2 = "CS2_073e2";
Expand Down
2 changes: 1 addition & 1 deletion HearthDb/CardIds.NonCollectible.Shaman.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public partial class CardIds
{
public partial class NonCollectible
{
public partial class Shaman
public class Shaman
{
public const string AncestralSpirit_AncestralSpiritEnchantment = "CS2_038e";
public const string FarSight_FarSightEnchantment = "CS2_053e";
Expand Down
2 changes: 1 addition & 1 deletion HearthDb/CardIds.NonCollectible.Warlock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public partial class CardIds
{
public partial class NonCollectible
{
public partial class Warlock
public class Warlock
{
public const string VoidwalkerBASIC = "BG_CS2_065";
public const string MortalCoil = "RLK_Prologue_EX1_302";
Expand Down
2 changes: 1 addition & 1 deletion HearthDb/CardIds.NonCollectible.Warrior.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public partial class CardIds
{
public partial class NonCollectible
{
public partial class Warrior
public class Warrior
{
public const string Rampage_RampageEnchantment = "CS2_104e";
public const string ArathiWeaponsmith_BattleAxeToken = "EX1_398t";
Expand Down
2 changes: 1 addition & 1 deletion HearthDb/CardIds.NonCollectible.Whizbang.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public partial class CardIds
{
public partial class NonCollectible
{
public partial class Whizbang
public class Whizbang
{
public const string WhizbangTheWonderfulHeroic = "BOT_914h";
public const string ZayleShadowCloakHeroic = "DAL_800h";
Expand Down

0 comments on commit c5c3c50

Please sign in to comment.