Files
Bubberstation/code/datums/keybinding/human.dm
tonty f91de19b44 Implements [OPTIONAL] Swap Left/Right hand, changes [OPTIONAL] default keybinds to accomodate (#92659)
## About The Pull Request

- Adds **OPTIONAL** keybinds that lets you select a specific hand
- Alters **OPTIONAL** default keybinds as such:
  - Q: Swap to Right Hand (replacing Drop item)
  - E: Swap to Left Hand (replacing Quick equip)
  - R: Quick equip (replacing Toggle Throw Mode)
  - ShiftR: Quick equip belt
  - X: Drop item (replacing Swap hands)
  - Swap hands is Unbound

## Why It's Good For The Game

Swapping hands has always been somewhat awkward. Since it depends on the
currently selected hand, swapping your hands requires you to look away
from what you're doing and mentally process what you're holding and what
you have selected. In the heat of the moment (like a fight) it's really
easy to forget which hand you have selected and do something you did not
want to do (like accidentally hug your target instead of attack them).
This makes it so that, at the very least, you only need to check what
you're holding.

The **OPTIONAL** default keybinds **THAT ARE OPTIONAL YOU DON'T HAVE TO
USE THEM** were altered so that new players use this new feature,
hopefully alleviating some of the hiccups from learning hand swapping.
## Changelog

🆑
qol: Added [OPTIONAL] keybinds to for Swap Left/Right hands. Check your
keybinds. [NOT OPTIONAL]
/🆑
2025-08-25 22:00:25 -07:00

77 lines
2.6 KiB
Plaintext

/datum/keybinding/human
category = CATEGORY_HUMAN
weight = WEIGHT_MOB
/datum/keybinding/human/can_use(client/user)
return ishuman(user.mob)
/datum/keybinding/human/quick_equip
hotkey_keys = list("R")
name = "quick_equip"
full_name = "Quick equip"
description = "Quickly puts an item in the best slot available"
keybind_signal = COMSIG_KB_HUMAN_QUICKEQUIP_DOWN
/datum/keybinding/human/quick_equip/down(client/user, turf/target)
. = ..()
if(.)
return
var/mob/living/carbon/human/H = user.mob
H.quick_equip()
return TRUE
/datum/keybinding/human/quick_equip_belt
hotkey_keys = list("ShiftR")
name = "quick_equip_belt"
full_name = "Quick equip belt"
description = "Put held thing in belt or take out most recent thing from belt"
///which slot are we trying to quickdraw from/quicksheathe into?
var/slot_type = ITEM_SLOT_BELT
///what we should call slot_type in messages (including failure messages)
var/slot_item_name = "belt"
keybind_signal = COMSIG_KB_HUMAN_QUICKEQUIPBELT_DOWN
/datum/keybinding/human/quick_equip_belt/down(client/user, turf/target)
. = ..()
if(.)
return
var/mob/living/carbon/human/H = user.mob
H.smart_equip_targeted(slot_type, slot_item_name)
return TRUE
/datum/keybinding/human/quick_equip_belt/quick_equip_bag
hotkey_keys = list("ShiftB")
name = "quick_equip_bag"
full_name = "Quick equip bag"
description = "Put held thing in backpack or take out most recent thing from backpack"
slot_type = ITEM_SLOT_BACK
slot_item_name = "backpack"
keybind_signal = COMSIG_KB_HUMAN_BAGEQUIP_DOWN
/datum/keybinding/human/quick_equip_belt/quick_equip_suit_storage
hotkey_keys = list("ShiftQ")
name = "quick_equip_suit_storage"
full_name = "Quick equip suit storage slot"
description = "Put held thing in suit storage slot item or take out most recent thing from suit storage slot item"
slot_type = ITEM_SLOT_SUITSTORE
slot_item_name = "suit storage slot item"
keybind_signal = COMSIG_KB_HUMAN_SUITEQUIP_DOWN
/datum/keybinding/human/quick_equip_belt/quick_equip_lpocket
hotkey_keys = list("Ctrl1")
name = "quick_equip_lpocket"
full_name = "Quick equip left pocket"
description = "Put in or take out an item in left pocket"
slot_type = ITEM_SLOT_LPOCKET
slot_item_name = "left pocket"
keybind_signal = COMSIG_KB_HUMAN_LPOCKETEQUIP_DOWN
/datum/keybinding/human/quick_equip_belt/quick_equip_rpocket
hotkey_keys = list("Ctrl2")
name = "quick_equip_rpocket"
full_name = "Quick equip right pocket"
description = "Put in or take out an item in right pocket"
slot_type = ITEM_SLOT_RPOCKET
slot_item_name = "right pocket"
keybind_signal = COMSIG_KB_HUMAN_RPOCKETEQUIP_DOWN