diff --git a/code/__DEFINES/keybinding.dm b/code/__DEFINES/keybinding.dm index b379ee2fa09..eacb3a02714 100644 --- a/code/__DEFINES/keybinding.dm +++ b/code/__DEFINES/keybinding.dm @@ -82,4 +82,5 @@ #define COMSIG_KB_MOVEMENT_SOUTH_DOWN "keybinding_movement_south_down" #define COMSIG_KB_MOVEMENT_WEST_DOWN "keybinding_movement_west_down" #define COMSIG_KB_MOVEMENT_EAST_DOWN "keybinding_movement_east_down" - +#define COMSIG_KB_MOVEMENT_ZLEVEL_MOVEUP_DOWN "keybinding_mob_zlevel_moveup_down" +#define COMSIG_KB_MOVEMENT_ZLEVEL_MOVEDOWN_DOWN "keybinding_mob_zlevel_movedown_down" diff --git a/code/datums/keybinding/mob.dm b/code/datums/keybinding/mob.dm index 6ab54b84245..8fe6cb212d6 100644 --- a/code/datums/keybinding/mob.dm +++ b/code/datums/keybinding/mob.dm @@ -21,7 +21,7 @@ return TRUE /datum/keybinding/mob/swap_hands - hotkey_keys = list("X", "Northeast") // PAGEUP + hotkey_keys = list("X") name = "swap_hands" full_name = "Swap hands" description = "" @@ -36,7 +36,7 @@ return TRUE /datum/keybinding/mob/activate_inhand - hotkey_keys = list("Z", "Southeast") // Southeast = PAGEDOWN + hotkey_keys = list("Z") name = "activate_inhand" full_name = "Activate in-hand" description = "Uses whatever item you have inhand" diff --git a/code/datums/keybinding/movement.dm b/code/datums/keybinding/movement.dm index e290ca898e0..1fd932f5bfc 100644 --- a/code/datums/keybinding/movement.dm +++ b/code/datums/keybinding/movement.dm @@ -29,3 +29,31 @@ 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) + . = ..() + 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) + . = ..() + if(.) + return + user.mob.down() + return TRUE