diff options
author | BlueRaja <BlueRaja.admin@gmail.com> | 2013-03-07 05:05:28 -0600 |
---|---|---|
committer | BlueRaja <BlueRaja.admin@gmail.com> | 2013-03-07 05:05:28 -0600 |
commit | 81e9645b8b036d9040bd1d02617b029b294809de (patch) | |
tree | 1ac415d112b11a8de8a11fbc5ea16691ef368dd4 /js/mapspecs.js | |
parent | c62d777cd17e72dd7068547d2e8aa47354387f1e (diff) | |
parent | ecb87bd22022a140df7e0d1843494ff065d55c1c (diff) | |
download | pathery-81e9645b8b036d9040bd1d02617b029b294809de.tar.xz |
Merge branch 'master' of git.raylu.net:pathery
Diffstat (limited to 'js/mapspecs.js')
-rw-r--r-- | js/mapspecs.js | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/js/mapspecs.js b/js/mapspecs.js index ecc5c9d..6ab7286 100644 --- a/js/mapspecs.js +++ b/js/mapspecs.js @@ -92,12 +92,6 @@ function grid_click(obj) { y = tmp[1];
x = tmp[2];
-
- if(typeof(mapdata[mapid]) == 'Object' && mapdata[mapid].editMap == true) {
- mapClick(obj);
- return;
- }
-
//The users solution - prepare it if it's not started
if (solution[mapid] == undefined) {
getmapdata(mapid);
@@ -591,14 +585,14 @@ function doanimate(x, y, p, c, mapid, pathNumber) { rs = 84;
//How fast should we be going?
selectbox = document.getElementById(mapid+',speed');
- selected = selectbox.options[selectbox.selectedIndex].value;
- switch (selected) {
+ var selectedSpeed = selectbox.options[selectbox.selectedIndex].value;
+ switch (selectedSpeed) {
case '1':
- rs =160;
+ rs =180;
break;
case '2':
- rs =84;
+ rs =94;
break;
case '3':
@@ -637,7 +631,8 @@ function doanimate(x, y, p, c, mapid, pathNumber) { case 'a': case 'b': case 'c':
case 'd': case 'e': case 'f':
- rs = rs + 410;
+ rs = rs + 410;
+ if (selectedSpeed <= 2) rs = rs + 200;
mapdata[mapid].pathColor[pathNumber] = targetColor(t);
break;
@@ -880,7 +875,10 @@ function mapAsHTML(map, targetWidth, mapEditor) { //var idHandle = map.ID+','+x+','+y;
//oldy is used for Position too... for now
- if (type == 'o' || mapEditor == true) {
+ if (mapEditor == true) {
+ mapgrid += "<div style='float:left; width:"+tileWidth+"px; height:"+tileWidth+"px; ' class='mapcell "+type+value+"' title='Position: "+x+","+oldy+"' id='"+idHandle+"' onMouseOver='mapEditOver(this)' onMouseDown='mapEditClick(this)' >";
+ mapgrid += "<div id='child_"+idHandle+"' class='child'></div></div>";
+ } else if (type == 'o') {
mapgrid += "<div style='float:left; width:"+tileWidth+"px; height:"+tileWidth+"px; ' class='mapcell "+type+value+"' title='Position: "+x+","+oldy+"' id='"+idHandle+"' onClick='grid_click(this)' >";
mapgrid += "<div id='child_"+idHandle+"' class='child'></div></div>";
} else {
|