Files
Bubberstation/code/datums/keybinding/living.dm
T
c728a702c6 [MIRROR] Adds a keybind for resting (#848)
* Adds a keybind for resting (#53709)

Adds a keybind for resting, it's odd that there's bind for all the UI buttons such as Resist, Throw, Drop but there isn't one for resting. The default key is now U

* Adds a keybind for resting

Co-authored-by: Azarak <azarak10@gmail.com>
2020-09-17 15:04:34 +02:00

77 lines
1.8 KiB
Plaintext

/datum/keybinding/living
category = CATEGORY_HUMAN
weight = WEIGHT_MOB
/datum/keybinding/living/can_use(client/user)
return isliving(user.mob)
/datum/keybinding/living/resist
hotkey_keys = list("B")
name = "resist"
full_name = "Resist"
description = "Break free of your current state. Handcuffed? on fire? Resist!"
keybind_signal = COMSIG_KB_LIVING_RESIST_DOWN
/datum/keybinding/living/resist/down(client/user)
. = ..()
if(.)
return
var/mob/living/L = user.mob
L.resist()
return TRUE
/datum/keybinding/living/look_up
hotkey_keys = list("L")
name = "look up"
full_name = "Look Up"
description = "Look up at the next z-level. Only works if directly below open space."
keybind_signal = COMSIG_KB_LIVING_LOOKUP_DOWN
/datum/keybinding/living/look_up/down(client/user)
. = ..()
if(.)
return
var/mob/living/L = user.mob
L.look_up()
return TRUE
/datum/keybinding/living/look_up/up(client/user)
var/mob/living/L = user.mob
L.end_look_up()
return TRUE
/datum/keybinding/living/look_down
hotkey_keys = list(";")
name = "look down"
full_name = "Look Down"
description = "Look down at the previous z-level. Only works if directly above open space."
keybind_signal = COMSIG_KB_LIVING_LOOKDOWN_DOWN
/datum/keybinding/living/look_down/down(client/user)
. = ..()
if(.)
return
var/mob/living/L = user.mob
L.look_down()
return TRUE
/datum/keybinding/living/look_down/up(client/user)
var/mob/living/L = user.mob
L.end_look_down()
return TRUE
/datum/keybinding/living/rest
hotkey_keys = list("U")
name = "rest"
full_name = "Rest"
description = "Lay down, or get up."
keybind_signal = COMSIG_KB_LIVING_REST_DOWN
/datum/keybinding/living/rest/down(client/user)
. = ..()
if(.)
return
var/mob/living/living_mob = user.mob
living_mob.lay_down()
return TRUE