Skip to content

Commit

Permalink
Add yours walking strategy as a fallback/alternative for Google walki…
Browse files Browse the repository at this point in the history
  • Loading branch information
NoxxDev committed Aug 23, 2016
1 parent cd03d58 commit 8ff66c0
Show file tree
Hide file tree
Showing 38 changed files with 58 additions and 211 deletions.
2 changes: 1 addition & 1 deletion PoGo.NecroBot.CLI/Config/Translations/translation.ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
},
{
"Key": "eventFortTargeted",
"Value": "Viatjant cap a la Pokeparada: {0} ({1}m)({2}segons)"
"Value": "Viatjant cap a la Pokeparada: {0} ({1}m) ({2}segons) (route {3})"
},
{
"Key": "eventProfileLogin",
Expand Down
2 changes: 1 addition & 1 deletion PoGo.NecroBot.CLI/Config/Translations/translation.cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
},
{
"Key": "eventFortTargeted",
"Value": "Chůze k Pokestopu: {0} ({1}m) ({2} sekund)"
"Value": "Chůze k Pokestopu: {0} ({1}m) ({2} sekund) (route {3})"
},
{
"Key": "eventProfileLogin",
Expand Down
2 changes: 1 addition & 1 deletion PoGo.NecroBot.CLI/Config/Translations/translation.da.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
},
{
"Key": "eventFortTargeted",
"Value": "{0} om ({1}m) ({2}sekunder)"
"Value": "{0} om ({1}m) ({2}sekunder) (route {3})"
},
{
"Key": "eventProfileLogin",
Expand Down
2 changes: 1 addition & 1 deletion PoGo.NecroBot.CLI/Config/Translations/translation.de.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
},
{
"Key": "eventFortTargeted",
"Value": "{0} in ({1}m) ({2} Sekunden)"
"Value": "{0} in ({1}m) ({2} Sekunden) (route {3})"
},
{
"Key": "eventProfileLogin",
Expand Down
2 changes: 1 addition & 1 deletion PoGo.NecroBot.CLI/Config/Translations/translation.el.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
},
{
"Key": "eventFortTargeted",
"Value": "{0} σε απόσταση {1} μέτρων"
"Value": "{0} σε απόσταση {1} μέτρων ({2} seconds) (route {3})"
},
{
"Key": "eventProfileLogin",
Expand Down
2 changes: 1 addition & 1 deletion PoGo.NecroBot.CLI/Config/Translations/translation.es.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
},
{
"Key": "eventFortTargeted",
"Value": "Llegando a Poképarada: {0} en ({1}m) ({2} segundos)"
"Value": "Llegando a Poképarada: {0} en ({1}m) ({2} segundos) (route {3})"
},
{
"Key": "eventProfileLogin",
Expand Down
2 changes: 1 addition & 1 deletion PoGo.NecroBot.CLI/Config/Translations/translation.et.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
},
{
"Key": "eventFortTargeted",
"Value": "{0} ({1} m pärast)"
"Value": "{0} ({1} m pärast) ({2} seconds) (route {3})"
},
{
"Key": "eventProfileLogin",
Expand Down
2 changes: 1 addition & 1 deletion PoGo.NecroBot.CLI/Config/Translations/translation.fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
},
{
"Key": "eventFortTargeted",
"Value": "{0} à {1}m | {2}s"
"Value": "{0} à {1}m | {2}s (route {3})"
},
{
"Key": "eventProfileLogin",
Expand Down
2 changes: 1 addition & 1 deletion PoGo.NecroBot.CLI/Config/Translations/translation.hu.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
},
{
"Key": "eventFortTargeted",
"Value": "Erkezes pokestopphoz: {0} ({1}m)"
"Value": "Erkezes pokestopphoz: {0} ({1}m) ({2} seconds) (route {3})"
},
{
"Key": "eventProfileLogin",
Expand Down
2 changes: 1 addition & 1 deletion PoGo.NecroBot.CLI/Config/Translations/translation.id.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
},
{
"Key": "eventFortTargeted",
"Value": "Jalan ke PokeStop {0}, {1} meter, {2} detik"
"Value": "Jalan ke PokeStop {0}, {1} meter, {2} detik (route {3})"
},
{
"Key": "eventProfileLogin",
Expand Down
2 changes: 1 addition & 1 deletion PoGo.NecroBot.CLI/Config/Translations/translation.it.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
},
{
"Key": "eventFortTargeted",
"Value": "Camminando verso il Pokestop: {0} ({1}m) ({2} secondi)"
"Value": "Camminando verso il Pokestop: {0} ({1}m) ({2} secondi) (route {3})"
},
{
"Key": "eventProfileLogin",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
},
{
"Key": "eventFortTargeted",
"Value": "次のポケストップへ移動中です: {0} ({1}m) ({2} 秒)"
"Value": "次のポケストップへ移動中です: {0} ({1}m) ({2} 秒) (route {3})"
},
{
"Key": "eventProfileLogin",
Expand Down
2 changes: 1 addition & 1 deletion PoGo.NecroBot.CLI/Config/Translations/translation.kh.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
},
{
"Key": "eventFortTargeted",
"Value": "ធ្វើដំណើរទៅ PokeStop: {0} ({1}វិនារទី)"
"Value": "ធ្វើដំណើរទៅ PokeStop: {0} ({1}វិនារទី) ({2} seconds) (route {3})"

},
{
Expand Down
2 changes: 1 addition & 1 deletion PoGo.NecroBot.CLI/Config/Translations/translation.lt.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
},
{
"Key": "eventFortTargeted",
"Value": "Atvykstama į Pokestotelę: {0} už ({1}m)"
"Value": "Atvykstama į Pokestotelę: {0} už ({1}m) ({2} seconds) (route {3})"
},
{
"Key": "eventProfileLogin",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
},
{
"Key": "eventFortTargeted",
"Value": "{0} over {1} meter ({2} seconden)"
"Value": "{0} over {1} meter ({2} seconden) (route {3})"
},
{
"Key": "eventProfileLogin",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
},
{
"Key": "eventFortTargeted",
"Value": "{0} in ({1}m)"
"Value": "{0} in ({1}m) ({2} seconds) (route {3})"
},
{
"Key": "eventProfileLogin",
Expand Down
2 changes: 1 addition & 1 deletion PoGo.NecroBot.CLI/Config/Translations/translation.pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
},
{
"Key": "eventFortTargeted",
"Value": "Dotarcie do PokeStopu: {0} za ({1}m) ({2}s)"
"Value": "Dotarcie do PokeStopu: {0} za ({1}m) ({2}s) (route {3})"
},
{
"Key": "eventProfileLogin",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
},
{
"Key": "eventFortTargeted",
"Value": "Chegando ao Pokestop: {0} ({1}m) ({2} segundos)"
"Value": "Chegando ao Pokestop: {0} ({1}m) ({2} segundos) (rota {3})"
},
{
"Key": "eventProfileLogin",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
},
{
"Key": "eventFortTargeted",
"Value": "A chegar ao Pokestop: {0} em ({1}m)"
"Value": "A chegar ao Pokestop: {0} em ({1}m) ({2} seconds) (route {3})"
},
{
"Key": "eventProfileLogin",
Expand Down
2 changes: 1 addition & 1 deletion PoGo.NecroBot.CLI/Config/Translations/translation.ro.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
},
{
"Key": "eventFortTargeted",
"Value": "Călătoresc la pokestopul \"{0}\" ({1}m) ({2} secunde)"
"Value": "Călătoresc la pokestopul \"{0}\" ({1}m) ({2} secunde) (route {3})"
},
{
"Key": "eventProfileLogin",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
},
{
"Key": "eventFortTargeted",
"Value": "Направляемся к <{0}>, дистанция ({1}м) ({2} сек.)"
"Value": "Направляемся к <{0}>, дистанция ({1}м) ({2} сек.) (route {3})"
},
{
"Key": "eventProfileLogin",
Expand Down
2 changes: 1 addition & 1 deletion PoGo.NecroBot.CLI/Config/Translations/translation.sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
},
{
"Key": "eventFortTargeted",
"Value": "Anländer till Pokestop: {0} om ({1}m)"
"Value": "Anländer till Pokestop: {0} om ({1}m) ({2} seconds) (route {3})"
},
{
"Key": "eventProfileLogin",
Expand Down
2 changes: 1 addition & 1 deletion PoGo.NecroBot.CLI/Config/Translations/translation.th.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
},
{
"Key": "eventFortTargeted",
"Value": "กำลังเดินทางไปสู่ PokeStops : {0} ( {1} เมตร ) ( {2} วินาที )"
"Value": "กำลังเดินทางไปสู่ PokeStops : {0} ( {1} เมตร ) ( {2} วินาที ) (route {3})"
},
{
"Key": "eventProfileLogin",
Expand Down
2 changes: 1 addition & 1 deletion PoGo.NecroBot.CLI/Config/Translations/translation.tr.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
},
{
"Key": "eventFortTargeted",
"Value": "{2} saniye sonra {1}m mesafedeki \"{0}\" adlı PokéStop'a varılacak."
"Value": "(route {3}) {2} saniye sonra {1}m mesafedeki \"{0}\" adlı PokéStop'a varılacak."
},
{
"Key": "eventProfileLogin",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
},
{
"Key": "eventFortTargeted",
"Value": "Прямуємо до <{0}>, дистанція ({1} м)"
"Value": "Прямуємо до <{0}>, дистанція ({1} м) ({2} seconds) (route {3})"
},
{
"Key": "eventProfileLogin",
Expand Down
2 changes: 1 addition & 1 deletion PoGo.NecroBot.CLI/Config/Translations/translation.vi.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
},
{
"Key": "eventFortTargeted",
"Value": "Đi đến Pokestop: {0} (xa {1}m) (trong {2} giây)"
"Value": "Đi đến Pokestop: {0} (xa {1}m) (trong {2} giây) (route {3})"
},
{
"Key": "eventProfileLogin",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
},
{
"Key": "eventFortTargeted",
"Value": "正在前往补给站:{0} 距离{1}米,需要{2}秒\t\t\t"
"Value": "正在前往补给站:{0} 距离{1}米,需要{2}秒 (route {3})\t\t\t"
},
{
"Key": "eventProfileLogin",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
},
{
"Key": "eventFortTargeted",
"Value": "正在前往补给站:{0} 距离{1}米,需要{2}秒\t\t\t"
"Value": "正在前往补给站:{0} 距离{1}米,需要{2}秒 (route {3})\t\t\t"
},
{
"Key": "eventProfileLogin",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
},
{
"Key": "eventFortTargeted",
"Value": "前往補給站:{0} (距離{1}公尺)"
"Value": "前往補給站:{0} (距離{1}公尺) ({2} seconds) (route {3})"
},
{
"Key": "eventProfileLogin",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
},
{
"Key": "eventFortTargeted",
"Value": "前往補給站:{0} (距離{1}公尺,需要{2}秒)\t\t\t\t"
"Value": "前往補給站:{0} (距離{1}公尺,需要{2}秒) (route {3})\t\t\t\t"
},
{
"Key": "eventProfileLogin",
Expand Down
2 changes: 1 addition & 1 deletion PoGo.NecroBot.CLI/ConsoleEventListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ private static void HandleEvent(FortTargetEvent fortTargetEvent, ISession sessio

Logger.Write(
session.Translation.GetTranslation(TranslationString.EventFortTargeted, fortTargetEvent.Name,
Math.Round(fortTargetEvent.Distance), intTimeForArrival),
Math.Round(fortTargetEvent.Distance), intTimeForArrival, fortTargetEvent.Route),
LogLevel.Info, ConsoleColor.Gray);
}

Expand Down
2 changes: 1 addition & 1 deletion PoGo.NecroBot.Logic/Common/Translations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ public class Translation : ITranslation
new KeyValuePair<TranslationString, string>(TranslationString.EventFortFailed,
"Name: {0} INFO: Looting failed, possible softban. Unban in: {1}/{2}"),
new KeyValuePair<TranslationString, string>(TranslationString.EventFortTargeted,
"Traveling to Pokestop: {0} ({1}m) ({2} seconds)"),
"Traveling to Pokestop: {0} ({1}m) ({2} seconds) (route {3})"),
new KeyValuePair<TranslationString, string>(TranslationString.EventProfileLogin, "Playing as {0}"),
new KeyValuePair<TranslationString, string>(TranslationString.EventUsedIncense,
"Used Incense, remaining: {0}"),
Expand Down
1 change: 1 addition & 0 deletions PoGo.NecroBot.Logic/Event/FortTargetEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
{
public class FortTargetEvent : IEvent
{
public string Route;
public double Distance;
public string Name;
}
Expand Down
3 changes: 3 additions & 0 deletions PoGo.NecroBot.Logic/Model/Yours/YoursWalk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,14 @@ public class Properties2
public class YoursWalk
{
public List<GeoCoordinate> Waypoints { get; set; }
public double Distance { get; set; }

public YoursWalk(string yoursResponse)
{
RoutingResponse yoursResponseParsed = JsonConvert.DeserializeObject<RoutingResponse>(yoursResponse);

Distance = double.Parse(yoursResponseParsed.properties.distance) * 1000;

Waypoints = new List<GeoCoordinate>();
foreach (List<double> coordinate in yoursResponseParsed.coordinates)
{
Expand Down
Loading

0 comments on commit 8ff66c0

Please sign in to comment.