diff options
| -rw-r--r-- | asciifarm/client/display/selector.py | 2 | ||||
| -rw-r--r-- | asciifarm/keybindings/default.json | 25 | ||||
| -rw-r--r-- | asciifarm/keybindings/keybindings.hy | 2 | ||||
| -rw-r--r-- | asciifarm/keybindings/vimbindings.hy | 41 |
4 files changed, 2 insertions, 68 deletions
diff --git a/asciifarm/client/display/selector.py b/asciifarm/client/display/selector.py index 3559673..50e778b 100644 --- a/asciifarm/client/display/selector.py +++ b/asciifarm/client/display/selector.py @@ -14,7 +14,7 @@ class Selector: invLen = self.inventory.getNumItems() if relative: value += self.value - if modular: + if modular and invLen: value %= invLen if value < 0: value = 0 diff --git a/asciifarm/keybindings/default.json b/asciifarm/keybindings/default.json deleted file mode 100644 index 2af12bf..0000000 --- a/asciifarm/keybindings/default.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "input":{ - "w": ["move", "north"], - "s": ["move", "south"], - "d": ["move", "east"], - "a": ["move", "west"], - "e": ["take"], - "q": ["drop"], - "f": [["attack"],["attack", "north"],["attack", "south"],["attack", "east"],["attack", "west"]], - "F": ["attack"], - "W": ["attack", "north"], - "S": ["attack", "south"], - "D": ["attack", "east"], - "A": ["attack", "west"], - "E": ["use"], - "r": ["interact"], - "KEY_UP": ["move", "north"], - "KEY_DOWN": ["move", "south"], - "KEY_RIGHT": ["move", "east"], - "KEY_LEFT": ["move", "west"] - }, - "control": { - "t": ["text"] - } -} diff --git a/asciifarm/keybindings/keybindings.hy b/asciifarm/keybindings/keybindings.hy index b92eb74..9c73bee 100644 --- a/asciifarm/keybindings/keybindings.hy +++ b/asciifarm/keybindings/keybindings.hy @@ -29,7 +29,7 @@ Controls: Move around e: Grab q: Drop - E: Use + E: Use/Equip r: Interact f: Attack t: Chat diff --git a/asciifarm/keybindings/vimbindings.hy b/asciifarm/keybindings/vimbindings.hy deleted file mode 100644 index b2525f5..0000000 --- a/asciifarm/keybindings/vimbindings.hy +++ /dev/null @@ -1,41 +0,0 @@ - - -;; Outdated! Don't use - -;; mainly intended as example for using different keybindings -"k" (input ["move" "north"]) -"j" (input ["move" "south"]) -"l" (input ["move" "east"]) -"h" (input ["move" "west"]) -"KEY_UP" (input ["move" "north"]) -"KEY_DOWN" (input ["move" "south"]) -"KEY_RIGHT" (input ["move" "east"]) -"KEY_LEFT" (input ["move" "west"]) -"g" (input ["take" (selectorvalue "ground")]) -"q" (input ["drop" (selectorvalue "inventory")]) -"E" (input ["use" (selectorvalue "inventory")]) -"r" (input ["interact" (selectorvalue "ground")]) -"v" (fn [client] (.select (selector "inventory") 1 True True)) -"c" (fn [client] (.select (selector "ground") 1 True True)) -"x" (fn [client] (.select (selector "equipment") 1 True True)) -"z" (input ["unequip" (selectorvalue "equipment")]) -"f" (doall [ - (input ["attack"]) - (input ["attack" "north"]) - (input ["attack" "south"]) - (input ["attack" "east"]) - (input ["attack" "west"])]) -"t" (fn [client] (client.readString)) -"help" "\ -Controls: - wasd or arrows: - Move around - e: Grab - q: Drop - E: Use - r: Interact - f: Attack - t: Chat - z: Unequip - xcv: scroll" - |
