diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index 3f6758c6ad..e55323fb3a 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -162,6 +162,12 @@ update_icon() return 1 +/obj/screen/zone_sel/proc/set_selected_zone(bodypart) + var/old_selecting = selecting + selecting = bodypart + if(old_selecting != selecting) + update_icon() + /obj/screen/zone_sel/update_icon() overlays.Cut() overlays += image('icons/mob/zone_sel.dmi', "[selecting]") diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 57ad0859e1..714bde7096 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1017,3 +1017,47 @@ mob/proc/yank_out_object() /mob/proc/is_muzzled() return 0 + +/client/proc/check_has_body_select() + return mob && mob.hud_used && istype(mob.zone_sel, /obj/screen/zone_sel) + +/client/verb/body_toggle_head() + set name = "body-toggle-head" + set hidden = 1 + toggle_zone_sel(list(BP_HEAD, O_EYES, O_MOUTH)) + +/client/verb/body_r_arm() + set name = "body-r-arm" + set hidden = 1 + toggle_zone_sel(list(BP_R_ARM,BP_R_HAND)) + +/client/verb/body_l_arm() + set name = "body-l-arm" + set hidden = 1 + toggle_zone_sel(list(BP_L_ARM,BP_L_HAND)) + +/client/verb/body_chest() + set name = "body-chest" + set hidden = 1 + toggle_zone_sel(list(BP_TORSO)) + +/client/verb/body_groin() + set name = "body-groin" + set hidden = 1 + toggle_zone_sel(list(BP_GROIN)) + +/client/verb/body_r_leg() + set name = "body-r-leg" + set hidden = 1 + toggle_zone_sel(list(BP_R_LEG,BP_R_FOOT)) + +/client/verb/body_l_leg() + set name = "body-l-leg" + set hidden = 1 + toggle_zone_sel(list(BP_L_LEG,BP_L_FOOT)) + +/client/proc/toggle_zone_sel(list/zones) + if(!check_has_body_select()) + return + var/obj/screen/zone_sel/selector = mob.zone_sel + selector.set_selected_zone(next_in_list(mob.zone_sel.selecting,zones)) \ No newline at end of file diff --git a/interface/skin.dmf b/interface/skin.dmf index be23750148..7c92a788c1 100644 --- a/interface/skin.dmf +++ b/interface/skin.dmf @@ -215,6 +215,34 @@ macro "borghotkeymode" name = "CTRL+Z" command = "Activate-Held-Object" is-disabled = false + elem + name = "NUMPAD1" + command = "body-r-leg" + is-disabled = false + elem + name = "NUMPAD2" + command = "body-groin" + is-disabled = false + elem + name = "NUMPAD3" + command = "body-l-leg" + is-disabled = false + elem + name = "NUMPAD4" + command = "body-r-arm" + is-disabled = false + elem + name = "NUMPAD5" + command = "body-chest" + is-disabled = false + elem + name = "NUMPAD6" + command = "body-l-arm" + is-disabled = false + elem + name = "NUMPAD8" + command = "body-toggle-head" + is-disabled = false elem name = "F1" command = "adminhelp" @@ -409,6 +437,34 @@ macro "macro" name = "CTRL+Z" command = "Activate-Held-Object" is-disabled = false + elem + name = "CTRL+NUMPAD1" + command = "body-r-leg" + is-disabled = false + elem + name = "CTRL+NUMPAD2" + command = "body-groin" + is-disabled = false + elem + name = "CTRL+NUMPAD3" + command = "body-l-leg" + is-disabled = false + elem + name = "CTRL+NUMPAD4" + command = "body-r-arm" + is-disabled = false + elem + name = "CTRL+NUMPAD5" + command = "body-chest" + is-disabled = false + elem + name = "CTRL+NUMPAD6" + command = "body-l-arm" + is-disabled = false + elem + name = "CTRL+NUMPAD8" + command = "body-toggle-head" + is-disabled = false elem name = "F1" command = "adminhelp" @@ -691,6 +747,34 @@ macro "hotkeymode" name = "CTRL+Z" command = "Activate-Held-Object" is-disabled = false + elem + name = "NUMPAD1" + command = "body-r-leg" + is-disabled = false + elem + name = "NUMPAD2" + command = "body-groin" + is-disabled = false + elem + name = "NUMPAD3" + command = "body-l-leg" + is-disabled = false + elem + name = "NUMPAD4" + command = "body-r-arm" + is-disabled = false + elem + name = "NUMPAD5" + command = "body-chest" + is-disabled = false + elem + name = "NUMPAD6" + command = "body-l-arm" + is-disabled = false + elem + name = "NUMPAD8" + command = "body-toggle-head" + is-disabled = false elem name = "F1" command = "adminhelp" @@ -881,6 +965,34 @@ macro "borgmacro" name = "CTRL+Z" command = "Activate-Held-Object" is-disabled = false + elem + name = "CTRL+NUMPAD1" + command = "body-r-leg" + is-disabled = false + elem + name = "CTRL+NUMPAD2" + command = "body-groin" + is-disabled = false + elem + name = "CTRL+NUMPAD3" + command = "body-l-leg" + is-disabled = false + elem + name = "CTRL+NUMPAD4" + command = "body-r-arm" + is-disabled = false + elem + name = "CTRL+NUMPAD5" + command = "body-chest" + is-disabled = false + elem + name = "CTRL+NUMPAD6" + command = "body-l-arm" + is-disabled = false + elem + name = "CTRL+NUMPAD8" + command = "body-head-toggle" + is-disabled = false elem name = "F1" command = "adminhelp"