client
show_popup_menus = 0
var
image/cursor
MouseDown(atom/a, turf/t, control, params)
params = params2list(params)
if("right" in params)
src.RightClick(t, text2num(params["icon-x"]), text2num(params["icon-y"]))
else
return ..()
proc
RightClick(atom/movable/o, icon_x, icon_y)
if(src.cursor)
del src.cursor
if(!o)
return
if(istype(o))
icon_x += o.step_x + o.pixel_x
icon_y += o.step_y + o.pixel_y
o = o.loc
src.cursor = image('mover.dmi', o)
o.pixel_x = icon_x - 16
o.pixel_y = icon_y - 16
src << src.cursor
Problem description:
Reference: https://gyazo.com/055c6b9f252239d8198934a6352d00b3
Turf moves when clicked by the cursor.
Because you are changing the turf's pixel_x and y. if you right click on the turf.