diff --git a/PokemonDatabase/Source Files/CSVDatabaseReader/CSVDatabaseReader/Pokemon.cs b/PokemonDatabase/Source Files/CSVDatabaseReader/CSVDatabaseReader/Pokemon.cs index 83ec574af..c45e48484 100644 --- a/PokemonDatabase/Source Files/CSVDatabaseReader/CSVDatabaseReader/Pokemon.cs +++ b/PokemonDatabase/Source Files/CSVDatabaseReader/CSVDatabaseReader/Pokemon.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -94,53 +94,54 @@ public enum Types ///Int value doesnt matter, ex `.ToString(1);` public override string ToString() { - return string.Format("new PokemonData({0} {1} {2} {3} {4} {5} {6} {7} {8} {9} " + - "{10} {11} {12} {13} {14} {15} {16} {17} {18} {19} " + - "{20} {21} {22} {23} {24} {25} {26} {27} {28} {29} " + - "{30} {31}),", - NAME == null ? "" : "\nId: Pokemons." + NAME.ToUpper(), - RegionalDex == null ? "" : ",\nregionalDex: new int[]{" + RegionalDex + "}", - Type1 == null || Type1 == "Types.NONE" ? "" : ",\ntype1: Types." + Type1, - Type2 == null || Type2 == "Types.NONE" ? "" : ",\ntype2: Types." + Type2, - Ability1 == null || Ability1 == "Abilities.NONE" ? "" : ",\nability1: Abilities." + Ability1, - Ability2 == null || Ability2 == "Abilities.NONE" ? "" : ",\nability2: Abilities." + Ability2, - HiddenAbility == null || HiddenAbility == "Abilities.NONE" ? "" : ",\nhiddenAbility: Abilities." + HiddenAbility, - MaleRatio == null ? "" : ",\nmaleRatio: " + MaleRatio, - CatchRate == null ? "" : ",\ncatchRate: " + CatchRate, - EggGroup1 == null || EggGroup1 == "EggGroups.NONE" ? "" : ",\neggGroup1: EggGroups." + EggGroup1, - EggGroup2 == null || EggGroup2 == "EggGroups.NONE" ? "" : ",\neggGroup2: EggGroups." + EggGroup2, - HatchTime == null ? "" : ",\nhatchTime: " + HatchTime, - Height == null ? "" : ",\nheight: " + Height, - Weight == null ? "" : ",\nweight: " + Weight, - LevelingRate == null ? "" : ",\nlevelingRate: LevelingRate." + LevelingRate,//\n" + - PokedexColor == null ? "" : ",\npokedexColor: Color." + PokedexColor, - BaseFriendship == null ? "" : ",\nbaseFriendship: " + BaseFriendship, - EXPYield == null ? "" : ",\nbaseExpYield: " + EXPYield, - BSHP == null ? "" : ",\nbaseStatsHP: " + BSHP, - BSATK == null ? "" : ",baseStatsATK: " + BSATK, - BSDEF == null ? "" : ",baseStatsDEF: " + BSDEF, - BSSPA == null ? "" : ",baseStatsSPA: " + BSSPA, - BSSPD == null ? "" : ",baseStatsSPD: " + BSSPD, - BSSPE == null ? "" : ",baseStatsSPE: " + BSSPE,//\n" + - EYHP == null || EYHP == "0" ? "" : ",\nevHP: " + EYHP, - EYATK == null || EYATK == "0" ? "" : ",evATK: " + EYATK, - EYDEF == null || EYDEF == "0" ? "" : ",evDEF: " + EYDEF, - EYSPA == null || EYSPA == "0" ? "" : ",evSPA: " + EYSPA, - EYSPD == null || EYSPD == "0" ? "" : ",evSPD: " + EYSPD, - EYSPE == null || EYSPE == "0" ? "" : ",evSPE: " + EYSPE,//\n" + - //NAME == null? "" : "$"luminance: "+Luminance,\n" + - ",\nmovesetmoves: new PokemonMoveset[] " + - //$"\n" + - "{\n" + - //trimend goes on last value, but there's also a comma before every value so it's fine - //it balances out the extra, and also if the value is null, you're not left with additional - //or dangling commas to trigger any errors. - Moves.TrimEnd(',') + "\n" + - "}", - //$"\n" + - PokemonEvolution == null ? "" : ",\nevolution: new IPokemonEvolution[] {" + PokemonEvolution + "}" - //,HeldItem == null? "" : "heldItem: "+HeldItem +"," - ); - } - } + return string.Format("new PokemonData({0} {1} {2} {3} {4} {5} {6} {7} {8} {9} " + + "{10} {11} {12} {13} {14} {15} {16} {17} {18} {19} " + + "{20} {21} {22} {23} {24} {25} {26} {27} {28} {29} " + + "{30} {31}),", + NAME == null? "" : "\nId: Pokemons."+NAME.ToUpper(), + RegionalDex == null? "" : ",\nregionalDex: new int[]{"+RegionalDex+"}", + Type1 == null || Type1 == "Types.NONE"? "" : ",\ntype1: Types."+Type1, + Type2 == null || Type2 == "Types.NONE"? "" : ",\ntype2: Types."+Type2, + Ability1 == null || Ability1 == "Abilities.NONE"? "" : ",\nability1: Abilities."+Ability1, + Ability2 == null || Ability2 == "Abilities.NONE"? "" : ",\nability2: Abilities."+Ability2, + HiddenAbility == null || HiddenAbility == "Abilities.NONE"? "" : ",\nhiddenAbility: Abilities."+HiddenAbility, + MaleRatio == null? "" : ",\nmaleRatio: "+MaleRatio, + CatchRate == null? "" : ",\ncatchRate: "+CatchRate, + EggGroup1 == null || EggGroup1 == "EggGroups.NONE"? "" : ",\neggGroup1: EggGroups."+EggGroup1, + EggGroup2 == null || EggGroup2 == "EggGroups.NONE"? "" : ",\neggGroup2: EggGroups."+EggGroup2, + HatchTime == null? "" : ",\nhatchTime: "+HatchTime, + Height == null? "" : ",\nheight: "+Height, + Weight == null? "" : ",\nweight: "+Weight, + LevelingRate == null? "" : ",\nlevelingRate: LevelingRate."+LevelingRate,//\n" + + PokedexColor == null? "" : ",\npokedexColor: Color."+PokedexColor, + BaseFriendship == null? "" : ",\nbaseFriendship: "+BaseFriendship, + EXPYield == null? "" : ",\nbaseExpYield: "+EXPYield, + BSHP == null? "" : ",\nbaseStatsHP: "+BSHP, + BSATK == null? "" : ",baseStatsATK: "+BSATK, + BSDEF == null? "" : ",baseStatsDEF: "+BSDEF, + BSSPA == null? "" : ",baseStatsSPA: "+BSSPA, + BSSPD == null? "" : ",baseStatsSPD: "+BSSPD, + BSSPE == null? "" : ",baseStatsSPE: "+BSSPE,//\n" + + EYHP == null || EYHP == "0"? "" : ",\nevHP: "+EYHP, + EYATK == null || EYATK == "0"? "" : ",evATK: "+EYATK, + EYDEF == null || EYDEF == "0"? "" : ",evDEF: "+EYDEF, + EYSPA == null || EYSPA == "0"? "" : ",evSPA: "+EYSPA, + EYSPD == null || EYSPD == "0"? "" : ",evSPD: "+EYSPD, + EYSPE == null || EYSPE == "0"? "" : ",evSPE: "+EYSPE,//\n" + + //NAME == null? "" : "$"luminance: "+Luminance,\n" + + ",\nmovesetmoves: new PokemonMoveset[] " + + //$"\n" + + "{\n" + + //trimend goes on last value, but there's also a comma before every value so it's fine + //it balances out the extra, and also if the value is null, you're not left with additional + //or dangling commas to trigger any errors. + LevelMoves.TrimEnd(',') + "\n" + + ","+TMMoves.TrimEnd(',') + "\n" + + "}", + //$"\n" + + PokemonEvolution == null? "" : ",\nevolution: new IPokemonEvolution[] {" + PokemonEvolution +"}" + //,HeldItem == null? "" : "heldItem: "+HeldItem +"," + ); + } + } } \ No newline at end of file