11-10-2020, 03:46 PM
PULL REQUEST DETAILS
[FEATURE] [INPUT]
About the PR
This PR adds two new hotkeys to the default human hotkeys list: `H` lets you attack yourself with the item in your active hand, and `X` lets you attack the object in your off-hand with your active hand.
To be a bit more specific, we currently have a hotkey for `"attackself"`, which calls `src.click(W, list())`; essentially, this existing hotkey action is the same as clicking on the item in your active hand, with that item active (it ends up calling the item's `attack_self` proc). The new hotkey "selfattack", bound to "H" by default, calls `src.click(src, list())`, which ends up calling the item's `attack` proc on the user. This new hotkey does nothing if you have no item in your active hand.
The new hotkey for "usehand", bound to "X" by default, is the same as clicking on an object in your off hand. If you have nothing in your active hand, the item in your off hand will be switched to your active hand. This new hotkey does nothing if you have no item in your inactive hand.
(Edit: TG hotkey for `"usehand"` is "N" by default)
Why's this needed?
These hotkeys make self-surgery, bomb-making, and drinking slightly less reliant on moving the mouse, among other actions.
The `H` hotkey is **really dangerous**; you will attack yourself with the object in your active hand, even if the object hurts a lot. Maybe this shouldn't be a default hotkey? Or maybe people shouldn't run with scissors?
Changelog
PULL REQUEST DETAILS
[FEATURE] [INPUT]
About the PR
This PR adds two new hotkeys to the default human hotkeys list: `H` lets you attack yourself with the item in your active hand, and `X` lets you attack the object in your off-hand with your active hand.
To be a bit more specific, we currently have a hotkey for `"attackself"`, which calls `src.click(W, list())`; essentially, this existing hotkey action is the same as clicking on the item in your active hand, with that item active (it ends up calling the item's `attack_self` proc). The new hotkey "selfattack", bound to "H" by default, calls `src.click(src, list())`, which ends up calling the item's `attack` proc on the user. This new hotkey does nothing if you have no item in your active hand.
The new hotkey for "usehand", bound to "X" by default, is the same as clicking on an object in your off hand. If you have nothing in your active hand, the item in your off hand will be switched to your active hand. This new hotkey does nothing if you have no item in your inactive hand.
(Edit: TG hotkey for `"usehand"` is "N" by default)
Why's this needed?
These hotkeys make self-surgery, bomb-making, and drinking slightly less reliant on moving the mouse, among other actions.
The `H` hotkey is **really dangerous**; you will attack yourself with the object in your active hand, even if the object hurts a lot. Maybe this shouldn't be a default hotkey? Or maybe people shouldn't run with scissors?
Changelog
Code:
(u)Jawns:
(*)New hotkeys for attacking yourself and clicking on your inactive hand with your active hand! Wow!
PULL REQUEST DETAILS