From 52bf9e8f3c5fbb32b08b4ceebc706c5c444b8c12 Mon Sep 17 00:00:00 2001 From: MLGTASTICa <61350382+MLGTASTICa@users.noreply.github.com> Date: Fri, 5 Apr 2024 22:52:15 +0200 Subject: [PATCH] Makes the radial menu for all medicine fit all limbs. (#15516) --- code/_onclick/hud/radial.dm | 4 +++- code/modules/radial/radial_body_select.dm | 14 +++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/code/_onclick/hud/radial.dm b/code/_onclick/hud/radial.dm index 94a0e95b7a8..18902dfa283 100644 --- a/code/_onclick/hud/radial.dm +++ b/code/_onclick/hud/radial.dm @@ -292,7 +292,7 @@ GLOBAL_LIST_EMPTY(radial_menus) Choices should be a list where list keys are movables or text used for element names and return value and list values are movables/icons/images used for element icons */ -/proc/show_radial_menu(mob/user, atom/anchor, list/choices, uniqueid, radius, datum/callback/custom_check, require_near = FALSE, tooltips = FALSE) +/proc/show_radial_menu(mob/user, atom/anchor, list/choices, uniqueid, radius, datum/callback/custom_check, require_near = FALSE, tooltips = FALSE, angle_override) if(!user || !anchor || !length(choices)) return if(!uniqueid) @@ -302,6 +302,8 @@ GLOBAL_LIST_EMPTY(radial_menus) return var/datum/radial_menu/menu = new + if(angle_override) + menu.min_angle = angle_override GLOB.radial_menus[uniqueid] = menu if(radius) menu.radius = radius diff --git a/code/modules/radial/radial_body_select.dm b/code/modules/radial/radial_body_select.dm index ef5310c41c9..835f3f88363 100644 --- a/code/modules/radial/radial_body_select.dm +++ b/code/modules/radial/radial_body_select.dm @@ -25,18 +25,18 @@ //the list of the above var/list/radial_options_show = list("head" = radial_options[BODY_ZONE_HEAD], "chest" = radial_options[BODY_ZONE_CHEST], - "groin" = radial_options[BODY_ZONE_PRECISE_GROIN], - "Larm" = radial_options[BODY_ZONE_L_ARM], - "Lhand" = radial_options[BODY_ZONE_PRECISE_L_HAND], "Rarm" = radial_options[BODY_ZONE_R_ARM], "Rhand" = radial_options[BODY_ZONE_PRECISE_R_HAND], - "Lleg" = radial_options[BODY_ZONE_L_LEG], - "Lfoot" = radial_options[BODY_ZONE_PRECISE_L_FOOT], "Rleg" = radial_options[BODY_ZONE_R_LEG], - "Rfoot" = radial_options[BODY_ZONE_PRECISE_R_FOOT]) + "Rfoot" = radial_options[BODY_ZONE_PRECISE_R_FOOT], + "Lfoot" = radial_options[BODY_ZONE_PRECISE_L_FOOT], + "Lleg" = radial_options[BODY_ZONE_L_LEG], + "Lhand" = radial_options[BODY_ZONE_PRECISE_L_HAND], + "Larm" = radial_options[BODY_ZONE_L_ARM], + "groin" = radial_options[BODY_ZONE_PRECISE_GROIN]) var/datum/limb/affecting = null - var/choice = show_radial_menu(doctor, H, radial_options_show, null, 48, null, TRUE) + var/choice = show_radial_menu(doctor, H, radial_options_show, null, 48, null, TRUE, null, 30) switch(choice) if("head") affecting = H.get_limb(BODY_ZONE_HEAD)