Adds binds for targeting the eyes and mouth (#55299)

This commit is contained in:
Coffee
2020-12-10 22:17:22 -05:00
committed by GitHub
parent d7e1173c2e
commit f1e339b86d
3 changed files with 64 additions and 9 deletions

View File

@@ -61,6 +61,8 @@
#define COMSIG_KB_MOB_TOGGLEMOVEINTENT_DOWN "keybinding_mob_togglemoveintent_down"
#define COMSIG_KB_MOB_TOGGLEMOVEINTENTALT_DOWN "keybinding_mob_togglemoveintentalt_down"
#define COMSIG_KB_MOB_TARGETCYCLEHEAD_DOWN "keybinding_mob_targetcyclehead_down"
#define COMSIG_KB_MOB_TARGETEYES_DOWN "keybinding_mob_targeteyes_down"
#define COMSIG_KB_MOB_TARGETMOUTH_DOWN "keybinding_mob_targetmouth_down"
#define COMSIG_KB_MOB_TARGETRIGHTARM_DOWN "keybinding_mob_targetrightarm_down"
#define COMSIG_KB_MOB_TARGETBODYCHEST_DOWN "keybinding_mob_targetbodychest_down"
#define COMSIG_KB_MOB_TARGETLEFTARM_DOWN "keybinding_mob_targetleftarm_down"

View File

@@ -139,8 +139,8 @@
/datum/keybinding/mob/target_head_cycle
hotkey_keys = list("Numpad8")
name = "target_head_cycle"
full_name = "Target: Cycle head"
description = ""
full_name = "Target: Cycle Head"
description = "Pressing this key targets the head, and continued presses will cycle to the eyes and mouth. This will impact where you hit people, and can be used for surgery."
keybind_signal = COMSIG_KB_MOB_TARGETCYCLEHEAD_DOWN
/datum/keybinding/mob/target_head_cycle/down(client/user)
@@ -150,11 +150,39 @@
user.body_toggle_head()
return TRUE
/datum/keybinding/mob/target_eyes
hotkey_keys = list("Numpad7")
name = "target_eyes"
full_name = "Target: Eyes"
description = "Pressing this key targets the eyes. This will impact where you hit people, and can be used for surgery."
keybind_signal = COMSIG_KB_MOB_TARGETEYES_DOWN
/datum/keybinding/mob/target_eyes/down(client/user)
. = ..()
if(.)
return
user.body_eyes()
return TRUE
/datum/keybinding/mob/target_mouth
hotkey_keys = list("Numpad9")
name = "target_mouths"
full_name = "Target: Mouth"
description = "Pressing this key targets the mouth. This will impact where you hit people, and can be used for surgery."
keybind_signal = COMSIG_KB_MOB_TARGETMOUTH_DOWN
/datum/keybinding/mob/target_mouth/down(client/user)
. = ..()
if(.)
return
user.body_mouth()
return TRUE
/datum/keybinding/mob/target_r_arm
hotkey_keys = list("Numpad4")
name = "target_r_arm"
full_name = "Target: right arm"
description = ""
description = "Pressing this key targets the right arm. This will impact where you hit people, and can be used for surgery."
keybind_signal = COMSIG_KB_MOB_TARGETRIGHTARM_DOWN
/datum/keybinding/mob/target_r_arm/down(client/user)
@@ -168,7 +196,7 @@
hotkey_keys = list("Numpad5")
name = "target_body_chest"
full_name = "Target: Body"
description = ""
description = "Pressing this key targets the body. This will impact where you hit people, and can be used for surgery."
keybind_signal = COMSIG_KB_MOB_TARGETBODYCHEST_DOWN
/datum/keybinding/mob/target_body_chest/down(client/user)
@@ -182,7 +210,7 @@
hotkey_keys = list("Numpad6")
name = "target_left_arm"
full_name = "Target: left arm"
description = ""
description = "Pressing this key targets the body. This will impact where you hit people, and can be used for surgery."
keybind_signal = COMSIG_KB_MOB_TARGETLEFTARM_DOWN
/datum/keybinding/mob/target_left_arm/down(client/user)
@@ -196,7 +224,7 @@
hotkey_keys = list("Numpad1")
name = "target_right_leg"
full_name = "Target: Right leg"
description = ""
description = "Pressing this key targets the right leg. This will impact where you hit people, and can be used for surgery."
keybind_signal = COMSIG_KB_MOB_TARGETRIGHTLEG_DOWN
/datum/keybinding/mob/target_right_leg/down(client/user)
@@ -210,7 +238,7 @@
hotkey_keys = list("Numpad2")
name = "target_body_groin"
full_name = "Target: Groin"
description = ""
description = "Pressing this key targets the groin. This will impact where you hit people, and can be used for surgery."
keybind_signal = COMSIG_KB_MOB_TARGETBODYGROIN_DOWN
/datum/keybinding/mob/target_body_groin/down(client/user)
@@ -224,7 +252,7 @@
hotkey_keys = list("Numpad3")
name = "target_left_leg"
full_name = "Target: left leg"
description = ""
description = "Pressing this key targets the left leg. This will impact where you hit people, and can be used for surgery."
keybind_signal = COMSIG_KB_MOB_TARGETLEFTLEG_DOWN
/datum/keybinding/mob/target_left_leg/down(client/user)

View File

@@ -336,7 +336,8 @@
add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/gravity, multiplicative_slowdown=speed_change)
//bodypart selection verbs - Cyberboss
//8:repeated presses toggles through head - eyes - mouth
//8: repeated presses toggles through head - eyes - mouth
//9: eyes 8: head 7: mouth
//4: r-arm 5: chest 6: l-arm
//1: r-leg 2: groin 3: l-leg
@@ -349,6 +350,8 @@
*
* (bound to 8) - repeated presses toggles through head - eyes - mouth
*/
///Hidden verb to target the head, bound to 8
/client/verb/body_toggle_head()
set name = "body-toggle-head"
set hidden = TRUE
@@ -368,6 +371,28 @@
var/atom/movable/screen/zone_sel/selector = mob.hud_used.zone_select
selector.set_selected_zone(next_in_line, mob)
///Hidden verb to target the eyes, bound to 7
/client/verb/body_eyes()
set name = "body-eyes"
set hidden = TRUE
if(!check_has_body_select())
return
var/atom/movable/screen/zone_sel/selector = mob.hud_used.zone_select
selector.set_selected_zone(BODY_ZONE_PRECISE_EYES, mob)
///Hidden verb to target the mouth, bound to 9
/client/verb/body_mouth()
set name = "body-mouth"
set hidden = TRUE
if(!check_has_body_select())
return
var/atom/movable/screen/zone_sel/selector = mob.hud_used.zone_select
selector.set_selected_zone(BODY_ZONE_PRECISE_MOUTH, mob)
///Hidden verb to target the right arm, bound to 4
/client/verb/body_r_arm()
set name = "body-r-arm"