Skip to content

Commit

Permalink
Makes the radial menu for all medicine fit all limbs. (#15516)
Browse files Browse the repository at this point in the history
  • Loading branch information
MLGTASTICa authored and homexp13 committed Jul 19, 2024
1 parent f03e6a0 commit 52bf9e8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
4 changes: 3 additions & 1 deletion code/_onclick/hud/radial.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down
14 changes: 7 additions & 7 deletions code/modules/radial/radial_body_select.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 52bf9e8

Please sign in to comment.