mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-13 11:12:14 +00:00
## About The Pull Request Semi WIP cus I need to probably make an issue report for lummox, but apart from that ready for review Uses the new mouse-pos so we can combine it with screen size and size to estimate very accurately the mouse position in turf terms. In future also will need to add a way to continously poll the users mouse pos but this alone is very useful ## Why It's Good For The Game This isnt used yet, but the benefits are pretty damn obvious (hitting E and dashing towards where your mouse??? 1990s features?????) ## Changelog 🆑 refactor: Added the possibility for keybindings to report the turf they clicked on. /🆑 --------- Co-authored-by: TiviPlus <572233640+TiviPlus@users.noreply.com>
60 lines
1.6 KiB
Plaintext
60 lines
1.6 KiB
Plaintext
/datum/keybinding/movement
|
|
category = CATEGORY_MOVEMENT
|
|
weight = WEIGHT_HIGHEST
|
|
|
|
/datum/keybinding/movement/north
|
|
hotkey_keys = list("W", "North")
|
|
name = "North"
|
|
full_name = "Move North"
|
|
description = "Moves your character north"
|
|
keybind_signal = COMSIG_KB_MOVEMENT_NORTH_DOWN
|
|
|
|
/datum/keybinding/movement/south
|
|
hotkey_keys = list("S", "South")
|
|
name = "South"
|
|
full_name = "Move South"
|
|
description = "Moves your character south"
|
|
keybind_signal = COMSIG_KB_MOVEMENT_SOUTH_DOWN
|
|
|
|
/datum/keybinding/movement/west
|
|
hotkey_keys = list("A", "West")
|
|
name = "West"
|
|
full_name = "Move West"
|
|
description = "Moves your character left"
|
|
keybind_signal = COMSIG_KB_MOVEMENT_WEST_DOWN
|
|
|
|
/datum/keybinding/movement/east
|
|
hotkey_keys = list("D", "East")
|
|
name = "East"
|
|
full_name = "Move East"
|
|
description = "Moves your character east"
|
|
keybind_signal = COMSIG_KB_MOVEMENT_EAST_DOWN
|
|
|
|
/datum/keybinding/movement/zlevel_upwards
|
|
hotkey_keys = list("Northeast") // PGUP
|
|
name = "Upwards"
|
|
full_name = "Move Upwards"
|
|
description = "Moves your character up a z-level if possible"
|
|
keybind_signal = COMSIG_KB_MOVEMENT_ZLEVEL_MOVEUP_DOWN
|
|
|
|
/datum/keybinding/movement/zlevel_upwards/down(client/user, turf/target)
|
|
. = ..()
|
|
if(.)
|
|
return
|
|
user.mob.up()
|
|
return TRUE
|
|
|
|
/datum/keybinding/movement/zlevel_downwards
|
|
hotkey_keys = list("Southeast") // PGDOWN
|
|
name = "Downwards"
|
|
full_name = "Move Downwards"
|
|
description = "Moves your character down a z-level if possible"
|
|
keybind_signal = COMSIG_KB_MOVEMENT_ZLEVEL_MOVEDOWN_DOWN
|
|
|
|
/datum/keybinding/movement/zlevel_downwards/down(client/user, turf/target)
|
|
. = ..()
|
|
if(.)
|
|
return
|
|
user.mob.down()
|
|
return TRUE
|