Browse Source

#126 PR improvements

tags/v0.1.3^2
W01fw00d 7 years ago
parent
commit
dc4366d8a3
2 changed files with 3 additions and 11 deletions
  1. +2
    -10
      src/client/js/components/spellbook.js
  2. +1
    -1
      src/client/js/objects/objects.js

+ 2
- 10
src/client/js/components/spellbook.js View File

@@ -141,11 +141,7 @@ define([
},

tabTarget: function() {
this.onMouseDown(null, objects.getClosest(window.player.x, window.player.y, 10, false, this.target));
},

shiftTabTarget: function() {
this.onMouseDown(null, objects.getClosest(window.player.x, window.player.y, 10, true, this.target));
this.onMouseDown(null, objects.getClosest(window.player.x, window.player.y, 10, this.shiftDown, this.target));
},

build: function(destroy) {
@@ -179,11 +175,7 @@ define([
this.shiftDown = true;
return;
} else if (key == 'tab') {
if (this.shiftDown) {
this.shiftTabTarget();
} else {
this.tabTarget();
}
this.tabTarget();
return;
}



+ 1
- 1
src/client/js/objects/objects.js View File

@@ -84,7 +84,7 @@ define([
} else {
fromIndex = (fromIndex + 1) % list.length;
}
console.log(fromIndex);
return list[fromIndex];
},



Loading…
Cancel
Save