summaryrefslogtreecommitdiff
path: root/asciifarm/keybindings/keybindings.json
diff options
context:
space:
mode:
authortroido <troido@hotmail.com>2018-04-14 18:13:19 +0200
committertroido <troido@hotmail.com>2018-04-14 18:13:19 +0200
commitaa5b7c9d753f6f140d7f55d0089e6e19028031b7 (patch)
tree6573cbda9383c9f12a625f95bd48bbd20cfd3f22 /asciifarm/keybindings/keybindings.json
parentb15f89a3576b98f57ff1ec083e9299c890c1f7fc (diff)
Stopped using hy for keybindings
keybindings are now a JSON format. Somehow hy errored for me, and the cleanest solution seemed not to use hy at all Thinking about it, the client was basically loading a new interpreter to optimize something that didn't need optimizing. It didn't make it more readable/writable either, and it always was a lot of hassle.
Diffstat (limited to 'asciifarm/keybindings/keybindings.json')
-rw-r--r--asciifarm/keybindings/keybindings.json46
1 files changed, 46 insertions, 0 deletions
diff --git a/asciifarm/keybindings/keybindings.json b/asciifarm/keybindings/keybindings.json
new file mode 100644
index 0000000..20759bd
--- /dev/null
+++ b/asciifarm/keybindings/keybindings.json
@@ -0,0 +1,46 @@
+{
+"actions": {
+"w": ["move", "north"],
+"s": ["move", "south"],
+"d": ["move", "east"],
+"a": ["move", "west"],
+"KEY_UP": ["move", "north"],
+"KEY_DOWN": ["move", "south"],
+"KEY_RIGHT": ["move", "east"],
+"KEY_LEFT": ["move", "west"],
+"k": ["move", "north"],
+"j": ["move", "south"],
+"l": ["move", "east"],
+"h": ["move", "west"],
+"e": ["inputwithselected", "take", "ground"],
+"q": ["inputwithselected", "drop", "inventory"],
+"E": ["inputwithselected", "use", "inventory"],
+"z": ["inputwithselected", "unequip", "equipment"],
+"R": ["input", ["interact"]],
+"r": ["do", [
+ ["input", ["interact"]],
+ ["input", ["interact", "north"]],
+ ["input", ["interact", "south"]],
+ ["input", ["interact", "east"]],
+ ["input", ["interact", "west"]]]],
+"c": ["select", "inventory", 1, true, true],
+"x": ["select", "ground", 1, true, true],
+"v": ["select", "equipment", 1, true, true],
+"f": ["do", [
+ ["input", ["attack"]],
+ ["input", ["attack", "north"]],
+ ["input", ["attack", "south"]],
+ ["input", ["attack", "east"]],
+ ["input", ["attack", "west"]]]],
+"F": ["input", ["attack"]],
+"W": ["input", ["attack", "north"]],
+"S": ["input", ["attack", "south"]],
+"D": ["input", ["attack", "east"]],
+"A": ["input", ["attack", "west"]],
+"t": ["runinput"],
+"NEWLINE": ["runinput"],
+"KEY_PPAGE": "(self.display.scrollBack 1]",
+"KEY_NPAGE": "(self.display.scrollBack -1]"
+},
+"help": "Controls:\n wasd or arrows:\n Move around\n e: Grab\n q: Drop\n E: Use/Equip\n r: Interact\n f: Attack\n t: Chat\n z: Unequip\n xcv: scroll\n ctrl-c: close client"
+}