Files
GS13NG/code/modules/keybindings/keybind/movement.dm
kevinz000 b57e1c1e93 Rebindable Hotkeys (#12138)
* demodularize interface

* keybindings

* binds

* prefs

* loose ends

* globals

* changes

* s

* datum ref lists

* ok

* fixes

* fixes

* fix

* ok

* sigh

* sigh

* indicators

* let's play the move code around game

* let's play the i didn't comma my lists game

* let's play the indent game

* let's play hte spelling bee

* let's fail the spelling bee

* LET'S PLAY THe HOW HARd  IS  IT TO SPELL A PROC GAME

* let's play the bugfix game

* bugfixes

* improvements

* Update bindings_client.dm

* pixel shift

* A

* wups
2020-05-20 23:40:20 +02:00

176 lines
4.4 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"
/datum/keybinding/movement/south
hotkey_keys = list("S", "South")
name = "South"
full_name = "Move South"
description = "Moves your character south"
/datum/keybinding/movement/west
hotkey_keys = list("A", "West")
name = "West"
full_name = "Move West"
description = "Moves your character left"
/datum/keybinding/movement/east
hotkey_keys = list("D", "East")
name = "East"
full_name = "Move East"
description = "Moves your character east"
/datum/keybinding/mob/face_north
hotkey_keys = list("CtrlW", "CtrlNorth")
name = "face_north"
full_name = "Face North"
description = ""
category = CATEGORY_MOVEMENT
/datum/keybinding/mob/face_north/down(client/user)
var/mob/M = user.mob
M.northface()
return TRUE
/datum/keybinding/mob/face_east
hotkey_keys = list("CtrlD", "CtrlEast")
name = "face_east"
full_name = "Face East"
description = ""
category = CATEGORY_MOVEMENT
/datum/keybinding/mob/face_east/down(client/user)
var/mob/M = user.mob
M.eastface()
return TRUE
/datum/keybinding/mob/face_south
hotkey_keys = list("CtrlS", "CtrlSouth")
name = "face_south"
full_name = "Face South"
description = ""
category = CATEGORY_MOVEMENT
/datum/keybinding/mob/face_south/down(client/user)
var/mob/M = user.mob
M.southface()
return TRUE
/datum/keybinding/mob/shift_north
hotkey_keys = list("CtrlShiftW", "CtrlShiftNorth")
name = "pixel_shift_north"
full_name = "Pixel Shift North"
description = ""
category = CATEGORY_MOVEMENT
/datum/keybinding/mob/shift_north/down(client/user)
var/mob/M = user.mob
M.northshift()
return TRUE
/datum/keybinding/mob/shift_east
hotkey_keys = list("CtrlShiftD", "CtrlShiftEast")
name = "pixel_shift_east"
full_name = "Pixel Shift East"
description = ""
category = CATEGORY_MOVEMENT
/datum/keybinding/mob/shift_east/down(client/user)
var/mob/M = user.mob
M.eastshift()
return TRUE
/datum/keybinding/mob/shift_south
hotkey_keys = list("CtrlShiftS", "CtrlShiftSouth")
name = "pixel_shift_south"
full_name = "Pixel Shift South"
description = ""
category = CATEGORY_MOVEMENT
/datum/keybinding/mob/shift_south/down(client/user)
var/mob/M = user.mob
M.southshift()
return TRUE
/datum/keybinding/mob/shift_west
hotkey_keys = list("CtrlShiftA", "CtrlShiftWest")
name = "pixel_shift_west"
full_name = "Pixel Shift West"
description = ""
category = CATEGORY_MOVEMENT
/datum/keybinding/mob/shift_west/down(client/user)
var/mob/M = user.mob
M.westshift()
return TRUE
/datum/keybinding/living/hold_sprint
hotkey_keys = list("Shift")
name = "hold_sprint"
full_name = "Sprint (hold down)"
description = "Hold down to sprint"
category = CATEGORY_MOVEMENT
/datum/keybinding/living/hold_sprint/can_use(client/user)
return ishuman(user.mob) || iscyborg(user.mob)
/datum/keybinding/living/hold_sprint/down(client/user)
var/mob/living/L = user.mob
L.sprint_hotkey(TRUE)
return TRUE
/datum/keybinding/living/hold_sprint/up(client/user)
var/mob/living/L = user.mob
L.sprint_hotkey(FALSE)
return TRUE
/datum/keybinding/living/toggle_sprint
hotkey_keys = list()
name = "toggle_sprint"
full_name = "Sprint (toggle)"
description = "Press to toggle sprint"
category = CATEGORY_MOVEMENT
/datum/keybinding/living/toggle_sprint/can_use(client/user)
return ishuman(user.mob) || iscyborg(user.mob)
/datum/keybinding/living/toggle_sprint/down(client/user)
var/mob/living/L = user.mob
L.default_toggle_sprint(TRUE)
return TRUE
/datum/keybinding/mob/toggle_move_intent
hotkey_keys = list("Alt")
name = "toggle_move_intent"
full_name = "Hold to toggle move intent"
description = "Held down to cycle to the other move intent, release to cycle back"
category = CATEGORY_MOVEMENT
/datum/keybinding/mob/toggle_move_intent/down(client/user)
var/mob/M = user.mob
M.toggle_move_intent()
return TRUE
/datum/keybinding/mob/toggle_move_intent/up(client/user)
var/mob/M = user.mob
M.toggle_move_intent()
return TRUE
/datum/keybinding/mob/toggle_move_intent_alternative
hotkey_keys = list("Unbound")
name = "toggle_move_intent_alt"
full_name = "press to cycle move intent"
description = "Pressing this cycle to the opposite move intent, does not cycle back"
category = CATEGORY_MOVEMENT
/datum/keybinding/mob/toggle_move_intent_alternative/down(client/user)
var/mob/M = user.mob
M.toggle_move_intent()
return TRUE