mob/
var/in_rmb_menu = null
..()
obj/screen/rmb_menu
name = "fancy RMB menu"
screen_loc = "1,1"
layer = 999
mouse_opacity = 2
atom/proc/advanced_rmb(var/atom/A,var/params)
if (usr.in_rmb_menu)
close_menu()
usr.in_rmb_menu = null
return 0
var/turf/CT = get_turf(A)
var/list/OL = list()
for (var/atom/CA in CT)
if (usr in oviewers(A))
OL += CA
draw_menu(OL,"object_list",params)
return 1
atom/proc/draw_menu(var/OL,var/mode,var/params)
var/list/PRM = params2list(params)
var/sector = 0
var/R = 0
var/counter = 0
var/list/VL = list()
var/obj/screen/rmb_menu/RMBmenu = new /obj/screen/rmb_menu
usr.in_rmb_menu = RMBmenu
RMBmenu.screen_loc = PRM.screen-loc
usr << image(icon='fancy_hud/rmb.dmi',icon_state="close",RMBmenu, pixel_x = -8, pixel_y = -8)
switch(mode)
if ("object_list")
sector = 360/(OL.len)
R = 8 + (Ol.len)*2
counter = 0
for (var/atom/A in OL)
usr << image(icon='fancy_hud/rmb.dmi',icon_state="element",RMBmenu, pixel_x = R*cos(counter*(2*M_PI/(OL.len)))-8, pixel_y = R*sin(counter*(2*M_PI/(OL.len)))-8)
usr << image(icon=A.icon.scale(16,16),icon_state=A.icon_state,RMBmenu, pixel_x = R*cos(counter*(2*M_PI/(OL.len)))-8, pixel_y = R*sin(counter*(2*M_PI/(OL.len)))-8)
counter++
if ("verb_list")
sector = 360/(OL.len)
R = 8 + (Ol.len)*2
counter = 0
for (var/V in OL.verbs)
VL += V
Problem description:
I want to rewrite context menu into graphical on, but encountered a little problem. Which verbs are visible on RMB: src's verb list, object's, both of them? How can i manage to get list of all shown verbs?