Skip to content

Commit

Permalink
Merge pull request #147 from Daylend/PokemonsNotToCatch
Browse files Browse the repository at this point in the history
Replaced hardcoded pokemon not to catch with text file list.
  • Loading branch information
NecronomiconCoding authored Jul 23, 2016
2 parents 0d7042f + 61d653f commit 07602b3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Empty file.
16 changes: 10 additions & 6 deletions PokemonGo.RocketAPI.Console/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ namespace PokemonGo.RocketAPI.Console
public class Settings : ISettings
{
private ICollection<PokemonId> _pokemonsNotToTransfer;

private ICollection<PokemonId> _pokemonsToEvolve;
private ICollection<PokemonId> _pokemonsNotToCatch;

public AuthType AuthType => (AuthType) Enum.Parse(typeof(AuthType), UserSettings.Default.AuthType, true);
public string PtcUsername => UserSettings.Default.PtcUsername;
public string PtcPassword => UserSettings.Default.PtcPassword;
Expand Down Expand Up @@ -95,12 +96,15 @@ public ICollection<PokemonId> PokemonsNotToTransfer
}

//Do not catch those
public ICollection<PokemonId> PokemonsNotToCatch => new[]
public ICollection<PokemonId> PokemonsNotToCatch
{
//Add pokemon here
PokemonId.Pidgey,
PokemonId.Rattata
};
get
{
//Type of pokemons not to catch
_pokemonsNotToCatch = _pokemonsNotToCatch ?? LoadPokemonList("Configs\\ConfigPokemonsNotToCatch.txt");
return _pokemonsNotToCatch;
}
}

private static ICollection<PokemonId> LoadPokemonList(string filename)
{
Expand Down

0 comments on commit 07602b3

Please sign in to comment.