summaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
authorPatrick Davison <snapwilliam@gmail.com>2013-04-18 01:58:35 -0700
committerPatrick Davison <snapwilliam@gmail.com>2013-04-18 01:58:35 -0700
commit5f55b38cb19aa4bf4c1c56d8e3080d7b7834e27e (patch)
treeb059675ffefc046acbe8d3f650438eb16680d7a1 /js
parent472b605532b16e1b429ab6300b98be7a41e0ba7a (diff)
downloadpathery-5f55b38cb19aa4bf4c1c56d8e3080d7b7834e27e.tar.xz
Blocked shows last Target.
Diffstat (limited to 'js')
-rw-r--r--js/mapspecs.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/js/mapspecs.js b/js/mapspecs.js
index cb9b27b..31370e3 100644
--- a/js/mapspecs.js
+++ b/js/mapspecs.js
@@ -286,7 +286,14 @@ function request_path_done() {
console.error('\n JO error ' + JO.error[i]);
if (JO.blocked) {
- alert("The path is blocked!");
+ var lastTarget;
+ for(i in JO.path) {
+ if (JO.path[i].blocked != true) continue;
+ lastTarget = JO.path[i].lastTarget;
+ }
+ if (lastTarget == 'f') lastTarget = 'finish';
+ alert("The path is blocked, can't reach "+lastTarget);
+
return;
}